Docs

Build with Relay.

Developer-first documentation for the unified LLM gateway.

Quickstart

Make your first request

  1. 1Create an API key
  2. 2Set base URL to https://api.decks.ai/v1
  3. 3Choose a model (or use auto/best)
  4. 4Send a chat completion
  5. 5View logs in your dashboard
Base URL
https://api.decks.ai/v1
Authentication
Authorization: Bearer RELAY_API_KEY
Endpoint
POST /chat/completions
curl
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" }]
  }'
Response
json
{
  "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 }
}