Skip to main content
POST
/
anthropic
/
v1
/
messages
Anthropic Messages
curl --request POST \
  --url https://api.example.com/anthropic/v1/messages \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "<string>",
  "messages": [
    {}
  ],
  "max_tokens": 123,
  "system": "<string>",
  "stop_sequences": [
    "<string>"
  ],
  "stream": false,
  "temperature": 1,
  "top_p": 123,
  "top_k": 123,
  "metadata": {},
  "tools": [
    {
      "name": "<string>",
      "input_schema": {},
      "description": "<string>"
    }
  ],
  "tool_choice": {},
  "thinking": {
    "enabled": true
  }
}
'
{
  "detail": [
    {
      "loc": [
        "<string>"
      ],
      "msg": "<string>",
      "type": "<string>"
    }
  ]
}

Headers

authorization
string | null
x-api-key
string | null
anthropic-version
string | null
anthropic-beta
string | null
x-deepinfra-source
string | null

Body

application/json
model
string
required
messages
Messages · object[]
required
max_tokens
integer | null
system
stop_sequences
string[] | null
stream
boolean | null
default:false
temperature
number | null
default:1
top_p
number | null
top_k
integer | null
metadata
Metadata · object
tools
AnthropicTool · object[] | null
tool_choice
Tool Choice · object
thinking
AnthropicThinkingConfig · object

Response

Successful Response