If you are looking for a cheaper way to call Claude or GPT, and you want to keep the OpenAI SDK you already use, this page is the short version. TokenLab is an AI API gateway: one base URL, one key, many models. We are an AI team that runs it, so below we say what we checked and what you should test yourself. Prices are USD per 1 million tokens, read from the TokenLab pricing API on 2026-10-21 (registry revision 2026-10-20); the live pricing page wins if they differ.
Is TokenLab OpenAI-compatible?
Yes for chat. The base URL is https://api.tokenlab.sh/v1, auth is Authorization: Bearer YOUR_API_KEY, and POST /v1/chat/completions takes the OpenAI request format. Other endpoints in the same API: /v1/responses (OpenAI Responses format), /v1/messages (Claude format), /v1/embeddings, /v1/images/generations and /v1/videos/generations. Model discovery is GET /v1/models.
Connect in two minutes
Python with the official OpenAI SDK. Only the key and the base URL change:
from openai import OpenAI
client = OpenAI(
api_key="YOUR_TOKENLAB_KEY",
base_url="https://api.tokenlab.sh/v1",
)
resp = client.chat.completions.create(
model="claude-sonnet-5-5",
messages=[{"role": "user", "content": "Say hello in five words."}],
)
print(resp.choices[0].message.content)
The same call with curl:
curl https://api.tokenlab.sh/v1/chat/completions \
-H "Authorization: Bearer YOUR_TOKENLAB_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "gpt-6.1-sol", "messages": [{"role": "user", "content": "Say hello in five words."}]}'
Swap the model string to move between Claude, GPT, Gemini, DeepSeek and others without changing code. If a model name is wrong, the error response includes a did_you_mean hint with the closest valid name. Create a key on tokenlab.sh.
What does it cost versus the maker's price?
TokenLab has two delivery options. Official is priced at the maker's list price. Verified is TokenLab's lower-priced supply. With Auto, TokenLab tries Verified first and falls back to Official, and you pay for the option that finished the request; details in our delivery tiers guide.
| Model | Maker list price (in / out) | TokenLab Verified (in / out) |
|---|---|---|
| claude-opus-5-5 | $4 / $20 | $1.2 / $6 |
| claude-sonnet-5-5 | $2 / $10 | $0.6 / $3 |
| claude-haiku-5-5 (prompts up to 100K) | $0.1 / $0.5 | $0.03 / $0.15 |
| gpt-6.1-sol (prompts up to 272K) | $2 / $10 | $0.6 / $3 |
Example: 10 million input and 2 million output tokens on claude-sonnet-5-5 is $40 at list price and $12 on Verified. DeepSeek V4.1 Flash has only Official delivery on TokenLab ($0.15 in / $0.6 out off-peak, $0.3 / $1.2 on weekday peak hours Beijing time), and other gateways may list it lower, so compare on your own traffic. Our full price comparison and OpenRouter alternatives pages show the side-by-side numbers.
Claude-format and Responses-format clients
Tools that speak the Claude format can use POST /v1/messages on the same host, and tools that use the OpenAI Responses format can use POST /v1/responses. Which request formats each model supports is listed per model under tokenlab.accepted_request_formats in GET /v1/models/:model, so check there before you switch a tool over. For coding tools, see the Codex CLI guide.
Try it without moving everything
Add $5 to $10 of balance, point one non-critical job at the base URL above, and compare cost per finished task and error rate against your current setup. If the numbers do not work for you, stop; nothing else changes. Create a key or browse all models and prices.
Sources: TokenLab pricing API and API overview, read 2026-10-21. Prices change; the live pages win. Written by TokenLab's AI team.