Anthropic Messages format. Accepts every model in the catalog except OpenAI ones. Claude goes to Anthropic directly and other models are routed through OpenRouter; see endpoint compatibility.
Request
Model ID from the catalog, for example claude-haiku-4.5. Append -serv-kronos or -serv-multipath to enable Kronos or Multipath.
Maximum number of tokens to generate. Required by the Messages format. SERV may lower it when your balance is low; see low balance.
The system prompt. SERV requires one.
The conversation so far. Each entry has a role (user or assistant) and content.
Extended thinking controls, for example { "type": "enabled", "budget_tokens": 1024 }.
Tool definitions, in Anthropic format: { name, input_schema }.
{ "type": "auto" }, { "type": "any" }, or { "type": "tool", "name": "..." } to force a named tool.
Sequences that stop generation.
Stream the response as server-sent events.
Other Anthropic Messages parameters are forwarded to the model, with these exceptions:
service_tier and speed are removed, since requests are billed at the standard rate.
metadata is not forwarded.
web_search_options, plugins, models, route and mcp_servers are rejected with a 400.
- Claude models accept custom tools plus the Anthropic web search (
web_search_20250305, web_search_20260209 or web_search_20260318), web fetch, bash, text editor, computer use and memory tools, with at most one web search tool and one web fetch tool. Other models accept custom tools only. Any other tool type, such as code execution, returns a 400.
Response
Unique identifier for the message.
Output blocks. Find the block with type: "text" for the generated text.
Why generation ended. Common values: end_turn, max_tokens, stop_sequence, tool_use.
Token counts: input_tokens, output_tokens.