Claude Sonnet 5
by Anthropic
Anthropic balanced model with near-flagship coding and agentic quality at Sonnet pricing, a 1M context window, and up to 128K output tokens.
Run queries immediately, pay only for usage
Per 1M Tokens
About this model
Claude Sonnet 5 brings near-flagship coding and agentic quality to the Sonnet tier, with a 1M-token context window and up to 128K output tokens. It is the default choice for production workloads that need Claude quality without Opus cost. Note that Sonnet 5 uses a new tokenizer that produces roughly 30 percent more tokens for the same text than Sonnet 4.6, so budget accordingly when migrating: the per-token price is the same, but the same document costs more to process. Available on the DOS.AI gateway with one API key and unified billing.
Capabilities
Use Cases
- Production agents
- Code development
- Customer support
- Long-document analysis
Model Details
- Provider
- Anthropic
- Model ID
- claude-sonnet-5
- Parameters
- Sonnet
- Context Length
- 1M tokens
- Category
- chat
API Usage
Use the DOS API to integrate Claude Sonnet 5into your applications. Our API is compatible with OpenAI's client libraries for easy migration.
Model ID
claude-sonnet-5Python
from dos import DOS
client = DOS()
response = client.chat.completions.create(
model="claude-sonnet-5",
messages=[
{"role": "user", "content": "Hello, how are you?"}
]
)
print(response.choices[0].message.content)cURL
curl https://api.dos.ai/v1/chat/completions \
-H "Authorization: Bearer $DOS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-sonnet-5",
"messages": [
{"role": "user", "content": "Hello, how are you?"}
]
}'Node.js
import DOS from 'dos-ai';
const client = new DOS();
const response = await client.chat.completions.create({
model: "claude-sonnet-5",
messages: [
{ role: "user", content: "Hello, how are you?" }
]
});
console.log(response.choices[0].message.content);Related Models
DOS.AI Auto
Smart routing - automatically picks the best model for your request. Free for simple tasks, paid models for complex ones.
DOS.AI
Ultra-efficient MoE model — 35B total, 3B active parameters. Fast inference at near-8B cost with 70B-class quality.
DeepSeek V4 Flash
1M-context fast tier replacing DeepSeek V3