v1

latestOpenAPI 3.1.02026-07-2676188241.3 KB
Anthropic

Create message (Anthropic)

Sends a structured list of input messages and generates the next message in the conversation. This is the Anthropic Messages API. Reasoning behavior mirrors the Chat Completions API: corti-s1 and corti-s1-mini generate chain-of-thought reasoning, while -instant variants do not. However, the Anthropic Messages API response does not expose reasoning as a separate field — content is returned as text blocks only.

post/messages

Headers

anthropic-versionstring required

Anthropic API version header.

Request body

model'corti-s1' | 'corti-s1-instant' | 'corti-s1-mini' | 'corti-s1-mini-instant' required
max_tokensinteger required

Maximum tokens to generate. Required by the Anthropic API.

systemstring nullable

System prompt. Equivalent to a system message in chat completions.

streamboolean

If true, returns SSE with typed events: message_start, content_block_start, content_block_delta, content_block_stop, message_delta, message_stop.

temperaturenumber float
top_pnumber float

Response

Successful response. For non-streaming requests, returns a complete message object. For streaming requests, returns Server-Sent Events (SSE) with typed events: message_start, content_block_start, content_block_delta, content_block_stop, message_delta, message_stop.

idstring

Unique message ID (e.g. chatcmpl-3e537413-...).

type'message'
role'assistant'
modelstring

The model name used for this response.

stop_reason'end_turn'

Why generation stopped.