Skip to main content

1. Create an API key

Open the Tokenless dashboard, create a key, and save it in your environment:
export TOKENLESS_API_KEY="tkl_..."
Treat this value like a provider credential. Do not commit it or expose it in browser code.

2. Call the router

Send a streaming Chat Completions request to the OpenAI-compatible endpoint:
curl https://api.usetokenless.com/openai/v1/chat/completions \
  -H "Authorization: Bearer $TOKENLESS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "tokenless-pro",
    "messages": [{"role": "user", "content": "Explain model routing in one paragraph."}],
    "stream": true
  }'
Use tokenless-max or tokenless-ultra-saver when you want a different quality and cost posture. The response remains OpenAI-shaped regardless of which underlying provider wins.

3. Save the request ID

Model responses include an X-Request-Id header. Record it in application logs and include it in support reports; it identifies the complete routed request.