Claude API 2026-10-21: sampling parameters removed
As of 2026-10-26, Anthropic has released Claude API version 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. Version 2023-06-01 still works, and the official version page lists no deprecation date for it.
Updated 2026-10-26
Four key points
Sampling parameters error out
The official version page: sending any of temperature, top_p, or top_k returns a 400 error on every model.
The old version still works
The official migration guide says requests that rely on non-default sampling values can stay on 2023-06-01; the version page lists no deprecation date.
SDKs default to the new version
The official release notes: Python SDK 2.0.0 and TypeScript SDK 1.0.0 send 2026-10-21 by default; C#, Go, Java, PHP, Ruby, and the ant CLI also have new versions.
License change
The official release notes: the new SDK and CLI versions move to Apache 2.0; earlier versions stay under MIT.
What changed in 2026-10-21
The official release notes list 2026-10-21 as a new API version. The version page lists Messages API changes including: a document block placed directly in an assistant message returns 400; a text block with a non-empty citations array in a user message returns 400; temperature, top_p, and top_k are removed, and sending any of them returns a 400 error on every model. The migration guide adds that the error occurs even at the default value, so remove all three.
What the release notes say
The 2026-10-21 release notes also list new SDK and ant CLI versions: Python 2.0.0, TypeScript 1.0.0, C# 13.0.0, Go 2.0.0, Java 3.0.0, PHP 1.0.0, Ruby 2.0.0, and ant CLI 2.0.0, all sending 2026-10-21 by default. These versions also carry breaking changes unrelated to the API version, and the license changes from MIT to Apache 2.0.
Timeline
-
2026-10-21
Anthropic releases API version 2026-10-21 together with SDK and ant CLI versions that use it by default.
-
2026-10-21
Claude Code 2.1.307 adds the /claude-api api-version command to move Claude API code to 2026-10-21.
-
2026-10-26
Checked against the official version page: version 2023-06-01 still has no listed deprecation date.
Confirmed vs not published
Confirmed (verbatim in the official pages)
2026-10-21 is released; sending temperature, top_p, or top_k returns 400; version 2023-06-01 still works; new SDK versions send 2026-10-21 by default; the new SDK and CLI use Apache 2.0; Claude Code 2.1.307 adds /claude-api api-version.
Unverified and not published
The official version page and release notes give no deprecation date for 2023-06-01 and no date for ending support for the old version. The version page only says Anthropic recommends using the latest API version whenever possible.
Old request vs new request
A 2023-06-01 request
It can send temperature, top_p, and top_k; older SDKs send 2023-06-01 by default. The migration guide says requests that rely on non-default values can stay on this version.
A 2026-10-21 request
It cannot send the three parameters; sending any of them returns 400 on every model. Without them, the request samples with the defaults, including a temperature of 1.0.
Migration steps
- 1Update your requests as the official migration guide says: remove temperature, top_p, and top_k (sending any of them returns 400), send document blocks in user messages instead of assistant messages, and remove citations from text blocks in user messages.
- 2Without an SDK, set the anthropic-version header to 2026-10-21; with an SDK, upgrade to the first version that sends it by default, such as Python 2.0.0 or TypeScript 1.0.0.
- 3Handle the SDK major-version breaking changes that are unrelated to the API version, and test your integration against 2026-10-21 before release.
Calling Claude on QCode
The QCode endpoint table gives https://api.qcode.cc/api as the Claude Agent SDK base_url, with a cr_ key from the dashboard. Billing is per token, with per-model rates on /models. For the migration, your own request code has to drop temperature, top_p, and top_k (the official migration guide).
Frequently asked questions
Can I still send temperature after 2026-10-21?
No. The official version page says the three parameters are removed, and sending any of them returns 400 on every model; the migration guide adds that this happens even at the default value.
When does version 2023-06-01 stop working?
The official version page lists no deprecation date, and the release notes give no schedule. The migration guide only says requests that rely on non-default sampling values can stay on 2023-06-01.
Which SDK versions use 2026-10-21 by default?
The official release notes list Python 2.0.0, TypeScript 1.0.0, C# 13.0.0, Go 2.0.0, Java 3.0.0, PHP 1.0.0, Ruby 2.0.0, and ant CLI 2.0.0.
What happens if I omit the sampling parameters?
The official migration guide says the request samples with their defaults, including a temperature of 1.0, the same as a 2023-06-01 request that leaves them out. On models that accept other values, such as Claude Sonnet 4.6, a request that lowered temperature for more consistent output loses that effect, and the guide says no other setting replaces it.
Does Claude Code have a migration command?
The official changelog entry for 2.1.307 (2026-10-21) says the release adds /claude-api api-version to move Claude API code to 2026-10-21.
What changes when calling Claude on QCode?
Use the QCode docs: the Claude Agent SDK base_url is https://api.qcode.cc/api and the key is a cr_ key. For the migration, your own request code has to drop temperature, top_p, and top_k; models are billed per token, with per-model rates on /models.
Sources
Anthropic official release notes, API version page, and the 2026-10-21 migration guide (captured 2026-10-26); the official Claude Code changelog (captured 2026-10-26); the QCode docs endpoint and pay-as-you-go pages (captured 2026-10-26); the QCode /models page (captured 2026-10-26).