Beta changedapi/beta
Recorded here
Lines+328added
Lines−328removed
From line
481
where the diff opens
First seen
14 Aug 2026
this site's first read of the page
Recorded edits39to this page, all time
The whole hunk
from line 481, old and new numbered
/
This page is larger than the 256 KiB this site keeps, so one side of the diff below stops where the stored text does.
from line 481
481481
482482 The version of the Claude API you want to use.
483483
484 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).
484 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning?sdk_languages=http).
485485
486486- `"anthropic-beta": optional array of AnthropicBeta`
487487
from line 953
953953
954954 The version of the Claude API you want to use.
955955
956 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).
956 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning?sdk_languages=http).
957957
958958- `"anthropic-beta": optional array of AnthropicBeta`
959959
from line 1396
13961396
13971397The Messages API can be used for either single queries or stateless multi-turn conversations.
13981398
1399Learn more about the Messages API in our [user guide](https://platform.claude.com/docs/en/get-started)
1399Learn more about the Messages API in our [user guide](https://platform.claude.com/docs/en/get-started?sdk_languages=http)
14001400
14011401#### Headers
14021402
from line 1404
14041404
14051405 The version of the Claude API you want to use.
14061406
1407 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).
1407 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning?sdk_languages=http).
14081408
14091409- `"anthropic-beta": optional array of AnthropicBeta`
14101410
from line 1530
15301530
15311531 Note that our models may stop _before_ reaching this maximum. This parameter only specifies the absolute maximum number of tokens to generate.
15321532
1533 Set to `0` to populate the [prompt cache](https://platform.claude.com/docs/en/build-with-claude/prompt-caching#pre-warming-the-cache) without generating a response.
1533 Set to `0` to populate the [prompt cache](https://platform.claude.com/docs/en/build-with-claude/prompt-caching?sdk_languages=http#pre-warming-the-cache) without generating a response.
15341534
1535 Different models have different maximum values for this parameter. See [models](https://platform.claude.com/docs/en/about-claude/models/overview) for details.
1535 Different models have different maximum values for this parameter. See [models](https://platform.claude.com/docs/en/about-claude/models/overview?sdk_languages=http) for details.
15361536
15371537 minimum: 0
15381538
from line 1544
15441544
15451545 Each input message must be an object with a `role` and `content`. You can specify a single `user`-role message, or you can include multiple `user` and `assistant` messages.
15461546
1547 If the final message uses the `assistant` role, the response content will continue immediately from the content in that message. This can be used to constrain part of the model's response. This is called prefill. On models that don't support prefill, creating a message that ends with a partial `assistant` response returns a 400 error. See [Prefill not supported](https://platform.claude.com/docs/en/api/errors#prefill-not-supported).
1547 If the final message uses the `assistant` role, the response content will continue immediately from the content in that message. This can be used to constrain part of the model's response. This is called prefill. On models that don't support prefill, creating a message that ends with a partial `assistant` response returns a 400 error. See [Prefill not supported](https://platform.claude.com/docs/en/api/errors?sdk_languages=http#prefill-not-supported).
15481548
15491549 Example with a single `user` message:
15501550
from line 1581
15811581 {"role": "user", "content": [{"type": "text", "text": "Hello, Claude"}]}
15821582 ```
15831583
1584 See [input examples](https://platform.claude.com/docs/en/build-with-claude/working-with-messages).
1584 See [input examples](https://platform.claude.com/docs/en/build-with-claude/working-with-messages?sdk_languages=http).
15851585
1586 Note that if you want to include a [system prompt](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices#give-claude-a-role), you can use the top-level `system` parameter — there is no `"system"` role for input messages in the Messages API.
1586 Note that if you want to include a [system prompt](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices?sdk_languages=http#give-claude-a-role), you can use the top-level `system` parameter — there is no `"system"` role for input messages in the Messages API.
15871587
15881588 There is a limit of 100,000 messages in a single request.
15891589
from line 1616
16161616 - `5m`: 5 minutes
16171617 - `1h`: 1 hour
16181618
1619 Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details.
1619 Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching?sdk_languages=http) for details.
16201620
16211621 - `"5m"`
16221622
from line 5145
51455145
51465146- `fallbacks: optional BetaFallbacksParam or null`
51475147
5148 Opt-in server-side retry on one or more substitute models when the requested model declines for policy reasons. Tried in order: if the first entry also declines, the second is tried, and so on. Some models don't support fallbacks; on those models, a list of fallback models returns a 400 error. See [Server-side fallback](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback#server-side-fallback). The string "default" requests the requested model's server-defined default fallback configuration. On a model that doesn't support fallbacks, the request runs on the requested model alone, so a declined request stays declined.
5148 Opt-in server-side retry on one or more substitute models when the requested model declines for policy reasons. Tried in order: if the first entry also declines, the second is tried, and so on. Some models don't support fallbacks; on those models, a list of fallback models returns a 400 error. See [Server-side fallback](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback?sdk_languages=http#server-side-fallback). The string "default" requests the requested model's server-defined default fallback configuration. On a model that doesn't support fallbacks, the request runs on the requested model alone, so a declined request stays declined.
51495149
51505150 - `array of BetaFallbackParam`
51515151
from line 5177
51775177
51785178 - `format: optional BetaJSONOutputFormat or null`
51795179
5180 A schema to specify Claude's output format in responses. See [structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs)
5180 A schema to specify Claude's output format in responses. See [structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs?sdk_languages=http)
51815181
51825182 - `type: "json_schema"`
51835183
from line 5225
52255225
52265226 Must be ≥1024 and less than `max_tokens`.
52275227
5228 See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking) for details.
5228 See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking?sdk_languages=http) for details.
52295229
52305230 minimum: 1024
52315231
from line 5243
52435243
52445244 - `display: optional "summarized" or "omitted" or "updates" or null`
52455245
5246 Controls how thinking content appears in the response. When set to `summarized`, thinking is returned normally. When set to `omitted`, thinking content is redacted but a signature is returned for multi-turn continuity. The default depends on the model; see [Controlling thinking display](https://platform.claude.com/docs/en/build-with-claude/thinking#controlling-thinking-display).
5246 Controls how thinking content appears in the response. When set to `summarized`, thinking is returned normally. When set to `omitted`, thinking content is redacted but a signature is returned for multi-turn continuity. The default depends on the model; see [Controlling thinking display](https://platform.claude.com/docs/en/build-with-claude/thinking?sdk_languages=http#controlling-thinking-display).
52475247
52485248 - `"summarized"`
52495249
from line 5269
52695269
52705270 - `display: optional "summarized" or "omitted" or "updates" or null`
52715271
5272 Controls how thinking content appears in the response. When set to `summarized`, thinking is returned normally. When set to `omitted`, thinking content is redacted but a signature is returned for multi-turn continuity. The default depends on the model; see [Controlling thinking display](https://platform.claude.com/docs/en/build-with-claude/thinking#controlling-thinking-display).
5272 Controls how thinking content appears in the response. When set to `summarized`, thinking is returned normally. When set to `omitted`, thinking content is redacted but a signature is returned for multi-turn continuity. The default depends on the model; see [Controlling thinking display](https://platform.claude.com/docs/en/build-with-claude/thinking?sdk_languages=http#controlling-thinking-display).
52735273
52745274 - `"summarized"`
52755275
from line 5323
53235323
53245324 Determines whether to use priority capacity (if available) or standard capacity for this request.
53255325
5326 Anthropic offers different levels of service for your API requests. See [service-tiers](https://platform.claude.com/docs/en/api/service-tiers) for details.
5326 Anthropic offers different levels of service for your API requests. See [service-tiers](https://platform.claude.com/docs/en/api/service-tiers?sdk_languages=http) for details.
53275327
53285328 - `"auto"`
53295329
from line 5349
53495349
53505350 Whether to incrementally stream the response using server-sent events. When `true`, SDKs return a raw event stream.
53515351
5352 In the TypeScript, Python and Ruby SDKs, the recommended way to stream is `messages.stream()`. It sets `stream` for you and accumulates the events into the final message. See [Streaming with SDKs](https://platform.claude.com/docs/en/build-with-claude/streaming#streaming-with-sdks) for an example in each language.
5352 In the TypeScript, Python and Ruby SDKs, the recommended way to stream is `messages.stream()`. It sets `stream` for you and accumulates the events into the final message. See [Streaming with SDKs](https://platform.claude.com/docs/en/build-with-claude/streaming?sdk_languages=http#streaming-with-sdks) for an example in each language.
53535353
53545354- `system: optional string or array of BetaTextBlockParam`
53555355
53565356 System prompt.
53575357
5358 A system prompt is a way of providing context and instructions to Claude, such as specifying a particular goal or role. See our [guide to system prompts](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices#give-claude-a-role).
5358 A system prompt is a way of providing context and instructions to Claude, such as specifying a particular goal or role. See our [guide to system prompts](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices?sdk_languages=http#give-claude-a-role).
53595359
53605360 - `string`
53615361
from line 5379
53795379
53805380 With `{"type": "adaptive"}`, Claude decides when and how much to think. With `{"type": "enabled"}` (manual extended thinking), you set a `budget_tokens` of at least 1,024. Thinking tokens count toward your `max_tokens` limit.
53815381
5382 Which `type` values are accepted, and what happens when you omit `thinking`, depend on the model. See [thinking](https://platform.claude.com/docs/en/build-with-claude/thinking#configuring-thinking) for each model's behavior.
5382 Which `type` values are accepted, and what happens when you omit `thinking`, depend on the model. See [thinking](https://platform.claude.com/docs/en/build-with-claude/thinking?sdk_languages=http#configuring-thinking) for each model's behavior.
53835383
53845384 - `BetaThinkingConfigEnabled object`
53855385
from line 5445
54455445
54465446 If you include `tools` in your API request, the model may return `tool_use` content blocks that represent the model's use of those tools. You can then run those tools using the tool input generated by the model and then optionally return results back to the model using `tool_result` content blocks.
54475447
5448 There are two types of tools: **client tools** and **server tools**. The behavior described below applies to client tools. For [server tools](https://platform.claude.com/docs/en/agents-and-tools/tool-use/server-tools), see their individual documentation as each has its own behavior (e.g., the [web search tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-search-tool)).
5448 There are two types of tools: **client tools** and **server tools**. The behavior described below applies to client tools. For [server tools](https://platform.claude.com/docs/en/agents-and-tools/tool-use/server-tools?sdk_languages=http), see their individual documentation as each has its own behavior (e.g., the [web search tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-search-tool?sdk_languages=http)).
54495449
54505450 Each tool definition includes:
54515451
from line 5501
55015501
55025502 Tools can be used for workflows that include running client-side tools and functions, or more generally whenever you want the model to produce a particular JSON structure of output.
55035503
5504 See our [guide](https://platform.claude.com/docs/en/agents-and-tools/tool-use/overview) for more details.
5504 See our [guide](https://platform.claude.com/docs/en/agents-and-tools/tool-use/overview?sdk_languages=http) for more details.
55055505
55065506 - `BetaTool object`
55075507
from line 5588
55885588
55895589 **Deprecated**
55905590
5591 Deprecated: Use `output_config.format` instead. See [structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs)
5591 Deprecated: Use `output_config.format` instead. See [structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs?sdk_languages=http)
55925592
55935593 A schema to specify Claude's output format in responses. This parameter will be removed in a future release.
55945594
from line 5869
58695869
58705870 This is an opaque field and should not be interpreted or parsed. When passing thinking blocks back to the API (required when using tools with extended thinking), pass them back exactly as received, with this field intact.
58715871
5872 See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking) for details.
5872 See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking?sdk_languages=http) for details.
58735873
58745874 - `thinking: string`
58755875
from line 5887
58875887
58885888 Pass `redacted_thinking` blocks back to the API unchanged when continuing a multi-turn conversation.
58895889
5890 See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking#redacted-thinking-blocks) for details.
5890 See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking?sdk_languages=http#redacted-thinking-blocks) for details.
58915891
58925892 - `BetaToolUseBlock object`
58935893
from line 6693
66936693 - `5m`: 5 minutes
66946694 - `1h`: 1 hour
66956695
6696 Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details.
6696 Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching?sdk_languages=http) for details.
66976697
66986698 - `"5m"`
66996699
from line 7713
77137713
77147714 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
77157715
7716 - `enabled: optional boolean or null`
7717
7718 Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.
7719
7720 - `BetaToolTextEditor20250124 object`
7721
7722 - `type: "text_editor_20250124"`
7723
7724 - `name: "str_replace_editor"`
7725
7726 Name of the tool.
7727
7728 This is how the tool will be called by
7716
No line in this hunk matches that.