New Flagship Model Added: Claude Sonnet 5
Date: 2026-07-01 / (1405-04-10)
Summary
Claude Sonnet 5, Anthropic's most agentic Sonnet model to date, is now available on AvalAI. Sonnet 5 narrows the gap to Opus-class performance at lower prices, with substantial improvements in reasoning, tool use, coding, and knowledge work. It is available via v1/chat/completions with full support via v1/messages and partial support via v1/responses, and launches with promotional pricing through August 31, 2026.
Details
Anthropic
We announce access to Claude Sonnet 5 (claude-sonnet-5), Anthropic's most agentic Sonnet model, built to make plans, use tools like browsers and terminals, and run autonomously at a level that recently required larger and more expensive models. Documentation
Key Features:
- Most Agentic Sonnet Yet: Makes plans, uses tools such as browsers and terminals, and runs autonomously on long-horizon tasks
- Close to Opus-Class Performance: Performance approaches Claude Opus 4.8 on many agentic tasks, at lower Sonnet-tier prices
- Substantial Improvement Over Sonnet 4.6: Clear gains on reasoning, tool use, coding, and knowledge work compared to its predecessor
- Effort-Level Control: Wide range of cost-performance options through configurable effort levels; higher effort can match Opus 4.8 on some tasks
- Strong Coding & Debugging: Sustained coding, tool use, and debugging across messy technical contexts, with follow-through on multi-step changes
- Computer Use: Improved agentic computer use on evaluations such as OSWorld-Verified
- Improved Safety: Overall lower rate of undesirable behaviors than Sonnet 4.6, better at refusing malicious requests and resisting prompt injection, with lower hallucination and sycophancy rates
- Adaptive Thinking: Supports configurable reasoning through thinking settings and effort levels
- Endpoint Support: Available on
v1/chat/completions(full support),v1/messages(full support), andv1/responses(partial support)
Pricing Details:
| Model | Input | Cached Input | Cache Creation Input | Output |
|---|---|---|---|---|
| claude-sonnet-5 (promotional, through 2026-08-31) | $2.00/1M tokens | $0.20/1M tokens | $4.00/1M tokens | $10.00/1M tokens |
| claude-sonnet-5 (standard, after 2026-08-31) | $3.00/1M tokens | $0.30/1M tokens | $6.00/1M tokens | $15.00/1M tokens |
Claude Sonnet 5 launches with introductory promotional pricing of $2/1M input and $10/1M output tokens through August 31, 2026, after which it moves to standard pricing of $3/1M input and $15/1M output tokens.
API Request/Response Examples
Example Request (v1/chat/completions)
curl https://api.avalai.ir/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $AVALAI_API_KEY" \
-d '{
"model": "claude-sonnet-5",
"messages": [
{
"role": "user",
"content": "Investigate this failing test, find the root cause, and propose a fix."
}
]
}'Example Response
{
"id": "chatcmpl-8c2ff...",
"created": 1782000000,
"model": "claude-sonnet-5",
"object": "chat.completion",
"system_fingerprint": null,
"choices": [
{
"finish_reason": "stop",
"index": 0,
"message": {
"content": "I'll trace the failure to its root cause and propose a durable fix...",
"role": "assistant",
"thinking_blocks": [],
"annotations": []
}
}
],
"usage": {
"completion_tokens": 210,
"prompt_tokens": 24,
"total_tokens": 234,
"completion_tokens_details": {
"reasoning_tokens": 0,
"text_tokens": 210
},
"prompt_tokens_details": {
"audio_tokens": null,
"cached_tokens": 0,
"text_tokens": 24,
"image_tokens": null,
"video_tokens": null,
"cache_creation_tokens": 0
},
"cache_creation_input_tokens": 0,
"cache_read_input_tokens": 0
},
"estimated_cost": {
"unit": "0.0021480000",
"irt": 329.07,
"exchange_rate": 153200
},
"service_tier": "default"
}SDK Usage Examples
curl https://api.avalai.ir/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $AVALAI_API_KEY" \
-d '{
"model": "claude-sonnet-5",
"messages": [
{
"role": "user",
"content": "Update the account tiers, then draft a launch announcement for enterprise contacts."
}
]
}'from openai import OpenAI
client = OpenAI(api_key="your-avalai-api-key", base_url="https://api.avalai.ir/v1")
completion = client.chat.completions.create(
model="claude-sonnet-5",
messages=[
{
"role": "user",
"content": "Update the account tiers, then draft a launch announcement for enterprise contacts.",
}
],
)
print(completion.choices[0].message.content)import { OpenAI } from "openai";
const client = new OpenAI({
apiKey: process.env.AVALAI_API_KEY,
baseURL: "https://api.avalai.ir/v1",
});
const completion = await client.chat.completions.create({
model: "claude-sonnet-5",
messages: [
{
role: "user",
content:
"Update the account tiers, then draft a launch announcement for enterprise contacts.",
},
],
});
console.log(completion.choices[0].message.content);Using Anthropic SDK (v1/messages)
curl https://api.avalai.ir/v1/messages \
-H "Content-Type: application/json" \
-H "x-api-key: $AVALAI_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-d '{
"model": "claude-sonnet-5",
"max_tokens": 1024,
"messages": [
{
"role": "user",
"content": "Carry this pull request through to a tested, verified result."
}
]
}'import anthropic
client = anthropic.Anthropic(
api_key="your-avalai-api-key", base_url="https://api.avalai.ir"
)
message = client.messages.create(
model="claude-sonnet-5",
max_tokens=1024,
messages=[
{
"role": "user",
"content": "Carry this pull request through to a tested, verified result.",
}
],
)
print(message.content[0].text)import Anthropic from "@anthropic-ai/sdk";
const client = new Anthropic({
apiKey: process.env.AVALAI_API_KEY,
baseURL: "https://api.avalai.ir",
});
const message = await client.messages.create({
model: "claude-sonnet-5",
max_tokens: 1024,
messages: [
{
role: "user",
content: "Carry this pull request through to a tested, verified result.",
},
],
});
console.log(message.content[0].text);Adaptive Thinking and Effort
Claude Sonnet 5 supports configurable reasoning through thinking settings and effort levels, letting you balance cost and performance. Higher effort levels can match Opus 4.8 on some tasks, while lower effort levels provide substantially improved cost efficiency.
response = client.chat.completions.create(
model="claude-sonnet-5",
messages=[
{
"role": "user",
"content": "Plan and execute a multi-step refactor across several services, verifying each change.",
}
],
extra_body={
"thinking": {"type": "adaptive"},
"output_config": {"effort": "high"},
},
)