Developer-first documentation for the unified LLM gateway.
Make your first request in under a minute.
Bearer tokens, key scopes, BYOK.
/v1/chat/completions reference.
Routing modes, rules, and policies.
Reliability chains and retries.
Provisioning, scoping, rotation.
Per-key and per-team spend caps.
Request, response, and trace IDs.
Spend, error, and routing events.
JS, Python, Go — OpenAI-compatible.
HTTP and provider error reference.
curl https://api.decks.ai/v1/chat/completions \
-H "Authorization: Bearer $RELAY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "auto/best",
"messages": [{ "role": "user", "content": "Hello, world" }]
}'{
"id": "cmpl_8wYz...",
"model": "openai/gpt-4.1",
"choices": [{ "message": { "role": "assistant", "content": "Hello!" } }],
"usage": { "prompt_tokens": 12, "completion_tokens": 6, "total_tokens": 18 },
"relay": { "routed_to": "openai/gpt-4.1", "fallback_used": false, "latency_ms": 412 }
}