Core Concepts
Unified API
One schema for chat, everywhere it goes.
Every provider ships a different chat interface. The unified API collapses them into a single, OpenAI-style contract so the code you write today still works after a provider swap.
The request shape
{
"provider": "auto",
"model": "auto",
"messages": [
{ "role": "system", "content": "You answer in short, plain sentences." },
{ "role": "user", "content": "Summarize this thread." }
],
"temperature": 0.7,
"max_tokens": 1024,
"stream": false
}| Field | Type | Notes |
|---|---|---|
| provider | string | auto routes automatically. See Provider IDs. |
| model | string | auto picks from the provider's defaults. |
| messages | array | role and content; optional name per message. |
| temperature | number | Defaults to 0.7. |
| max_tokens | number | Caps the completion. |
| stream | boolean | Set true for SSE chunks. |
What is not in the contract
- Provider-specific knobs (stop sequences, thinking budgets) are not surfaced in v1.
- Messages use flat strings only — image inputs are on the roadmap.
- There is no per-provider auth: one key is the only credential.
Backwards compatibility
The response shape follows the OpenAI Chat Completion format deliberately, so existing OpenAI-compatible client code parses it without changes. Fields providers add are dropped during normalization, never spliced in.