Quickstart
Request body
The request body follows the OpenAI chat completions schema. The most common fields:Model ID without any provider prefix (e.g.
gpt-4o, claude-opus-4-6,
llama-4-405b). The router resolves it to the best provider.Conversation history. Each message has
role (system, user, assistant,
or tool) and content (string or content parts for multimodal models).When
true, the response is a Server-Sent Events stream of incremental
deltas — same wire format as OpenAI.Set
{ "type": "json_object" } for JSON-mode, or { "type": "json_schema", "json_schema": {...} } for structured outputs (where supported).top_p, presence_penalty, frequency_penalty, seed, logprobs, stop, user, …) is forwarded to the provider when supported.
Response
The response is an OpenAIchat.completion object:
Streaming
Setstream: true to receive a text/event-stream of chat.completion.chunk events:
data: [DONE], exactly like OpenAI. Failover is handled before the first byte goes out — once streaming starts, the connection sticks with the chosen provider.