Skip to main content
POST
Create a message (Anthropic Messages API)

Authorizations

Authorization
string
header
default:YOUR_API_KEY
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
model
string
required
Example:

"glm-5.3-abliterated"

messages
object[]
required
system
max_tokens
integer

Output limit. Defaults to the model's max output.

stream
boolean
default:false
temperature
number
top_p
number
top_k
integer
stop_sequences
string[]
Maximum array length: 4
tools
object[]
tool_choice
object
thinking
object
output_config
object
reasoning_effort
enum<string>
Available options:
off,
low,
high,
max

Response

Message object, or event stream when stream=true

id
string
type
string
Example:

"message"

role
string
Example:

"assistant"

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