Claude API 2026-10-21 drops temperature, top_p and top_k
Anthropic released Claude API version 2026-10-21 on October 21, 2026. Sending temperature, top_p or top_k now returns a 400 error, and seven SDKs get majors.
4 min read

By the numbers
- the new anthropic-version header value
- 2026-10-21
- error returned for temperature, top_p or top_k
- 400
- SDKs and CLIs with new major versions
- 8
Anthropic released a new Claude API version, 2026-10-21, on October 21, 2026. It removes the temperature, top_p and top_k sampling settings, and any request that sends one now fails with a 400 error. Seven official SDKs and the ant command-line tool shipped new major versions that use it by default.
The previous version, 2023-06-01, has been the default for more than three years. Munder Difflin's daily agent-tools roundup describes this as Anthropic's first new API version since then.
How Claude API versions work
Every request to the Claude API carries an anthropic-version header. Its value is a date that pins the request to one fixed set of behavior. To use the new version without an SDK, send anthropic-version: 2026-10-21.
Within one version, Anthropic's versioning page promises that existing input and output fields stay as they are. Anthropic can still add optional inputs, new output values and new streaming event types. Removing or renaming a field needs a new dated version, which is what happened here.
The SDKs pick the version for you. The migration guide says requests "use the API version that was current when your SDK's major version was released." Code on an older SDK major keeps sending 2023-06-01 until you upgrade it.
What breaks in the Messages API
Three request shapes now return a 400 error, according to Anthropic's release notes:
- Sampling settings.
temperature,top_pandtop_kare removed. Sending any of them fails on every model. - Documents in assistant turns. A
documentblock placed directly in anassistantmessage is rejected. - Citations in user turns. A
textblock with a non-emptycitationsarray in ausermessage is rejected. That includes one nested inside asearch_resultblock.
The Admin API also renames several fields. RBAC groups use role_ids instead of roles, and roles use display_name instead of name. API keys move workspace_id into scope.workspace_id. Two Claude Enterprise Analytics fields change as well: actor.email becomes actor.email_address, and summaries becomes data.
The new version works on the Claude API, Claude Platform on AWS, Microsoft Foundry and Google Cloud. On Amazon Bedrock it covers Claude 4.7 and later models only.
The new SDK major versions
These are the first releases that send 2026-10-21, per the release notes and migration guide:
| SDK or tool | First version on 2026-10-21 |
|---|---|
Python (anthropic) | 2.0.0 |
TypeScript (@anthropic-ai/sdk) | 1.0.0 |
C# (Anthropic) | 13.0.0 |
Go (anthropic-sdk-go/v2) | 2.0.0 |
Java (com.anthropic:anthropic-java) | 3.0.0 |
PHP (anthropic-ai/sdk) | 1.0.0 |
Ruby (anthropic gem) | 2.0.0 |
ant CLI | 2.0.0 |
The SDKs carry breaking changes of their own, separate from the API version. The migration guide lists the main ones:
- Authorization header. The SDKs and CLI now send the key as
Authorization: Bearer, notX-Api-Key. The API accepts either header, but a proxy or gateway that readsX-Api-Keymust change. - One credential per client. Passing both an API key and an auth token is now an error. In Python it raises
ValueError; in TypeScript,TypeError. - Text Completions removed. The old completions interface is gone from the TypeScript, Go, Java and Ruby SDKs and from the CLI. Use the Messages API.
- Go module path. Go code must change every import to
github.com/anthropics/anthropic-sdk-go/v2and needs Go 1.25 or later. - PHP upgrade command. A plain
composer updatestays on the old major version. Usecomposer requireto move to 1.0.0.
The licence changes too. Starting with these versions, the SDKs and CLI are licensed under Apache 2.0 instead of MIT. Earlier versions stay under MIT, and the guide says no code changes are needed for that.
Later on October 21, Python SDK 2.1.0 and TypeScript SDK 1.1.0 added enforcement status and actions to user profiles. That is a separate feature, not part of the version change.
What this means for developers
Nothing breaks until you upgrade an SDK major version or change the header yourself. That gives you time, but the release notes name no shutdown date for 2023-06-01. Plan the move rather than waiting for one.
- Search for sampling settings first. Find every call that sets
temperature,top_portop_k, including in wrappers and config files. Each one becomes a 400 error after the upgrade. - Check what sits between you and the API. A logging proxy, gateway or secret scanner that reads
X-Api-Keywill stop seeing the key once the SDK sendsAuthorization: Bearer. - Pin the major version in your lockfile. An unpinned
anthropicor@anthropic-ai/sdkrange can jump to the new major on the next install. Upgrade on purpose, with tests. - Review stored conversations. If you replay saved message histories, check them for documents in assistant turns or citations in user turns.
- Tell whoever tracks licences. The new majors are Apache 2.0, not MIT. Record the change before the upgrade ships.
Sources
- Claude Platform release notes: API - Anthropic
- Migrating to API version 2026-10-21 - Anthropic
- Versions - Anthropic
- Agent Tools Today, 22 Oct 2026: Claude API 2026-10-21, LayerFS 1.0, PHP2Shell - Munder Difflin
Related articles

Claude Opus 5.5 cuts output price to $20 per million
Anthropic released Claude Opus 5.5 on September 22, 2026, at $4 input and $20 output per million tokens, with thinking always switched on.

Claude Duet is Anthropic's proactive agent app, in preview
Anthropic opened a waitlist preview of Claude Duet on October 21, 2026: an Opus 5.5 agent that works from its own cloud computer and messages you first.

Inception Mercury 3 diffusion LLM claims 1,068 tokens/sec
Inception's Mercury 3 diffusion LLM claims 1,068 tokens a second, a 1M-token context and $0.20/$0.70 per million tokens, half off at launch.
The weekly digest
One email every Friday with the week's top stories from all six desks: AI, dev tools, coding, the tech industry, startups and what's next. Free, no spam.