Create a chat completion
Send a chat request through routeur.ai. The request body is OpenAI-compatible: routing, DLP, and moderation are applied transparently by the gateway before the upstream provider sees the prompt.
POST
/v1/chat/completions
Stable
https://api.routeur.ai
Request body
model
string
required
The model to use. Pass
auto (or any other alias defined in
your routing rules) to let routeur.ai pick the upstream model.
Pass an explicit upstream model id (e.g. gpt-4o-mini,
claude-3-5-sonnet) to bypass routing and send the request
directly to that model.messages
array of object
required
Conversation history. Each item has a
role and content.temperature
number
optional · default 1
Sampling temperature passed through to the upstream provider.
stream
boolean
optional · default false
Return server-sent events when supported by the upstream provider.
Routeur headers
Routeur-Trace
true | false
optional
Append a
routeur metadata block to the response.Routeur-Dry-Run
true | false
optional
Return the route resolution without calling the upstream provider.
Returns
An OpenAI-compatible chat completion object. With Routeur-Trace: true, the response also includes a routeur block describing the route and any redactions applied.