Claude's new API version drops temperature, top_p and top_k
Anthropic's API version 2026-10-21 rejects sampling parameters outright, switches API keys to a Bearer header, and relicenses its SDKs under Apache 2.0.
Anthropic has released a new Claude API version, 2026-10-21, alongside major new releases of all seven official SDKs and its ant CLI: Python 2.0.0, TypeScript 1.0.0, C# 13.0.0, Go 2.0.0, Java 3.0.0, PHP 1.0.0 and Ruby 2.0.0. Existing code on the previous version, 2023-06-01, keeps working unchanged unless you opt in.
The headline break: sending temperature, top_p or top_k in a Messages or Batch request now returns a 400 error, even at the parameter’s own default value. You have to delete them, not just leave them unset. The SDKs also switch to sending your key as Authorization: Bearer instead of X-Api-Key, though the API itself still accepts either header:
# Before
X-Api-Key: <key>
# After
Authorization: Bearer <key>
The client libraries are now licensed under Apache 2.0 instead of MIT, and MessageParam becomes a union type split by role in every strongly typed SDK.
Why it matters: if you tuned temperature for more consistent output on an older model such as Sonnet 4.6, that tuning doesn’t error, it just silently stops applying once you upgrade, so test before you switch. Anything reading or setting X-Api-Key in front of the API, like a proxy or gateway, needs updating too.
The caveat: on Amazon Bedrock, 2026-10-21 only works with Claude 4.7 and later models.