NanoGPT API Documentation

1041 Total Models
622 Text Models
188 Image Models
126 Video Models
61 Audio TTS
16 STT Models
28 Embedding Models

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/v1

1,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.

Full docsAgent docs

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.

curl -X POST https://nano-gpt.com/api/v1/chat/completions \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-5.2",
    "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.

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.com

API Endpoints

Available endpoints and their capabilities

Chat Completions

POST /api/v1/chat/completions

OpenAI-compatible endpoint for text generation with streaming support

Image Generation

POST /api/generate-image

Generate images with DALL-E, Midjourney, Flux, and more

Video Generation

POST /api/generate-video

Create 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-speech

Text-to-speech and speech-to-text capabilities

Models List

GET /api/v1/models

Get 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

Max Input: 65.5K tokens
API Input: $4.00/1M
API Output: $7.99/1M

100%

Aion 1.0 mini (DeepSeek)

Max Input: 131.1K tokens
API Input: $0.80/1M
API Output: $1.39/1M

100%

AionLabs: Aion-2.0

Max Input: 131.1K tokens
API Input: $0.80/1M
API Output: $1.60/1M

TPS 38.1

TTFT 4.9s

100%

AionLabs: Aion-2.5

Max Input: 131.1K tokens
API Input: $1.00/1M
API Output: $3.00/1M

TPS 23.2

TTFT 10.3s

100%

Amazon Nova 2 Lite

Max Input: 1.0M tokens
API Input: $0.51/1M
API Output: $4.25/1M

100%

Amazon Nova Lite 1.0

Max Input: 300.0K tokens
API Input: $0.06/1M
API Output: $0.24/1M

100%

Amazon Nova Micro 1.0

Max Input: 128.0K tokens
API Input: $0.04/1M
API Output: $0.14/1M

100%

Amazon Nova Pro 1.0

Max Input: 300.0K tokens
API Input: $0.80/1M
API Output: $3.20/1M

100%

Amoral Gemma3 27B v2

Max Input: 32.8K tokens
API Input: $0.30/1M
API Output: $0.30/1M

100%

Anubis 70B v1

Max Input: 65.5K tokens
API Input: $0.31/1M
API Output: $0.31/1M

100%

Anubis 70B v1.1

Max Input: 131.1K tokens
API Input: $0.31/1M
API Output: $0.31/1M

TPS 17

TTFT 37.7s

100%

ASI1 Mini

Max Input: 128.0K tokens
API Input: $1.00/1M
API Output: $1.00/1M

100%

Code Examples

Get started with code samples in multiple languages

A simple example to get you started with the NanoGPT API

import requests

API_KEY = "YOUR_API_KEY"
BASE_URL = "https://nano-gpt.com/api/v1"

headers = {
    "Authorization": f"Bearer {API_KEY}",
    "Content-Type": "application/json"
}

# Simple chat completion
response = requests.post(
    f"{BASE_URL}/chat/completions",
    headers=headers,
    json={
        "model": "chatgpt-4o-latest",
        "messages": [
            {"role": "user", "content": "Hello, how are you?"}
        ]
    }
)

print(response.json())

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).