POST /v1/messages
Anthropic-compatible Messages endpoint. Serves direct Anthropic and AWS
Bedrock for anthropic.* model ids. Streaming and tool use are
pass-through, byte-identical to upstream Anthropic.
Authentication
x-api-key: fm_live_...
anthropic-version: 2023-06-01
Request body
request json
{
"model": "claude-3-5-sonnet-latest",
"max_tokens": 256,
"system": "You are concise.",
"messages": [
{"role": "user", "content": "What is 2+2?"}
]
}Required fields
model— string. Anthropic-shape model id.messages— array of{ role: "user" | "assistant", content }.max_tokens— integer.
Optional
system,temperature,top_p,top_k.stream— boolean. Anthropic-style event stream.tools,tool_choice.
MoE on the Anthropic surface
x-fm-route works here too, but Fire Mission constrains the routed
decision to Anthropic-shape providers (Anthropic direct or AWS Bedrock with anthropic.* ids) so the request body stays compatible. If MoE
produces a non-Anthropic-shape model, the call fails with moe_routing_unavailable.
Response (non-streaming)
response json
{
"id": "msg_...",
"type": "message",
"role": "assistant",
"model": "claude-3-5-sonnet-latest",
"content": [{"type": "text", "text": "4"}],
"stop_reason": "end_turn",
"usage": {"input_tokens": 18, "output_tokens": 1}
}Errors
Errors use the Anthropic envelope ({ type: "error", error: { type, message } }).
See the errors page for Fire Mission-specific codes.