TOKEN documentation
TOKEN serves frontier and open models through one OpenAI-compatible API at
https://api.thetoken.dev/v1. It also accepts the Anthropic Messages format
at https://api.thetoken.dev/v1/messages, so tools such as Claude Code work
too. One key works for every model in the catalog.
| Setting | Value |
|---|---|
| Base URL (OpenAI format) | https://api.thetoken.dev/v1 |
| Base URL (Anthropic format) | https://api.thetoken.dev |
| API key | tkn_..., from the console’s API Keys page; these docs read it from TOKEN_API_KEY |
| Model names | IDs such as zai-org/glm-5.3, or aliases such as glm-5.3 (all models) |
Get started
Section titled “Get started”QuickstartCreate a key and make your first request in curl, Python or TypeScript.
API referenceEndpoints, fields and models, generated from the OpenAPI document.
Guides
Section titled “Guides”Claude CodePoint Claude Code at TOKEN with three environment variables.
CursorUse TOKEN models in Cursor's chat through the OpenAI base URL setting.
ClineThe OpenAI Compatible provider.
OpenCodeAdd TOKEN as a provider in opencode.json.
OpenAI SDKPython and TypeScript: change the base URL and the key.
LangChainChatOpenAI and OpenAIEmbeddings in Python and JavaScript.
Features
Section titled “Features”StreamingServer-sent events, with usage in the last chunk.
Tool callingOpenAI and Anthropic tool formats.
Structured outputJSON mode and JSON Schema replies.
VisionSend images to models with image input.
EmbeddingsText embeddings with BGE-M3.
Errors and rate limitsEvery status code, the exact messages, limits and retry advice.
How TOKEN works
Section titled “How TOKEN works”How routing and failover workProvider order, full precision, retries.
The us-eu-hosted privacy groupKeep requests on US and EU hosts.
Models and pricesEvery model, who serves it and what it costs.
For AI assistants: every docs page has a Markdown version at its URL
plus .md (for example /docs/quickstart.md), listed in
/llms.txt. The API is described in /openapi.json.