Metadata-Version: 2.4
Name: nanogpt-sdk
Version: 0.1.1
Summary: Python client for the NanoGPT API
Author: Kalen McMillan
License: MIT
Project-URL: Homepage, https://github.com/kalenmcmillan/nanogpt-sdk
Project-URL: Repository, https://github.com/kalenmcmillan/nanogpt-sdk
Project-URL: Issues, https://github.com/kalenmcmillan/nanogpt-sdk/issues
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests>=2.32.0
Dynamic: license-file

# NanoGPT SDK

A clean Python client for the [NanoGPT](https://docs.nano-gpt.com/introduction) API. 

Supports text completions, chat completions, image and video generation, and model listing.

## Installation

```
pip install nanogpt-sdk
```

## Quickstart

```python
from nanogpt import Client, BearerAuth, endpoints

# Initialize
client = Client(BearerAuth('YOUR_API_KEY'))

# Create a chat completion
response = endpoints.chat.create_completion(
    client,
    model = 'gpt-nano-1',
    messages = [
        {'role': 'system', 'content': 'You are a helpful assistant.'},
        {'role': 'user', 'content': 'Why is the sky blue?'}
    ],
    temperature = 0.7,
    max_tokens = 256
)

# Print generated text
print(response['choices'][0]['message']['content'])
```

## Endpoints

| Module                | Description                          |
| --------------------- | ------------------------------------ |
| `endpoints.chat`  | Create chat completions (OpenAI-style message schema) |
| `endpoints.completions`      | Generate free-form text completions          |
| `endpoints.models` | List available public or subscription models          |
| `endpoints.images`    | Generate images from text prompts  |
| `endpoints.videos` | Generate videos from text prompts             |

## Development

```
git clone https://github.com/kalenmcmillan/nanogpt-sdk.git
cd nanogpt-sdk
python -m pip install -e .
pytest
```
## License

MIT License © 2025 Kalen McMillan
