Skip to main content
POST
Create a message (Anthropic Messages, translated to the upstream's Chat Completions); `stream: true` answers with server-sent events

Authorizations

Authorization
string
header
required

ak_… project API key (or x-api-key)

Body

application/json

Rejected with 400 unsupported_parameter: top_k, server tools, document blocks, container, mcp_servers, and any field not listed here.

model
string
required

Public model ID, e.g. a1 (A-05)

Minimum string length: 1
Example:

"a1"

messages
object[]
required
Required array length: 1 - 10000 elements
max_tokens
integer
required

Required. 1…the model's max_output_tokens

Required range: x >= 1
system
tools
object[]
Maximum array length: 128
temperature
number

0–1 (Anthropic's range)

Required range: 0 <= x <= 1
top_p
number
Required range: 0 <= x <= 1
stop_sequences
string[]
Maximum array length: 4
tool_choice
object
thinking

budget_tokens maps to a reasoning effort; output_config.effort wins

Available options:
false
output_config
object
top_k
integer

Rejected: 400 unsupported_parameter

stream
boolean

Default false

include_reasoning
boolean

false drops thinking blocks from the output

policy_ids
string[] | null

Antara extension: published policies to add for this request

Maximum array length: 20
Required string length: 1 - 120
metadata
object
service_tier
string
context_management
any

Response

application/json when stream is false; otherwise text/event-stream: event: <type> + data: <MessageStreamEvent>, ending with message_stop

id
string
required
Pattern: ^msg_[0-9a-f]{32}$
Example:

"msg_0193a6c2e7b47c3d9f1e2a4b5c6d7e8f"

type
enum<string>
required
Available options:
message
role
enum<string>
required
Available options:
assistant
model
string
required
Example:

"a1"

content
object[]
required
stop_reason
enum<string> | null
required
Available options:
end_turn,
max_tokens,
stop_sequence,
tool_use,
refusal,
null
stop_sequence
string | null
required
usage
object
required