Create an API key
Sign in to the Customer Portal, create or rotate an API key, and store the raw key securely. It is shown only once.
Developer docs
Use OpenAI-compatible and Anthropic-compatible endpoints while Tokenok handles customer identity, provider policy, usage metering, billing records, and fallback routing.
Sign in to the Customer Portal, create or rotate an API key, and store the raw key securely. It is shown only once.
curl https://api.tokenok.net/v1/chat/completions \
-H "Authorization: Bearer $TOKENOK_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"openai/gpt-4.1-mini","messages":[{"role":"user","content":"Hello"}]}'
Use `/console`, `/me/request-logs`, `/me/billing/statement`, invoice PDFs, and CSV exports to reconcile customer usage.
Interactive FastAPI documentation is available at /api/docs.
Payment providers must POST signed paid events to `/webhooks/payments/{payment_provider}` before balance credit is applied.
SDK compatibility
from openai import OpenAI
client = OpenAI(
api_key="TOKENOK_API_KEY",
base_url="https://api.tokenok.net/v1",
)
response = client.chat.completions.create(
model="tokenok-fast",
messages=[{"role": "user", "content": "Hello from Tokenok"}],
)
Provider-specific models and aliases are controlled in the Tokenok admin console, so application code can stay stable while routing changes.
Migration checklist
Point your OpenAI-compatible client at `https://api.tokenok.net/v1` and keep the same chat completions shape.
Create a customer API key with provider and model policy, then store the raw key in your application secret manager.
Start with `model=\"tokenok-fast\"`, then test premium, coding, or provider-specific routes as volume grows.
Check request logs, balances, provider health, failed requests, and billing statements before moving production traffic.