Claude API 2026-10-21 removes temperature, top_p and top_k controls
Claude API version 2026-10-21 removes temperature, top_p and top_k and tightens message validation. New SDK major versions and the ant CLI default to it, while 2023-06-01 remains supported.

TL;DR
temperature,top_p, andtop_kare removed from Messages requests under2026-10-21, according to ClaudeDevs.- Direct assistant-turn documents and cited text blocks in user turns now return 400 errors, as described in the breaking-change announcement.
- New SDK major versions and
antdefault to the new API contract, the SDK announcement confirms. 2023-06-01is not deprecated, Anthropic confirmed in its release announcement.
Even sending temperature: 1.0 now returns a 400, although omitting the parameter still samples at that default. An old Go installation command can silently keep installing ant v1, without an error or warning.
API version selection
This is Anthropic’s first official API version release since 2023. The company plans more frequent versions so developers can absorb breaking changes before a new model requires them.
For direct HTTP calls, the new contract is selected with anthropic-version: 2026-10-21. Earlier SDK majors send 2023-06-01; the new majors send 2026-10-21, including their Amazon Bedrock and Google Cloud clients, according to the migration guide.
Sampling parameters
The new SDK types and CLI flags also lose all three sampling parameters. Anthropic’s documented behavior distinguishes between models that already required defaults and models that allowed tuning:
- Claude 4.7 and later: These models already accept only default values, so sampling behavior stays the same.
- Models such as Sonnet 4.6: Requests that previously lowered temperature lose that consistency control. No other setting replaces it.
- Requests depending on non-default values:
2023-06-01remains available for those calls.
Documents and citations
Two placement rules in Anthropic’s migration guide introduce 400 responses:
- Documents in assistant messages: A
documentblock directly in an assistant message is rejected. A document nested inside another block, such as a web-fetch tool result returned by Claude, remains accepted. - Citations in user messages: A text block with a non-empty
citationsarray is rejected, including inside asearch_resultblock. Citations on assistant text remain accepted, as does the"citations": {"enabled": true}configuration on documents and search results.
These validation changes also apply to token counting and to each request in a Message Batch created with 2026-10-21.
SDK major versions
The sharpest edge is the dependency upgrade: new SDK majors select the breaking contract automatically, as ClaudeDevs explained. These are the first releases using the new version, according to the upgrade table:
| Client | First release using 2026-10-21 |
| --- | --- |
| Python anthropic | 2.0.0 |
| TypeScript @anthropic-ai/sdk | 1.0.0 |
| C# Anthropic | 13.0.0 |
| Go anthropic-sdk-go | 2.0.0 |
| Java anthropic-java | 3.0.0 |
| PHP anthropic-ai/sdk | 1.0.0 |
| Ruby anthropic | 2.0.0 |
| ant CLI | 2.0.0 |
Package and platform constraints add three more changes:
- Go: The SDK module and imports become
github.com/anthropics/anthropic-sdk-go/v2. The CLI’s Go installation path becomesgithub.com/anthropics/anthropic-cli/v2/cmd/ant@latest. - TypeScript provider packages: The v1 Bedrock, Vertex, Foundry, AWS, and Google Cloud SDKs require v1 of the core SDK. Leaving a provider package on its earlier major installs a second, older core SDK copy.
- Amazon Bedrock:
2026-10-21is available only for Claude 4.7 and later models. Opus 4.6 and earlier require the existing API version.
Role-specific message types
MessageParam becomes a union of UserMessageParam, AssistantMessageParam, and SystemMessageParam, with an equivalent split for beta types. The SDK migration notes describe changes to message construction and handling even though the message fields and values sent over the wire remain unchanged:
- Python: Calling
MessageParam(...)now raisesTypeError. Dict literals still work, andMessageParamremains valid in annotations such aslist[MessageParam]. - TypeScript: An interface can no longer extend
MessageParam, because it is a union. A type alias such astype StoredMessage = Anthropic.MessageParam & { id: string }remains valid. - Go: Copying a
MessageParamnow copies pointers to the underlying message. Mutatingduplicate.OfUser.Contentchanges the original too; assigningduplicate.Contentin v1 changed only the copy.
Authentication headers
For the direct Claude API, the new SDKs and ant switch API-key authentication from x-api-key to Authorization: Bearer <key>, according to the SDK and CLI migration notes.
The server still accepts x-api-key as a legacy fallback, as the API overview confirms. The SDK upgrade therefore changes the header presented to gateways without invalidating existing raw HTTP clients using x-api-key.
Claude Code migration command
Claude Code 2.1.307 adds /claude-api api-version to move application code to 2026-10-21, according to the official release notes.
Admin and analytics fields
Admin and Enterprise Analytics responses stop including the old names of renamed fields. Anthropic lists these replacements in the response-field migration notes:
| API surface | Old field | Replacement |
| --- | --- | --- |
| RBAC groups | roles | role_ids |
| RBAC group members | group_id | rbac_group_id |
| RBAC roles | name | display_name |
| Organization and workspace rate limits | group_type | group.type |
| API keys | workspace_id | scope |
| Per-user usage and cost reports | actor.email | actor.email_address |
| Activity summaries | summaries | data |
The API-key change also changes semantics. Previously, workspace_id: null could mean either the Default Workspace or an all-workspaces key.
Under the new contract:
- A workspace-bound key exposes the workspace’s real ID in
scope.workspace_id, including for the Default Workspace. - An all-workspaces key has
scope: {"type": "organization"}and noworkspace_id. - List Workspaces with
include_default=trueexposes the Default Workspace’s ID under the workspace named"Default".
The rate-limit list endpoints’ group_type query parameter and the API-key list endpoint’s workspace_id filter are unchanged.