Skip to main content
POST
Create message

Authorizations

Authorization
string
header
required

Project customer key. Requires the permission for the requested endpoint.

Headers

anthropic-version
string
default:2023-06-01

Messages protocol version.

anthropic-beta
string

Model-supported beta protocol flags.

Maximum string length: 512
X-Limitless-Session-ID
string

Optional cache-affinity hint, isolated to this organization and project. X-Abliteration-Session-ID is accepted for compatibility.

Required string length: 1 - 512

Body

application/json

Model-dependent request fields. Read the compatibility guide for supported combinations and limits.

model
string
required
Required string length: 1 - 200
max_tokens
integer
required

Positive output bound; limited by the model’s configured maximum. Chat/Responses default to 1,024 when omitted. Send exactly one output-bound field.

Required range: 1 <= x <= 999990
messages
object[]
required
Minimum array length: 1
system
stream
boolean
default:false
temperature
number | null
top_p
number | null
top_k
integer | null
stop_sequences
string[] | null
tools
object[] | null

Chat: function tools. Responses: functions and supported web_search aliases. Messages: custom functions, web_search_2025_03_05 and web_fetch_2025_03_05. See the tools guide.

tool_choice
object | null
thinking
object | null
output_config
object | null
context_management
object | null
metadata
object | null
service_tier
enum<string> | null
Available options:
auto,
standard_only
policy_ids
string[]

Published Limitless policy IDs. These add to automatically attached policies; provider IDs are not accepted.

Maximum array length: 1000
Required string length: 1 - 120

Response

Successful response.

id
string
required
Pattern: ^msg_
content
object[]
required
model
string
required
stop_reason
enum<string> | null
required
Available options:
end_turn,
max_tokens,
stop_sequence,
tool_use
usage
object
required
type
string
default:message
Allowed value: "message"
role
string
default:assistant
Allowed value: "assistant"
stop_sequence
string | null