
Developer center
TokensChain is fully OpenAI-SDK compatible. Get multi-cloud routing, semantic caching and compliance moderation without rewriting code.
Quickstart
from openai import OpenAI
client = OpenAI(
base_url="https://api.tokenschain.io/v1",
api_key="sk-...",
)
resp = client.chat.completions.create(
model="qwen3-max",
messages=[{"role": "user", "content": "Analyze this earnings report..."}],
)
print(resp.choices[0].message.content)Core endpoints
| Method | Path | Description |
|---|---|---|
| POST | /v1/chat/completions | Chat completions with stream / tools / vision |
| POST | /v1/completions | Text completions (legacy models) |
| POST | /v1/embeddings | Embeddings: BGE / M3E / OpenAI models |
| POST | /v1/rerank | Reranking to improve RAG recall |
| POST | /v1/images/generations | Text-to-image: Flux / SD3 / Tongyi Wanxiang |
| POST | /v1/audio/transcriptions | Speech-to-text (Whisper / Paraformer) |
| GET | /v1/models | List available models and pricing |
SDKs & tools