Beta docs: the shipped API is POST /api/v1/generate for gemini and sarvam. Some pages below describe planned features. See the shipped quick start.

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

JSON
{
  "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
}
FieldTypeNotes
providerstringauto routes automatically. See Provider IDs.
modelstringauto picks from the provider's defaults.
messagesarrayrole and content; optional name per message.
temperaturenumberDefaults to 0.7.
max_tokensnumberCaps the completion.
streambooleanSet 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.