POST /v1/messages for Claude Code and other Anthropic-format clients - it converts requests to the internal OpenAI shape, reuses the full routing/fallback/billing pipeline, and translates the response back to the Anthropic format.
Endpoint:
Request Format
Identical to the OpenAI Chat Completions API, with optional Routor-specific fields:The model Field
Always use
"auto" unless you have a specific reason to lock to a model. To force a specific model, set "routor_profile": "direct" and pass the model ID in model.
Routor-Specific Parameters
These fields are stripped before the request is forwarded to the provider. the provider never sees them.routor_profile
"auto"(default). Routor classifies the prompt and picks the tier"tier". Use withroutor_tierto skip classification and force a specific tier"direct". Bypass routing entirely and proxy straight to the model named inmodel. Themodelfield must be a valid model ID fromGET /v1/models
routor_tier
routor_profile: "tier". Forces routing to this exact tier, bypassing classification.
Example. always use STANDARD regardless of prompt:
routor_tier_floor
routor_tier_ceiling
routor_max_cost
routor_bfcl_min
routor_code_quality / routor_chat_quality
0 = Fast (no floor), 1 = Balanced, 2 = Best.
routor_code_qualityapplies when the prompt looks like a coding task (floors: STANDARD for1, COMPLEX for2)routor_chat_qualityapplies otherwise (floors: LIGHT for1, STANDARD for2)
routor_tier_floor - the higher of the two wins.
Response Format
Identical to the OpenAI Chat Completions response, plus aroutor object with routing metadata:
model field in the response shows the actual model used, not "auto". The routor object’s model may differ from the top-level model when a fallback was used.
Response Headers
Every response includesX-Request-Id. When the server has DEBUG_ROUTING=1 set, routing metadata is also exposed in headers:
routor object in the response body (shown above) instead.