Point existing clients at NanoGPT, keep your current request shape, and switch models without rewriting integrations.
Drop-in base URL
Use the official OpenAI SDK with a different base URL.
https://nano-gpt.com/api/v11,085 models in one catalog
609 text, 210 image, 155 video, plus audio, speech, and embeddings.
Text counts include each publicly listed model ID: listed aliases and thinking variants count separately. Hidden and local-only models are excluded; extra long-context pricing tiers do not count as models.
Spend and privacy controls
Put limits on keys, use PII redaction where needed, and keep pay-as-you-go billing in the same wallet.
Get up and running in minutes
2
Copy code examples in Python, JavaScript, or cURL
3
Start using 1,085 AI models instantly
Set NANOGPT_API_KEY in your terminal, then copy an example. Examples use an environment variable and never include your real key.
curl -X POST https://nano-gpt.com/api/v1/chat/completions \
-H "Authorization: Bearer $NANOGPT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "openai/gpt-5.6-sol",
"messages": [
{ "role": "user", "content": "Hello, how are you?" }
]
}'Note: when you use reasoning (thinking) models, some client software, such as LiteLLM, might fail to process reasoning content. In this case, try the https://nano-gpt.com/api/v1legacy endpoint instead of https://nano-gpt.com/api/v1. For more information, refer to the documentation.
Accountless x402 requests return a live 402 quote instead of asking for an API key, card, dashboard, or pre-funded balance.
One unauthenticated request
Supported endpoints return 402 Payment Required with payment.accepted[].
Nano and Base USDC
Use quote-and-complete rails or exact X-PAYMENT replay when a wallet signs the payment payload.
Stable matrix
GET /api/v1/x402/endpoints lists only the accountless contract enabled in the current deployment.
curl -i https://nano-gpt.com/api/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{"model":"gpt-4.1-nano","messages":[{"role":"user","content":"Say ok"}],"stream":false}'Complete API reference and guides
For comprehensive API documentation, integration guides, and best practices, visit our documentation site.
Visit docs.nano-gpt.comAvailable endpoints and their capabilities
Chat Completions
POST /api/v1/chat/completionsOpenAI-compatible endpoint for text generation with streaming support
Image Generation
POST /api/generate-imageGenerate images with DALL-E, Flux, and more
Video Generation
POST /api/generate-videoCreate videos with Kling, Veo, Hunyuan, and other providers. This endpoint is asynchronous: it returns a runId and requires polling /api/generate-video/status (include modelSlug) until completed to obtain the final video URL.
Audio & Speech
POST /api/text-to-speechText-to-speech and speech-to-text capabilities
Models List
GET /api/v1/modelsGet available models with pricing information
For the full endpoint list, see our Documentation
Browse and search our model catalog. Prefer a dedicated browser? Use /models.
Model catalog
The full searchable catalog loads when you get to it, keeping the API setup view fast.
Get started with code samples in multiple languages
Code examples
Language-specific examples load when you reach this section.
Simple, transparent pricing for all models
All prices are pay-as-you-go with no monthly fees. Prices shown are API prices per 1 million tokens for text models.
For bulk discounts, please contact our sales team or visit our Discord community.
Use NanoGPT via MCP-compatible clients
Connect NanoGPT to tools like Claude Code and Cursor using the Model Context Protocol (MCP).
Access the authenticated text API directly as a Tor Onion service.
Onion API base URL
http://nanogpt5wwal7shnauuilouj3gaewmk7lskqxdmxlbfz5ho4tdqeh2id.onion/api/v1Onion services use http:// because Tor itself authenticates and encrypts the connection. Copy the address only from an official NanoGPT page.
Supported routes
/models, /chat/completions, /responses, and /messages under /api/v1.
Resolve through Tor
Use --socks5-hostname so cURL sends the Onion hostname through the Tor proxy instead of trying local DNS.
Your regular API key
Use the same NanoGPT API key and request formats. Free models, media, batches, account routes, and the web app are not exposed here.
Start Tor locally first. Its SOCKS port is commonly 9050; change this to 9150 when using Tor Browser's proxy.
curl --socks5-hostname 127.0.0.1:9050 \
-X POST http://nanogpt5wwal7shnauuilouj3gaewmk7lskqxdmxlbfz5ho4tdqeh2id.onion/api/v1/chat/completions \
-H "Authorization: Bearer $NANOGPT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5.2",
"messages": [{ "role": "user", "content": "Hello through Tor" }]
}'