ANTHROPIC MODEL GUIDE

Claude Sonnet 5 API

Anthropic's fast, high-capability production model for coding, agents, document work, and tool-driven applications.

Core specificationsSpecifications reviewed September 1, 2026
Official model IDclaude-sonnet-5
Context / max output1M / 128K
Vendor input / output per 1M$2 input / $10 output
ReasoningAdaptive thinking · high default effort
Selection verdictSonnet 5 is a production migration, not a model-ID search-and-replace.
Best fit

Coding, long documents, tool-using agents, and production systems upgrading from Sonnet 4.6.

Avoid when

Integrations still dependent on legacy sampling overrides, manual thinking budgets, or assistant prefilling.

02

Choosing and integrating

01

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 sourceInput tokens per requestInputOutputCache writeCache read1h cache write
LLMFly AISingle rate$1$5$1.25$0.1$2
Provider referenceSingle rate$2$10$2.5$0.2$4
02
Migration differences

Read this before migrating from Sonnet 4.6

Old integration assumptionSonnet 5 behaviorRequired change
Manual extended-thinking budgetNot supportedUse adaptive thinking + effort
Non-default temperature / top_p / top_kReturns 400Remove overrides or use defaults
Assistant message prefillingNot supportedUse user messages and explicit format constraints
Reuse old token budgetMay underestimateRetokenize and revise max_tokens
03
Cost and capacity

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.
04
Reasoning control

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.
05
Use cases

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.
06
Protocol integration

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.

request.example
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
  }'
07
Rollout

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.
08
Migration risks

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.
09
Source boundary

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.

Get API Key