Skip to main content
POST
Anthropic-compatible Messages endpoint. Supports OpenAI-style messages as input and can return OpenAI-style responses when response_format='openai' is provided.

Request body

MessagesRequest
string
required
Model identifier
MessageInput[]
required
Conversation messages
string
System prompt (string or content blocks)
integer,null
Maximum tokens to generate
number,null
Sampling temperature
number,null
Top-p
integer,null
Top-k
string[],null
Stop sequences (Anthropic style)
boolean
Stream response tokens
object[],null
Tool definitions (Anthropic or OpenAI format)
string
Tool choice configuration
object,null
Arbitrary metadata
string,null
Response format preference

Response

MessagesResponse
string
required
Message identifier
string
Response type
string
Assistant role
string
required
Model identifier
object[]
required
Response content blocks
string,null
Stop reason
string,null
Stop sequence
UsageInfo
required
Token usage

Status codes