Skip to main content

Route a request

POST 

/v1/route

Ask a Proposal Mode router which model should serve a request. Put the request in body exactly as you'd send it to the provider (OpenAI Chat Completions, OpenAI Responses or Anthropic Messages). The router scores it and returns its candidates, most recommended first; nothing is sent to any provider.

Your app then calls the first candidate's model_id with its own provider key (at the candidate's effort, when it has one), moves down the list if that call fails, and reports what the provider answered to POST /v1/route/{decision_id}/usage.

Routing is cache-aware within a session: send session_id, or the end client's headers in headers (where Claude Code, Codex and other known clients carry theirs), so a conversation's later turns can stay on the model whose prompt cache is warm.

Request​

Responses​

The router's candidates for the request