Technology

Add as a preferred source on Google

Anthropic API Version Rejects Requests With Three Sampling Fields

Developers with custom sampling logic can remove the settings from calls on the new version or keep those calls on API version `2023-06-01`.

Updated 2 min read
A developer revises an API request on a laptop in a San Francisco workspace / TokenPost.ai (macro)
A developer revises an API request on a laptop in a San Francisco workspace / TokenPost.ai (macro)

Anthropic's Claude API now requires developers using custom sampling values to revise requests or keep them on version 2023-06-01, because a newer version rejects three sampling controls.

Anthropic's migration guide says the 2026-10-21 version rejects requests containing temperature, top_p or top_k on both the Messages API and Message Batch API. A field triggers the error even when it carries its default value. Teams whose code depends on nondefault sampling can remove the fields or continue sending those calls under 2023-06-01.

Requests that omit the three controls use the API’s standard sampling behavior, including a temperature of 1.0. Anthropic says that matches the behavior of models such as Claude 4.7 and later, which already use only default settings. On Claude Sonnet 4.6, dropping a custom temperature removes that adjustment; the guide offers no substitute setting.

The API version also changes which message content is accepted. It rejects document blocks placed directly in assistant messages, as well as nonempty citations attached to text blocks in user messages. Anthropic has also renamed some response fields in its Admin API and Claude Enterprise Analytics API. Those changes may require developers to adjust code that builds requests or reads responses.

The version identifier governs API behavior rather than naming a Claude model. New major releases of Anthropic's client SDKs and the ant command-line tool select 2026-10-21 by default. Developers making direct API calls can choose a version through the anthropic-version header. Anthropic advises developers to verify their integrations on the new version before release.

Related articles

View all