from line 1
11---
2title: What's new in Claude Sonnet 5
3url: https://platform.claude.com/docs/en/models/sonnet-5/whats-new-sonnet-5
4description: Overview of new features and behavior changes in Claude Sonnet 5.
2title: Claude Sonnet 5
3url: https://platform.claude.com/docs/en/models/sonnet-5/overview
4description: "Claude Sonnet 5 reference: lifecycle status, model IDs on every platform, context window, output limits, pricing, and migration resources. Claude Sonnet 5 is a legacy model; Claude Sonnet 5.5 is the current Sonnet model."
55---
66
7<Note>
8 Claude Sonnet 5.5 is the current Sonnet model. See [What's new in Claude Sonnet 5.5](https://platform.claude.com/docs/en/models/sonnet-5-5/whats-new-sonnet-5-5).
9</Note>
7**Legacy.** Released June 30, 2026.
108
11Claude Sonnet 5 is the next generation of Anthropic's Sonnet model family. It is a drop-in upgrade for Claude Sonnet 4.6 with three behavior changes: [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/thinking) is on by default, manual extended thinking now returns a 400 error (it was deprecated on Claude Sonnet 4.6), and setting sampling parameters (`temperature`, `top_p`, `top_k`) to non-default values returns a 400 error. This page summarizes everything new at launch, including a new tokenizer.
9Although Claude Sonnet 5 is still available, you should consider migrating to Claude Sonnet 5.5 for improved performance. [See Claude Sonnet 5.5](https://platform.claude.com/docs/en/models/sonnet-5-5/overview) · [Migrate to Claude Sonnet 5.5](https://platform.claude.com/docs/en/models/sonnet-5-5/migration-guide#migrating-from-claude-sonnet-5)
1210
13## New model
11Model ID: `claude-sonnet-5`
1412
15| Model | API model ID | Description |
16| --------------- | ----------------- | ---------------------------------------------- |
17| Claude Sonnet 5 | `claude-sonnet-5` | The best combination of speed and intelligence |
13Context window: 1M tokens · Max output: 128K tokens · Input pricing: $2 / MTok · Output pricing: $10 / MTok
1814
19Claude Sonnet 5 supports the [1M token context window](https://platform.claude.com/docs/en/build-with-claude/context-windows) by default (1M tokens is both the default and the maximum; there is no smaller context variant), 128k max output tokens, [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/thinking), and the same set of tools and platform features as Claude Sonnet 4.6, except [Priority Tier](https://platform.claude.com/docs/en/api/service-tiers#supported-models), which is not available on Claude Sonnet 5. On the Claude API and Google Cloud, Claude Sonnet 5 also supports the [browser use tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool) and the stable `computer_toolset_20260801` version of the [computer use tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool), neither of which Claude Sonnet 4.6 supports; the earlier `computer_20251124` version is still accepted on both models. To upgrade an existing integration, see [Migrate from `computer_20251124`](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool#migrate-from-computer-20251124).
15[Announcement](https://www.anthropic.com/news/claude-sonnet-5)
2016
21For complete pricing and specs, see the [models overview](https://platform.claude.com/docs/en/models/overview).
17## How it compares to the current lineup
2218
23## Behavior changes
19| Model | Context | Max output | Price / MTok | Thinking | Default effort | Knowledge cutoff |
20| :---------------------------------------------------------------------------------- | :------ | :--------- | :----------- | :------------------- | :------------- | :--------------- |
21| [Claude Fable 5.1](https://platform.claude.com/docs/en/models/fable-5-1/overview) | 1M | 128K | $10 / $50 | Adaptive (always on) | `high` | Jun 2026 |
22| [Claude Opus 5.5](https://platform.claude.com/docs/en/models/opus-5-5/overview) | 1M | 128K | $4 / $20 | Adaptive (always on) | `medium` | Jun 2026 |
23| [Claude Sonnet 5.5](https://platform.claude.com/docs/en/models/sonnet-5-5/overview) | 1M | 128K | $2 / $10 | Adaptive | `high` | Jun 2026 |
24| **Claude Sonnet 5** (this model) | 1M | 128K | $2 / $10 | Adaptive | `high` | Jan 2026 |
25| [Claude Haiku 4.5](https://platform.claude.com/docs/en/models/haiku-4-5/overview) | 200K | 64K | $1 / $5 | Extended | — | Feb 2025 |
2426
25### Adaptive thinking on by default
27* **Context:** 1M tokens is roughly 555k words or 2.5M Unicode characters on the current tokenizer (introduced with Claude Opus 4.7); models before it fit about 750k words in 1M tokens. 200k tokens is roughly 150k words.
28* **Max output:** Synchronous Messages API limit. On the Message Batches API, Claude Opus 5.5, Claude Opus 5, Claude Sonnet 5.5, Claude Sonnet 5, Claude Opus 4.8, Claude Opus 4.7, Claude Opus 4.6, and Claude Sonnet 4.6 support up to 300k output tokens with the output-300k-2026-03-24 beta header.
29* **Price / MTok:** Input / output, base price per million tokens. Batch API requests are 50% off; prompt caching reads cost 10% of the base input price (2.5% on Claude Fable 5.1 and Claude Mythos 5.1, 5% on Claude Opus 5.5). See Pricing for the full list.
30* **Thinking:** Adaptive thinking lets the model decide how much to think, steered by effort. Extended thinking is the manual budget\_tokens mode on earlier models.
31* **Default effort:** The effort parameter’s default on the Claude API. Models without a value don’t support the parameter.
32* **Knowledge cutoff:** Reliable knowledge cutoff: the date through which the model’s knowledge is most extensive and reliable.
2633
27On Claude Sonnet 4.6, requests without a `thinking` field run without thinking. On Claude Sonnet 5, the same requests run with [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/thinking). To turn thinking off, pass `thinking: {type: "disabled"}`. Because `max_tokens` is a hard limit on total output (thinking plus response text), revisit it for workloads that ran without thinking on Claude Sonnet 4.6.
34## Specifications
2835
29### Sampling parameters not accepted
36### Model IDs
3037
31Setting `temperature`, `top_p`, or `top_k` to a non-default value returns a 400 error. Remove these parameters when migrating; the default value (or omitting the parameter) is accepted. Use system-prompt instructions to guide model behavior. This is new for Sonnet-class models; the same constraint was previously introduced on Claude Opus 4.7.
38| Platform | Model ID |
39| :----------------------------------------------------------------------------------------------------- | :-------------------------- |
40| Claude API | `claude-sonnet-5` |
41| [Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock) | `anthropic.claude-sonnet-5` |
42| [Google Cloud](https://platform.claude.com/docs/en/build-with-claude/claude-on-vertex-ai) | `claude-sonnet-5` |
43| [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry) | `claude-sonnet-5` |
44| [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws) | `claude-sonnet-5` |
3245
33### Manual extended thinking removed
46### Pricing
3447
35Manual extended thinking (`thinking: {type: "enabled", budget_tokens: N}`) was deprecated on Claude Sonnet 4.6; on Claude Sonnet 5 it is removed and returns a 400 error, the same as on Claude Opus 4.8 and Claude Opus 4.7. Use adaptive thinking with the [effort parameter](https://platform.claude.com/docs/en/build-with-claude/effort) instead.
48| Feature | Value |
49| :------------------------------------------------------------------------------------- | :------------------------------- |
50| Input | $2 / MTok |
51| Output | $10 / MTok |
52| [5m cache write](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) | $2.50 / MTok |
53| [1h cache write](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) | $4 / MTok |
54| [Cache read](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) | $0.20 / MTok |
55| [Batch API](https://platform.claude.com/docs/en/build-with-claude/batch-processing) | 50% discount on input and output |
3656
37<CodeGroup exclude="shell">
38 ```python Python
39 # Not supported on Claude Sonnet 5 (returns 400)
40 thinking = {"type": "enabled", "budget_tokens": 32000}
57[Full price list](https://platform.claude.com/docs/en/about-claude/pricing)
4158
42 # Use this instead
43 thinking = {"type": "adaptive"}
44 ```
59### Capabilities
4560
46 ```typescript TypeScript
47 // Not supported on Claude Sonnet 5 (returns 400)
48 const legacyThinking = { type: "enabled", budget_tokens: 32000 };
61| Feature | Value |
62| :-------------------------------------------------------------------------------------------------------------------------- | :--------------------- |
63| [Context window](https://platform.claude.com/docs/en/build-with-claude/context-windows) | 1M tokens |
64| Max output | 128K tokens |
65| [Max output (Batch API, beta)](https://platform.claude.com/docs/en/build-with-claude/batch-processing#extended-output-beta) | 300K tokens |
66| [Thinking](https://platform.claude.com/docs/en/build-with-claude/thinking) | Adaptive |
67| [Default effort](https://platform.claude.com/docs/en/build-with-claude/effort) | `high` |
68| Input → output | Text and images → text |
69| Reliable knowledge cutoff | Jan 2026 |
70| Training data cutoff | Jan 2026 |
4971
50 // Use this instead
51 const thinking = { type: "adaptive" };
52 ```
72### Availability
5373
54 ```csharp C#
55 // Not supported on Claude Sonnet 5 (returns 400)
56 var legacyThinking = new ThinkingConfigEnabled(budgetTokens: 32000);
74| Feature | Value |
75| :---------------------------------------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
76| [Status](https://platform.claude.com/docs/en/about-claude/model-deprecations) | Active (legacy) |
77| Released | June 30, 2026 |
78| Retirement | Not sooner than June 30, 2027 |
79| Platforms | Claude API, [Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock), [Google Cloud](https://platform.claude.com/docs/en/build-with-claude/claude-on-vertex-ai), [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry), [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws) |
5780
58 // Use this instead
59 var thinking = new ThinkingConfigAdaptive();
60 ```
81## Good to know
6182
62 ```go Go
63 // Not supported on Claude Sonnet 5 (returns 400)
64 legacyThinking := anthropic.ThinkingConfigParamUnion{
65 OfEnabled: &anthropic.ThinkingConfigEnabledParam{BudgetTokens: 32000},
66 }
83* On the [Message Batches API](https://platform.claude.com/docs/en/build-with-claude/batch-processing#extended-output-beta), Claude Sonnet 5 supports up to 300k output tokens with the `output-300k-2026-03-24` beta header.
84* Setting `temperature`, `top_p`, or `top_k` to non-default values returns a 400 error.
85* Query limits and capabilities programmatically with the [Models API](https://platform.claude.com/docs/en/api/models/list).
6786
68 // Use this instead
69 thinking := anthropic.ThinkingConfigParamUnion{
70 OfAdaptive: &anthropic.ThinkingConfigAdaptiveParam{},
71 }
72 ```
87## Resources
7388
74 ```java Java
75 // Not supported on Claude Sonnet 5 (returns 400)
76 var legacyThinking = ThinkingConfigEnabled.builder().budgetTokens(32_000L).build();
89<CardGroup cols={3}>
90 <Card title="Migrate to Claude Sonnet 5.5" icon="arrows-left-right" href="https://platform.claude.com/docs/en/models/sonnet-5-5/migration-guide#migrating-from-claude-sonnet-5">
91 What changes when moving from Claude Sonnet 5 to Claude Sonnet 5.5.
92 </Card>
7793
78 // Use this instead
79 var thinking = ThinkingConfigAdaptive.builder().build();
80 ```
94 <Card title="Claude Sonnet 5.5" icon="arrow-right" href="https://platform.claude.com/docs/en/models/sonnet-5-5/overview">
95 The current Sonnet model: overview, specs, and resources.
96 </Card>
8197
82 ```php PHP
83 // Not supported on Claude Sonnet 5 (returns 400)
84 $thinking = ['type' => 'enabled', 'budget_tokens' => 32000];
98 <Card title="Prompting Claude Sonnet 5" icon="lightbulb" href="https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/prompting-claude-sonnet-5">
99 Model-specific prompting guidance.
100 </Card>
85101
86 // Use this instead
87 $thinking = ['type' => 'adaptive'];
88 ```
102 <Card title="Adaptive thinking" icon="brain" href="https://platform.claude.com/docs/en/build-with-claude/thinking">
103 On by default on Claude Sonnet 5. Steer depth with `effort`.
104 </Card>
89105
90 ```ruby Ruby
91 # Not supported on Claude Sonnet 5 (returns 400)
92 legacy_thinking = {type: "enabled", budget_tokens: 32_000}
106 <Card title="Effort" icon="sliders" href="https://platform.claude.com/docs/en/build-with-claude/effort">
107 Effort defaults to `high` on the Claude API and Claude Code. Choose a level per workload.
108 </Card>
93109
94 # Use this instead
95 thinking = {type: "adaptive"}
96 ```
97</CodeGroup>
110 <Card title="Context windows" icon="stack" href="https://platform.claude.com/docs/en/build-with-claude/context-windows">
111 1M tokens by default. How the window is counted and managed.
112 </Card>
113</CardGroup>
98114
99## New tokenizer
115## Reference
100116
101Claude Sonnet 5 uses a new tokenizer. The same input text produces approximately 30% more tokens than on Claude Sonnet 4.6. The exact increase depends on the content. This is not an API change: requests, responses, and streaming events keep the same shape, and no code changes are required.
102
103The change affects anything you measure or budget in tokens:
104
105* **Token counts:** `usage` fields and [token counting](https://platform.claude.com/docs/en/build-with-claude/token-counting) results for the same text are higher than on Claude Sonnet 4.6. Don't reuse counts measured against earlier models; recount against Claude Sonnet 5.
106* **Context window capacity in text terms:** the context window is 1M tokens, but each token covers less text on average, so the same window holds less text than on Claude Sonnet 4.6.
107* **`max_tokens` budgets:** an output limit tuned for Claude Sonnet 4.6 may truncate equivalent output on Claude Sonnet 5. Revisit limits sized close to your expected output length.
108* **Per-request cost:** per-token pricing is lower than Claude Sonnet 4.6's (see [Pricing](https://platform.claude.com/docs/en/models/sonnet-5/whats-new-sonnet-5#pricing)), but because the same text produces more tokens, the cost of an equivalent request does not drop in direct proportion.
109
110## API constraints inherited from Claude Sonnet 4.6
111
112<Note>
113 This constraint is unchanged from Claude Sonnet 4.6. Aside from the three [behavior changes](https://platform.claude.com/docs/en/models/sonnet-5/whats-new-sonnet-5#behavior-changes) (see [Migration guide](https://platform.claude.com/docs/en/models/sonnet-5/whats-new-sonnet-5#migration-guide)), code that already runs on Claude Sonnet 4.6 needs no other changes.
114</Note>
115
116### Assistant message prefilling not supported
117
118Prefilling the assistant message returns a `400` error, unchanged from Claude Sonnet 4.6. Use [structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs), system prompt instructions, or `output_config.format` instead.
119
120## Capability improvements
121
122Claude Sonnet 5 is a capability upgrade over Claude Sonnet 4.6 at a lower price. It is also an option for workloads that need more capability than Claude Sonnet 4.6 provides without moving to an Opus-class model.
123
124The largest gains over Claude Sonnet 4.6 are in coding and agentic tasks. For benchmark results, see [Anthropic's Transparency Hub](https://www.anthropic.com/transparency).
125
126## Cybersecurity safeguards
127
128Claude Sonnet 5 is the first Sonnet-tier model with real-time cybersecurity safeguards. Requests that involve prohibited or high-risk cybersecurity topics may be refused. Refusals return as a successful HTTP 200 response with `stop_reason: "refusal"`, not an error. See [Real-time cyber safeguards on Claude Opus and Sonnet](https://support.claude.com/en/articles/14604842-real-time-cyber-safeguards-on-claude-opus-and-sonnet) for what the safeguards block and how legitimate security work can apply to the Cyber Verification Program.
129
130## Pricing
131
132Claude Sonnet 5 is priced at $2 per million input tokens and $10 per million output tokens, lower per-token pricing than Claude Sonnet 4.6's $3/$15. Because the [new tokenizer](https://platform.claude.com/docs/en/models/sonnet-5/whats-new-sonnet-5#new-tokenizer) produces approximately 30% more tokens for the same text, the cost of an equivalent request does not drop in direct proportion to the per-token prices when comparing with Claude Sonnet 4.6. The exact difference depends on the content and workload shape.
133
134See [Pricing](https://platform.claude.com/docs/en/about-claude/pricing) for complete pricing, including batch processing and prompt caching rates.
135
136## Availability
137
138At launch, Claude Sonnet 5 is available on:
139
140* **Claude API:** available to all customers.
141* **AWS:** available through [Claude in Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock) and [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws). On Amazon Bedrock, Claude Sonnet 5 is also reachable through the `InvokeModel` API, served by the same infrastructure as Claude in Amazon Bedrock. The legacy [Claude on Amazon Bedrock (Opus 4.6 and earlier)](https://platform.claude.com/docs/en/build-with-claude/claude-on-amazon-bedrock-legacy) integration does not include Claude Sonnet 5.
142* **Google Cloud:** available through [Claude on Google Cloud](https://platform.claude.com/docs/en/build-with-claude/claude-on-vertex-ai).
143* **Microsoft Foundry:** available through [Claude in Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry).
144
145Claude Sonnet 5 supports [zero data retention](https://platform.claude.com/docs/en/manage-claude/api-and-data-retention) for organizations with ZDR agreements.
146
147## Migration guide
148
149Claude Sonnet 5 is a drop-in replacement for Claude Sonnet 4.6. Update your model ID:
150
151<CodeGroup exclude="shell">
152 ```python Python
153 model = "claude-sonnet-4-6" # Before
154 model = "claude-sonnet-5" # After
155 ```
156
157 ```typescript TypeScript
158 const legacyModel = "claude-sonnet-4-6"; // Before
159 const model = "claude-sonnet-5"; // After
160 ```
161
162 ```csharp C#
163 var legacyModel = Model.ClaudeSonnet4_6; // Before
164 var model = Model.ClaudeSonnet5; // After
165 ```
166
167 ```go Go
168 // Before
169 legacyModel := anthropic.ModelClaudeSonnet4_6
170 // After
171 model := anthropic.ModelClaudeSonnet5
172 ```
173
174 ```java Java
175 var legacyModel = Model.CLAUDE_SONNET_4_6; // Before
176 var model = Model.CLAUDE_SONNET_5; // After
177 ```
178
179 ```php PHP
180 $model = 'claude-sonnet-4-6'; // Before
181 $model = 'claude-sonnet-5'; // After
182 ```
183
184 ```ruby Ruby
185 legacy_model = "claude-sonnet-4-6" # Before
186 model = "claude-sonnet-5" # After
187 ```
188</CodeGroup>
189
190Then review the following:
191
1921. **Token budgets and counts:** the [new tokenizer](https://platform.claude.com/docs/en/models/sonnet-5/whats-new-sonnet-5#new-tokenizer) produces approximately 30% more tokens for the same text. The exact increase depends on the content and workload shape. Recount prompts with [token counting](https://platform.claude.com/docs/en/build-with-claude/token-counting), and revisit `max_tokens` limits sized close to your expected output length.
1932. **Extended thinking:** if you still set `budget_tokens`, migrate to [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/thinking). Manual extended thinking (`thinking: {type: "enabled"}`) is not supported and returns a 400 error.
1943. **Sampling parameters:** requests that set sampling parameters (`temperature`, `top_p`, `top_k`) to a non-default value return a 400 error; remove them when migrating. Tool definitions and response shapes are unchanged, and assistant message prefilling was already unsupported on Claude Sonnet 4.6.
195
196See [Migrating to Claude Sonnet 5 from Claude Sonnet 4.6](https://platform.claude.com/docs/en/models/sonnet-5/migration-guide#migrating-from-claude-sonnet-4-6-to-claude-sonnet-5) for details.
197
198## Next steps
199
200<CardGroup>
201 <Card title="Models overview" icon="arrow-right" href="https://platform.claude.com/docs/en/models/overview">
202 Complete specs and pricing for all current Claude models.
117<CardGroup cols={3}>
118 <Card title="System prompt" icon="text" href="https://platform.claude.com/docs/en/release-notes/system-prompts/claude-sonnet-5">
119 The system prompt Claude Sonnet 5 uses on claude.ai and the Claude apps.
203120 </Card>
204121
205 <Card title="Token counting" icon="database" href="https://platform.claude.com/docs/en/build-with-claude/token-counting">
206 Measure your prompts under the new tokenizer before you migrate.
122 <Card title="System card" icon="file" href="https://www.anthropic.com/claude-sonnet-5-system-card">
123 Safety evaluations and deployment decisions for Claude Sonnet 5.
207124 </Card>
208125
209 <Card title="Adaptive thinking" icon="brain" href="https://platform.claude.com/docs/en/build-with-claude/thinking">
210 The recommended thinking-on mode on Claude Sonnet 5.
126 <Card title="Pricing" icon="coins" href="https://platform.claude.com/docs/en/about-claude/pricing">
127 Full price list, including batch discounts and prompt caching rates.
211128 </Card>
212129
213 <Card title="Context windows" icon="sliders" href="https://platform.claude.com/docs/en/build-with-claude/context-windows">
214 How the 1M token context window works.
130 <Card title="Model IDs and versioning" icon="fingerprint" href="https://platform.claude.com/docs/en/about-claude/models/model-ids-and-versions">
131 How model IDs, aliases, and pinned snapshots work.
215132 </Card>
216133
217 <Card title="Pricing" icon="shield" href="https://platform.claude.com/docs/en/about-claude/pricing">
218 Complete pricing, including batch processing and prompt caching rates.
134 <Card title="Model deprecations" icon="clock" href="https://platform.claude.com/docs/en/about-claude/model-deprecations">
135 Lifecycle status and retirement commitments for every Claude model.
219136 </Card>
220137</CardGroup>
221138
No line in this hunk matches that.