Skip to content
alpharouter

Docs

Chat Completions

The most widely used path. Request and response shapes match OpenAI Chat Completions, so existing code works unchanged.

Request body

Only model and messages are required. Put a routing path in model and candidates get re-picked on every request.

FieldTypeRequiredNote
modelstringYesModel ID or route path
messagesarrayYessystem, user, assistant, tool
streambooleanNoSSE deltas, default false
toolsarrayNoTool-capable models only
max_tokensintegerNoCapped by model limit
temperaturenumberNo0–2

Streaming

Set stream to true to receive deltas over SSE. Once streaming has begun there is no fallback; the request fails as-is.

Tool calls

Pass a tools array and only tool-capable models remain as candidates. If none qualify, the request stops with 400.

Image input

Mix image_url parts into content and candidates narrow to vision-capable models.

Cancelled streams and billing

Closing the connection mid-stream does not necessarily stop upstream generation. The gateway keeps reading the response to the end, within a time and output limit, and bills on the final usage the upstream reports. If a limit is hit first, it bills an estimate of what was generated up to that point.

service_tier

The service_tier parameter is accepted and ignored. Every request runs at the standard tier and is billed at standard prices.