ANTHROPIC MODEL GUIDE
Claude Sonnet 5 API
Anthropic's fast, high-capability production model for coding, agents, document work, and tool-driven applications.
Coding, long documents, tool-using agents, and production systems upgrading from Sonnet 4.6.
Integrations still dependent on legacy sampling overrides, manual thinking budgets, or assistant prefilling.
Choosing and integrating
Claude Sonnet 5 API pricing breakdown
Claude Sonnet 5 (claude-sonnet-5) is billed by token usage. Prices below are USD per 1M tokens. LLMFly AI rates already include the 0.5x group multiplier; do not apply it again. Provider reference prices are separate. These rates come from the site's Model Plaza snapshot; confirm live catalog and account rates before calling.
Example: a request with 10,000 uncached input tokens and 1,000 output tokens costs approximately $0.015 in LLMFly AI token charges. This excludes cache writes, tools, retries, and other additional fees.
- Platform and provider prices use their own input-token tiers. Do not apply provider long-context multipliers to platform prices.
- Not listed does not mean free. Account for cache reads, cache writes, and uncached input in their respective billing categories.
- Token cost = tokens in each billing category × its price per million ÷ 1,000,000. Add tools and other charges separately.
| Price source | Input tokens per request | Input | Output | Cache write | Cache read | 1h cache write |
|---|---|---|---|---|---|---|
| LLMFly AI | Single rate | $1 | $5 | $1.25 | $0.1 | $2 |
| Provider reference | Single rate | $2 | $10 | $2.5 | $0.2 | $4 |
Read this before migrating from Sonnet 4.6
| Old integration assumption | Sonnet 5 behavior | Required change |
|---|---|---|
| Manual extended-thinking budget | Not supported | Use adaptive thinking + effort |
| Non-default temperature / top_p / top_k | Returns 400 | Remove overrides or use defaults |
| Assistant message prefilling | Not supported | Use user messages and explicit format constraints |
| Reuse old token budget | May underestimate | Retokenize and revise max_tokens |
Why the tokenizer change affects budgets
- Recount system prompts, tool schemas, and common documents.
- Thinking tokens and final text share the output budget.
- Check truncation rate, latency, and cost per task together.
- Validate caching and usage records on the actual route.
Configure adaptive thinking and effort
Sonnet 5 enables adaptive thinking by default and controls it with effort. Establish quality at the default high setting, then test lower effort for acceptable latency and output reductions.
- A 1M context window by default and up to 128K output tokens.
- Adaptive thinking is enabled by default and controlled with the effort parameter.
- Tool use, browser use, and supported computer-use toolsets on eligible platforms.
- Designed primarily for coding and AI agent workflows.
Production workloads that fit Sonnet 5
Coding and agents are central use cases, but validate against your repositories, tools, and failure modes.
- Production coding, frontend work, code review, and refactoring.
- Long-document analysis and knowledge workflows.
- Agents that need tools, browser interaction, and structured checkpoints.
- Teams upgrading from Sonnet 4.6 while keeping a Sonnet-class latency profile.
Call Sonnet 5 through LLMFly AI
The sample uses an OpenAI-compatible endpoint. If Model Plaza exposes a different protocol or route, test tools, streaming, and errors using the configuration available to the current key.
curl https://app.llmfly.ai/v1/chat/completions \
-H "Authorization: Bearer $LLMFLY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-sonnet-5",
"messages": [{"role": "user", "content": "Summarize the tradeoffs in three bullets."}],
"stream": false
}'Zero-downtime migration checklist
- Replay sampled production traffic offline before switching live traffic.
- Remove incompatible sampling fields and assistant prefilling.
- Recalculate tokens, max_tokens, timeouts, and budgets.
- Validate 400 errors, tools, structured outputs, and truncation.
- Canary a small traffic share and keep a rollback route to Sonnet 4.6.
Sonnet 5 incompatible patterns
- Manual extended-thinking budgets are removed; use adaptive thinking and effort instead.
- Non-default temperature, top_p, or top_k values return a 400 error.
- Assistant-message prefilling is not supported.
- The new tokenizer can produce roughly 30% more tokens for the same text than Sonnet 4.6, so recount prompts and revisit budgets.
Claude Sonnet 5 specification sources and usage notes
Migration behavior and specifications were checked against Anthropic Claude Sonnet 5 documentation: https://platform.claude.com/docs/en/models/sonnet-5/whats-new-sonnet-5. Confirm protocol and tool support on the selected LLMFly AI route with Model Plaza and a small request.
Frequently asked questions
Can Sonnet 5 replace Sonnet 4.6 by changing only the model ID?
Not safely. Address tokenizer, adaptive thinking, sampling fields, assistant prefilling, and output-budget differences first.
Why do old temperature settings return an error?
Sonnet 5 returns 400 for non-default temperature, top_p, or top_k; remove these overrides or use supported defaults.
Does Sonnet 5 support manual thinking budgets?
No. Replace manual extended-thinking budgets with adaptive thinking and the effort parameter.
Is every request cheaper than Sonnet 4.6?
Token price alone cannot prove that. The new tokenizer can produce more tokens for the same text, so compare actual usage records.
How should I reduce migration risk?
Replay traffic offline, recount tokens, canary a small share, and keep a tested rollback route.
Test Claude Sonnet 5 with your own task
Create an API key, confirm the model ID, and start with a small representative request.