Router API
Chat Completions
Send a routed OpenAI-compatible chat completion request
POST
Send a chat completion request through one Dari Router. The request must use
model: "dari/routing". The router selects one enabled model and returns an OpenAI-compatible response with dari_routing metadata.
Path Parameters
Router ID.
Headers
Bearer token using a Dari API key with the
routing scope.Must be
application/json.Body
Must be
dari/routing.OpenAI-style chat messages. At least one message is required.
Set to
true to receive Server-Sent Events.Request-specific guidance for choosing between the router’s enabled models.
OpenAI-style tool definitions.
OpenAI-style tool choice.
Text, JSON object, or JSON schema response format.
Request Example
Response Fields
The selected provider model that served the request.
OpenAI-compatible chat completion choices.
Token usage when available from the selected provider.
Routing metadata.
Always
dari/routing.The selected provider model.
A short explanation for the routing decision.