Documentation Index
Fetch the complete documentation index at: https://docs.openserv.ai/llms.txt
Use this file to discover all available pages before exploring further.
Request
Bearer $SERV_API_KEY.Maximum number of tokens to generate. Required by the Messages format.
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 }."auto", "any", or { "type": "tool", "name": "..." }.Sequences that stop generation.
Stream the response as server-sent events.
Response
Unique identifier for the message.
Always
"message".Always
"assistant".The model used.
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.
