Generate responses using Anthropic Messages-style payloads.
stream option is set to true), the response is in MIME type text/event-stream. Otherwise, the content type is application/json.
You can view the schema of the streamed sequence of chunk objects in streaming mode here.
ID of team to run requests as (optional parameter).
A list of conversation messages ordered from oldest to newest. Must contain at least one item.
1[
{
"content": "Explain top_p in one sentence.",
"role": "user"
}
]
Code of the model to use. See available model list.
"meta-llama-3.1-8b-instruct"
Maximum number of tokens to generate for the assistant response. Must be greater than 0 when provided.
x >= 1Payload format for the top-level system instruction.
Whether to stream output as server-sent events (text/event-stream). When false or omitted, returns a single JSON response.
Sampling temperature. Lower values make outputs more deterministic; higher values increase diversity.
Nucleus sampling parameter. The model samples from the smallest token set whose cumulative probability reaches top_p.
Limits sampling to the k most likely tokens at each decoding step.
Stop strings that terminate generation when matched in output. The matched value is returned in stop_sequence when applicable.
Tool definitions available to the model. Use this to allow tool calls with structured arguments.
Controls tool-calling behavior (auto, any, tool, none) and optional parallel-call behavior.
Controls reasoning behavior with mode (enabled, disabled, adaptive). enabled requires budget_tokens; disabled and adaptive must not include it.
Output generation options including effort level and structured output format settings.
Compatibility field accepted for request portability. Parsed but not used for generation.
Compatibility field accepted for request portability. Parsed but not used for generation.
Compatibility field accepted for request portability. Parsed but not used for generation.
Compatibility field accepted for request portability. Parsed but not used for generation.
Compatibility field accepted for request portability. Parsed but not used for generation.
Compatibility field accepted for request portability. Parsed but not used for generation.
Successfully generated a Messages-style response. For streaming (text/event-stream) event and chunk details, see Messages chunk object.
Unique identifier for this message response.
Response object type (message).
"message"Role of the output message author (assistant).
"assistant"Assistant output blocks in generation order.
Token usage details for this response.
Why generation stopped (end_turn, max_tokens, tool_use, stop_sequence).
end_turn, max_tokens, tool_use, stop_sequence Matched stop string when stop_reason is stop_sequence; otherwise null.
Model used to generate the response.