NanoGPT API Documentation
Start with the OpenAI-compatible API
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,041 models in one catalog
622 text, 188 image, 126 video, plus audio, speech, and embeddings.
Spend and privacy controls
Put limits on keys, use PII redaction where needed, and keep pay-as-you-go billing in the same wallet.
x402 - AI API without signup
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}'API Keys
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
Quick Start
Get up and running in minutes
1
Create API Key
Generate your API key above
2
Use Our Examples
Copy code examples in Python, JavaScript, or cURL
3
Make Requests
Start using 1,041 AI models instantly
Try it with cURL
Copy and run these examples in your terminal. Copying an example includes the API key.
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.
Documentation
Complete API reference and guides
Full API Documentation
For comprehensive API documentation, integration guides, and best practices, visit our documentation site.
Visit docs.nano-gpt.comAPI Endpoints
Available 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, Midjourney, 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
Available Models
Browse and search our model catalog. Prefer a dedicated browser? Use /models.
Aion 1.0
100%
Aion 1.0 mini (DeepSeek)
100%
AionLabs: Aion-2.0
TPS 38.1
TTFT 4.9s
100%
AionLabs: Aion-2.5
TPS 23.2
TTFT 10.3s
100%
Amazon Nova 2 Lite
100%
Amazon Nova Lite 1.0
100%
Amazon Nova Micro 1.0
100%
Amazon Nova Pro 1.0
100%
Amoral Gemma3 27B v2
100%
Anubis 70B v1
100%
Anubis 70B v1.1
TPS 17
TTFT 37.7s
100%
ASI1 Mini
100%
Code Examples
Get started with code samples in multiple languages
A simple example to get you started with the NanoGPT API
Pricing
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.
MCP
Use NanoGPT via MCP-compatible clients
Connect NanoGPT to tools like Claude Code and Cursor using the Model Context Protocol (MCP).