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
One key for Claude, GPT and leading Chinese models, billed per token, up and running in minutes.
- Billed per token — live rates on /models
- Pay by card (Visa / Mastercard / AMEX), Apple Pay, Google Pay or crypto
- Self-service: top up and activate instantly
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
Anthropic releases API version 2026-10-21 together with SDK and ant CLI versions that use it by default.
Claude Code 2.1.307 adds the /claude-api api-version command to move Claude API code to 2026-10-21.
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
① Update 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. ② Without 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. ③ Handle 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).
Follow the official steps before the 400s start
Want to try it for a few days first? Not ready for a monthly plan? Pay-as-you-go Packs start at $4 for a one-time quota you use within 7 days; if you already have a Personal Plan, add a booster pack when you need more quota.
Related reading
Claude Code Pay-as-you-go Packs: No Subscription, 7 Days
Buy quota once and use it within 7 days, no subscription; extra packs add to the same key.
Claude Haiku 5.5 Breaking Changes (Oct 2026): 5 Fixes
The five breaking changes from Haiku 4.5 to 5.5, the 400 errors, and the official fixes.
ANTHROPIC_BASE_URL in Claude Code (Oct 2026): 2 Env Vars
How to set ANTHROPIC_BASE_URL and the key variable in Claude Code.
Crypto payment guide
Nine coins, 56 networks, zero platform fee for AI coding API credits.
Anthropic details on this page were checked on 2026-10-26 against the official release notes, version page, and migration guide; QCode setup follows docs.qcode.cc; model availability and rates follow /models. Official changes are not announced separately.