Skip to main content
The gateway’s main endpoint. Accepts OpenAI-format chat requests, routes to any of the 13 supported providers, streams responses back, and writes a trace to ClickHouse on the way out.

Request body

Any OpenAI field not listed above is passed through to the provider untouched.

Response body (non-streaming)

The cost object is an OpenTracy extra; the rest matches OpenAI exactly.

Response headers

Curl

TypeScript / Node (openai SDK)

Go (net/http)

Semantic auto-routing

Pass "model": "auto" and the engine picks per-prompt based on its learned cluster/error profiles:
The response headers show you which model was picked:
See /v1/route if you want the decision without generating a completion.

Streaming

Set "stream": true. Responses come back as Server-Sent Events:
The engine translates Anthropic and Bedrock event-streams into OpenAI’s SSE format, so clients don’t need per-provider logic.

Tool calls

Pass OpenAI-format tools. The engine maps them to provider-native shapes (Anthropic tools, Gemini function declarations, etc.):
The response comes back with tool_calls in the assistant message.

Errors