Claude API’s first new version since 2023 drops temperature

On October 21, Anthropic turned temperature, top_p and top_k into errors: under the new Claude API version 2026-10-21, a request that sends any of them gets a 400, even when the value is the default. It is the first official version since 2023. Until now, the version history in the docs listed only 2023-06-01 and the 2023-01-01 initial release.
Anthropic’s migration guide lists every breaking change and the SDK versions that pick it up. The old version stays: “2023-06-01 is not deprecated,” the ClaudeDevs account wrote. The company plans to release versions more often “so you can handle breaking changes before a new model requires them.” You set the version on each request in the anthropic-version header. Under Anthropic’s versioning rules, a given version keeps its existing input and output parameters.
The end of temperature
The sampling change covers Messages requests and Message Batch requests. A request that leaves the three parameters out samples at their defaults, including a temperature of 1.0, the same as a 2023-06-01 request without them. The guide says Claude 4.7 and later models already accept only the defaults, so they sample as before.
Older models are where behaviour changes. On a model that accepts other values, such as Claude Sonnet 4.6, a request that lowered temperature for more consistent output loses that effect, and no other setting replaces it. For a request that relies on a non-default value, the guide gives two options: stop sending the parameter, or keep that request on 2023-06-01.
Documents, citations and renamed fields
Two content rules also get stricter. They apply to POST /v1/messages, to token counting, and to every request in a Message Batch created with the new version. A document block placed directly in an assistant message now returns a 400, so documents go in user messages. A document nested inside another block is still accepted, for example a web fetch tool result that Claude returned. A text block with a non-empty citations array in a user message also returns a 400, including text inside search_result blocks. Citations on Claude’s earlier replies that you send back in assistant messages still work, and so does "citations": {"enabled": true} on documents and search results.
The Admin API and the Claude Enterprise Analytics API no longer return the old names of renamed fields:
- RBAC groups:
rolesbecomesrole_ids - RBAC group members:
group_idbecomesrbac_group_id - RBAC roles:
namebecomesdisplay_name - Organization and workspace rate limits:
group_typebecomesgroup.type - API keys:
workspace_idbecomesscope, with different values - Per-user usage and cost reports:
actor.emailbecomesactor.email_address - Activity summaries:
summariesbecomesdata
The group_type query parameter on the rate-limit list endpoints stays the same, and so does the workspace_id filter on the API key list endpoint.
Under 2023-06-01, an API key’s workspace_id was null in two cases: a key bound to the Default Workspace, and a key not bound to any single workspace. Under 2026-10-21, scope.workspace_id carries the real workspace ID, including the Default Workspace’s. An all-workspaces key has a scope of {"type": "organization"} and no workspace ID. Code that treated null as “Default” now has to compare against the Default Workspace’s ID. To get that ID, call List Workspaces with include_default=true and take the workspace named “Default”.
What the new SDKs change
New major versions of the SDKs and the ant CLI came out the same day. They send 2026-10-21 by default, including from their Amazon Bedrock and Google Cloud clients. Earlier versions sent 2023-06-01 with every request. The removed parameters and old field names are also gone from the SDK types and from the CLI’s flags and output.
The SDKs and the CLI now send the API key as Authorization: Bearer <key> instead of in X-Api-Key. The Claude API accepts either header, so a program that talks to it directly needs no change. A proxy or gateway that reads or sets X-Api-Key does: switch it to Authorization, or send the key in X-Api-Key yourself. The guide’s Python tab lists two exceptions: AnthropicFoundry still sends its key as x-api-key, and AnthropicBedrockMantle already sent a bearer token.
Because an API key and an auth token now share a header, a client holds one credential. In the Python, TypeScript, Go, PHP and Ruby SDKs, code that removed X-Api-Key so a request carried only an auth token should be deleted, not adapted, because removing Authorization would remove the token. If no credential is passed in code and both ANTHROPIC_API_KEY and ANTHROPIC_AUTH_TOKEN are set, the client uses the key.
The other SDK changes touch types and legacy features:
MessageParamsplits intoUserMessageParam,AssistantMessageParamandSystemMessageParam, and the beta types split the same way. The requests the SDK sends stay the same.- In the C#, Go, Java, PHP and Ruby SDKs, required fields that can hold only one value become constants, and their one-member enum types are removed.
- The TypeScript and Ruby tool runners drop client-side compaction in favour of server-side compaction, where the API itself summarizes the conversation. Its trigger threshold must be at least 50,000 tokens.
- Text Completions is removed from the TypeScript, Go, Java and Ruby SDKs and from the CLI.
- The non-beta Models methods no longer take
betas. Beta headers go throughclient.beta.modelsorant beta:models. - The CLI drops
--api-keyand--auth-token, which have printed a deprecation warning since v1.27.0, because a value on the command line shows up in shell history and process listings. Use the environment variables,--api-key-stdin,--auth-token-stdinorant auth logininstead. - The SDKs and the CLI move from the MIT License to Apache 2.0. Earlier versions stay under MIT.
The new version works on the Claude API, Claude Platform on AWS, Microsoft Foundry and Google Cloud. On Amazon Bedrock it covers only Claude 4.7 and later models, the versioning docs say.
Our analysis
What we checked
On October 22 we installed the last 2023-06-01 releases and the new major versions of the TypeScript and Python SDKs, plus ant CLI v2.0.0. We sent requests through stub transports and a local capture server, so nothing reached the real API.
In both SDKs, the last old release we ran sends 2023-06-01 with the key in x-api-key, and the new release we ran sends 2026-10-21 with a Bearer key. The SDKs remove the sampling parameters from their types but not from what they send, so untyped code can still trigger the 400. For Python users, the typed parameters were already gone two months earlier.
| Release | Published (UTC) | Version header | Key sent as |
|---|---|---|---|
| TS 0.137.0 | Oct 20, 22:23 | 2023-06-01 | x-api-key |
| TS 1.1.0 (1.0.0 at 16:00 Oct 21) | Oct 21, 22:03 | 2026-10-21 | Bearer |
| Python 1.17.0 | Oct 20, 22:13 | 2023-06-01 | x-api-key |
| Python 2.1.0 (2.0.0 at 15:51 Oct 21) | Oct 21, 22:00 | 2026-10-21 | Bearer |
| ant CLI 2.0.0 | Oct 21, 17:30 | 2026-10-21 | Bearer |
- Python 2.1.0 raises
TypeErroron atemperatureargument but sendstemperatureunchanged throughextra_body. Plain-JS calls to TypeScript 1.1.0 also send it unchanged. - Python’s typed sampling arguments disappeared in 1.0.0 on August 20. The changelog for that release doesn’t mention it.
- The guide says Claude 4.7 and later accept only the defaults. The TypeScript 0.137.0 doc comments are more precise: for models after Opus 4.6,
temperatureaccepts only 1.0,top_paccepts any value of 0.99 or higher, andtop_krejects every value. That comes from the documentation; we did not measure it. - The Bedrock and Vertex clients send the version as a body field,
anthropic_version. The old clients hard-codedbedrock-2023-05-31andvertex-2023-10-16. The new ones take the value from the core SDK’s version, which we infer makes it 2026-10-21; we did not send anything to AWS or Google Cloud. - In the CLI,
--temperatureand--api-keystop withflag provided but not defined. The help text lists no flag for a custom header, so we found no way to pin a CLI request to 2023-06-01.
Moving over
The guide’s steps come in order. First, install the first SDK major that uses 2026-10-21: TypeScript 1.0.0, Python 2.0.0 or ant 2.0.0. The Go SDK went to v2.0.0, per the CLI changelog. If you call the API without an SDK, set the anthropic-version header yourself. Next, fix each breaking change that affects you and test against the new version. Then release the upgrade and the fixes together. In Claude Code, Anthropic points to the /claude-api skill as one way to do the update.
For a Sonnet 4.6 call that has to keep a low temperature, we confirmed that Python 2.1.0 can pin a single request back with extra_headers={"anthropic-version": "2023-06-01"}.
Up next
Claude Duet works while you’re away and asks before acting, Video
Anthropic’s new agent app keeps working when you step away, yet Claude Duet never directly sees your passwords and checks with you before acting on your behalf. Have you ever had an agent act on your behalf without asking first?
Related stories
- Claude’s API sandbox got a new name and a cost readout
- Cowork and chat become one Claude, tasks keep running
- Claude Academy opens with free courses and tutorials
- Claude Desktop boots ~2x faster after a timer fix
- A browser inside Claude Desktop, always on in Cowork
- Anthropic’s Workbench moves into a new Build section
Comments
No comments yet. Be the first.
Join the conversation
Sign in to leave a comment. It appears after moderation.

