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,090 models in one catalog
593 text, 214 image, 160 video, 8 3D, 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.
Manage your API authentication
You can create up to 20 API keys. Need more? Contact support
No API keys yet
Create your first API key to get started
Base URL
https://nano-gpt.com/api/v1
Get up and running in minutes
2
Copy code examples in Python, JavaScript, or cURL
3
Start using 1,090 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.
Connect your editor or terminal to NanoGPT. Create a key above, then choose your coding tool. Consider a separate key with a spending limit so you can track its usage.
Open Cline settings and choose OpenAI Compatible as the API provider. Enter these values and paste your NanoGPT API key into the API key field.
Base URL
https://nano-gpt.com/api/v1Model ID
openai/gpt-5.6-solIf you use separate Plan and Act configurations, set NanoGPT in both. Start with the tool’s default generation settings.
Cline setup guideThe example uses openai/gpt-5.6-sol. Check its current pricing and your key’s billing mode before starting; browse models to choose another model that supports tools.
Verify the connection
Open a project and send this first task:
First task
Inspect this project and explain how to run its tests. Read the relevant files first. Do not edit files or run commands.You should see file-reading tool calls followed by an explanation. Review any permission requests in your coding tool. Check Usage for the request and its charge.
Set NANOGPT_API_KEY in your terminal. Copying this example keeps the environment variable placeholder.
curl 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!"}]}'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 authenticated text and image generation 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, plus /api/generate-image and its signed recovery URLs.
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. Anonymous payments, free models, video, audio, batches, account routes, and the web app are not exposed here.
Onion image-generation URL
http://nanogpt5wwal7shnauuilouj3gaewmk7lskqxdmxlbfz5ho4tdqeh2id.onion/api/generate-imageThis route sits outside the OpenAI-compatible /api/v1 base path.
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" }]
}'