POSTDocumentation Index
Fetch the complete documentation index at: https://docs.routing.run/llms.txt
Use this file to discover all available pages before exploring further.
/v1/messages accepts Anthropic Messages-style request bodies and routes them through the same routing chain as chat completions.
Do not use this as your default integration path. For apps and coding agents, prefer
/v1/chat/completions.Base URL
This endpoint is currently request-compatible, not full Anthropic SDK parity. The response returns
content as a string and includes credits_charged, so some Anthropic SDK helpers will not deserialize it exactly.Live checks against
route/glm-5.1-precision, route/qwen3.6-plus, and route/kimi-k2.5 showed another limitation: some reasoning-oriented models can return an empty content string from /v1/messages even when output tokens are billed. If you need predictable assistant text for coding agents, prefer the OpenAI-compatible endpoint.Quick setup
How it works
Anthropic-shaped requests are converted internally, run through the same routing chain as chat completions, then returned as a simplified message object.Request
Response
content is a string (assistant text) in the wire JSON. credits_charged is a routing.run extension (float credits deducted for that call). The upstream internal id is not included in this JSON response (it is logged server-side).Stop reasons
| Value | Meaning |
|---|---|
end_turn | Returned by the current adapter for normal Anthropic-style responses, including some truncated cases |
max_tokens | Documented Anthropic value, but not reliably surfaced by the current adapter |
Error handling
See Authentication for plain-text +X-Error-Code handling (same middleware stack as chat).