v1
latestOpenAPI 3.1.02026-07-2219165126.1 KBMessages
Create a message
Generate an Anthropic-compatible message response from Messages API input. Supports streaming, tool use, and multimodal content blocks.
post/v1/messages
Request body
Example request
{
"max_tokens": 512,
"messages": [
{
"content": "Draft a release note for an API latency improvement.",
"role": "user"
}
],
"model": "claude-sonnet-4.5"
}Response
JSON response when stream=false, or Anthropic-style Server-Sent Events when stream=true.
Example response
{
"content": [
{
"text": "The CAP theorem states that a distributed system can guarantee at most two of consistency, availability, and partition tolerance at the same time once network partitions are possible.",
"type": "text"
}
],
"created": 1743393600,
"id": "msg_123",
"model": "claude-sonnet-4.5",
"role": "assistant",
"stop_reason": "end_turn",
"type": "message",
"usage": {
"input_tokens": 17,
"output_tokens": 32
}
}