This page is larger than the 256 KiB this site keeps, so one side of the diff below stops where the stored text does.
The two sides of this change are more than 400 edits apart, too far apart to line up, so this is the differ's own diff of it and the words inside a line are not marked.
from line 23
2323
2424 - `string`
2525
26 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 42 more`
26 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 43 more`
2727
2828 - `"message-batches-2024-09-24"`
2929
from line 114
114114 - `"thinking-binding-controls-2026-08-01"`
115115
116116 - `"mid-conversation-system-clear-at-2026-08-21"`
117
118 - `"compact-2026-09-04"`
117119
118120- `"anthropic-user-profile-id": optional string`
119121
from line 1286
12841286 - `encrypted_content: optional string or null`
12851287
12861288 Opaque metadata from prior compaction, to be round-tripped verbatim
1289
1290 - `signature: optional string or null`
1291
1292 The block's signature as returned, to be sent back verbatim
12871293
12881294 - `BetaRequestToolAdditionBlock object`
12891295
from line 1530
15241530- `cache_control: optional BetaCacheControlEphemeral or null`
15251531
15261532 Top-level cache control automatically applies a cache_control marker to the last cacheable block in the request.
1533
1534- `compaction: optional BetaCompactionConfig or null`
1535
1536 Compact the whole conversation and return a signed `compaction` block,
1537 alone, that a later request sends back first in `messages`, in place of
1538 the messages it summarizes. There is no trigger and no pause flag: sending
1539 the parameter compacts, and nothing is sampled after the block.
1540
1541 The summarization prompt is the server's own unless `instructions` are
1542 given, which then replace it for this request; a value that is empty or
1543 only whitespace counts as absent.
1544
1545 - `type: "summarize"`
1546
1547 - `instructions: optional string or null`
1548
1549 Replaces the server's default summarization prompt for this request. An empty or whitespace-only value counts as absent.
1550
1551 maxLength: 16384
15271552
15281553- `container: optional BetaContainerParams or string or null`
15291554
from line 3468
34433468
34443469 When true, guarantees schema validation on tool names and inputs
34453470
3471 - `url_sources: optional BetaWebFetchURLSources or null`
3472
3473 Which sources contribute to the set of URLs web fetch may fetch.
3474
3475 Each key is a tagged variant: `user_input` is `all` or `none`; the
3476 two tool filters are `all`, `none`, `only` (only the named tools'
3477 results) or `except` (every result but the named tools'). A named tool
3478 must be declared in this request's `tools[]`.
3479
3480 - `client_tool_results: optional BetaWebFetchURLSourceAll or BetaWebFetchURLSourceNone or BetaWebFetchURLSourceOnly or BetaWebFetchURLSourceExcept`
3481
3482 Which client tools' results contribute fetchable URLs: "all", "none", or an only or except list of client tool names from tools[].
3483
3484 - `BetaWebFetchURLSourceAll object`
3485
3486 The `url_sources` variant under which a source contributes in
3487 full: every result of the tool filter's source, or all user input.
3488
3489 - `type: "all"`
3490
3491 - `BetaWebFetchURLSourceNone object`
3492
3493 The `url_sources` variant under which a source contributes nothing:
3494 no result of the tool filter's source, or no user input.
3495
3496 - `type: "none"`
3497
3498 - `BetaWebFetchURLSourceOnly object`
3499
3500 The tool filter variant under which only the named tools' results
3501 contribute.
3502
3503 - `type: "only"`
3504
3505 - `tools: array of BetaWebFetchURLSourceToolReference`
3506
3507 - `type: "tool_reference"`
3508
3509 - `name: string`
3510
3511 - `BetaWebFetchURLSourceExcept object`
3512
3513 The tool filter variant under which every result but the named
3514 tools' contributes.
3515
3516 - `type: "except"`
3517
3518 - `tools: array of BetaWebFetchURLSourceToolReference`
3519
3520 - `type: "tool_reference"`
3521
3522 - `name: string`
3523
3524 - `server_tool_results: optional BetaWebFetchURLSourceAll or BetaWebFetchURLSourceNone or BetaWebFetchURLSourceOnly or BetaWebFetchURLSourceExcept`
3525
3526 Which server tools' results contribute fetchable URLs: "all", "none", or an only or except list of server tool names from tools[]; only web_search and web_fetch results ever contribute.
3527
3528 - `BetaWebFetchURLSourceAll object`
3529
3530 The `url_sources` variant under which a source contributes in
3531 full: every result of the tool filter's source, or all user input.
3532
3533 - `BetaWebFetchURLSourceNone object`
3534
3535 The `url_sources` variant under which a source contributes nothing:
3536 no result of the tool filter's source, or no user input.
3537
3538 - `BetaWebFetchURLSourceOnly object`
3539
3540 The tool filter variant under which only the named tools' results
3541 contribute.
3542
3543 - `BetaWebFetchURLSourceExcept object`
3544
3545 The tool filter variant under which every result but the named
3546 tools' contributes.
3547
3548 - `user_input: optional BetaWebFetchURLSourceAll or BetaWebFetchURLSourceNone`
3549
3550 Whether URLs in user messages are fetchable: "all" or "none".
3551
3552 - `BetaWebFetchURLSourceAll object`
3553
3554 The `url_sources` variant under which a source contributes in
3555 full: every result of the tool filter's source, or all user input.
3556
3557 - `BetaWebFetchURLSourceNone object`
3558
3559 The `url_sources` variant under which a source contributes nothing:
3560 no result of the tool filter's source, or no user input.
3561
34463562 - `BetaWebSearchTool20260209 object`
34473563
34483564 - `type: "web_search_20260209"`
from line 3665
35493665
35503666 When true, guarantees schema validation on tool names and inputs
35513667
3668 - `url_sources: optional BetaWebFetchURLSources or null`
3669
3670 Which sources contribute to the set of URLs web fetch may fetch.
3671
3672 Each key is a tagged variant: `user_input` is `all` or `none`; the
3673 two tool filters are `all`, `none`, `only` (only the named tools'
3674 results) or `except` (every result but the named tools'). A named tool
3675 must be declared in this request's `tools[]`.
3676
35523677 - `BetaWebFetchTool20260309 object`
35533678
35543679 Web fetch tool with use_cache parameter for bypassing cached content.
from line 3732
36073732
36083733 When true, guarantees schema validation on tool names and inputs
36093734
3735 - `url_sources: optional BetaWebFetchURLSources or null`
3736
3737 Which sources contribute to the set of URLs web fetch may fetch.
3738
3739 Each key is a tagged variant: `user_input` is `all` or `none`; the
3740 two tool filters are `all`, `none`, `only` (only the named tools'
3741 results) or `except` (every result but the named tools'). A named tool
3742 must be declared in this request's `tools[]`.
3743
36103744 - `use_cache: optional boolean`
36113745
36123746 Whether to use cached content. Set to false to bypass the cache and fetch fresh content. Only set to false when the user explicitly requests fresh content or when fetching rapidly-changing sources.
from line 3866
37323866 - `strict: optional boolean`
37333867
37343868 When true, guarantees schema validation on tool names and inputs
3869
3870 - `url_sources: optional BetaWebFetchURLSources or null`
3871
3872 Which sources contribute to the set of URLs web fetch may fetch.
3873
3874 Each key is a tagged variant: `user_input` is `all` or `none`; the
3875 two tool filters are `all`, `none`, `only` (only the named tools'
3876 results) or `except` (every result but the named tools'). A named tool
3877 must be declared in this request's `tools[]`.
37353878
37363879 - `use_cache: optional boolean`
37373880
from line 4985
48424985 - `encrypted_content: string or null`
48434986
48444987 Opaque metadata from prior compaction, to be round-tripped verbatim
4988
4989 - `signature: optional string or null`
4990
4991 Signature over the summary, to be sent back with the block verbatim
48454992
48464993 - `BetaFallbackBlock object`
48474994
from line 5753
56065753
56075754 - `"fast"`
56085755
5609 - `input_transformations: optional array of BetaThinkingDroppedInputTransformation or null`
5610
5611 Changes the API made to the request's input before showing it to the model:
5612 one entry per change, in request order. Today the only entry type is
5613 `thinking_dropped` — a `thinking`, `redacted_thinking` or `connector_text`
5614 block from the request's `messages` that was removed from the prompt instead
5615 of being shown to the model because it failed a binding check. More entry
5616 types may be added over time; ignore types you do not recognize.
5756 - `input_transformations: optional array of BetaInputTransformation or null`
5757
5758 Changes the API made to the request's input before showing it to the model,
5759 and blocks that failed a binding check but were left unchanged: one entry per
5760 block, in request order. Two entry types today. `thinking_dropped` — a
5761 `thinking`, `redacted_thinking` or `connector_text` block from the request's
5762 `messages` that was removed from the prompt instead of being shown to the
5763 model because it failed a binding check. `thinking_mismatch_allowed` — a
5764 `thinking` or `redacted_thinking` block that failed the conversation check
5765 (the conversation before it differs from the one it was created in, or it
5766 carries no record of one on a model that requires it) and was shown to the
5767 model all the same, because that check is not enforced for this request.
5768 More entry types may be added over time; ignore types you do not recognize.
56175769
56185770 Requires `anthropic-beta: thinking-binding-controls-2026-08-01`. Present on
56195771 every such response from a model that supports extended thinking, as `[]`
5620 when nothing was changed; without the beta, blocks are removed all the same
5621 but nothing is reported. Removed blocks contribute nothing to
5622 `usage.input_tokens`. When streaming, the array is final in `message_start`;
5623 the final `message_delta` event carries it only when a server-side model
5624 fallback happened mid-stream, in which case it holds the serving model's
5625 entries and replaces the one in `message_start`.
5626
5627 - `type: "thinking_dropped"`
5628
5629 Always `thinking_dropped` for this entry type.
5630
5631 default: thinking_dropped
5632
5633 - `path: string`
5634
5635 Where the removed block was in your request, as `messages.{i}.content.{j}`:
5636 `i` indexes the `messages` array you sent and `j` that message's `content`
5637 array — the same form error messages use.
5638
5639 - `reason: "model_binding_mismatch" or "prefix_binding_mismatch" or "organization_binding_mismatch" or "end_user_binding_mismatch"`
5640
5641 Which binding check removed the block: `model_binding_mismatch` — it was
5642 created by a model whose reasoning the requested model may not read;
5643 `prefix_binding_mismatch` — the conversation before it differs from the
5644 conversation it was created in (the rest of that turn's consecutive thinking
5645 blocks are removed with it, each with this reason);
5646 `organization_binding_mismatch` — it was created under a different
5647 organization (an Anthropic organization, AWS account or Google Cloud project)
5648 and this organization is not one of its additional organizations;
5649 `end_user_binding_mismatch` — it was created for a different end user, or
5650 was removed by the consumer-organization binding. A block that would fail
5651 several checks reports one reason, in this order of precedence:
5652 `organization_binding_mismatch`, `end_user_binding_mismatch`,
5653 `model_binding_mismatch`, `prefix_binding_mismatch`.
5654
5655 - `"model_binding_mismatch"`
5656
5657 - `"prefix_binding_mismatch"`
5658
5659 - `"organization_binding_mismatch"`
5660
5661 - `"end_user_binding_mismatch"`
5662
5663- `BetaRawMessageStreamEvent = BetaRawMessageStartEvent or BetaRawMessageDeltaEvent or BetaRawMessageStopEvent or 3 more`
5664
5665 - `BetaRawMessageStartEvent object`
5666
5667 - `type: "message_start"`
5668
5669 default: message_start
5670
5671 - `message: BetaMessage`
5672
5673 - `BetaRawMessageDeltaEvent object`
5674
5675 - `type: "message_delta"`
5676
5677 default: message_delta
5678
5679 - `context_management: BetaContextManagementResponse or null`
5680
5681 Information about context management strategies applied during the request
5682
5683 - `delta: object`
5684
5685 - `container: BetaContainer or null`
5686
5687 Information about the container used in the request (for the code execution tool)
5688
5689 - `stop_details: BetaRefusalStopDetails or null`
5690
5691 Structured information about a refusal.
5692
5693 - `stop_reason: BetaStopReason or null`
5694
5695 - `stop_sequence: string or null`
5696
5697 - `usage: BetaMessageDeltaUsage`
5698
5699 Billing and rate-limit usage.
5700
5701 Anthropic's API bills and rate-limits by token counts, as tokens represent the underlying cost to our systems.
5702
5703 Under the hood, the API transforms requests into a format suitable for the model. The model's output then goes through a parsing stage before becoming an API response. As a result, the token counts in `usage` will not match one-to-one with the exact visible content of an API request or response.
5704
5705 For example, `output_tokens` will be non-zero, even for an empty string response from Claude.
5706
5707 Total input tokens in a request is the summation of `input_tokens`, `cache_creation_input_tokens`, and `cache_read_input_tokens`.
5708
5709 - `cache_creation_input_tokens: number or null`
5710
5711 The cumulative number of input tokens used to create the cache entry.
5712
5713 minimum: 0
5714
5715 - `cache_read_input_tokens: number or null`
5716
5717 The cumulative number of input tokens read from the cache.
5718
5719 minimum: 0
5720
5721 - `fallback_credit: BetaFallbackCreditUsage or null`
5722
5723 Outcome of the `fallback_credit_token` presented on this request.
5724
5725 - `input_tokens: number or null`
5726
5727 The cumulative number of input tokens which were used.
5728
5729 minimum: 0
5730
5731 - `iterations: BetaIterationsUsage or null`
5732
5733 Per-iteration token usage breakdown.
5734
5735 Each entry represents one sampling iteration, with its own input/output token counts and cache statistics, discriminated by `type`. For `message` entries (model sampling iterations, such as the turns of a server-side tool use loop), this allows you to:
5736
5737 - Determine which iterations exceeded long context thresholds (>=200k tokens)
5738 - Calculate the context window size from the last `message` entry
5739 - Understand token accumulation across server-side tool use loops
5740
5741 A `compaction` entry reports the token usage of the compaction operation itself — the server-side request that summarizes the context being closed — NOT the size of the context that was compacted away, and its token counts can be much smaller than that closed context (for example, a compaction that closes a ~200k-token context can report only a few thousand tokens). Do not derive the context window size from a `compaction` entry, even when it is the last entry. A `compaction` entry's tokens are not included in the top-level `usage` fields. When an input-token trigger is in effect (the default — 150,000 tokens unless configured otherwise), each `compaction` entry closes a context that had reached at least that threshold, though the context can exceed it by the final iteration's output and tool results.
5742
5743 - `output_tokens: number`
5744
5745 The cumulative number of output tokens which were used.
5746
5747 - `output_tokens_details: BetaOutputTokensDetails or null`
5748
5749 Breakdown of output tokens by category.
5750
5751 `output_tokens` remains the inclusive, authoritative total used for billing.
5752 This object provides a read-only decomposition for observability — for example,
5753 how many of the billed output tokens were spent on internal reasoning that may
5754 have been summarized before being returned to you.
5755
5756 - `server_tool_use: BetaServerToolUsage or null`
5757
5758 The number of server tool requests.
5759
5760 - `input_transformations: optional array of BetaThinkingDroppedInputTransformation or null`
5761
5762 Changes the API made to the request's input before showing it to the model:
5763 one entry per change, in request order. Today the only entry type is
5764 `thinking_dropped` — a `thinking`, `redacted_thinking` or `connector_text`
5765 block from the request's `messages` that was removed from the prompt instead
5766 of being shown to the model because it failed a binding check. More entry
5767 types may be added over time; ignore types you do not recognize.
5768
5769 Requires `anthropic-beta: thinking-binding-controls-2026-08-01`. Present on
5770 every such response from a model that supports extended thinking, as `[]`
5771 when nothing was changed; without the beta, blocks are removed all the same
5772 but nothing is reported. Removed blocks contribute nothing to
5773 `usage.input_tokens`. When streaming, the array is final in `message_start`;
5774 the final `message_delta` event carries it only when a server-side model
5775 fallback happened mid-stream, in which case it holds the serving model's
5776 entries and replaces the one in `message_start`.
5772 when there is no entry to report; without the beta, blocks are removed or
5773 left in place all the same but nothing is reported. Removed blocks contribute
5774 nothing to `usage.input_tokens`; blocks left in place count as sent. When
5775 streaming, the array is final in `message_start`; the final `message_delta`
5776 event carries it only when a server-side model fallback happened mid-stream,
5777 in which case it holds the serving model's entries and replaces the one in
5778 `message_start`.
5779
5780 - `BetaThinkingDroppedInputTransformation object`
57775781
57785782 - `type: "thinking_dropped"`
57795783
from line 5806
58025806 several checks reports one reason, in this order of precedence:
58035807 `organization_binding_mismatch`, `end_user_binding_mismatch`,
58045808 `model_binding_mismatch`, `prefix_binding_mismatch`.
5809
5810 - `"model_binding_mismatch"`
5811
5812 - `"prefix_binding_mismatch"`
5813
5814 - `"organization_binding_mismatch"`
5815
5816 - `"end_user_binding_mismatch"`
5817
5818 - `BetaThinkingMismatchAllowedInputTransformation object`
5819
5820 - `type: "thinking_mismatch_allowed"`
5821
5822 Always `thinking_mismatch_allowed` for this entry type.
5823
5824 default: thinking_mismatch_allowed
5825
5826 - `path: string`
5827
5828 Where the block is in your request, as `messages.{i}.content.{j}`:
5829 `i` indexes the `messages` array you sent and `j` that message's `content`
5830 array — the same form error messages use.
5831
5832 - `reason: "model_binding_mismatch" or "prefix_binding_mismatch" or "organization_binding_mismatch" or "end_user_binding_mismatch"`
5833
5834 Which binding check the block failed; the block was shown to the model all
5835 the same. Always `prefix_binding_mismatch` today — the conversation before
5836 the block differs from the conversation it was created in, or the block
5837 carries no record of one on a model that requires it. Were the check
5838 enforced for this request, the block would have been removed or the request
5839 rejected (`thinking.block_binding.prefix_mismatch_behavior`). A removal also
5840 takes the rest of that turn's consecutive thinking blocks, whereas here each
5841 block is checked on its own, so `thinking_mismatch_allowed` entries are a
5842 lower bound on what enforcement would remove.
5843
5844 - `"model_binding_mismatch"`
5845
5846 - `"prefix_binding_mismatch"`
5847
5848 - `"organization_binding_mismatch"`
5849
5850 - `"end_user_binding_mismatch"`
5851
5852- `BetaRawMessageStreamEvent = BetaRawMessageStartEvent or BetaRawMessageDeltaEvent or BetaRawMessageStopEvent or 3 more`
5853
5854 - `BetaRawMessageStartEvent object`
5855
5856 - `type: "message_start"`
5857
5858 default: message_start
5859
5860 - `message: BetaMessage`
5861
5862 - `BetaRawMessageDeltaEvent object`
5863
5864 - `type: "message_delta"`
5865
5866 default: message_delta
5867
5868 - `context_management: BetaContextManagementResponse or null`
5869
5870 Information about context management strategies applied during the request
5871
5872 - `delta: object`
5873
5874 - `container: BetaContainer or null`
5875
5876 Information about the container used in the request (for the code execution tool)
5877
5878 - `stop_details: BetaRefusalStopDetails or null`
5879
5880 Structured information about a refusal.
5881
5882 - `stop_reason: BetaStopReason or null`
5883
5884 - `stop_sequence: string or null`
5885
5886 - `usage: BetaMessageDeltaUsage`
5887
5888 Billing and rate-limit usage.
5889
5890 Anthropic's API bills and rate-limits by token counts, as tokens represent the underlying cost to our systems.
5891
5892 Under the hood, the API transforms requests into a format suitable for the model. The model's output then goes through a parsing stage before becoming an API response. As a result, the token counts in `usage` will not match one-to-one with the exact visible content of an API request or response.
5893
5894 For example, `output_tokens` will be non-zero, even for an empty string response from Claude.
5895
5896 Total input tokens in a request is the summation of `input_tokens`, `cache_creation_input_tokens`, and `cache_read_input_tokens`.
5897
5898 - `cache_creation_input_tokens: number or null`
5899
5900 The cumulative number of input tokens used to create the cache entry.
5901
5902 minimum: 0
5903
5904 - `cache_read_input_tokens: number or null`
5905
5906 The cumulative number of input tokens read from the cache.
5907
5908 minimum: 0
5909
5910 - `fallback_credit: BetaFallbackCreditUsage or null`
5911
5912 Outcome of the `fallback_credit_token` presented on this request.
5913
5914 - `input_tokens: number or null`
5915
5916 The cumulative number of input tokens which were used.
5917
5918 minimum: 0
5919
5920 - `iterations: BetaIterationsUsage or null`
5921
5922 Per-iteration token usage breakdown.
5923
5924 Each entry represents one sampling iteration, with its own input/output token counts and cache statistics, discriminated by `type`. For `message` entries (model sampling iterations, such as the turns of a server-side tool use loop), this allows you to:
5925
5926 - Determine which iterations exceeded long context thresholds (>=200k tokens)
5927 - Calculate the context window size from the last `message` entry
5928 - Understand token accumulation across server-side tool use loops
5929
5930 A `compaction` entry reports the token usage of the compaction operation itself — the server-side request that summarizes the context being closed — NOT the size of the context that was compacted away, and its token counts can be much smaller than that closed context (for example, a compaction that closes a ~200k-token context can report only a few thousand tokens). Do not derive the context window size from a `compaction` entry, even when it is the last entry. A `compaction` entry's tokens are not included in the top-level `usage` fields. When an input-token trigger is in effect (the default — 150,000 tokens unless configured otherwise), each `compaction` entry closes a context that had reached at least that threshold, though the context can exceed it by the final iteration's output and tool results.
5931
5932 - `output_tokens: number`
5933
5934 The cumulative number of output tokens which were used.
5935
5936 - `output_tokens_details: BetaOutputTokensDetails or null`
5937
5938 Breakdown of output tokens by category.
5939
5940 `output_tokens` remains the inclusive, authoritative total used for billing.
5941 This object provides a read-only decomposition for observability — for example,
5942 how many of the billed output tokens were spent on internal reasoning that may
5943 have been summarized before being returned to you.
5944
5945 - `server_tool_use: BetaServerToolUsage or null`
5946
5947 The number of server tool requests.
5948
5949 - `input_transformations: optional array of BetaInputTransformation or null`
5950
5951 Changes the API made to the request's input before showing it to the model,
5952 and blocks that failed a binding check but were left unchanged: one entry per
5953 block, in request order. Two entry types today. `thinking_dropped` — a
5954 `thinking`, `redacted_thinking` or `connector_text` block from the request's
5955 `messages` that was removed from the prompt instead of being shown to the
5956 model because it failed a binding check. `thinking_mismatch_allowed` — a
5957 `thinking` or `redacted_thinking` block that failed the conversation check
5958 (the conversation before it differs from the one it was created in, or it
5959 carries no record of one on a model that requires it) and was shown to the
5960 model all the same, because that check is not enforced for this request.
5961 More entry types may be added over time; ignore types you do not recognize.
5962
5963 Requires `anthropic-beta: thinking-binding-controls-2026-08-01`. Present on
5964 every such response from a model that supports extended thinking, as `[]`
5965 when there is no entry to report; without the beta, blocks are removed or
5966 left in place all the same but nothing is reported. Removed blocks contribute
5967 nothing to `usage.input_tokens`; blocks left in place count as sent. When
5968 streaming, the array is final in `message_start`; the final `message_delta`
5969 event carries it only when a server-side model fallback happened mid-stream,
5970 in which case it holds the serving model's entries and replaces the one in
5971 `message_start`.
5972
5973 - `BetaThinkingDroppedInputTransformation object`
5974
5975 - `BetaThinkingMismatchAllowedInputTransformation object`
58055976
58065977 - `BetaRawMessageStopEvent object`
58075978
from line 6308
61376308
61386309 - `string`
61396310
6140 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 42 more`
6311 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 43 more`
61416312
61426313 - `"message-batches-2024-09-24"`
61436314
from line 6399
62286399 - `"thinking-binding-controls-2026-08-01"`
62296400
62306401 - `"mid-conversation-system-clear-at-2026-08-21"`
6402
6403 - `"compact-2026-09-04"`
62316404
62326405- `"anthropic-user-profile-id": optional string`
62336406
from line 7559
73867559 - `encrypted_content: optional string or null`
73877560
73887561 Opaque metadata from prior compaction, to be round-tripped verbatim
7562
7563 - `signature: optional string or null`
7564
7565 The block's signature as returned, to be sent back verbatim
73897566
73907567 - `BetaRequestToolAdditionBlock object`
73917568
from line 7803
76267803- `cache_control: optional BetaCacheControlEphemeral or null`
76277804
76287805 Top-level cache control automatically applies a cache_control marker to the last cacheable block in the request.
7806
7807- `compaction: optional BetaCompactionConfig or null`
7808
7809 Compact the whole conversation and return a signed `compaction` block,
7810 alone, that a later request sends back first in `messages`, in place of
7811 the messages it summarizes. There is no trigger and no pause flag: sending
7812 the parameter compacts, and nothing is sampled after the block.
7813
7814 The summarization prompt is the server's own unless `instructions` are
7815 given, which then replace it for this request; a value that is empty or
7816 only whitespace counts as absent.
7817
7818 - `type: "summarize"`
7819
7820 - `instructions: optional string or null`
7821
7822 Replaces the server's default summarization prompt for this request. An empty or whitespace-only value counts as absent.
7823
7824 maxLength: 16384
76297825
76307826- `context_management: optional BetaContextManagementConfig or null`
76317827
from line 9567
93719567
93729568 When true, guarantees schema validation on tool names and inputs
93739569
9570 - `url_sources: optional BetaWebFetchURLSources or null`
9571
9572 Which sources contribute to the set of URLs web fetch may fetch.
9573
9574 Each key is a tagged variant: `user_input` is `all` or `none`; the
9575 two tool filters are `all`, `none`, `only` (only the named tools'
9576 results) or `except` (every result but the named tools'). A named tool
9577 must be declared in this request's `tools[]`.
9578
9579 - `client_tool_results: optional BetaWebFetchURLSourceAll or BetaWebFetchURLSourceNone or BetaWebFetchURLSourceOnly or BetaWebFetchURLSourceExcept`
9580
9581 Which client tools' results contribute fetchable URLs: "all", "none", or an only or except list of client tool names from tools[].
9582
9583 - `BetaWebFetchURLSourceAll object`
9584
9585 The `url_sources` variant under which a source contributes in
9586 full: every result of the tool filter's source, or all user input.
9587
9588 - `type: "all"`
9589
9590 - `BetaWebFetchURLSourceNone object`
9591
9592 The `url_sources` variant under which a source contributes nothing:
9593 no result of the tool filter's source, or no user input.
9594
9595 - `type: "none"`
9596
9597 - `BetaWebFetchURLSourceOnly object`
9598
9599 The tool filter variant under which only the named tools' results
9600 contribute.
9601
9602 - `type: "only"`
9603
9604 - `tools: array of BetaWebFetchURLSourceToolReference`
9605
9606 - `type: "tool_reference"`
9607
9608 - `name: string`
9609
9610 - `BetaWebFetchURLSourceExcept object`
9611
9612 The tool filter variant under which every result but the named
9613 tools' contributes.
9614
9615 - `type: "except"`
9616
9617 - `tools: array of BetaWebFetchURLSourceToolReference`
9618
9619 - `type: "tool_reference"`
9620
9621 - `name: string`
9622
9623 - `server_tool_results: optional BetaWebFetchURLSourceAll or BetaWebFetchURLSourceNone or BetaWebFetchURLSourceOnly or BetaWebFetchURLSourceExcept`
9624
9625 Which server tools' results contribute fetchable URLs: "all", "none", or an only or except list of server tool names from tools[]; only web_search and web_fetch results ever contribute.
9626
9627 - `BetaWebFetchURLSourceAll object`
9628
9629 The `url_sources` variant under which a source contributes in
9630 full: every result of the tool filter's source, or all user input.
9631
9632 - `BetaWebFetchURLSourceNone object`
9633
9634 The `url_sources` variant under which a source contributes nothing:
9635 no result of the tool filter's source, or no user input.
9636
9637 - `BetaWebFetchURLSourceOnly object`
9638
9639 The tool filter variant under which only the named tools' results
9640 contribute.
9641
9642 - `BetaWebFetchURLSourceExcept object`
9643
9644 The tool filter variant under which every result but the named
9645 tools' contributes.
9646
9647 - `user_input: optional BetaWebFetchURLSourceAll or BetaWebFetchURLSourceNone`
9648
9649 Whether URLs in user messages are fetchable: "all" or "none".
9650
9651 - `BetaWebFetchURLSourceAll object`
9652
9653 The `url_sources` variant under which a source contributes in
9654 full: every result of the tool filter's source, or all user input.
9655
9656 - `BetaWebFetchURLSourceNone object`
9657
9658 The `url_sources` variant under which a source contributes nothing:
9659 no result of the tool filter's source, or no user input.
9660
93749661 - `BetaWebSearchTool20260209 object`
93759662
93769663 - `type: "web_search_20260209"`
from line 9764
94779764
94789765 When true, guarantees schema validation on tool names and inputs
94799766
9767 - `url_sources: optional BetaWebFetchURLSources or null`
9768
9769 Which sources contribute to the set of URLs web fetch may fetch.
9770
9771 Each key is a tagged variant: `user_input` is `all` or `none`; the
9772 two tool filters are `all`, `none`, `only` (only the named tools'
9773 results) or `except` (every result but the named tools'). A named tool
9774 must be declared in this request's `tools[]`.
9775
94809776 - `BetaWebFetchTool20260309 object`
94819777
94829778 Web fetch tool with use_cache parameter for bypassing cached content.
from line 9831
95359831
95369832 When true, guarantees schema validation on tool names and inputs
95379833
9834 - `url_sources: optional BetaWebFetchURLSources or null`
9835
9836 Which sources contribute to the set of URLs web fetch may fetch.
9837
9838 Each key is a tagged variant: `user_input` is `all` or `none`; the
9839 two tool filters are `all`, `none`, `only` (only the named tools'
9840 results) or `except` (every result but the named tools'). A named tool
9841 must be declared in this request's `tools[]`.
9842
95389843 - `use_cache: optional boolean`
95399844
95409845 Whether to use cached content. Set to false to bypass the cache and fetch fresh content. Only set to false when the user explicitly requests fresh content or when fetching rapidly-changing sources.
from line 9965
96609965 - `strict: optional boolean`
96619966
96629967 When true, guarantees schema validation on tool names and inputs
9968
9969 - `url_sources: optional BetaWebFetchURLSources or null`
9970
9971 Which sources contribute to the set of URLs web fetch may fetch.
9972
9973 Each key is a tagged variant: `user_input` is `all` or `none`; the
9974 two tool filters are `all`, `none`, `only` (only the named tools'
9975 results) or `except` (every result but the named tools'). A named tool
9976 must be declared in this request's `tools[]`.
96639977
96649978 - `use_cache: optional boolean`
96659979
from line 13883
1356913883
1357013884 Opaque metadata from prior compaction, to be round-tripped verbatim
1357113885
13886 - `signature: optional string or null`
13887
13888 Signature over the summary, to be sent back with the block verbatim
13889
1357213890### Beta Compaction Block Param
1357313891
1357413892- `BetaCompactionBlockParam object`
from line 13929
1361113929 - `encrypted_content: optional string or null`
1361213930
1361313931 Opaque metadata from prior compaction, to be round-tripped verbatim
13932
13933 - `signature: optional string or null`
13934
13935 The block's signature as returned, to be sent back verbatim
13936
13937### Beta Compaction Config
13938
13939- `BetaCompactionConfig object`
13940
13941 Compact the whole conversation and return a signed `compaction` block,
13942 alone, that a later request sends back first in `messages`, in place of
13943 the messages it summarizes. There is no trigger and no pause flag: sending
13944 the parameter compacts, and nothing is sampled after the block.
13945
13946 The summarization prompt is the server's own unless `instructions` are
13947 given, which then replace it for this request; a value that is empty or
13948 only whitespace counts as absent.
13949
13950 - `type: "summarize"`
13951
13952 - `instructions: optional string or null`
13953
13954 Replaces the server's default summarization prompt for this request. An empty or whitespace-only value counts as absent.
13955
13956 maxLength: 16384
1361413957
1361513958### Beta Compaction Content Block Delta
1361613959
from line 15689
1534615689
1534715690 Opaque metadata from prior compaction, to be round-tripped verbatim
1534815691
15692 - `signature: optional string or null`
15693
15694 Signature over the summary, to be sent back with the block verbatim
15695
1534915696 - `BetaFallbackBlock object`
1535015697
1535115698 Marks the point in `content` where one model's output gives way to the next.
from line 16929
1658216929 - `encrypted_content: optional string or null`
1658316930
1658416931 Opaque metadata from prior compaction, to be round-tripped verbatim
16932
16933 - `signature: optional string or null`
16934
16935 The block's signature as returned, to be sent back verbatim
1658516936
1658616937 - `BetaRequestToolAdditionBlock object`
1658716938
from line 19212
1886119212
1886219213 minimum: 1
1886319214
19215### Beta Input Transformation
19216
19217- `BetaInputTransformation = BetaThinkingDroppedInputTransformation or BetaThinkingMismatchAllowedInputTransformation`
19218
19219 One entry of `input_transformations`: either a change the API made to the
19220 request's input before showing it to the model, or a block that failed a
19221 binding check and was still shown to the model unchanged. The `type` field
19222 says which.
19223
19224 - `BetaThinkingDroppedInputTransformation object`
19225
19226 - `type: "thinking_dropped"`
19227
19228 Always `thinking_dropped` for this entry type.
19229
19230 default: thinking_dropped
19231
19232 - `path: string`
19233
19234 Where the removed block was in your request, as `messages.{i}.content.{j}`:
19235 `i` indexes the `messages` array you sent and `j` that message's `content`
19236 array — the same form error messages use.
19237
19238 - `reason: "model_binding_mismatch" or "prefix_binding_mismatch" or "organization_binding_mismatch" or "end_user_binding_mismatch"`
19239
19240 Which binding check removed the block: `model_binding_mismatch` — it was
19241 created by a model whose reasoning the requested model may not read;
19242 `prefix_binding_mismatch` — the conversation before it differs from the
19243 conversation it was created in (the rest of that turn's consecutive thinking
19244 blocks are removed with it, each with this reason);
19245 `organization_binding_mismatch` — it was created under a different
19246 organization (an Anthropic organization, AWS account or Google Cloud project)
19247 and this organization is not one of its additional organizations;
19248 `end_user_binding_mismatch` — it was created for a different end user, or
19249 was removed by the consumer-organization binding. A block that would fail
19250 several checks reports one reason, in this order of precedence:
19251 `organization_binding_mismatch`, `end_user_binding_mismatch`,
19252 `model_binding_mismatch`, `prefix_binding_mismatch`.
19253
19254 - `"model_binding_mismatch"`
19255
19256 - `"prefix_binding_mismatch"`
19257
19258 - `"organization_binding_mismatch"`
19259
19260 - `"end_user_binding_mismatch"`
19261
19262 - `BetaThinkingMismatchAllowedInputTransformation object`
19263
19264 - `type: "thinking_mismatch_allowed"`
19265
19266 Always `thinking_mismatch_allowed` for this entry type.
19267
19268 default: thinking_mismatch_allowed
19269
19270 - `path: string`
19271
19272 Where the block is in your request, as `messages.{i}.content.{j}`:
19273 `i` indexes the `messages` array you sent and `j` that message's `content`
19274 array — the same form error messages use.
19275
19276 - `reason: "model_binding_mismatch" or "prefix_binding_mismatch" or "organization_binding_mismatch" or "end_user_binding_mismatch"`
19277
19278 Which binding check the block failed; the block was shown to the model all
19279 the same. Always `prefix_binding_mismatch` today — the conversation before
19280 the block differs from the conversation it was created in, or the block
19281 carries no record of one on a model that requires it. Were the check
19282 enforced for this request, the block would have been removed or the request
19283 rejected (`thinking.block_binding.prefix_mismatch_behavior`). A removal also
19284 takes the rest of that turn's consecutive thinking blocks, whereas here each
19285 block is checked on its own, so `thinking_mismatch_allowed` entries are a
19286 lower bound on what enforcement would remove.
19287
19288 - `"model_binding_mismatch"`
19289
19290 - `"prefix_binding_mismatch"`
19291
19292 - `"organization_binding_mismatch"`
19293
19294 - `"end_user_binding_mismatch"`
19295
1886419296### Beta Iterations Usage
1886519297
1886619298- `BetaIterationsUsage = array of BetaMessageIterationUsage or BetaCompactionIterationUsage or BetaAdvisorMessageIterationUsage or BetaFallbackMessageIterationUsage`
from line 21058
2062621058 - `encrypted_content: string or null`
2062721059
2062821060 Opaque metadata from prior compaction, to be round-tripped verbatim
21061
21062 - `signature: optional string or null`
21063
21064 Signature over the summary, to be sent back with the block verbatim
2062921065
2063021066 - `BetaFallbackBlock object`
2063121067
from line 21826
2139021826
2139121827 - `"fast"`
2139221828
21393 - `input_transformations: optional array of BetaThinkingDroppedInputTransformation or null`
21394
21395 Changes the API made to the request's input before showing it to the model:
21396 one entry per change, in request order. Today the only entry type is
21397 `thinking_dropped` — a `thinking`, `redacted_thinking` or `connector_text`
21398 block from the request's `messages` that was removed from the prompt instead
21399 of being shown to the model because it failed a binding check. More entry
21400 types may be added over time; ignore types you do not recognize.
21829 - `input_transformations: optional array of BetaInputTransformation or null`
21830
21831 Changes the API made to the request's input before showing it to the model,
21832 and blocks that failed a binding check but were left unchanged: one entry per
21833 block, in request order. Two entry types today. `thinking_dropped` — a
21834 `thinking`, `redacted_thinking` or `connector_text` block from the request's
21835 `messages` that was removed from the prompt instead of being shown to the
21836 model because it failed a binding check. `thinking_mismatch_allowed` — a
21837 `thinking` or `redacted_thinking` block that failed the conversation check
21838 (the conversation before it differs from the one it was created in, or it
21839 carries no record of one on a model that requires it) and was shown to the
21840 model all the same, because that check is not enforced for this request.
21841 More entry types may be added over time; ignore types you do not recognize.
2140121842
2140221843 Requires `anthropic-beta: thinking-binding-controls-2026-08-01`. Present on
2140321844 every such response from a model that supports extended thinking, as `[]`
21404 when nothing was changed; without the beta, blocks are removed all the same
21405 but nothing is reported. Removed blocks contribute nothing to
21406 `usage.input_tokens`. When streaming, the array is final in `message_start`;
21407 the final `message_delta` event carries it only when a server-side model
21408 fallback happened mid-stream, in which case it holds the serving model's
21409 entries and replaces the one in `message_start`.
21410
21411 - `type: "thinking_dropped"`
21412
21413 Always `thinking_dropped` for this entry type.
21414
21415 default: thinking_dropped
21416
21417 - `path: string`
21418
21419 Where the removed block was in your request, as `messages.{i}.content.{j}`:
21420 `i` indexes the `messages` array you sent and `j` that message's `content`
21421 array — the same form error messages use.
21422
21423 - `reason: "model_binding_mismatch" or "prefix_binding_mismatch" or "organization_binding_mismatch" or "end_user_binding_mismatch"`
21424
21425 Which binding check removed the block: `model_binding_mismatch` — it was
21426 created by a model whose reasoning the requested model may not read;
21427 `prefix_binding_mismatch` — the conversation before it differs from the
21428 conversation it was created in (the rest of that turn's consecutive thinking
21429 blocks are removed with it, each with this reason);
21430 `organization_binding_mismatch` — it was created under a different
21431 organization (an Anthropic organization, AWS account or Google Cloud project)
21432 and this organization is not one of its additional organizations;
21433 `end_user_binding_mismatch` — it was created for a different end user, or
21434 was removed by the consumer-organization binding. A block that would fail
21435 several checks reports one reason, in this order of precedence:
21436 `organization_binding_mismatch`, `end_user_binding_mismatch`,
21437 `model_binding_mismatch`, `prefix_binding_mismatch`.
21438
21439 - `"model_binding_mismatch"`
21440
21441 - `"prefix_binding_mismatch"`
21442
21443 - `"organization_binding_mismatch"`
21444
21445 - `"end_user_binding_mismatch"`
21845 when there is no entry to report; without the beta, blocks are removed or
21846 left in place all the same but nothing is reported. Removed blocks contribute
21847 nothing to `usage.input_tokens`; blocks left in place count as sent. When
21848 streaming, the array is final in `message_start`; the final `message_delta`
21849 event carries it only when a server-side model fallback happened mid-stream,
21850 in which case it holds the serving model's entries and replaces the one in
21851 `message_start`.
21852
21853 - `BetaThinkingDroppedInputTransformation object`
21854
21855 - `type: "thinking_dropped"`
21856
21857 Always `thinking_dropped` for this entry type.
21858
21859 default: thinking_dropped
21860
21861 - `path: string`
21862
21863 Where the removed block was in your request, as `messages.{i}.content.{j}`:
21864 `i` indexes the `messages` array you sent and `j` that message's `content`
21865 array — the same form error messages use.
21866
21867 - `reason: "model_binding_mismatch" or "prefix_binding_mismatch" or "organization_binding_mismatch" or "end_user_binding_mismatch"`
21868
21869 Which binding check removed the block: `model_binding_mismatch` — it was
21870 created by a model whose reasoning the requested model may not read;
21871 `prefix_binding_mismatch` — the conversation before it differs from the
21872 conversation it was created in (the rest of that turn's consecutive thinking
21873 blocks are removed with it, each with this reason);
21874 `organization_binding_mismatch` — it was created under a different
21875 organization (an Anthropic organization, AWS account or Google Cloud project)
21876 and this organization is not one of its additional organizations;
21877 `end_user_binding_mismatch` — it was created for a different end user, or
21878 was removed by the consumer-organization binding. A block that would fail
21879 several checks reports one reason, in this order of precedence:
21880 `organization_binding_mismatch`, `end_user_binding_mismatch`,
21881 `model_binding_mismatch`, `prefix_binding_mismatch`.
21882
21883 - `"model_binding_mismatch"`
21884
21885 - `"prefix_binding_mismatch"`
21886
21887 - `"organization_binding_mismatch"`
21888
21889 - `"end_user_binding_mismatch"`
21890
21891 - `BetaThinkingMismatchAllowedInputTransformation object`
21892
21893 - `type: "thinking_mismatch_allowed"`
21894
21895 Always `thinking_mismatch_allowed` for this entry type.
21896
21897 default: thinking_mismatch_allowed
21898
21899 - `path: string`
21900
21901 Where the block is in your request, as `messages.{i}.content.{j}`:
21902 `i` indexes the `messages` array you sent and `j` that message's `content`
21903 array — the same form error messages use.
21904
21905 - `reason: "model_binding_mismatch" or "prefix_binding_mismatch" or "organization_binding_mismatch" or "end_user_binding_mismatch"`
21906
21907 Which binding check the block failed; the block was shown to the model all
21908 the same. Always `prefix_binding_mismatch` today — the conversation before
21909 the block differs from the conversation it was created in, or the block
21910 carries no record of one on a model that requires it. Were the check
21911 enforced for this request, the block would have been removed or the request
21912 rejected (`thinking.block_binding.prefix_mismatch_behavior`). A removal also
21913 takes the rest of that turn's consecutive thinking blocks, whereas here each
21914 block is checked on its own, so `thinking_mismatch_allowed` entries are a
21915 lower bound on what enforcement would remove.
21916
21917 - `"model_binding_mismatch"`
21918
21919 - `"prefix_binding_mismatch"`
21920
21921 - `"organization_binding_mismatch"`
21922
21923 - `"end_user_binding_mismatch"`
2144621924
2144721925### Beta Message Delta Usage
2144821926
from line 23571
2309323571 - `encrypted_content: optional string or null`
2309423572
2309523573 Opaque metadata from prior compaction, to be round-tripped verbatim
23574
23575 - `signature: optional string or null`
23576
23577 The block's signature as returned, to be sent back verbatim
2309623578
2309723579 - `BetaRequestToolAdditionBlock object`
2309823580
from line 25126
2464425126 - `encrypted_content: string or null`
2464525127
2464625128 Opaque metadata from prior compaction, to be round-tripped verbatim
25129
25130 - `signature: optional string or null`
25131
25132 Signature over the summary, to be sent back with the block verbatim
2464725133
2464825134 - `BetaFallbackBlock object`
2464925135
from line 25907
2542125907
2542225908 default: 0, minimum: 0
2542325909
25424 - `input_transformations: optional array of BetaThinkingDroppedInputTransformation or null`
25425
25426 Changes the API made to the request's input before showing it to the model:
25427 one entry per change, in request order. Today the only entry type is
25428 `thinking_dropped` — a `thinking`, `redacted_thinking` or `connector_text`
25429 block from the request's `messages` that was removed from the prompt instead
25430 of being shown to the model because it failed a binding check. More entry
25431 types may be added over time; ignore types you do not recognize.
25910 - `input_transformations: optional array of BetaInputTransformation or null`
25911
25912 Changes the API made to the request's input before showing it to the model,
25913 and blocks that failed a binding check but were left unchanged: one entry per
25914 block, in request order. Two entry types today. `thinking_dropped` — a
25915 `thinking`, `redacted_thinking` or `connector_text` block from the request's
25916 `messages` that was removed from the prompt instead of being shown to the
25917 model because it failed a binding check. `thinking_mismatch_allowed` — a
25918 `thinking` or `redacted_thinking` block that failed the conversation check
25919 (the conversation before it differs from the one it was created in, or it
25920 carries no record of one on a model that requires it) and was shown to the
25921 model all the same, because that check is not enforced for this request.
25922 More entry types may be added over time; ignore types you do not recognize.
2543225923
2543325924 Requires `anthropic-beta: thinking-binding-controls-2026-08-01`. Present on
2543425925 every such response from a model that supports extended thinking, as `[]`
25435 when nothing was changed; without the beta, blocks are removed all the same
25436 but nothing is reported. Removed blocks contribute nothing to
25437 `usage.input_tokens`. When streaming, the array is final in `message_start`;
25438 the final `message_delta` event carries it only when a server-side model
25439 fallback happened mid-stream, in which case it holds the serving model's
25440 entries and replaces the one in `message_start`.
25441
25442 - `type: "thinking_dropped"`
25443
25444 Always `thinking_dropped` for this entry type.
25445
25446 default: thinking_dropped
25447
25448 - `path: string`
25449
25450 Where the removed block was in your request, as `messages.{i}.content.{j}`:
25451 `i` indexes the `messages` array you sent and `j` that message's `content`
25452 array — the same form error messages use.
25453
25454 - `reason: "model_binding_mismatch" or "prefix_binding_mismatch" or "organization_binding_mismatch" or "end_user_binding_mismatch"`
25455
25456 Which binding check removed the block: `model_binding_mismatch` — it was
25457 created by a model whose reasoning the requested model may not read;
25458 `prefix_binding_mismatch` — the conversation before it differs from the
25459 conversation it was created in (the rest of that turn's consecutive thinking
25460 blocks are removed with it, each with this reason);
25461 `organization_binding_mismatch` — it was created under a different
25462 organization (an Anthropic organization, AWS account or Google Cloud project)
25463 and this organization is not one of its additional organizations;
25464 `end_user_binding_mismatch` — it was created for a different end user, or
25465 was removed by the consumer-organization binding. A block that would fail
25466 several checks reports one reason, in this order of precedence:
25467 `organization_binding_mismatch`, `end_user_binding_mismatch`,
25468 `model_binding_mismatch`, `prefix_binding_mismatch`.
25469
25470 - `"model_binding_mismatch"`
25471
25472 - `"prefix_binding_mismatch"`
25473
25474 - `"organization_binding_mismatch"`
25475
25476 - `"end_user_binding_mismatch"`
25926 when there is no entry to report; without the beta, blocks are removed or
25927 left in place all the same but nothing is reported. Removed blocks contribute
25928 nothing to `usage.input_tokens`; blocks left in place count as sent. When
25929 streaming, the array is final in `message_start`; the final `message_delta`
25930 event carries it only when a server-side model fallback happened mid-stream,
25931 in which case it holds the serving model's entries and replaces the one in
25932 `message_start`.
25933
25934 - `BetaThinkingDroppedInputTransformation object`
25935
25936 - `type: "thinking_dropped"`
25937
25938 Always `thinking_dropped` for this entry type.
25939
25940 default: thinking_dropped
25941
25942 - `path: string`
25943
25944 Where the removed block was in your request, as `messages.{i}.content.{j}`:
25945 `i` indexes the `messages` array you sent and `j` that message's `content`
25946 array — the same form error messages use.
25947
25948 - `reason: "model_binding_mismatch" or "prefix_binding_mismatch" or "organization_binding_mismatch" or "end_user_binding_mismatch"`
25949
25950 Which binding check removed the block: `model_binding_mismatch` — it was
25951 created by a model whose reasoning the requested model may not read;
25952 `prefix_binding_mismatch` — the conversation before it differs from the
25953 conversation it was created in (the rest of that turn's consecutive thinking
25954 blocks are removed with it, each with this reason);
25955 `organization_binding_mismatch` — it was created under a different
25956 organization (an Anthropic organization, AWS account or Google Cloud project)
25957 and this organization is not one of its additional organizations;
25958 `end_user_binding_mismatch` — it was created for a different end user, or
25959 was removed by the consumer-organization binding. A block that would fail
25960 several checks reports one reason, in this order of precedence:
25961 `organization_binding_mismatch`, `end_user_binding_mismatch`,
25962 `model_binding_mismatch`, `prefix_binding_mismatch`.
25963
25964 - `"model_binding_mismatch"`
25965
25966 - `"prefix_binding_mismatch"`
25967
25968 - `"organization_binding_mismatch"`
25969
25970 - `"end_user_binding_mismatch"`
25971
25972 - `BetaThinkingMismatchAllowedInputTransformation object`
25973
25974 - `type: "thinking_mismatch_allowed"`
25975
25976 Always `thinking_mismatch_allowed` for this entry type.
25977
25978 default: thinking_mismatch_allowed
25979
25980 - `path: string`
25981
25982 Where the block is in your request, as `messages.{i}.content.{j}`:
25983 `i` indexes the `messages` array you sent and `j` that message's `content`
25984 array — the same form error messages use.
25985
25986 - `reason: "model_binding_mismatch" or "prefix_binding_mismatch" or "organization_binding_mismatch" or "end_user_binding_mismatch"`
25987
25988 Which binding check the block failed; the block was shown to the model all
25989 the same. Always `prefix_binding_mismatch` today — the conversation before
25990 the block differs from the conversation it was created in, or the block
25991 carries no record of one on a model that requires it. Were the check
25992 enforced for this request, the block would have been removed or the request
25993 rejected (`thinking.block_binding.prefix_mismatch_behavior`). A removal also
25994 takes the rest of that turn's consecutive thinking blocks, whereas here each
25995 block is checked on its own, so `thinking_mismatch_allowed` entries are a
25996 lower bound on what enforcement would remove.
25997
25998 - `"model_binding_mismatch"`
25999
26000 - `"prefix_binding_mismatch"`
26001
26002 - `"organization_binding_mismatch"`
26003
26004 - `"end_user_binding_mismatch"`
2547726005
2547826006### Beta Raw Message Start Event
2547926007
from line 26909
2638126909 - `encrypted_content: string or null`
2638226910
2638326911 Opaque metadata from prior compaction, to be round-tripped verbatim
26912
26913 - `signature: optional string or null`
26914
26915 Signature over the summary, to be sent back with the block verbatim
2638426916
2638526917 - `BetaFallbackBlock object`
2638626918
from line 27677
2714527677
2714627678 - `"fast"`
2714727679
27148 - `input_transformations: optional array of BetaThinkingDroppedInputTransformation or null`
27149
27150 Changes the API made to the request's input before showing it to the model:
27151 one entry per change, in request order. Today the only entry type is
27152 `thinking_dropped` — a `thinking`, `redacted_thinking` or `connector_text`
27153 block from the request's `messages` that was removed from the prompt instead
27154 of being shown to the model because it failed a binding check. More entry
27155 types may be added over time; ignore types you do not recognize.
27680 - `input_transformations: optional array of BetaInputTransformation or null`
27681
27682 Changes the API made to the request's input before showing it to the model,
27683 and blocks that failed a binding check but were left unchanged: one entry per
27684 block, in request order. Two entry types today. `thinking_dropped` — a
27685 `thinking`, `redacted_thinking` or `connector_text` block from the request's
27686 `messages` that was removed from the prompt instead of being shown to the
27687 model because it failed a binding check. `thinking_mismatch_allowed` — a
27688 `thinking` or `redacted_thinking` block that failed the conversation check
27689 (the conversation before it differs from the one it was created in, or it
27690 carries no record of one on a model that requires it) and was shown to the
27691 model all the same, because that check is not enforced for this request.
27692 More entry types may be added over time; ignore types you do not recognize.
2715627693
2715727694 Requires `anthropic-beta: thinking-binding-controls-2026-08-01`. Present on
2715827695 every such response from a model that supports extended thinking, as `[]`
27159 when nothing was changed; without the beta, blocks are removed all the same
27160 but nothing is reported. Removed blocks contribute nothing to
27161 `usage.input_tokens`. When streaming, the array is final in `message_start`;
27162 the final `message_delta` event carries it only when a server-side model
27163 fallback happened mid-stream, in which case it holds the serving model's
27164 entries and replaces the one in `message_start`.
27165
27166 - `type: "thinking_dropped"`
27167
27168 Always `thinking_dropped` for this entry type.
27169
27170 default: thinking_dropped
27171
27172 - `path: string`
27173
27174 Where the removed block was in your request, as `messages.{i}.content.{j}`:
27175 `i` indexes the `messages` array you sent and `j` that message's `content`
27176 array — the same form error messages use.
27177
27178 - `reason: "model_binding_mismatch" or "prefix_binding_mismatch" or "organization_binding_mismatch" or "end_user_binding_mismatch"`
27179
27180 Which binding check removed the block: `model_binding_mismatch` — it was
27181 created by a model whose reasoning the requested model may not read;
27182 `prefix_binding_mismatch` — the conversation before it differs from the
27183 conversation it was created in (the rest of that turn's consecutive thinking
27184 blocks are removed with it, each with this reason);
27185 `organization_binding_mismatch` — it was created under a different
27186 organization (an Anthropic organization, AWS account or Google Cloud project)
27187 and this organization is not one of its additional organizations;
27188 `end_user_binding_mismatch` — it was created for a different end user, or
27189 was removed by the consumer-organization binding. A block that would fail
27190 several checks reports one reason, in this order of precedence:
27191 `organization_binding_mismatch`, `end_user_binding_mismatch`,
27192 `model_binding_mismatch`, `prefix_binding_mismatch`.
27193
27194 - `"model_binding_mismatch"`
27195
27196 - `"prefix_binding_mismatch"`
27197
27198 - `"organization_binding_mismatch"`
27199
27200 - `"end_user_binding_mismatch"`
27696 when there is no entry to report; without the beta, blocks are removed or
27697 left in place all the same but nothing is reported. Removed blocks contribute
27698 nothing to `usage.input_tokens`; blocks left in place count as sent. When
27699 streaming, the array is final in `message_start`; the final `message_delta`
27700 event carries it only when a server-side model fallback happened mid-stream,
27701 in which case it holds the serving model's entries and replaces the one in
27702 `message_start`.
27703
27704 - `BetaThinkingDroppedInputTransformation object`
27705
27706 - `type: "thinking_dropped"`
27707
27708 Always `thinking_dropped` for this entry type.
27709
27710 default: thinking_dropped
27711
27712 - `path: string`
27713
27714 Where the removed block was in your request, as `messages.{i}.content.{j}`:
27715 `i` indexes the `messages` array you sent and `j` that message's `content`
27716 array — the same form error messages use.
27717
27718 - `reason: "model_binding_mismatch" or "prefix_binding_mismatch" or "organization_binding_mismatch" or "end_user_binding_mismatch"`
27719
27720 Which binding check removed the block: `model_binding_mismatch` — it was
27721 created by a model whose reasoning the requested model may not read;
27722 `prefix_binding_mismatch` — the conversation before it differs from the
27723 conversation it was created in (the rest of that turn's consecutive thinking
27724 blocks are removed with it, each with this reason);
27725 `organization_binding_mismatch` — it was created under a different
27726 organization (an Anthropic organization, AWS account or Google Cloud project)
27727 and this organization is not one of its additional organizations;
27728 `end_user_binding_mismatch` — it was created for a different end user, or
27729 was removed by the consumer-organization binding. A block that would fail
27730 several checks reports one reason, in this order of precedence:
27731 `organization_binding_mismatch`, `end_user_binding_mismatch`,
27732 `model_binding_mismatch`, `prefix_binding_mismatch`.
27733
27734 - `"model_binding_mismatch"`
27735
27736 - `"prefix_binding_mismatch"`
27737
27738 - `"organization_binding_mismatch"`
27739
27740 - `"end_user_binding_mismatch"`
27741
27742 - `BetaThinkingMismatchAllowedInputTransformation object`
27743
27744 - `type: "thinking_mismatch_allowed"`
27745
27746 Always `thinking_mismatch_allowed` for this entry type.
27747
27748 default: thinking_mismatch_allowed
27749
27750 - `path: string`
27751
27752 Where the block is in your request, as `messages.{i}.content.{j}`:
27753 `i` indexes the `messages` array you sent and `j` that message's `content`
27754 array — the same form error messages use.
27755
27756 - `reason: "model_binding_mismatch" or "prefix_binding_mismatch" or "organization_binding_mismatch" or "end_user_binding_mismatch"`
27757
27758 Which binding check the block failed; the block was shown to the model all
27759 the same. Always `prefix_binding_mismatch` today — the conversation before
27760 the block differs from the conversation it was created in, or the block
27761 carries no record of one on a model that requires it. Were the check
27762 enforced for this request, the block would have been removed or the request
27763 rejected (`thinking.block_binding.prefix_mismatch_behavior`). A removal also
27764 takes the rest of that turn's consecutive thinking blocks, whereas here each
27765 block is checked on its own, so `thinking_mismatch_allowed` entries are a
27766 lower bound on what enforcement would remove.
27767
27768 - `"model_binding_mismatch"`
27769
27770 - `"prefix_binding_mismatch"`
27771
27772 - `"organization_binding_mismatch"`
27773
27774 - `"end_user_binding_mismatch"`
2720127775
2720227776### Beta Raw Message Stop Event
2720327777
from line 28689
2811528689 - `encrypted_content: string or null`
2811628690
2811728691 Opaque metadata from prior compaction, to be round-tripped verbatim
28692
28693 - `signature: optional string or null`
28694
28695 Signature over the summary, to be sent back with the block verbatim
2811828696
2811928697 - `BetaFallbackBlock object`
2812028698
from line 29457
2887929457
2888029458 - `"fast"`
2888129459
28882 - `input_transformations: optional array of BetaThinkingDroppedInputTransformation or null`
28883
28884 Changes the API made to the request's input before showing it to the model:
28885 one entry per change, in request order. Today the only entry type is
28886 `thinking_dropped` — a `thinking`, `redacted_thinking` or `connector_text`
28887 block from the request's `messages` that was removed from the prompt instead
28888 of being shown to the model because it failed a binding check. More entry
28889 types may be added over time; ignore types you do not recognize.
29460 - `input_transformations: optional array of BetaInputTransformation or null`
29461
29462 Changes the API made to the request's input before showing it to the model,
29463 and blocks that failed a binding check but were left unchanged: one entry per
29464 block, in request order. Two entry types today. `thinking_dropped` — a
29465 `thinking`, `redacted_thinking` or `connector_text` block from the request's
29466 `messages` that was removed from the prompt instead of being shown to the
29467 model because it failed a binding check. `thinking_mismatch_allowed` — a
29468 `thinking` or `redacted_thinking` block that failed the conversation check
29469 (the conversation before it differs from the one it was created in, or it
29470 carries no record of one on a model that requires it) and was shown to the
29471 model all the same, because that check is not enforced for this request.
29472 More entry types may be added over time; ignore types you do not recognize.
2889029473
2889129474 Requires `anthropic-beta: thinking-binding-controls-2026-08-01`. Present on
2889229475 every such response from a model that supports extended thinking, as `[]`
28893 when nothing was changed; without the beta, blocks are removed all the same
28894 but nothing is reported. Removed blocks contribute nothing to
28895 `usage.input_tokens`. When streaming, the array is final in `message_start`;
28896 the final `message_delta` event carries it only when a server-side model
28897 fallback happened mid-stream, in which case it holds the serving model's
28898 entries and replaces the one in `message_start`.
28899
28900 - `type: "thinking_dropped"`
28901
28902 Always `thinking_dropped` for this entry type.
28903
28904 default: thinking_dropped
28905
28906 - `path: string`
28907
28908 Where the removed block was in your request, as `messages.{i}.content.{j}`:
28909 `i` indexes the `messages` array you sent and `j` that message's `content`
28910 array — the same form error messages use.
28911
28912 - `reason: "model_binding_mismatch" or "prefix_binding_mismatch" or "organization_binding_mismatch" or "end_user_binding_mismatch"`
28913
28914 Which binding check removed the block: `model_binding_mismatch` — it was
28915 created by a model whose reasoning the requested model may not read;
28916 `prefix_binding_mismatch` — the conversation before it differs from the
28917 conversation it was created in (the rest of that turn's consecutive thinking
28918 blocks are removed with it, each with this reason);
28919 `organization_binding_mismatch` — it was created under a different
28920 organization (an Anthropic organization, AWS account or Google Cloud project)
28921 and this organization is not one of its additional organizations;
28922 `end_user_binding_mismatch` — it was created for a different end user, or
28923 was removed by the consumer-organization binding. A block that would fail
28924 several checks reports one reason, in this order of precedence:
28925 `organization_binding_mismatch`, `end_user_binding_mismatch`,
28926 `model_binding_mismatch`, `prefix_binding_mismatch`.
28927
28928 - `"model_binding_mismatch"`
28929
28930 - `"prefix_binding_mismatch"`
28931
28932 - `"organization_binding_mismatch"`
28933
28934 - `"end_user_binding_mismatch"`
29476 when there is no entry to report; without the beta, blocks are removed or
29477 left in place all the same but nothing is reported. Removed blocks contribute
29478 nothing to `usage.input_tokens`; blocks left in place count as sent. When
29479 streaming, the array is final in `message_start`; the final `message_delta`
29480 event carries it only when a server-side model fallback happened mid-stream,
29481 in which case it holds the serving model's entries and replaces the one in
29482 `message_start`.
29483
29484 - `BetaThinkingDroppedInputTransformation object`
29485
29486 - `type: "thinking_dropped"`
29487
29488 Always `thinking_dropped` for this entry type.
29489
29490 default: thinking_dropped
29491
29492 - `path: string`
29493
29494 Where the removed block was in your request, as `messages.{i}.content.{j}`:
29495 `i` indexes the `messages` array you sent and `j` that message's `content`
29496 array — the same form error messages use.
29497
29498 - `reason: "model_binding_mismatch" or "prefix_binding_mismatch" or "organization_binding_mismatch" or "end_user_binding_mismatch"`
29499
29500 Which binding check removed the block: `model_binding_mismatch` — it was
29501 created by a model whose reasoning the requested model may not read;
29502 `prefix_binding_mismatch` — the conversation before it differs from the
29503 conversation it was created in (the rest of that turn's consecutive thinking
29504 blocks are removed with it, each with this reason);
29505 `organization_binding_mismatch` — it was created under a different
29506 organization (an Anthropic organization, AWS account or Google Cloud project)
29507 and this organization is not one of its additional organizations;
29508 `end_user_binding_mismatch` — it was created for a different end user, or
29509 was removed by the consumer-organization binding. A block that would fail
29510 several checks reports one reason, in this order of precedence:
29511 `organization_binding_mismatch`, `end_user_binding_mismatch`,
29512 `model_binding_mismatch`, `prefix_binding_mismatch`.
29513
29514 - `"model_binding_mismatch"`
29515
29516 - `"prefix_binding_mismatch"`
29517
29518 - `"organization_binding_mismatch"`
29519
29520 - `"end_user_binding_mismatch"`
29521
29522 - `BetaThinkingMismatchAllowedInputTransformation object`
29523
29524 - `type: "thinking_mismatch_allowed"`
29525
29526 Always `thinking_mismatch_allowed` for this entry type.
29527
29528 default: thinking_mismatch_allowed
29529
29530 - `path: string`
29531
29532 Where the block is in your request, as `messages.{i}.content.{j}`:
29533 `i` indexes the `messages` array you sent and `j` that message's `content`
29534 array — the same form error messages use.
29535
29536 - `reason: "model_binding_mismatch" or "prefix_binding_mismatch" or "organization_binding_mismatch" or "end_user_binding_mismatch"`
29537
29538 Which binding check the block failed; the block was shown to the model all
29539 the same. Always `prefix_binding_mismatch` today — the conversation before
29540 the block differs from the conversation it was created in, or the block
29541 carries no record of one on a model that requires it. Were the check
29542 enforced for this request, the block would have been removed or the request
29543 rejected (`thinking.block_binding.prefix_mismatch_behavior`). A removal also
29544 takes the rest of that turn's consecutive thinking blocks, whereas here each
29545 block is checked on its own, so `thinking_mismatch_allowed` entries are a
29546 lower bound on what enforcement would remove.
29547
29548 - `"model_binding_mismatch"`
29549
29550 - `"prefix_binding_mismatch"`
29551
29552 - `"organization_binding_mismatch"`
29553
29554 - `"end_user_binding_mismatch"`
2893529555
2893629556 - `BetaRawMessageDeltaEvent object`
2893729557
from line 29640
2902029640
2902129641 The number of server tool requests.
2902229642
29023 - `input_transformations: optional array of BetaThinkingDroppedInputTransformation or null`
29024
29025 Changes the API made to the request's input before showing it to the model:
29026 one entry per change, in request order. Today the only entry type is
29027 `thinking_dropped` — a `thinking`, `redacted_thinking` or `connector_text`
29028 block from the request's `messages` that was removed from the prompt instead
29029 of being shown to the model because it failed a binding check. More entry
29030 types may be added over time; ignore types you do not recognize.
29643 - `input_transformations: optional array of BetaInputTransformation or null`
29644
29645 Changes the API made to the request's input before showing it to the model,
29646 and blocks that failed a binding check but were left unchanged: one entry per
29647 block, in request order. Two entry types today. `thinking_dropped` — a
29648 `thinking`, `redacted_thinking` or `connector_text` block from the request's
29649 `messages` that was removed from the prompt instead of being shown to the
29650 model because it failed a binding check. `thinking_mismatch_allowed` — a
29651 `thinking` or `redacted_thinking` block that failed the conversation check
29652 (the conversation before it differs from the one it was created in, or it
29653 carries no record of one on a model that requires it) and was shown to the
29654 model all the same, because that check is not enforced for this request.
29655 More entry types may be added over time; ignore types you do not recognize.
2903129656
2903229657 Requires `anthropic-beta: thinking-binding-controls-2026-08-01`. Present on
2903329658 every such response from a model that supports extended thinking, as `[]`
29034 when nothing was changed; without the beta, blocks are removed all the same
29035 but nothing is reported. Removed blocks contribute nothing to
29036 `usage.input_tokens`. When streaming, the array is final in `message_start`;
29037 the final `message_delta` event carries it only when a server-side model
29038 fallback happened mid-stream, in which case it holds the serving model's
29039 entries and replaces the one in `message_start`.
29040
29041 - `type: "thinking_dropped"`
29042
29043 Always `thinking_dropped` for this entry type.
29044
29045 default: thinking_dropped
29046
29047 - `path: string`
29048
29049 Where the removed block was in your request, as `messages.{i}.content.{j}`:
29050 `i` indexes the `messages` array you sent and `j` that message's `content`
29051 array — the same form error messages use.
29052
29053 - `reason: "model_binding_mismatch" or "prefix_binding_mismatch" or "organization_binding_mismatch" or "end_user_binding_mismatch"`
29054
29055 Which binding check removed the block: `model_binding_mismatch` — it was
29056 created by a model whose reasoning the requested model may not read;
29057 `prefix_binding_mismatch` — the conversation before it differs from the
29058 conversation it was created in (the rest of that turn's consecutive thinking
29059 blocks are removed with it, each with this reason);
29060 `organization_binding_mismatch` — it was created under a different
29061 organization (an Anthropic organization, AWS account or Google Cloud project)
29062 and this organization is not one of its additional organizations;
29063 `end_user_binding_mismatch` — it was created for a different end user, or
29064 was removed by the consumer-organization binding. A block that would fail
29065 several checks reports one reason, in this order of precedence:
29066 `organization_binding_mismatch`, `end_user_binding_mismatch`,
29067 `model_binding_mismatch`, `prefix_binding_mismatch`.
29659 when there is no entry to report; without the beta, blocks are removed or
29660 left in place all the same but nothing is reported. Removed blocks contribute
29661 nothing to `usage.input_tokens`; blocks left in place count as sent. When
29662 streaming, the array is final in `message_start`; the final `message_delta`
29663 event carries it only when a server-side model fallback happened mid-stream,
29664 in which case it holds the serving model's entries and replaces the one in
29665 `message_start`.
29666
29667 - `BetaThinkingDroppedInputTransformation object`
29668
29669 - `BetaThinkingMismatchAllowedInputTransformation object`
2906829670
2906929671 - `BetaRawMessageStopEvent object`
2907029672
from line 30939
3033730939
3033830940 - `"model_context_window_exceeded"`
3033930941
30942### Beta Summarize Compaction
30943
30944- `BetaSummarizeCompaction object`
30945
30946 Compact the whole conversation and return a signed `compaction` block,
30947 alone, that a later request sends back first in `messages`, in place of
30948 the messages it summarizes. There is no trigger and no pause flag: sending
30949 the parameter compacts, and nothing is sampled after the block.
30950
30951 The summarization prompt is the server's own unless `instructions` are
30952 given, which then replace it for this request; a value that is empty or
30953 only whitespace counts as absent.
30954
30955 - `type: "summarize"`
30956
30957 - `instructions: optional string or null`
30958
30959 Replaces the server's default summarization prompt for this request. An empty or whitespace-only value counts as absent.
30960
30961 maxLength: 16384
30962
3034030963### Beta System Message Output Config
3034130964
3034230965- `BetaSystemMessageOutputConfig object`
from line 32132
3150932132
3151032133 - `"end_user_binding_mismatch"`
3151132134
32135### Beta Thinking Mismatch Allowed Input Transformation
32136
32137- `BetaThinkingMismatchAllowedInputTransformation object`
32138
32139 - `type: "thinking_mismatch_allowed"`
32140
32141 Always `thinking_mismatch_allowed` for this entry type.
32142
32143 default: thinking_mismatch_allowed
32144
32145 - `path: string`
32146
32147 Where the block is in your request, as `messages.{i}.content.{j}`:
32148 `i` indexes the `messages` array you sent and `j` that message's `content`
32149 array — the same form error messages use.
32150
32151 - `reason: "model_binding_mismatch" or "prefix_binding_mismatch" or "organization_binding_mismatch" or "end_user_binding_mismatch"`
32152
32153 Which binding check the block failed; the block was shown to the model all
32154 the same. Always `prefix_binding_mismatch` today — the conversation before
32155 the block differs from the conversation it was created in, or the block
32156 carries no record of one on a model that requires it. Were the check
32157 enforced for this request, the block would have been removed or the request
32158 rejected (`thinking.block_binding.prefix_mismatch_behavior`). A removal also
32159 takes the rest of that turn's consecutive thinking blocks, whereas here each
32160 block is checked on its own, so `thinking_mismatch_allowed` entries are a
32161 lower bound on what enforcement would remove.
32162
32163 - `"model_binding_mismatch"`
32164
32165 - `"prefix_binding_mismatch"`
32166
32167 - `"organization_binding_mismatch"`
32168
32169 - `"end_user_binding_mismatch"`
32170
3151232171### Beta Thinking Prefix Mismatch Behavior
3151332172
3151432173- `BetaThinkingPrefixMismatchBehavior = "error" or "drop_block"`
from line 35190
3453135190
3453235191 When true, guarantees schema validation on tool names and inputs
3453335192
35193 - `url_sources: optional BetaWebFetchURLSources or null`
35194
35195 Which sources contribute to the set of URLs web fetch may fetch.
35196
35197 Each key is a tagged variant: `user_input` is `all` or `none`; the
35198 two tool filters are `all`, `none`, `only` (only the named tools'
35199 results) or `except` (every result but the named tools'). A named tool
35200 must be declared in this request's `tools[]`.
35201
35202 - `client_tool_results: optional BetaWebFetchURLSourceAll or BetaWebFetchURLSourceNone or BetaWebFetchURLSourceOnly or BetaWebFetchURLSourceExcept`
35203
35204 Which client tools' results contribute fetchable URLs: "all", "none", or an only or except list of client tool names from tools[].
35205
35206 - `BetaWebFetchURLSourceAll object`
35207
35208 The `url_sources` variant under which a source contributes in
35209 full: every result of the tool filter's source, or all user input.
35210
35211 - `type: "all"`
35212
35213 - `BetaWebFetchURLSourceNone object`
35214
35215 The `url_sources` variant under which a source contributes nothing:
35216 no result of the tool filter's source, or no user input.
35217
35218 - `type: "none"`
35219
35220 - `BetaWebFetchURLSourceOnly object`
35221
35222 The tool filter variant under which only the named tools' results
35223 contribute.
35224
35225 - `type: "only"`
35226
35227 - `tools: array of BetaWebFetchURLSourceToolReference`
35228
35229 - `type: "tool_reference"`
35230
35231 - `name: string`
35232
35233 - `BetaWebFetchURLSourceExcept object`
35234
35235 The tool filter variant under which every result but the named
35236 tools' contributes.
35237
35238 - `type: "except"`
35239
35240 - `tools: array of BetaWebFetchURLSourceToolReference`
35241
35242 - `type: "tool_reference"`
35243
35244 - `name: string`
35245
35246 - `server_tool_results: optional BetaWebFetchURLSourceAll or BetaWebFetchURLSourceNone or BetaWebFetchURLSourceOnly or BetaWebFetchURLSourceExcept`
35247
35248 Which server tools' results contribute fetchable URLs: "all", "none", or an only or except list of server tool names from tools[]; only web_search and web_fetch results ever contribute.
35249
35250 - `BetaWebFetchURLSourceAll object`
35251
35252 The `url_sources` variant under which a source contributes in
35253 full: every result of the tool filter's source, or all user input.
35254
35255 - `BetaWebFetchURLSourceNone object`
35256
35257 The `url_sources` variant under which a source contributes nothing:
35258 no result of the tool filter's source, or no user input.
35259
35260 - `BetaWebFetchURLSourceOnly object`
35261
35262 The tool filter variant under which only the named tools' results
35263 contribute.
35264
35265 - `BetaWebFetchURLSourceExcept object`
35266
35267 The tool filter variant under which every result but the named
35268 tools' contributes.
35269
35270 - `user_input: optional BetaWebFetchURLSourceAll or BetaWebFetchURLSourceNone`
35271
35272 Whether URLs in user messages are fetchable: "all" or "none".
35273
35274 - `BetaWebFetchURLSourceAll object`
35275
35276 The `url_sources` variant under which a source contributes in
35277 full: every result of the tool filter's source, or all user input.
35278
35279 - `BetaWebFetchURLSourceNone object`
35280
35281 The `url_sources` variant under which a source contributes nothing:
35282 no result of the tool filter's source, or no user input.
35283
3453435284 - `BetaWebSearchTool20260209 object`
3453535285
3453635286 - `type: "web_search_20260209"`
from line 35387
3463735387
3463835388 When true, guarantees schema validation on tool names and inputs
3463935389
35390 - `url_sources: optional BetaWebFetchURLSources or null`
35391
35392 Which sources contribute to the set of URLs web fetch may fetch.
35393
35394 Each key is a tagged variant: `user_input` is `all` or `none`; the
35395 two tool filters are `all`, `none`, `only` (only the named tools'
35396 results) or `except` (every result but the named tools'). A named tool
35397 must be declared in this request's `tools[]`.
35398
3464035399 - `BetaWebFetchTool20260309 object`
3464135400
3464235401 Web fetch tool with use_cache parameter for bypassing cached content.
from line 35454
3469535454
3469635455 When true, guarantees schema validation on tool names and inputs
3469735456
35457 - `url_sources: optional BetaWebFetchURLSources or null`
35458
35459 Which sources contribute to the set of URLs web fetch may fetch.
35460
35461 Each key is a tagged variant: `user_input` is `all` or `none`; the
35462 two tool filters are `all`, `none`, `only` (only the named tools'
35463 results) or `except` (every result but the named tools'). A named tool
35464 must be declared in this request's `tools[]`.
35465
3469835466 - `use_cache: optional boolean`
3469935467
3470035468 Whether to use cached content. Set to false to bypass the cache and fetch fresh content. Only set to false when the user explicitly requests fresh content or when fetching rapidly-changing sources.
from line 35588
3482035588 - `strict: optional boolean`
3482135589
3482235590 When true, guarantees schema validation on tool names and inputs
35591
35592 - `url_sources: optional BetaWebFetchURLSources or null`
35593
35594 Which sources contribute to the set of URLs web fetch may fetch.
35595
35596 Each key is a tagged variant: `user_input` is `all` or `none`; the
35597 two tool filters are `all`, `none`, `only` (only the named tools'
35598 results) or `except` (every result but the named tools'). A named tool
35599 must be declared in this request's `tools[]`.
3482335600
3482435601 - `use_cache: optional boolean`
3482535602
from line 36875
3609836875
3609936876 When true, guarantees schema validation on tool names and inputs
3610036877
36878 - `url_sources: optional BetaWebFetchURLSources or null`
36879
36880 Which sources contribute to the set of URLs web fetch may fetch.
36881
36882 Each key is a tagged variant: `user_input` is `all` or `none`; the
36883 two tool filters are `all`, `none`, `only` (only the named tools'
36884 results) or `except` (every result but the named tools'). A named tool
36885 must be declared in this request's `tools[]`.
36886
36887 - `client_tool_results: optional BetaWebFetchURLSourceAll or BetaWebFetchURLSourceNone or BetaWebFetchURLSourceOnly or BetaWebFetchURLSourceExcept`
36888
36889 Which client tools' results contribute fetchable URLs: "all", "none", or an only or except list of client tool names from tools[].
36890
36891 - `BetaWebFetchURLSourceAll object`
36892
36893 The `url_sources` variant under which a source contributes in
36894 full: every result of the tool filter's source, or all user input.
36895
36896 - `type: "all"`
36897
36898 - `BetaWebFetchURLSourceNone object`
36899
36900 The `url_sources` variant under which a source contributes nothing:
36901 no result of the tool filter's source, or no user input.
36902
36903 - `type: "none"`
36904
36905 - `BetaWebFetchURLSourceOnly object`
36906
36907 The tool filter variant under which only the named tools' results
36908 contribute.
36909
36910 - `type: "only"`
36911
36912 - `tools: array of BetaWebFetchURLSourceToolReference`
36913
36914 - `type: "tool_reference"`
36915
36916 - `name: string`
36917
36918 - `BetaWebFetchURLSourceExcept object`
36919
36920 The tool filter variant under which every result but the named
36921 tools' contributes.
36922
36923 - `type: "except"`
36924
36925 - `tools: array of BetaWebFetchURLSourceToolReference`
36926
36927 - `type: "tool_reference"`
36928
36929 - `name: string`
36930
36931 - `server_tool_results: optional BetaWebFetchURLSourceAll or BetaWebFetchURLSourceNone or BetaWebFetchURLSourceOnly or BetaWebFetchURLSourceExcept`
36932
36933 Which server tools' results contribute fetchable URLs: "all", "none", or an only or except list of server tool names from tools[]; only web_search and web_fetch results ever contribute.
36934
36935 - `BetaWebFetchURLSourceAll object`
36936
36937 The `url_sources` variant under which a source contributes in
36938 full: every result of the tool filter's source, or all user input.
36939
36940 - `BetaWebFetchURLSourceNone object`
36941
36942 The `url_sources` variant under which a source contributes nothing:
36943 no result of the tool filter's source, or no user input.
36944
36945 - `BetaWebFetchURLSourceOnly object`
36946
36947 The tool filter variant under which only the named tools' results
36948 contribute.
36949
36950 - `BetaWebFetchURLSourceExcept object`
36951
36952 The tool filter variant under which every result but the named
36953 tools' contributes.
36954
36955 - `user_input: optional BetaWebFetchURLSourceAll or BetaWebFetchURLSourceNone`
36956
36957 Whether URLs in user messages are fetchable: "all" or "none".
36958
36959 - `BetaWebFetchURLSourceAll object`
36960
36961 The `url_sources` variant under which a source contributes in
36962 full: every result of the tool filter's source, or all user input.
36963
36964 - `BetaWebFetchURLSourceNone object`
36965
36966 The `url_sources` variant under which a source contributes nothing:
36967 no result of the tool filter's source, or no user input.
36968
3610136969### Beta Web Fetch Tool 20260209
3610236970
3610336971- `BetaWebFetchTool20260209 object`
from line 37043
3617537043
3617637044 When true, guarantees schema validation on tool names and inputs
3617737045
37046 - `url_sources: optional BetaWebFetchURLSources or null`
37047
37048 Which sources contribute to the set of URLs web fetch may fetch.
37049
37050 Each key is a tagged variant: `user_input` is `all` or `none`; the
37051 two tool filters are `all`, `none`, `only` (only the named tools'
37052 results) or `except` (every result but the named tools'). A named tool
37053 must be declared in this request's `tools[]`.
37054
37055 - `client_tool_results: optional BetaWebFetchURLSourceAll or BetaWebFetchURLSourceNone or BetaWebFetchURLSourceOnly or BetaWebFetchURLSourceExcept`
37056
37057 Which client tools' results contribute fetchable URLs: "all", "none", or an only or except list of client tool names from tools[].
37058
37059 - `BetaWebFetchURLSourceAll object`
37060
37061 The `url_sources` variant under which a source contributes in
37062 full: every result of the tool filter's source, or all user input.
37063
37064 - `type: "all"`
37065
37066 - `BetaWebFetchURLSourceNone object`
37067
37068 The `url_sources` variant under which a source contributes nothing:
37069 no result of the tool filter's source, or no user input.
37070
37071 - `type: "none"`
37072
37073 - `BetaWebFetchURLSourceOnly object`
37074
37075 The tool filter variant under which only the named tools' results
37076 contribute.
37077
37078 - `type: "only"`
37079
37080 - `tools: array of BetaWebFetchURLSourceToolReference`
37081
37082 - `type: "tool_reference"`
37083
37084 - `name: string`
37085
37086 - `BetaWebFetchURLSourceExcept object`
37087
37088 The tool filter variant under which every result but the named
37089 tools' contributes.
37090
37091 - `type: "except"`
37092
37093 - `tools: array of BetaWebFetchURLSourceToolReference`
37094
37095 - `type: "tool_reference"`
37096
37097 - `name: string`
37098
37099 - `server_tool_results: optional BetaWebFetchURLSourceAll or BetaWebFetchURLSourceNone or BetaWebFetchURLSourceOnly or BetaWebFetchURLSourceExcept`
37100
37101 Which server tools' results contribute fetchable URLs: "all", "none", or an only or except list of server tool names from tools[]; only web_search and web_fetch results ever contribute.
37102
37103 - `BetaWebFetchURLSourceAll object`
37104
37105 The `url_sources` variant under which a source contributes in
37106 full: every result of the tool filter's source, or all user input.
37107
37108 - `BetaWebFetchURLSourceNone object`
37109
37110 The `url_sources` variant under which a source contributes nothing:
37111 no result of the tool filter's source, or no user input.
37112
37113 - `BetaWebFetchURLSourceOnly object`
37114
37115 The tool filter variant under which only the named tools' results
37116 contribute.
37117
37118 - `BetaWebFetchURLSourceExcept object`
37119
37120 The tool filter variant under which every result but the named
37121 tools' contributes.
37122
37123 - `user_input: optional BetaWebFetchURLSourceAll or BetaWebFetchURLSourceNone`
37124
37125 Whether URLs in user messages are fetchable: "all" or "none".
37126
37127 - `BetaWebFetchURLSourceAll object`
37128
37129 The `url_sources` variant under which a source contributes in
37130 full: every result of the tool filter's source, or all user input.
37131
37132 - `BetaWebFetchURLSourceNone object`
37133
37134 The `url_sources` variant under which a source contributes nothing:
37135 no result of the tool filter's source, or no user input.
37136
3617837137### Beta Web Fetch Tool 20260309
3617937138
3618037139- `BetaWebFetchTool20260309 object`
from line 37213
3625437213
3625537214 When true, guarantees schema validation on tool names and inputs
3625637215
37216 - `url_sources: optional BetaWebFetchURLSources or null`
37217
37218 Which sources contribute to the set of URLs web fetch may fetch.
37219
37220 Each key is a tagged variant: `user_input` is `all` or `none`; the
37221 two tool filters are `all`, `none`, `only` (only the named tools'
37222 results) or `except` (every result but the named tools'). A named tool
37223 must be declared in this request's `tools[]`.
37224
37225 - `client_tool_results: optional BetaWebFetchURLSourceAll or BetaWebFetchURLSourceNone or BetaWebFetchURLSourceOnly or BetaWebFetchURLSourceExcept`
37226
37227 Which client tools' results contribute fetchable URLs: "all", "none", or an only or except list of client tool names from tools[].
37228
37229 - `BetaWebFetchURLSourceAll object`
37230
37231 The `url_sources` variant under which a source contributes in
37232 full: every result of the tool filter's source, or all user input.
37233
37234 - `type: "all"`
37235
37236 - `BetaWebFetchURLSourceNone object`
37237
37238 The `url_sources` variant under which a source contributes nothing:
37239 no result of the tool filter's source, or no user input.
37240
37241 - `type: "none"`
37242
37243 - `BetaWebFetchURLSourceOnly object`
37244
37245 The tool filter variant under which only the named tools' results
37246 contribute.
37247
37248 - `type: "only"`
37249
37250 - `tools: array of BetaWebFetchURLSourceToolReference`
37251
37252 - `type: "tool_reference"`
37253
37254 - `name: string`
37255
37256 - `BetaWebFetchURLSourceExcept object`
37257
37258 The tool filter variant under which every result but the named
37259 tools' contributes.
37260
37261 - `type: "except"`
37262
37263 - `tools: array of BetaWebFetchURLSourceToolReference`
37264
37265 - `type: "tool_reference"`
37266
37267 - `name: string`
37268
37269 - `server_tool_results: optional BetaWebFetchURLSourceAll or BetaWebFetchURLSourceNone or BetaWebFetchURLSourceOnly or BetaWebFetchURLSourceExcept`
37270
37271 Which server tools' results contribute fetchable URLs: "all", "none", or an only or except list of server tool names from tools[]; only web_search and web_fetch results ever contribute.
37272
37273 - `BetaWebFetchURLSourceAll object`
37274
37275 The `url_sources` variant under which a source contributes in
37276 full: every result of the tool filter's source, or all user input.
37277
37278 - `BetaWebFetchURLSourceNone object`
37279
37280 The `url_sources` variant under which a source contributes nothing:
37281 no result of the tool filter's source, or no user input.
37282
37283 - `BetaWebFetchURLSourceOnly object`
37284
37285 The tool filter variant under which only the named tools' results
37286 contribute.
37287
37288 - `BetaWebFetchURLSourceExcept object`
37289
37290 The tool filter variant under which every result but the named
37291 tools' contributes.
37292
37293 - `user_input: optional BetaWebFetchURLSourceAll or BetaWebFetchURLSourceNone`
37294
37295 Whether URLs in user messages are fetchable: "all" or "none".
37296
37297 - `BetaWebFetchURLSourceAll object`
37298
37299 The `url_sources` variant under which a source contributes in
37300 full: every result of the tool filter's source, or all user input.
37301
37302 - `BetaWebFetchURLSourceNone object`
37303
37304 The `url_sources` variant under which a source contributes nothing:
37305 no result of the tool filter's source, or no user input.
37306
3625737307 - `use_cache: optional boolean`
3625837308
3625937309 Whether to use cached content. Set to false to bypass the cache and fetch fresh content. Only set to false when the user explicitly requests fresh content or when fetching rapidly-changing sources.
from line 37393
3634337393
3634437394 When true, guarantees schema validation on tool names and inputs
3634537395
37396 - `url_sources: optional BetaWebFetchURLSources or null`
37397
37398 Which sources contribute to the set of URLs web fetch may fetch.
37399
37400 Each key is a tagged variant: `user_input` is `all` or `none`; the
37401 two tool filters are `all`, `none`, `only` (only the named tools'
37402 results) or `except` (every result but the named tools'). A named tool
37403 must be declared in this request's `tools[]`.
37404
37405 - `client_tool_results: optional BetaWebFetchURLSourceAll or BetaWebFetchURLSourceNone or BetaWebFetchURLSourceOnly or BetaWebFetchURLSourceExcept`
37406
37407 Which client tools' results contribute fetchable URLs: "all", "none", or an only or except list of client tool names from tools[].
37408
37409 - `BetaWebFetchURLSourceAll object`
37410
37411 The `url_sources` variant under which a source contributes in
37412 full: every result of the tool filter's source, or all user input.
37413
37414 - `type: "all"`
37415
37416 - `BetaWebFetchURLSourceNone object`
37417
37418 The `url_sources` variant under which a source contributes nothing:
37419 no result of the tool filter's source, or no user input.
37420
37421 - `type: "none"`
37422
37423 - `BetaWebFetchURLSourceOnly object`
37424
37425 The tool filter variant under which only the named tools' results
37426 contribute.
37427
37428 - `type: "only"`
37429
37430 - `tools: array of BetaWebFetchURLSourceToolReference`
37431
37432 - `type: "tool_reference"`
37433
37434 - `name: string`
37435
37436 - `BetaWebFetchURLSourceExcept object`
37437
37438 The tool filter variant under which every result but the named
37439 tools' contributes.
37440
37441 - `type: "except"`
37442
37443 - `tools: array of BetaWebFetchURLSourceToolReference`
37444
37445 - `type: "tool_reference"`
37446
37447 - `name: string`
37448
37449 - `server_tool_results: optional BetaWebFetchURLSourceAll or BetaWebFetchURLSourceNone or BetaWebFetchURLSourceOnly or BetaWebFetchURLSourceExcept`
37450
37451 Which server tools' results contribute fetchable URLs: "all", "none", or an only or except list of server tool names from tools[]; only web_search and web_fetch results ever contribute.
37452
37453 - `BetaWebFetchURLSourceAll object`
37454
37455 The `url_sources` variant under which a source contributes in
37456 full: every result of the tool filter's source, or all user input.
37457
37458 - `BetaWebFetchURLSourceNone object`
37459
37460 The `url_sources` variant under which a source contributes nothing:
37461 no result of the tool filter's source, or no user input.
37462
37463 - `BetaWebFetchURLSourceOnly object`
37464
37465 The tool filter variant under which only the named tools' results
37466 contribute.
37467
37468 - `BetaWebFetchURLSourceExcept object`
37469
37470 The tool filter variant under which every result but the named
37471 tools' contributes.
37472
37473 - `user_input: optional BetaWebFetchURLSourceAll or BetaWebFetchURLSourceNone`
37474
37475 Whether URLs in user messages are fetchable: "all" or "none".
37476
37477 - `BetaWebFetchURLSourceAll object`
37478
37479 The `url_sources` variant under which a source contributes in
37480 full: every result of the tool filter's source, or all user input.
37481
37482 - `BetaWebFetchURLSourceNone object`
37483
37484 The `url_sources` variant under which a source contributes nothing:
37485 no result of the tool filter's source, or no user input.
37486
3634637487 - `use_cache: optional boolean`
3634737488
3634837489 Whether to use cached content. Set to false to bypass the cache and fetch fresh content. Only set to false when the user explicitly requests fresh content or when fetching rapidly-changing sources.
from line 38035
3689438035
3689538036 - `"content_too_large"`
3689638037
38038### Beta Web Fetch URL Source All
38039
38040- `BetaWebFetchURLSourceAll object`
38041
38042 The `url_sources` variant under which a source contributes in
38043 full: every result of the tool filter's source, or all user input.
38044
38045 - `type: "all"`
38046
38047### Beta Web Fetch URL Source Except
38048
38049- `BetaWebFetchURLSourceExcept object`
38050
38051 The tool filter variant under which every result but the named
38052 tools' contributes.
38053
38054 - `type: "except"`
38055
38056 - `tools: array of BetaWebFetchURLSourceToolReference`
38057
38058 - `type: "tool_reference"`
38059
38060 - `name: string`
38061
38062### Beta Web Fetch URL Source None
38063
38064- `BetaWebFetchURLSourceNone object`
38065
38066 The `url_sources` variant under which a source contributes nothing:
38067 no result of the tool filter's source, or no user input.
38068
38069 - `type: "none"`
38070
38071### Beta Web Fetch URL Source Only
38072
38073- `BetaWebFetchURLSourceOnly object`
38074
38075 The tool filter variant under which only the named tools' results
38076 contribute.
38077
38078 - `type: "only"`
38079
38080 - `tools: array of BetaWebFetchURLSourceToolReference`
38081
38082 - `type: "tool_reference"`
38083
38084 - `name: string`
38085
38086### Beta Web Fetch URL Source Tool Reference
38087
38088- `BetaWebFetchURLSourceToolReference object`
38089
38090 One entry of a tool filter's `tools`: it must name a tool declared
38091 in this request's `tools[]`.
38092
38093 - `type: "tool_reference"`
38094
38095 - `name: string`
38096
38097### Beta Web Fetch URL Sources
38098
38099- `BetaWebFetchURLSources object`
38100
38101 Which sources contribute to the set of URLs web fetch may fetch.
38102
38103 Each key is a tagged variant: `user_input` is `all` or `none`; the
38104 two tool filters are `all`, `none`, `only` (only the named tools'
38105 results) or `except` (every result but the named tools'). A named tool
38106 must be declared in this request's `tools[]`.
38107
38108 - `client_tool_results: optional BetaWebFetchURLSourceAll or BetaWebFetchURLSourceNone or BetaWebFetchURLSourceOnly or BetaWebFetchURLSourceExcept`
38109
38110 Which client tools' results contribute fetchable URLs: "all", "none", or an only or except list of client tool names from tools[].
38111
38112 - `BetaWebFetchURLSourceAll object`
38113
38114 The `url_sources` variant under which a source contributes in
38115 full: every result of the tool filter's source, or all user input.
38116
38117 - `type: "all"`
38118
38119 - `BetaWebFetchURLSourceNone object`
38120
38121 The `url_sources` variant under which a source contributes nothing:
38122 no result of the tool filter's source, or no user input.
38123
38124 - `type: "none"`
38125
38126 - `BetaWebFetchURLSourceOnly object`
38127
38128 The tool filter variant under which only the named tools' results
38129 contribute.
38130
38131 - `type: "only"`
38132
38133 - `tools: array of BetaWebFetchURLSourceToolReference`
38134
38135 - `type: "tool_reference"`
38136
38137 - `name: string`
38138
38139 - `BetaWebFetchURLSourceExcept object`
38140
38141 The tool filter variant under which every result but the named
38142 tools' contributes.
38143
38144 - `type: "except"`
38145
38146 - `tools: array of BetaWebFetchURLSourceToolReference`
38147
38148 - `type: "tool_reference"`
38149
38150 - `name: string`
38151
38152 - `server_tool_results: optional BetaWebFetchURLSourceAll or BetaWebFetchURLSourceNone or BetaWebFetchURLSourceOnly or BetaWebFetchURLSourceExcept`
38153
38154 Which server tools' results contribute fetchable URLs: "all", "none", or an only or except list of server tool names from tools[]; only web_search and web_fetch results ever contribute.
38155
38156 - `BetaWebFetchURLSourceAll object`
38157
38158 The `url_sources` variant under which a source contributes in
38159 full: every result of the tool filter's source, or all user input.
38160
38161 - `BetaWebFetchURLSourceNone object`
38162
38163 The `url_sources` variant under which a source contributes nothing:
38164 no result of the tool filter's source, or no user input.
38165
38166 - `BetaWebFetchURLSourceOnly object`
38167
38168 The tool filter variant under which only the named tools' results
38169 contribute.
38170
38171 - `BetaWebFetchURLSourceExcept object`
38172
38173 The tool filter variant under which every result but the named
38174 tools' contributes.
38175
38176 - `user_input: optional BetaWebFetchURLSourceAll or BetaWebFetchURLSourceNone`
38177
38178 Whether URLs in user messages are fetchable: "all" or "none".
38179
38180 - `BetaWebFetchURLSourceAll object`
38181
38182 The `url_sources` variant under which a source contributes in
38183 full: every result of the tool filter's source, or all user input.
38184
38185 - `BetaWebFetchURLSourceNone object`
38186
38187 The `url_sources` variant under which a source contributes nothing:
38188 no result of the tool filter's source, or no user input.
38189
3689738190### Beta Web Search Result Block
3689838191
3689938192- `BetaWebSearchResultBlock object`
from line 38823
3753038823
3753138824 - `string`
3753238825
37533 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 42 more`
38826 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 43 more`
3753438827
3753538828 - `"message-batches-2024-09-24"`
3753638829
from line 38914
3762138914 - `"thinking-binding-controls-2026-08-01"`
3762238915
3762338916 - `"mid-conversation-system-clear-at-2026-08-21"`
38917
38918 - `"compact-2026-09-04"`
3762438919
3762538920- `"anthropic-user-profile-id": optional string`
3762638921
from line 40106
3881140106 - `encrypted_content: optional string or null`
3881240107
3881340108 Opaque metadata from prior compaction, to be round-tripped verbatim
40109
40110 - `signature: optional string or null`
40111
40112 The block's signature as returned, to be sent back verbatim
3881440113
3881540114 - `BetaRequestToolAdditionBlock object`
3881640115
from line 40350
3905140350 - `cache_control: optional BetaCacheControlEphemeral or null`
3905240351
3905340352 Top-level cache control automatically applies a cache_control marker to the last cacheable block in the request.
40353
40354 - `compaction: optional BetaCompactionConfig or null`
40355
40356 Compact the whole conversation and return a signed `compaction` block,
40357 alone, that a later request sends back first in `messages`, in place of
40358 the messages it summarizes. There is no trigger and no pause flag: sending
40359 the parameter compacts, and nothing is sampled after the block.
40360
40361 The summarization prompt is the server's own unless `instructions` are
40362 given, which then replace it for this request; a value that is empty or
40363 only whitespace counts as absent.
40364
40365 - `type: "summarize"`
40366
40367 - `instructions: optional string or null`
40368
40369 Replaces the server's default summarization prompt for this request. An empty or whitespace-only value counts as absent.
40370
40371 maxLength: 16384
3905440372
3905540373 - `container: optional BetaContainerParams or string or null`
3905640374
from line 42288
4097042288
4097142289 When true, guarantees schema validation on tool names and inputs
4097242290
42291 - `url_sources: optional BetaWebFetchURLSources or null`
42292
42293 Which sources contribute to the set of URLs web fetch may fetch.
42294
42295 Each key is a tagged variant: `user_input` is `all` or `none`; the
42296 two tool filters are `all`, `none`, `only` (only the named tools'
42297 results) or `except` (every result but the named tools'). A named tool
42298 must be declared in this request's `tools[]`.
42299
42300 - `client_tool_results: optional BetaWebFetchURLSourceAll or BetaWebFetchURLSourceNone or BetaWebFetchURLSourceOnly or BetaWebFetchURLSourceExcept`
42301
42302 Which client tools' results contribute fetchable URLs: "all", "none", or an only or except list of client tool names from tools[].
42303
42304 - `BetaWebFetchURLSourceAll object`
42305
42306 The `url_sources` variant under which a source contributes in
42307 full: every result of the tool filter's source, or all user input.
42308
42309 - `type: "all"`
42310
42311 - `BetaWebFetchURLSourceNone object`
42312
42313 The `url_sources` variant under which a source contributes nothing:
42314 no result of the tool filter's source, or no user input.
42315
42316 - `type: "none"`
42317
42318 - `BetaWebFetchURLSourceOnly object`
42319
42320 The tool filter variant under which only the named tools' results
42321 contribute.
42322
42323 - `type: "only"`
42324
42325 - `tools: array of BetaWebFetchURLSourceToolReference`
42326
42327 - `type: "tool_reference"`
42328
42329 - `name: string`
42330
42331 - `BetaWebFetchURLSourceExcept object`
42332
42333 The tool filter variant under which every result but the named
42334 tools' contributes.
42335
42336 - `type: "except"`
42337
42338 - `tools: array of BetaWebFetchURLSourceToolReference`
42339
42340 - `type: "tool_reference"`
42341
42342 - `name: string`
42343
42344 - `server_tool_results: optional BetaWebFetchURLSourceAll or BetaWebFetchURLSourceNone or BetaWebFetchURLSourceOnly or BetaWebFetchURLSourceExcept`
42345
42346 Which server tools' results contribute fetchable URLs: "all", "none", or an only or except list of server tool names from tools[]; only web_search and web_fetch results ever contribute.
42347
42348 - `BetaWebFetchURLSourceAll object`
42349
42350 The `url_sources` variant under which a source contributes in
42351 full: every result of the tool filter's source, or all user input.
42352
42353 - `BetaWebFetchURLSourceNone object`
42354
42355 The `url_sources` variant under which a source contributes nothing:
42356 no result of the tool filter's source, or no user input.
42357
42358 - `BetaWebFetchURLSourceOnly object`
42359
42360 The tool filter variant under which only the named tools' results
42361 contribute.
42362
42363 - `BetaWebFetchURLSourceExcept object`
42364
42365 The tool filter variant under which every result but the named
42366 tools' contributes.
42367
42368 - `user_input: optional BetaWebFetchURLSourceAll or BetaWebFetchURLSourceNone`
42369
42370 Whether URLs in user messages are fetchable: "all" or "none".
42371
42372 - `BetaWebFetchURLSourceAll object`
42373
42374 The `url_sources` variant under which a source contributes in
42375 full: every result of the tool filter's source, or all user input.
42376
42377 - `BetaWebFetchURLSourceNone object`
42378
42379 The `url_sources` variant under which a source contributes nothing:
42380 no result of the tool filter's source, or no user input.
42381
4097342382 - `BetaWebSearchTool20260209 object`
4097442383
4097542384 - `type: "web_search_20260209"`
from line 42485
4107642485
4107742486 When true, guarantees schema validation on tool names and inputs
4107842487
42488 - `url_sources: optional BetaWebFetchURLSources or null`
42489
42490 Which sources contribute to the set of URLs web fetch may fetch.
42491
42492 Each key is a tagged variant: `user_input` is `all` or `none`; the
42493 two tool filters are `all`, `none`, `only` (only the named tools'
42494 results) or `except` (every result but the named tools'). A named tool
42495 must be declared in this request's `tools[]`.
42496
4107942497 - `BetaWebFetchTool20260309 object`
4108042498
4108142499 Web fetch tool with use_cache parameter for bypassing cached content.
from line 42552
4113442552
4113542553 When true, guarantees schema validation on tool names and inputs
4113642554
42555 - `url_sources: optional BetaWebFetchURLSources or null`
42556
42557 Which sources contribute to the set of URLs web fetch may fetch.
42558
42559 Each key is a tagged variant: `user_input` is `all` or `none`; the
42560 two tool filters are `all`, `none`, `only` (only the named tools'
42561 results) or `except` (every result but the named tools'). A named tool
42562 must be declared in this request's `tools[]`.
42563
4113742564 - `use_cache: optional boolean`
4113842565
4113942566 Whether to use cached content. Set to false to bypass the cache and fetch fresh content. Only set to false when the user explicitly requests fresh content or when fetching rapidly-changing sources.
from line 42686
4125942686 - `strict: optional boolean`
4126042687
4126142688 When true, guarantees schema validation on tool names and inputs
42689
42690 - `url_sources: optional BetaWebFetchURLSources or null`
42691
42692 Which sources contribute to the set of URLs web fetch may fetch.
42693
42694 Each key is a tagged variant: `user_input` is `all` or `none`; the
42695 two tool filters are `all`, `none`, `only` (only the named tools'
42696 results) or `except` (every result but the named tools'). A named tool
42697 must be declared in this request's `tools[]`.
4126242698
4126342699 - `use_cache: optional boolean`
4126442700
from line 43087
4165143087
4165243088 - `string`
4165343089
41654 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 42 more`
43090 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 43 more`
4165543091
4165643092 - `"message-batches-2024-09-24"`
4165743093
from line 43178
4174243178 - `"thinking-binding-controls-2026-08-01"`
4174343179
4174443180 - `"mid-conversation-system-clear-at-2026-08-21"`
43181
43182 - `"compact-2026-09-04"`
4174543183
4174643184- `"anthropic-workspace-id": optional string`
4174743185
from line 43359
4192143359
4192243360 - `string`
4192343361
41924 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 42 more`
43362 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 43 more`
4192543363
4192643364 - `"message-batches-2024-09-24"`
4192743365
from line 43450
4201243450 - `"thinking-binding-controls-2026-08-01"`
4201343451
4201443452 - `"mid-conversation-system-clear-at-2026-08-21"`
43453
43454 - `"compact-2026-09-04"`
4201543455
4201643456- `"anthropic-workspace-id": optional string`
4201743457
from line 43640
4220043640
4220143641 - `string`
4220243642
42203 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 42 more`
43643 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 43 more`
4220443644
4220543645 - `"message-batches-2024-09-24"`
4220643646
from line 43731
4229143731 - `"thinking-binding-controls-2026-08-01"`
4229243732
4229343733 - `"mid-conversation-system-clear-at-2026-08-21"`
43734
43735 - `"compact-2026-09-04"`
4229443736
4229543737- `"anthropic-workspace-id": optional string`
4229643738
from line 43903
4246143903
4246243904 - `string`
4246343905
42464 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 42 more`
43906 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 43 more`
4246543907
4246643908 - `"message-batches-2024-09-24"`
4246743909
from line 43994
4255243994 - `"thinking-binding-controls-2026-08-01"`
4255343995
4255443996 - `"mid-conversation-system-clear-at-2026-08-21"`
43997
43998 - `"compact-2026-09-04"`
4255543999
4255644000- `"anthropic-workspace-id": optional string`
4255744001
from line 44058
4261444058
4261544059 - `string`
4261644060
42617 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 42 more`
44061 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 43 more`
4261844062
4261944063 - `"message-batches-2024-09-24"`
4262044064
from line 44149
4270544149 - `"thinking-binding-controls-2026-08-01"`
4270644150
4270744151 - `"mid-conversation-system-clear-at-2026-08-21"`
44152
44153 - `"compact-2026-09-04"`
4270844154
4270944155- `"anthropic-workspace-id": optional string`
4271044156
from line 45076
4363045076 - `encrypted_content: string or null`
4363145077
4363245078 Opaque metadata from prior compaction, to be round-tripped verbatim
45079
45080 - `signature: optional string or null`
45081
45082 Signature over the summary, to be sent back with the block verbatim
4363345083
4363445084 - `BetaFallbackBlock object`
4363545085
from line 45844
4439445844
4439545845 - `"fast"`
4439645846
44397 - `input_transformations: optional array of BetaThinkingDroppedInputTransformation or null`
44398
44399 Changes the API made to the request's input before showing it to the model:
44400 one entry per change, in request order. Today the only entry type is
44401 `thinking_dropped` — a `thinking`, `redacted_thinking` or `connector_text`
44402 block from the request's `messages` that was removed from the prompt instead
44403 of being shown to the model because it failed a binding check. More entry
44404 types may be added over time; ignore types you do not recognize.
45847 - `input_transformations: optional array of BetaInputTransformation or null`
45848
45849 Changes the API made to the request's input before showing it to the model,
45850 and blocks that failed a binding check but were left unchanged: one entry per
45851 block, in request order. Two entry types today. `thinking_dropped` — a
45852 `thinking`, `redacted_thinking` or `connector_text` block from the request's
45853 `messages` that was removed from the prompt instead of being shown to the
45854 model because it failed a binding check. `thinking_mismatch_allowed` — a
45855 `thinking` or `redacted_thinking` block that failed the conversation check
45856 (the conversation before it differs from the one it was created in, or it
45857 carries no record of one on a model that requires it) and was shown to the
45858 model all the same, because that check is not enforced for this request.
45859 More entry types may be added over time; ignore types you do not recognize.
4440545860
4440645861 Requires `anthropic-beta: thinking-binding-controls-2026-08-01`. Present on
4440745862 every such response from a model that supports extended thinking, as `[]`
44408 when nothing was changed; without the beta, blocks are removed all the same
44409 but nothing is reported. Removed blocks contribute nothing to
44410 `usage.input_tokens`. When streaming, the array is final in `message_start`;
44411 the final `message_delta` event carries it only when a server-side model
44412 fallback happened mid-stream, in which case it holds the serving model's
44413 entries and replaces the one in `message_start`.
44414
44415 - `type: "thinking_dropped"`
44416
44417 Always `thinking_dropped` for this entry type.
44418
44419 default: thinking_dropped
44420
44421 - `path: string`
44422
44423 Where the removed block was in your request, as `messages.{i}.content.{j}`:
44424 `i` indexes the `messages` array you sent and `j` that message's `content`
44425 array — the same form error messages use.
44426
44427 - `reason: "model_binding_mismatch" or "prefix_binding_mismatch" or "organization_binding_mismatch" or "end_user_binding_mismatch"`
44428
44429 Which binding check removed the block: `model_binding_mismatch` — it was
44430 created by a model whose reasoning the requested model may not read;
44431 `prefix_binding_mismatch` — the conversation before it differs from the
44432 conversation it was created in (the rest of that turn's consecutive thinking
44433 blocks are removed with it, each with this reason);
44434 `organization_binding_mismatch` — it was created under a different
44435 organization (an Anthropic organization, AWS account or Google Cloud project)
44436 and this organization is not one of its additional organizations;
44437 `end_user_binding_mismatch` — it was created for a different end user, or
44438 was removed by the consumer-organization binding. A block that would fail
44439 several checks reports one reason, in this order of precedence:
44440 `organization_binding_mismatch`, `end_user_binding_mismatch`,
44441 `model_binding_mismatch`, `prefix_binding_mismatch`.
44442
44443 - `"model_binding_mismatch"`
44444
44445 - `"prefix_binding_mismatch"`
44446
44447 - `"organization_binding_mismatch"`
44448
44449 - `"end_user_binding_mismatch"`
45863 when there is no entry to report; without the beta, blocks are removed or
45864 left in place all the same but nothing is reported. Removed blocks contribute
45865 nothing to `usage.input_tokens`; blocks left in place count as sent. When
45866 streaming, the array is final in `message_start`; the final `message_delta`
45867 event carries it only when a server-side model fallback happened mid-stream,
45868 in which case it holds the serving model's entries and replaces the one in
45869 `message_start`.
45870
45871 - `BetaThinkingDroppedInputTransformation object`
45872
45873 - `type: "thinking_dropped"`
45874
45875 Always `thinking_dropped` for this entry type.
45876
45877 default: thinking_dropped
45878
45879 - `path: string`
45880
45881 Where the removed block was in your request, as `messages.{i}.content.{j}`:
45882 `i` indexes the `messages` array you sent and `j` that message's `content`
45883 array — the same form error messages use.
45884
45885 - `reason: "model_binding_mismatch" or "prefix_binding_mismatch" or "organization_binding_mismatch" or "end_user_binding_mismatch"`
45886
45887 Which binding check removed the block: `model_binding_mismatch` — it was
45888 created by a model whose reasoning the requested model may not read;
45889 `prefix_binding_mismatch` — the conversation before it differs from the
45890 conversation it was created in (the rest of that turn's consecutive thinking
45891 blocks are removed with it, each with this reason);
45892 `organization_binding_mismatch` — it was created under a different
45893 organization (an Anthropic organization, AWS account or Google Cloud project)
45894 and this organization is not one of its additional organizations;
45895 `end_user_binding_mismatch` — it was created for a different end user, or
45896 was removed by the consumer-organization binding. A block that would fail
45897 several checks reports one reason, in this order of precedence:
45898 `organization_binding_mismatch`, `end_user_binding_mismatch`,
45899 `model_binding_mismatch`, `prefix_binding_mismatch`.
45900
45901 - `"model_binding_mismatch"`
45902
45903 - `"prefix_binding_mismatch"`
45904
45905 - `"organization_binding_mismatch"`
45906
45907 - `"end_user_binding_mismatch"`
45908
45909 - `BetaThinkingMismatchAllowedInputTransformation object`
45910
45911 - `type: "thinking_mismatch_allowed"`
45912
45913 Always `thinking_mismatch_allowed` for this entry type.
45914
45915 default: thinking_mismatch_allowed
45916
45917 - `path: string`
45918
45919 Where the block is in your request, as `messages.{i}.content.{j}`:
45920 `i` indexes the `messages` array you sent and `j` that message's `content`
45921 array — the same form error messages use.
45922
45923 - `reason: "model_binding_mismatch" or "prefix_binding_mismatch" or "organization_binding_mismatch" or "end_user_binding_mismatch"`
45924
45925 Which binding check the block failed; the block was shown to the model all
45926 the same. Always `prefix_binding_mismatch` today — the conversation before
45927 the block differs from the conversation it was created in, or the block
45928 carries no record of one on a model that requires it. Were the check
45929 enforced for this request, the block would have been removed or the request
45930 rejected (`thinking.block_binding.prefix_mismatch_behavior`). A removal also
45931 takes the rest of that turn's consecutive thinking blocks, whereas here each
45932 block is checked on its own, so `thinking_mismatch_allowed` entries are a
45933 lower bound on what enforcement would remove.
45934
45935 - `"model_binding_mismatch"`
45936
45937 - `"prefix_binding_mismatch"`
45938
45939 - `"organization_binding_mismatch"`
45940
45941 - `"end_user_binding_mismatch"`
4445045942
4445145943 - `BetaMessageBatchErroredResult object`
4445245944
4445345945