curl --request POST \
--url https://api.edgee.ai/v1/messages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "claude-sonnet-4.5",
"max_tokens": 1024,
"messages": [
{
"role": "user",
"content": "<string>"
}
],
"system": "<string>",
"stream": false,
"tools": [
{
"name": "<string>",
"input_schema": {},
"description": "<string>"
}
],
"tool_choice": {
"type": "auto"
}
}
'{
"id": "<string>",
"model": "<string>",
"content": [
{
"type": "text",
"text": "<string>"
}
],
"usage": {
"input_tokens": 1,
"output_tokens": 1,
"cache_read_input_tokens": 1,
"cache_creation_input_tokens": 1
},
"stop_reason": "end_turn"
}Create messages using Anthropic Messages API format
curl --request POST \
--url https://api.edgee.ai/v1/messages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "claude-sonnet-4.5",
"max_tokens": 1024,
"messages": [
{
"role": "user",
"content": "<string>"
}
],
"system": "<string>",
"stream": false,
"tools": [
{
"name": "<string>",
"input_schema": {},
"description": "<string>"
}
],
"tool_choice": {
"type": "auto"
}
}
'{
"id": "<string>",
"model": "<string>",
"content": [
{
"type": "text",
"text": "<string>"
}
],
"usage": {
"input_tokens": 1,
"output_tokens": 1,
"cache_read_input_tokens": 1,
"cache_creation_input_tokens": 1
},
"stop_reason": "end_turn"
}Creates a message using Anthropic’s native Messages API format. This endpoint provides the same API format as Anthropic’s official API, making it easy to migrate existing integrations or use Anthropic-specific features.Documentation Index
Fetch the complete documentation index at: https://www.edgee.ai/docs/llms.txt
Use this file to discover all available pages before exploring further.
Comma-separated list of tags for categorizing and filtering requests in analytics and logs. Example: production,agent,codex
Enable debug mode to include additional debugging information in the response.
Compression bundle to apply.
claude, opencode, cursor, codex Claude CLI passthrough authentication. When set, the gateway uses this key instead of x-api-key / Authorization to authenticate the request. Used by the Claude Code CLI when proxying requests through Edgee.
Claude CLI session identifier. Used to group all messages from a single CLI session in analytics.
The model ID to use (Anthropic format, without provider prefix)
"claude-sonnet-4.5"
Maximum number of tokens to generate
x >= 11024
Array of message objects
1Show child attributes
System prompt as a string
Enable streaming responses
Tool definitions
Show child attributes
Show child attributes
Message created successfully
Unique identifier for this message
The model that generated the response
Array of content blocks
Show child attributes
Show child attributes
Why the model stopped generating
end_turn, max_tokens, tool_use Was this page helpful?