Docs

for chunk in client.chat.completions.create(model=MODEL, messages=msgs, stream=True):
    print(chunk.choices[0].delta.content or "", end="")

{
  "model": "anthropic/claude-sonnet-4.5",
  "models": ["openai/gpt-5-mini", "google/gemini-2.5-flash"],
  "messages": [{"role": "user", "content": "..."}]
}

vendor/model:cheap
vendor/model:fast
"route": {"sort": "latency"}

{"model": "@preset/support-bot", "messages": [{"role": "user", "content": "..."}]}

-H "X-Title: My App"

{
  "model": "MODEL_ID",
  "messages": [{"role": "user", "content": "What's the weather in Seoul?"}],
  "tools": [{
    "type": "function",
    "function": {
      "name": "get_weather",
      "description": "Current weather for a city",
      "parameters": {
        "type": "object",
        "properties": {"city": {"type": "string"}},
        "required": ["city"]
      }
    }
  }]
}

"response_format": {
  "type": "json_schema",
  "json_schema": {
    "name": "ticket",
    "strict": true,
    "schema": {
      "type": "object",
      "properties": {
        "title": {"type": "string"},
        "priority": {"type": "string", "enum": ["low", "normal", "high"]}
      },
      "required": ["title", "priority"],
      "additionalProperties": false
    }
  }
}

POST/v1/chat/completions
GET/v1/models
GET/api/models/{id}
GET/api/rankings

400
401
402
502
503