Private AI

Bitcoin.com AI logo
Bitcoin.com AI logo
Bitcoin.com AI logoBitcoin.com AI logo
 
 
 
 
All conversations

Create

Chat
Studio

Explore

Models
Pricing
AI Apps

Library

Gallery
Workspace
Usage
API
Suggestions and bugs
Terms

|

Privacy

|

Refunds
Balance
Teams
Referrals
Presets
Settings
FAQBenchmarks

API integration

One OpenAI-compatible API for 1,282 text, image, video, 3D, audio and embedding models. Create a key, point your client at the base URL, and send your first request.

Guides:

Provider routingPrompt cachingWeb search pricingReferral rules
Referrals: requests billed with provider-selection pricing or markup get no referral discount or commission.

This includes Caching mode (caching: true or a :caching suffix) and pinned providers, and can include saved preferences or routing suffixes. In Chat Completions, prompt_caching or cache_control markers can also switch models with provider selection to Caching mode. Automatic routing and automatic provider caching stay eligible.

Base URLhttps://ai.bitcoin.com/api/v1
API docs

API keys

Create a key to authenticate your API requests.

No API keys yet

Create a key with the button above, then make your first request.

Send a key as Authorization: Bearer $NANOGPT_API_KEY or x-api-key.

Scripts that only manage model presets (called as presets/<name>) or read subscription usage can use a Management API token instead, which cannot run models or spend your balance. Management API docs

Batch API

High-volume asynchronous Chat Completions and Responses API jobs.

Make your first request

Three steps from a new key to a working call.

Works with the OpenAI SDKs and OpenAI-compatible tools such as Cursor, Cline, Roo, OpenWebUI and LiteLLM. Keep your request shape and set model to a NanoGPT text model ID.

  1. 1

    Get an API key

    Create one in the API keys section above.

  2. 2

    Store it in an environment variable

    Examples read the key from NANOGPT_API_KEY and never contain it, so they are safe to copy and share.

    export NANOGPT_API_KEY="paste-your-key-here"
  3. 3

    Send a request

    curl https://ai.bitcoin.com/api/v1/chat/completions \
      -H "Authorization: Bearer $NANOGPT_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{"model":"openai/gpt-6.1-sol","messages":[{"role":"user","content":"Hello!"}]}'

    You get an OpenAI-style chat completion back; the reply is in choices[0].message.content. The request and its cost appear in Usage. To use another model, pick one from the model list and copy its API name. Full quickstart in the docs.

Client failing on reasoning (thinking) output, as some LiteLLM versions do? Use https://ai.bitcoin.com/api/v1legacy as the base URL instead.

Docs and models

Everything past the first request: every model and its API name, code examples and the full reference.

Models and prices

Search every model with its API name, context length and price, then paste the API name into your request.

  • Browse models
  • Compare prices
  • List models with GET /v1/models

Code examples

Python, JavaScript and cURL for text with streaming, images and video.

  • Text generation
  • Image generation
  • Video generation

Full documentation

Guides, every endpoint and its parameters, and the management API.

  • Open the API docs
  • Management API

API reference

The main endpoints at a glance.

Authenticate with Authorization: Bearer $NANOGPT_API_KEY or x-api-key. The Batch API covers high-volume asynchronous jobs.

EndpointPathWhat it does
Chat completions
POST
/api/v1/chat/completions
OpenAI-compatible text generation with streaming, tools and vision.
Responses
POST
/api/v1/responses
OpenAI Responses API.
Messages
POST
/api/v1/messages
Anthropic Messages API, for clients such as Claude Code.
Models
GET
/api/v1/models
Model list. Add ?detailed=true for pricing and context limits.
Images
POST
/api/v1/images/generations
OpenAI-compatible image generation. NanoGPT's native route is POST /api/generate-image.
Video
POST
/api/generate-video
Asynchronous: returns a runId. Poll /api/generate-video/status with runId and modelSlug until it completes.
Text to speech
POST
/api/v1/audio/speech
OpenAI-compatible speech synthesis.
Speech to text
POST
/api/v1/audio/transcriptions
OpenAI-compatible transcription.
Embeddings
POST
/api/v1/embeddings
OpenAI-compatible embeddings.
Reranking
POST
/api/v1/rerank
Rank text documents against a query, returning raw relevance scores and original document indexes.
Reranking models
GET
/api/v1/rerank-models
Reranking model capabilities and prices in USD per million input tokens.

Every endpoint, parameter and error code is in the full API reference.