Create a message
Creates a message using the Anthropic Messages API format. Supports text, images, PDFs, tools, and extended thinking.
Authentication
AuthorizationBearer
API key as bearer token in Authorization header
Request
This endpoint expects an object.
model
max_tokens
messages
system
metadata
stop_sequences
stream
temperature
top_p
top_k
tools
tool_choice
thinking
service_tier
Allowed values:
provider
When multiple model providers are available, optionally indicate your routing preference.
plugins
Plugins you want to enable for this request, including their settings.
user
A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 128 characters.
session_id
A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 128 characters.
models
Response
Successful response
content
id
model
role
Allowed values:
stop_reason
stop_sequence
type
Allowed values:
usage