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

Response Normalization

Every provider speaks a different dialect. One response shape comes back.

Providers disagree on response schemas — different field names, different token accounting, different error formats. Normalization maps them all onto one documented shape before anything reaches your code.

The normalized shape

JSON
{
  "id": "chatcmpl_01J8R2aKq...",
  "object": "chat.completion",
  "created": 1758432000,
  "model": "claude",
  "provider": "anthropic",
  "choices": [
    {
      "index": 0,
      "message": { "role": "assistant", "content": "Here is the summary." },
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 41,
    "completion_tokens": 23,
    "total_tokens": 64
  }
}

Field mapping

Providers call itOpenLink calls it
content blocks / text arraychoices[0].message.content (string)
output_tokensusage.completion_tokens
input_tokensusage.prompt_tokens
stop_reasonchoices[0].finish_reason

Where providers use arrays where we use strings, the first entry wins for content; the rest are dropped during normalization.

Cost is not in the response

Where cost lives

Token counts are returned, but per-request cost is reported in the dashboard and webhook events — not embedded in the response body.