Messages
Anthropic Messages–compatible endpoint on the Modellix LLM gateway. Accepts a synchronous request with model (provider/name format, typically anthropic/...), Anthropic-style messages, and required max_tokens; optional system prompt is supported. Returns a Messages JSON object by default, or SSE (text/event-stream) when stream=true. Auth accepts Authorization: Bearer or x-api-key (same Modellix API Key). Use this path for the Anthropic SDK, Claude Code, and other Anthropic-native clients; optional anthropic-version header is forwarded when present. Do not send OpenAI Chat Completions or Responses field shapes on this endpoint—use /chat/completions or /responses instead. Optional fields follow Anthropic Messages; support depends on the selected model.
Authorizations
Authorization: Bearer (OpenAI SDK, Codex, OpenCode, etc.)
Headers
Optional session affinity header. Length 8–128; alphanumeric, -, and _ only.
8 - 128^[A-Za-z0-9_-]+$"my-conversation-001"
Anthropic API version header (optional; often set automatically by native Anthropic clients; forwarded upstream when present)
"2023-06-01"
Body
Anthropic Messages request body. Requires model, messages, and max_tokens; optional system and stream. Message roles are user or assistant only.
Core fields below; other fields follow Anthropic Messages.
Model ID in provider/name form
"openai/gpt-5.5"
"openai/gpt-5.6-sol"
"anthropic/claude-sonnet-5"
"google/gemini-3.6-flash"
Anthropic Messages list (min 1). Roles are user or assistant only; put system text in system, not as a message role.
1Required. Maximum number of tokens to generate.
x >= 1Default false. When true, returns an Anthropic Messages SSE event stream.
System prompt (string or content-block array)
Response
Success. Non-streaming returns JSON; streaming returns SSE.
Shape follows Anthropic message
Unique identifier for this Anthropic message.
Object type. Typically message for Anthropic Messages.
"message"
Role of the response message. Typically assistant.
"assistant"
Model ID that produced this Anthropic message.
Array of Anthropic content blocks in the assistant reply.
Why generation stopped, or null.
Token usage object for the Anthropic Messages API. Shape follows Anthropic usage (for example input and output tokens), not Chat Completions prompt_tokens fields.