TokenByteTokenByte Docs

Quickstart

Get on TokenByte's unified API in five minutes

TokenByte exposes mainstream AI providers — OpenAI, Anthropic, Google, Mistral, and more — behind a single OpenAI-compatible endpoint. This guide takes you from zero to first call in under five minutes.

Why TokenByte

One interface

Hit every model through a single OpenAI-compatible API. Swap providers by changing one argument.

Pay-as-you-go

Upstream pricing, one-to-one. No subscriptions, no bundles, no hidden fees.

Granular controls

Per-key rate limits, model allowlists, and per-request spending caps.

Live observability

Real-time dashboards for usage, latency, and spend; fully searchable logs.

Three steps

Create an account

Head to the sign-up page. Email, GitHub, Discord, and Passkeys are all supported.

Mint an API key

Open Console → API keys and click New API key. Use one key per app or environment, and tune the rate limits to match.

Fire your first request

TokenByte's base URL is https://api.tokenbyte.ai/v1. The example below calls Claude Sonnet 4.5:

curl https://api.tokenbyte.ai/v1/chat/completions \
  -H "Authorization: Bearer $TOKENBYTE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "Claude Sonnet 4.5",
    "messages": [{"role": "user", "content": "Hello"}]
  }'
from openai import OpenAI

client = OpenAI(
    base_url="https://api.tokenbyte.ai/v1",
    api_key="YOUR_TOKENBYTE_API_KEY",
)

response = client.chat.completions.create(
    model="Claude Sonnet 4.5",
    messages=[{"role": "user", "content": "Hello"}],
)
print(response.choices[0].message.content)
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api.tokenbyte.ai/v1",
  apiKey: process.env.TOKENBYTE_API_KEY,
});

const response = await client.chat.completions.create({
  model: "Claude Sonnet 4.5",
  messages: [{ role: "user", content: "Hello" }],
});
console.log(response.choices[0].message.content);

What goes in the model field? Exactly the title shown on each card in the Models page or the Console → Models catalog — e.g. Claude Sonnet 4.5 in the snippets above. TokenByte passes the upstream name through as-is, so the card title is the model name: what you see is what you type, no mapping needed.

What's next

On this page