claude/for
Search
Subscribe
Work & Tools

Claude API version 2026-10-21: what breaks, how to upgrade

API version 2026-10-21 removes temperature, top_p and top_k, and the SDKs now send Authorization: Bearer. Here is what breaks and the upgrade order.

If code you own calls the Claude API, API version 2026-10-21 removes three sampling settings, rejects two message shapes with a 400 error, and ships new major SDK versions. Anthropic's migration guide covers the jump from 2023-06-01. If you only use claude.ai or Claude Code, this page is not about you.

This site is independent and not affiliated with Anthropic. We read the migration guide and the release notes on 2026-10-23. We did not run any upgrade or call the API with the new version, so nothing below is a hands-on result.

What changed, in one list

The release notes date the launch to October 21, 2026. Here is what the migration guide says will bite:

  • Sampling parameters are gone. temperature, top_p and top_k now return a 400 error.
  • Two message shapes are rejected. document blocks placed directly in assistant messages, and citations on text blocks in user messages.
  • SDKs change how they authenticate. Your key goes out as Authorization: Bearer, not X-Api-Key.
  • Admin API fields were renamed. Only matters if you read those responses.

Who needs to act

You do if an app, script or automation calls api.anthropic.com with your key, including one a contractor built. The guide says that if you use an SDK, your requests use the API version current when your SDK's major version shipped. So nothing changes until you upgrade the SDK.

You do not if you only chat in claude.ai. Setting up a key for Claude Code is a separate job, covered in our API key guide.

The upgrade order

now

Find what you call

Search your code for temperature, top_p, top_k, citations, X-Api-Key and anthropic-version.

next

Move to the new version

Upgrade the SDK, or set the anthropic-version header to 2026-10-21 if you call the API directly.

next

Fix the breaking changes

Remove the sampling parameters, move documents to user messages, drop citations from user text blocks.

next

Test, then release together

Anthropic says to release the upgrade together with your fixes.

The search in step one is our suggestion, not Anthropic's, and we did not run it on a real codebase. Claude Code 2.1.307 also added a command for this job, which we describe in our 2.1.306 to 2.1.308 brief.

The SDK versions to install

Anthropic's release notes list the first versions that send 2026-10-21 by default:

LanguageVersion
Python2.0.0
TypeScript1.0.0
C#13.0.0
Go2.0.0
Java3.0.0
PHP1.0.0
Ruby2.0.0
ant CLI2.0.0

The migration guide gives the upgrade steps for each language in its own tab, so follow the one for your language.

The Claude moves worth stealing, by email

Workflows tested on real jobs, sent only when they are worth it. Free.

Sampling parameters: the change that costs you something

Anthropic's wording is blunt: a request that sends temperature, top_p or top_k "returns a 400 error, even at the parameter's default value." Remove all three. The latest SDKs and the CLI no longer have them.

Newer models already accept only defaults, so nothing shifts there. On older ones, such as Claude Sonnet 4.6, Anthropic says a lowered temperature for more consistent output loses its effect, and "No other setting replaces it." If a request depends on a non-default value, the guide says to keep that request on 2023-06-01.

Messages and keys

Documents and citations are the two request shapes that now fail:

  • A document block directly in an assistant message returns a 400 error. Send it in a user message instead. A document nested inside another block, such as a web fetch tool result that Claude returned, is still accepted.
  • A text block in a user message with a non-empty citations array returns a 400 error. Citations on assistant text blocks, the replies you send back, are still accepted.

On keys, the SDK and the CLI send yours as Authorization: Bearer <key>. The Claude API accepts a key in either header. Change anything in your own stack that reads X-Api-Key, such as a proxy, a log filter or a test stub.

What else the new SDKs change

These matter only if they match your stack, and the migration guide has code for each:

  • MessageParam is split into one type per role: user, assistant and system. In Python and TypeScript, a message written as a plain dict or object literal needs little or no change.
  • A client holds one credential. Passing an API key and an auth token together now raises an error in Python and TypeScript.
  • Text Completions is removed from the TypeScript, Go, Java and Ruby SDKs and from the CLI. Use the Messages API.
  • The TypeScript and Ruby tool runners lose client-side compaction. Server-side compaction needs a trigger threshold of at least 50,000 tokens.
  • The SDKs and CLI move to the Apache License 2.0. Earlier versions stay under MIT.

Honest limits

  • On Amazon Bedrock, 2026-10-21 is available only for Claude 4.7 and later models. On older models, stay on your current SDK version.
  • Admin API and Enterprise Analytics API responses drop old field names. For example, API keys lose workspace_id in favor of scope. The guide lists every rename, and we did not check them against a live organization.
  • We cannot tell you how long your own migration takes. That depends on how many places set sampling values.

Do I have to upgrade to API version 2026-10-21?

The migration guide sets no deadline, and we saw none in the release entries we read. It even tells you to keep some requests on 2023-06-01 if they rely on non-default sampling values. The new SDK majors send 2026-10-21 by default, so upgrading them is what moves you.

How do I set the version without an SDK?

Send the anthropic-version header with the value 2026-10-21 on each request. Anthropic's migration guide shows a cURL call that does this. Still read the breaking changes first, because the same 400 errors apply to direct calls.

Will removing temperature change my results?

On models that already accept only default values, such as Claude 4.7 and later, Anthropic says requests sample as before. On models that accept other values, a lowered temperature stops having an effect. If you relied on one, keep that request on the old version.

Sources (checked 2026-10-23)

The Claude moves worth stealing, by email

Workflows tested on real jobs, sent only when they are worth it. Free.