Table of Contents [expand]
Last updated February 18, 2026
Claude Sonnet 4.6 is a large language model (LLM) in Anthropic’s Claude family that supports conversational chat, tool calling, and enhanced reasoning for complex tasks with extended thinking. It’s a high-performing model designed to support enterprise applications. This version, claude-sonnet-4-6, offers better performance than the claude-4-5-sonnet model.
- Model ID:
claude-sonnet - Region:
us,eu
When to Use This Model
Claude Sonnet 4.6 is ideal for complex tasks like data processing, sales forecasting, and nuanced content generation. It’s optimized for enterprise apps and offers intelligence, speed, and advanced capabilities for agents, coding, and content generation.
Usage
Claude Sonnet 4.6 follows our Claude /v1/chat/completions API schema.
To provision access to the model, attach a Managed Inference and Agents add-on to your app $APP_NAME:
heroku addons:create heroku-inference:standard -a $APP_NAME
Using config variables, you can invoke the model in various ways:
- Heroku CLI
aiplugin (heroku ai:models:call) - curl
- Python
- Ruby
- Javascript
Multimodal Support
- Supported inputs:
text,image - Supported outputs:
text
Rate Limits
- Maximum requests per minute: 150
- Maximum tokens per minute: 800,000
Prompt Caching
Prompt caching is supported for system prompts and tools. The minimum tokens required for prompt caching is 1,024.
Example curl Requests
To retrieve and export your API credentials:
export INFERENCE_KEY=$(heroku config:get -a $APP_NAME INFERENCE_KEY)
export INFERENCE_URL=$(heroku config:get -a $APP_NAME INFERENCE_URL)
Text to Text
curl $INFERENCE_URL/v1/chat/completions \
-H "Authorization: Bearer $INFERENCE_KEY" \
-d @- <<EOF
{
"model": "claude-sonnet-4-6",
"messages": [
{ "role": "user", "content": "Hello!" },
{ "role": "assistant", "content": "Hi there! How can I assist you today?" },
{ "role": "user", "content": "What's the weather like in Portland, Oregon right now?" }
],
"temperature": 0.5,
"max_tokens": 100,
"stream": false,
"tools": [
{
"type": "function",
"function": {
"name": "get_weather",
"description": "Fetches the current weather for a given city.",
"parameters": {
"type": "object",
"properties": {
"location": {
"type": "string",
"description": "The city and state, e.g. San Francisco, CA"
}
},
"required": ["location"]
}
}
}
],
"tool_choice": "auto"
}
EOF
Image to Text
curl -X POST "$INFERENCE_URL/v1/chat/completions" \
-H "Authorization: Bearer $INFERENCE_KEY" \
-H "Content-Type: application/json" \
-d @- <<EOF
{
"model": "claude-sonnet-4-6",
"messages": [
{
"role": "user",
"content": [
{
"type": "text",
"text": "What do you see in this image?"
},
{
"type": "image_url",
"image_url": {
"url": "https://upload.wikimedia.org/wikipedia/commons/thumb/e/ec/Heroku_logo.svg/960px-Heroku_logo.svg.png"
}
}
]
}
]
}
EOF