Send a message to an Anthropic-compatible model and receive a response
Header | Required | Description |
---|---|---|
x-api-key | ✅ | Your Requesty API key (Anthropic format) |
Content-Type | ✅ | Must be application/json |
anthropic-version | ❌ | API version (defaults to 2023-06-01 ) |
anthropic/claude-sonnet-4-20250514
, anthropic/claude-3-7-sonnet
openai/gpt-4o
, openai/gpt-4o-mini
google/gemini-2.0-flash-exp
mistral/mistral-large-2411
, meta/llama-3.3-70b-instruct
stream: true
:
system
parameter:
200
- Success400
- Bad Request (invalid parameters)401
- Unauthorized (invalid API key)403
- Forbidden (insufficient permissions)429
- Rate Limited500
- Internal Server Errorx-api-key
header instead of Authorization: Bearer
max_tokens
: Unlike OpenAI’s API, the max_tokens
parameter is requiredsystem
parameter, not as a messageuser
and assistant
roles are supported in messages (no system
role)Your Requesty API key
The version of the Anthropic API to use
"2023-06-01"
Message response
The response is of type object
.