Skip to main content
Anthropic Messages format. Accepts Claude and most other models in the catalog — see endpoint compatibility.

Request

string
required
Bearer $SERV_API_KEY.
string
required
Model ID from the catalog, for example claude-haiku-4.5.
integer
required
Maximum number of tokens to generate. Required by the Messages format.
string
required
The system prompt. SERV requires one.
array
required
The conversation so far. Each entry has a role (user or assistant) and content.
object
Extended thinking controls, for example { "type": "enabled", "budget_tokens": 1024 }.
array
Tool definitions, in Anthropic format: { name, input_schema }.
string | object
"auto", "any", or { "type": "tool", "name": "..." }.
array
Sequences that stop generation.
boolean
default:"false"
Stream the response as server-sent events.
All other Anthropic Messages parameters are accepted and forwarded to the model.

Response

string
Unique identifier for the message.
string
Always "message".
string
Always "assistant".
string
The model used.
array
Output blocks. Find the block with type: "text" for the generated text.
string
Why generation ended. Common values: end_turn, max_tokens, stop_sequence, tool_use.
object
Token counts: input_tokens, output_tokens.