Claude Sonnet 5
Sonnet 5 is Anthropic's most capable Sonnet-class model, with frontier performance across coding, agents, and professional work.
- Context Window
- 1M
- In
- $2.23per million tokens
- Out
- $11.13per million tokens
Anthropic
anthropic/ claude-sonnet-5Specifications
In$2.23
Out$11.13
- Context Window
- 1M
- Modalities
- text
- Price
- $2.23 in · $11.13 out, per million tokens
- Model ID
- anthropic/claude-sonnet-5
Quick start
anthropic/claude-sonnet-5
$2.23 in · $11.13 out, per million tokens
import OpenAI from 'openai'
const client = new OpenAI({
apiKey: process.env.HANZO_API_KEY,
baseURL: 'https://api.hanzo.ai/v1'
})
const response = await client.chat.completions.create({
model: 'anthropic/claude-sonnet-5',
messages: [{ role: 'user', content: 'Hello!' }]
})
console.log(response.choices[0].message.content)
from openai import OpenAI
client = OpenAI(
api_key=os.environ["HANZO_API_KEY"],
base_url="https://api.hanzo.ai/v1"
)
response = client.chat.completions.create(
model="anthropic/claude-sonnet-5",
messages=[{"role": "user", "content": "Hello!"}]
)
print(response.choices[0].message.content)
curl https://api.hanzo.ai/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $HANZO_API_KEY" \
-d '{
"model": "anthropic/claude-sonnet-5",
"messages": [{"role": "user", "content": "Hello!"}]
}'
package main
import (
"context"
"fmt"
"os"
"github.com/sashabaranov/go-openai"
)
func main() {
cfg := openai.DefaultConfig(os.Getenv("HANZO_API_KEY"))
cfg.BaseURL = "https://api.hanzo.ai/v1"
client := openai.NewClientWithConfig(cfg)
resp, _ := client.CreateChatCompletion(context.Background(),
openai.ChatCompletionRequest{
Model: "anthropic/claude-sonnet-5",
Messages: []openai.ChatCompletionMessage{
{Role: openai.ChatMessageRoleUser, Content: "Hello!"},
},
},
)
fmt.Println(resp.Choices[0].Message.Content)
}
More from Anthropic
View all Anthropic models →$44.56Bill a month
The same bill for this mix.
Claude Sonnet 5$44.561M
Claude Sonnet 5.5$44.561M
- Claude Haiku 4.5 Claude Haiku 4.5 is Anthropic’s fastest and most efficient model, delivering near-frontier intelligence at a fraction of the cost and latency of larger Claude models. Matching Claude Sonnet 4’s performance...
- Claude Haiku 5.5 Claude Haiku 5.5 is Anthropic's small, fast model for high-volume, cost-sensitive work such as summarization, subagents, and browser use. It succeeds Claude Haiku 4.5 with stronger coding, computer use, and...
- Claude Sonnet 5.5 Claude Sonnet 5.5 is Anthropic's Sonnet-class model for well-scoped everyday work, succeeding Claude Sonnet 5 as a direct upgrade. It is especially strong at building features, fixing bugs, and producing...
- Claude Sonnet Latest This model always redirects to the latest model in the Claude Sonnet family.
- Claude Sonnet 4.5 Claude Sonnet 4.5 is Anthropic’s most advanced Sonnet model to date, optimized for real-world agents and coding workflows. It delivers state-of-the-art performance on coding benchmarks such as SWE-bench Verified, with...
- Claude Sonnet 4.6 Sonnet 4.6 is Anthropic's most capable Sonnet-class model yet, with frontier performance across coding, agents, and professional work. It excels at iterative development, complex codebase navigation, end-to-end project management with...
- Claude Fable 5↗ (opens in a new tab)anthropic/claude-fable-51MClaude Fable 5 is a Mythos-class model from Anthropic, built for autonomous knowledge work and coding. It supports text, image, and file inputs with text output, with reasoning support and...
- Claude Fable 5.1↗ (opens in a new tab)anthropic/claude-fable-5.11MClaude Fable 5.1 improves on Claude Fable 5 across the board, with the biggest gains in agentic coding, long-running agentic workflows, and knowledge work: long code refactors, front-end and visual...
- Claude Fable 5.1 (batch)↗ (opens in a new tab)anthropic/claude-fable-5.1:batch1MClaude Fable 5.1 improves on Claude Fable 5 across the board, with the biggest gains in agentic coding, long-running agentic workflows, and knowledge work: long code refactors, front-end and visual...
- Claude Haiku 5.5 (batch)↗ (opens in a new tab)anthropic/claude-haiku-5.5:batch1MClaude Haiku 5.5 is Anthropic's small, fast model for high-volume, cost-sensitive work such as summarization, subagents, and browser use. It succeeds Claude Haiku 4.5 with stronger coding, computer use, and...
Use Claude Sonnet 5 via Hanzo AI
One API key. Every major model. OpenAI-compatible. Start free.

