Request
string
required
Bearer $SERV_API_KEY.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.
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.
