Your first request
Create an API key, add balance, and install the official Python SDK withpip install openai.
Set NANOGPT_API_KEY in your environment. Keep the key on your server, outside source control.
Use the exact SDK base URL https://api.nano-gpt.com/api/v1. The SDK appends /chat/completions, producing POST /api/v1/chat/completions. Do not append that endpoint to base_url yourself.
Explore the API
- Chat Completions:
POST /api/v1/chat/completions - Responses:
POST /api/v1/responses - Messages:
POST /api/v1/messages - Image generation:
POST /api/v1/images/generations - Video generation: job submission and polling
- API Hosts: direct API host, partner domains and runtime limits
- Private Mode: local encryption proxy
x-x402: true on the initial unauthenticated quote request. Check GET /api/v1/x402/endpoints for the current supported matrix.