Skip to content

anthropic_messages

POST
/v1/messages
curl --request POST \
--url https://example.com/v1/messages \
--header 'Content-Type: application/json' \
--data '{ "agent_permission": null, "code_execution_permission": null, "dry_allowed_length": 1, "dry_base": 1, "dry_multiplier": 1, "dry_sequence_breakers": [ "example" ], "enable_code_execution": true, "enable_thinking": true, "files": [ "example" ], "frequency_penalty": 1, "grammar": { "type": "regex", "value": "example" }, "logit_bias": "example", "logprobs": true, "max_tokens": 1, "max_tool_rounds": 1, "messages": [ { "content": [ { "cache_control": "example", "citations": "example", "content": "example", "id": "example", "input": "example", "is_error": true, "name": "example", "signature": "example", "source": { "data": "example", "media_type": "example", "type": "example", "url": "example" }, "text": "example", "thinking": "example", "tool_use_id": "example", "type": "example" } ], "role": "example" } ], "metadata": "example", "min_p": 1, "model": "example", "presence_penalty": 1, "reasoning_effort": "example", "repetition_penalty": 1, "response_format": { "type": "text" }, "session_id": "example", "stop_sequences": [ "example" ], "stream": true, "system": "example", "temperature": 1, "thinking": { "budget_tokens": 1, "type": "example" }, "tool_choice": { "name": "example", "type": "example" }, "tools": [ { "allowed_domains": [ "example" ], "blocked_domains": [ "example" ], "description": "example", "input_schema": "example", "max_uses": 1, "name": "example", "type": "example", "user_location": { "city": "example", "country": "example", "region": "example", "timezone": "example", "type": "example" } } ], "top_k": 1, "top_logprobs": 1, "top_p": 1, "truncate_sequence": true, "web_search_options": { "extract_description": "example", "search_context_size": "low", "search_description": "example", "user_location": { "approximate": { "city": "example", "country": "example", "region": "example", "timezone": "example" }, "type": "approximate" } } }'
Media type application/json
object
agent_permission
string | null
Example
null
code_execution_permission
string | null
Example
null
dry_allowed_length
integer | null
dry_base
number | null format: float
dry_multiplier
number | null format: float
dry_sequence_breakers
Array<string> | null
enable_code_execution
boolean
enable_thinking
boolean | null
files
Array | null
frequency_penalty
number | null format: float
grammar
One of:
null
logit_bias
object | null
logprobs
boolean
max_tokens
integer | null
max_tool_rounds
integer | null
messages
required
Array<object>
object
content
required
One of:
string
role
required
string
metadata
object | null
min_p
number | null format: double
model
string
presence_penalty
number | null format: float
reasoning_effort
string | null
repetition_penalty
number | null format: float
response_format
One of:
null
session_id
string | null
stop_sequences
Array<string> | null
stream
boolean | null
system
One of:
null
temperature
number | null format: double
thinking
One of:
null
tool_choice
One of:
null
tools
Array<object> | null
object
allowed_domains
Array<string> | null
blocked_domains
Array<string> | null
description
string | null
input_schema
object | null
max_uses
integer | null
name
string | null
type
string | null
user_location
One of:
null
top_k
integer | null
top_logprobs
integer | null
top_p
number | null format: double
truncate_sequence
boolean | null
web_search_options
One of:
null

Anthropic messages

Media type application/json
object
content
required
Array<object>
object
id
string | null
input
object | null
name
string | null
text
string | null
thinking
string | null
type
required
string
id
required
string
model
required
string
role
string
stop_reason
required
string
stop_sequence
string | null
type
string
usage
required
object
input_tokens
required
integer
output_tokens
required
integer
Example generated
{
"content": [
{
"id": "example",
"input": "example",
"name": "example",
"text": "example",
"thinking": "example",
"type": "example"
}
],
"id": "example",
"model": "example",
"role": "example",
"stop_reason": "example",
"stop_sequence": "example",
"type": "example",
"usage": {
"input_tokens": 1,
"output_tokens": 1
}
}