Claude API Version 2026-10-21: Power-User Guide to the SDK Upgrade and Breaking Changes

Last updated: November 4, 2026

Claude API version 2026-10-21, released October 21, 2026, is the first new Claude API version since 2023-06-01. It removes temperature, top_p and top_k, rejects some document and citation placements, renames Admin API fields, and ships with new SDK majors that send API keys as Bearer tokens.

Contents

Every Claude API request carries an anthropic-version header, and the API versions page now lists 2026-10-21 as the latest. Anthropic announced it in the Claude Platform release notes together with new major versions of every official SDK and the ant command-line tool. This guide summarizes the official migration guide.

What changed at a glance

Area What changed What to do
Sampling parameters temperature, top_p and top_k return a 400 error on every model Remove them; defaults apply, including temperature 1.0
Documents in assistant turns A document block placed directly in an assistant message returns a 400 error Send documents in user messages
Citations in user turns A text block with a non-empty citations array in a user message returns a 400 error Strip citations from blocks you send as the user
Admin API fields Old names such as roles, group_id, name, group_type and workspace_id are gone Read role_ids, rbac_group_id, display_name, group.type and scope
Enterprise Analytics API actor.email and summaries are gone Read actor.email_address and data
SDK authentication API keys go out as Authorization: Bearer Update proxies or code that read X-Api-Key
SDK message types MessageParam becomes a union of user, assistant and system types Fix typed constructors, subclasses and role checks
License SDKs and CLI move from MIT to Apache 2.0 Update dependency license records

Breaking changes in the API

The Messages API changes apply to POST /v1/messages, to token counting and to every request in a Message Batch created with the new version. The biggest is the removal of sampling controls. According to the migration guide, models that already accept only the default values, such as Claude 4.7 and later, sample exactly as before. On models that still accepted 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.

Two content rules also tighten. A document block placed directly in an assistant message is rejected, although a document nested inside another block, such as a web fetch result Claude returned, is still accepted. A text block with a non-empty citations array in a user message is rejected too, including inside search_result blocks. Citations on Claude’s own earlier replies, and the "citations": {"enabled": true} setting on documents, still work.

For organization tooling, Admin API responses drop the old names of renamed fields. API keys lose workspace_id in favor of scope: a key bound to a workspace, including the Default Workspace, now reports that workspace’s real ID in scope.workspace_id, and an all-workspaces key has a scope type of organization.

Breaking changes in the SDKs and CLI

The new SDK majors include changes that do not depend on the API version. The most widely felt is authentication: the SDKs and CLI send your key as Authorization: Bearer <key> instead of X-Api-Key. The Claude API accepts either header, so direct calls keep working, but a gateway, middleware or log filter that reads X-Api-Key must change. A client now holds one credential. In Python, passing both api_key and auth_token raises a ValueError instead of sending two headers.

MessageParam is now a union of UserMessageParam, AssistantMessageParam and SystemMessageParam. Literals that name their role need no change, but calling MessageParam(...) in Python now raises a TypeError, and typed code in other languages must use the class for each role. The legacy Text Completions API is gone from the TypeScript, Go, Java and Ruby SDKs and the CLI, and the CLI drops the --api-key and --auth-token flags in favor of environment variables, --api-key-stdin or ant auth login.

SDK versions that send 2026-10-21

Language Package First version on 2026-10-21
Python anthropic 2.0.0
TypeScript @anthropic-ai/sdk 1.0.0
C# Anthropic 13.0.0
Go github.com/anthropics/anthropic-sdk-go/v2 2.0.0
Java com.anthropic:anthropic-java 3.0.0
PHP anthropic-ai/sdk 1.0.0
Ruby anthropic 2.0.0
CLI ant 2.0.0

The anthropic package on PyPI shows version 2.0.0 published on October 21, 2026, with later 2.x releases since and the Apache-2.0 license. The Python SDK v2.0.0 release is on GitHub. Upgrade Bedrock, Vertex, Foundry and AWS add-on packages to their matching majors in the same change.

How to upgrade, step by step

  1. Inventory every place your code sends temperature, top_p or top_k, places documents in assistant turns, or sends citations in user turns. Decide whether each request can drop them.
  2. Check proxies, gateways, logging and test stubs for anything that reads or sets X-Api-Key, and update them to use Authorization.
  3. Upgrade the SDK to the version in the table above. In Go, change imports to github.com/anthropics/anthropic-sdk-go/v2. In PHP, run composer require "anthropic-ai/sdk", because composer update alone stays within your current constraint.
  4. If you call the API without an SDK, set the header anthropic-version: 2026-10-21.
  5. Fix typed message construction, role checks and any Admin API field reads flagged by your type checker or tests.
  6. Test against 2026-10-21 before release, and ship the SDK upgrade together with the code fixes. The migration guide names the /claude-api api-version command as the easiest way to upgrade your code.

If you use Claude Code for the upgrade, our Claude Code guide covers its current features. The Claude message threads guide explains another recent API addition that pairs well with the new SDKs.

How 2026-10-21 compares with 2023-06-01

Version 2023-06-01 changed the streaming format, then stayed in place for more than three years while Anthropic added features as optional inputs. Version 2026-10-21 is a cleanup release: it removes parameters that newer models already ignored, drops renamed fields, and aligns the SDKs on one authentication header. It adds no new model capabilities by itself; for models and costs, see our Claude Haiku 5.5 guide and Claude API pricing guide.

Limitations and when to wait

  • On Amazon Bedrock, 2026-10-21 works only with Claude 4.7 and later models. Calls to older Bedrock models should stay on your current SDK or API version.
  • Workloads that depend on a low temperature with Claude Sonnet 4.6 or other models that honored it lose that control. The migration guide says to keep those requests on 2023-06-01 if needed.
  • An SDK sends the API version that was current when its major version was released, so the new majors bring the API changes with them.

Frequently asked questions

What is Claude API version 2026-10-21?

It is the first new Claude API version since 2023-06-01, released October 21, 2026. You select it with the anthropic-version header or by installing the new SDK major versions.

Which SDK versions use API version 2026-10-21?

Python SDK 2.0.0, TypeScript SDK 1.0.0, C# SDK 13.0.0, Go SDK 2.0.0, Java SDK 3.0.0, PHP SDK 1.0.0, Ruby SDK 2.0.0 and the ant CLI 2.0.0 are the first releases that send 2026-10-21 by default.

Can I still set temperature on the Claude API?

Not on 2026-10-21. A request that sends temperature, top_p or top_k returns a 400 error on every model, even at the default value. If a request depends on a lower temperature, Anthropic says to keep it on 2023-06-01.

Do I have to change my proxy for the new Claude SDKs?

Possibly. The new SDKs and CLI send the API key as Authorization: Bearer instead of X-Api-Key. The Claude API accepts either header, but a proxy, gateway, log filter or test stub that reads X-Api-Key must be updated to read Authorization.

Does API version 2026-10-21 work on Amazon Bedrock?

Only for Claude 4.7 and later models. For Opus 4.6 and earlier on Bedrock, Anthropic says to stay on your current SDK version or keep sending your current API version until you move those calls to a newer model.

Did the Anthropic SDK license change?

Yes. Starting with the new major versions, the SDKs and the ant CLI are licensed under Apache 2.0. Earlier versions remain under the MIT License. No code changes are needed, but dependency license records should be updated.

Sources

Image: Claude AI symbol from Wikimedia Commons, released under CC0 (resized). Claude is a trademark of Anthropic. FreeAnswers is not affiliated with or endorsed by Anthropic.



Related answers

Leave a Comment