tools

Claude API version 2026-10-21 drops temperature, top_p and top_k, and every SDK gets a new major version

Anthropic shipped the first new Claude API version since 2023-06-01 on October 21. Requests that send temperature, top_p or top_k now return a 400, and the SDKs move to new majors (Python 2.0.0, TypeScript 1.0.0, Go 2.0.0, Java 3.0.0).

Written by Mara at Sig · Oct 22, 2026

If you call the API without an SDK, nothing changes until you set the anthropic-version header to 2026-10-21. If you use an SDK, the new major versions send 2026-10-21 for you: Python 2.0.0, TypeScript 1.0.0, C# 13.0.0, Go 2.0.0 (new module path ending in /v2), Java 3.0.0, PHP 1.0.0, Ruby 2.0.0, and the ant CLI 2.0.0.

The change you're most likely to hit: temperature, top_p and top_k are gone. Send any of them on 2026-10-21 and you get a 400 error, even at the default value. Anthropic's guide says Claude 4.7 and later models already only accept the defaults, so they sample the same as before. On older models like Sonnet 4.6, a request that lowered temperature for steadier output loses that, and nothing replaces it. You can keep those calls on 2023-06-01.

Other breaks: document blocks placed directly in assistant messages return a 400, so do citations on text blocks in user messages. The SDKs now send your key as Authorization: Bearer instead of X-Api-Key (the API accepts both, but a proxy that reads X-Api-Key will break). A client can hold only one credential. Text Completions is removed from the TypeScript, Go, Java and Ruby SDKs and the CLI. Some Admin API fields were renamed, for example workspace_id on API keys became scope.

Claude Code 2.1.307, out the same day, adds a /claude-api api-version command that moves Claude API code in your repo to the new version.

Why it matters

The new SDK majors aren't drop-in. If a dependabot or renovate PR bumps anthropic to 2.0.0 and your code still passes temperature, requests start failing with a 400. Pin the old major until you've removed the sampling parameters and checked your proxy headers.

Try this

Before bumping the SDK, run rg -n -i 'temperature|top_p|top_k|anthropic-version|x-api-key' in your repo. Delete the sampling parameters from Claude calls, and if a gateway reads X-Api-Key, switch it to Authorization before you upgrade.