GET

/v1/schemas/anthropic/chat/v1/messages/count_tokens?beta=true

kind inputactivity chathash 86dd53a5…extracted Nov 11, 2026version currentsource upstream spec ↗
fieldrecorded source
schemaSource linked above.

upstream-spec

Source trace
690622377a5eedc0e9f2265ed755ee34dc0c52d35b47327f425777a550f45e1e
{
  "fetchedAt": 1794374425,
  "extractorVersion": "2",
  "verifiedAt": null
}

Request body

13 properties · 2 required · 214 $defs
propertytypedescriptionconstraints
messages*BetaInputMessageUnion[]Input messages.
model*stringThe model that will complete your prompt.22 known values
cache_controlBetaCacheControlEphemeralTop-level cache control automatically applies a cache_control marker to the last cacheable block in the request.nullable
compactionBetaSummarizeCompactionCompact the whole conversation and return a signed `compaction` block, alone, that a later request sends back first in `messages`, in place of the messages it summarizes. There is no trigger and no pause flag: sending the parameter compacts, and nothing is sam…nullable
context_managementBetaContextManagementConfigContext management configuration. This allows you to control how Claude manages context across multiple requests, such as whether to clear function results or not.nullable
mcp_serversBetaRequestMCPServerURLDefinition[]MCP servers to be utilized in this requestitems ≤ 20
output_configBetaOutputConfigConfiguration options for the model's output, such as the output format.
output_formatBetaJsonOutputFormatDeprecated: Use `output_config.format` instead. See [structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs) A schema to specify Claude's output format in responses. This parameter will be removed in a future release.nullable · deprecated
speedenumThe inference speed mode for this request. `"fast"` enables high output-tokens-per-second inference. Some models require the `fast-mode-2026-02-01` beta header for any `speed` value. See [fast mode](https://platform.claude.com/docs/en/build-with-claude/fast-mode) for which models.standard | fast · nullable
systemstring | BetaRequestTextBlock[]System prompt.
thinkingThinkingConfigEnabled | ThinkingConfigDisabled | ThinkingConfigBetweenTools | …Configuration for Claude's thinking.
tool_choiceToolChoiceAuto | ToolChoiceAny | ToolChoiceTool | …How the model should use the provided tools. The model can use a specific tool, any available tool, decide by itself, or not use tools at all.
toolsBetaTool | BetaBashTool_20241022 | BetaBashTool_20250124[]Definitions of tools that the model may use.

Types

214 $defs

BetaAdvisorTool_20260301object

allowed_callersBetaAllowedCaller[]
cache_controlBetaCacheControlEphemeralCreate a cache control breakpoint at this content block.nullable
cachingBetaCacheControlEphemeralCaching for the advisor's own prompt. When set, each advisor call writes a cache entry at the given TTL so subsequent calls in the same conversation read the stable prefix. When omitted, the advisor prompt is not cached.nullable
defer_loadingbooleanIf true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.
max_tokensintegerBounds the advisor's total output (thinking + text) per call. When the advisor hits this cap, the returned advisor_result or advisor_redacted_result block carries stop_reason='max_tokens', and a truncation note is appended to the advice text the worker model sees (inside the encrypted blob in redacted mode). When set, the API also passes the advisor its remaining-token budget, so the advisor shapes its output toward the cap. When omitted, the advisor model's default output cap applies and the API doesn't pass a budget.n ≥ 1024 · nullable
max_usesintegerMaximum number of times the tool can be used in the API request.n > 0 · nullable
model*stringThe model that will complete your prompt.22 known values
name*constName of the tool."advisor"
strictbooleanWhen true, guarantees schema validation on tool names and inputs
type*const"advisor_20260301"

BetaAdvisorToolResultErrorCodeenum

max_uses_exceeded | prompt_too_long | too_many_requests | overloaded | unavailable | execution_time_exceeded · +1 more

BetaAllowedCallerenum

Specifies who can invoke a tool.

direct | code_execution_20250825 | code_execution_20260120 | code_execution_20260521

BetaAllThinkingTurnsobject

type*const"all"

BetaAssistantInputMessageobject

content*string | BetaInputContentBlock[]
role*const"assistant"

BetaBase64ImageSourceobject

data*stringformat: byte
media_type*enumimage/jpeg | image/png | image/gif | image/webp
type*const"base64"

BetaBase64PDFSourceobject

data*stringformat: byte
media_type*const"application/pdf"
type*const"base64"

BetaBashCodeExecutionToolResultErrorCodeenum

invalid_tool_input | unavailable | too_many_requests | execution_time_exceeded | output_file_too_large

BetaBashTool_20241022object

allowed_callersBetaAllowedCaller[]
cache_controlBetaCacheControlEphemeralCreate a cache control breakpoint at this content block.nullable
defer_loadingbooleanIf true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.
input_examplesobject[]
name*constName of the tool."bash"
strictbooleanWhen true, guarantees schema validation on tool names and inputs
type*const"bash_20241022"

BetaBashTool_20250124object

allowed_callersBetaAllowedCaller[]
cache_controlBetaCacheControlEphemeralCreate a cache control breakpoint at this content block.nullable
defer_loadingbooleanIf true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.
input_examplesobject[]
name*constName of the tool."bash"
strictbooleanWhen true, guarantees schema validation on tool names and inputs
type*const"bash_20250124"

BetaBrowserCloseTabConfigobject

``close_tab``'s config overrides.

defer_loadingbooleanDefer loading for this member. Must resolve to the same value on every enabled member of the toolset.nullable
enabledbooleanWhether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.nullable

BetaBrowserDoubleClickConfigobject

``double_click``'s config overrides.

defer_loadingbooleanDefer loading for this member. Must resolve to the same value on every enabled member of the toolset.nullable
enabledbooleanWhether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.nullable

BetaBrowserFileUploadConfigobject

``file_upload``'s config overrides.

defer_loadingbooleanDefer loading for this member. Must resolve to the same value on every enabled member of the toolset.nullable
enabledbooleanWhether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.nullable

BetaBrowserFindConfigobject

``find``'s config overrides.

defer_loadingbooleanDefer loading for this member. Must resolve to the same value on every enabled member of the toolset.nullable
enabledbooleanWhether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.nullable

BetaBrowserFormInputConfigobject

``form_input``'s config overrides.

defer_loadingbooleanDefer loading for this member. Must resolve to the same value on every enabled member of the toolset.nullable
enabledbooleanWhether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.nullable

BetaBrowserGetPageTextConfigobject

``get_page_text``'s config overrides.

defer_loadingbooleanDefer loading for this member. Must resolve to the same value on every enabled member of the toolset.nullable
enabledbooleanWhether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.nullable

BetaBrowserHoldKeyConfigobject

``hold_key``'s config overrides.

defer_loadingbooleanDefer loading for this member. Must resolve to the same value on every enabled member of the toolset.nullable
enabledbooleanWhether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.nullable

BetaBrowserHoverConfigobject

``hover``'s config overrides.

defer_loadingbooleanDefer loading for this member. Must resolve to the same value on every enabled member of the toolset.nullable
enabledbooleanWhether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.nullable

BetaBrowserJavascriptExecConfigobject

``javascript_exec``'s config overrides.

defer_loadingbooleanDefer loading for this member. Must resolve to the same value on every enabled member of the toolset.nullable
enabledbooleanWhether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.nullable

BetaBrowserKeyConfigobject

``key``'s config overrides.

defer_loadingbooleanDefer loading for this member. Must resolve to the same value on every enabled member of the toolset.nullable
enabledbooleanWhether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.nullable

BetaBrowserLeftClickConfigobject

``left_click``'s config overrides.

defer_loadingbooleanDefer loading for this member. Must resolve to the same value on every enabled member of the toolset.nullable
enabledbooleanWhether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.nullable

BetaBrowserLeftClickDragConfigobject

``left_click_drag``'s config overrides.

defer_loadingbooleanDefer loading for this member. Must resolve to the same value on every enabled member of the toolset.nullable
enabledbooleanWhether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.nullable

BetaBrowserLeftMouseDownConfigobject

``left_mouse_down``'s config overrides.

defer_loadingbooleanDefer loading for this member. Must resolve to the same value on every enabled member of the toolset.nullable
enabledbooleanWhether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.nullable

BetaBrowserLeftMouseUpConfigobject

``left_mouse_up``'s config overrides.

defer_loadingbooleanDefer loading for this member. Must resolve to the same value on every enabled member of the toolset.nullable
enabledbooleanWhether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.nullable

BetaBrowserListTabsConfigobject

``list_tabs``'s config overrides.

defer_loadingbooleanDefer loading for this member. Must resolve to the same value on every enabled member of the toolset.nullable
enabledbooleanWhether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.nullable

BetaBrowserMiddleClickConfigobject

``middle_click``'s config overrides.

defer_loadingbooleanDefer loading for this member. Must resolve to the same value on every enabled member of the toolset.nullable
enabledbooleanWhether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.nullable

BetaBrowserMouseMoveConfigobject

``mouse_move``'s config overrides.

defer_loadingbooleanDefer loading for this member. Must resolve to the same value on every enabled member of the toolset.nullable
enabledbooleanWhether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.nullable

BetaBrowserNavigateConfigobject

``navigate``'s config overrides.

defer_loadingbooleanDefer loading for this member. Must resolve to the same value on every enabled member of the toolset.nullable
enabledbooleanWhether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.nullable

BetaBrowserNewTabConfigobject

``new_tab``'s config overrides.

defer_loadingbooleanDefer loading for this member. Must resolve to the same value on every enabled member of the toolset.nullable
enabledbooleanWhether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.nullable

BetaBrowserReadConsoleConfigobject

``read_console``'s config overrides.

defer_loadingbooleanDefer loading for this member. Must resolve to the same value on every enabled member of the toolset.nullable
enabledbooleanWhether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.nullable

BetaBrowserReadNetworkConfigobject

``read_network``'s config overrides.

defer_loadingbooleanDefer loading for this member. Must resolve to the same value on every enabled member of the toolset.nullable
enabledbooleanWhether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.nullable

BetaBrowserReadPageConfigobject

``read_page``'s config overrides.

defer_loadingbooleanDefer loading for this member. Must resolve to the same value on every enabled member of the toolset.nullable
enabledbooleanWhether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.nullable

BetaBrowserRightClickConfigobject

``right_click``'s config overrides.

defer_loadingbooleanDefer loading for this member. Must resolve to the same value on every enabled member of the toolset.nullable
enabledbooleanWhether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.nullable

BetaBrowserScreenshotConfigobject

``screenshot``'s config overrides.

defer_loadingbooleanDefer loading for this member. Must resolve to the same value on every enabled member of the toolset.nullable
enabledbooleanWhether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.nullable

BetaBrowserScrollConfigobject

``scroll``'s config overrides.

defer_loadingbooleanDefer loading for this member. Must resolve to the same value on every enabled member of the toolset.nullable
enabledbooleanWhether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.nullable

BetaBrowserScrollToConfigobject

``scroll_to``'s config overrides.

defer_loadingbooleanDefer loading for this member. Must resolve to the same value on every enabled member of the toolset.nullable
enabledbooleanWhether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.nullable

BetaBrowserStateChangeDownloadCompletedobject

A file download that finished during this call, reported with the same `download_id` as its `download_started` — or without a prior `download_started`, when the download finished during the call that started it (at most one state change per `download_id` per r…

download_id*stringThe caller-assigned identifier for this download, stable across the state changes reporting it.length ≥ 1 · length ≤ 4096
pathstringWhere the executor saved the file, on the executor's filesystem. Only included when another tool in the same environment can read the file at that path.length ≤ 4096 · nullable
size_bytesintegerThe completed download's size.n ≥ 0 · nullable
type*const"download_completed"
url*stringThe final post-redirect URL the download was served from.length ≤ 4096

BetaBrowserStateChangeDownloadFailedobject

A file download that failed — or was cancelled — during this call.

download_id*stringThe caller-assigned identifier for this download, stable across the state changes reporting it.length ≥ 1 · length ≤ 4096
errorstringThe failure or cancellation detail, when known.length ≤ 4096 · nullable
type*const"download_failed"
url*stringThe final post-redirect URL the download was served from.length ≤ 4096

BetaBrowserStateChangeDownloadStartedobject

A file download that started during this call.

download_id*stringThe caller-assigned identifier for this download, stable across the state changes reporting it.length ≥ 1 · length ≤ 4096
type*const"download_started"
url*stringThe final post-redirect URL the download was served from.length ≤ 4096

BetaBrowserStateChangeTabOpenedobject

A tab this call's execution opened that remains open at its end — the creation delta of the `tabs` inventory, not an event log.

tab_id*stringThe `tab_id` of the opened tab, present in `tabs`.length ≥ 1 · length ≤ 4096
type*const"tab_opened"

BetaBrowserStateTabEntryobject

One open browser tab reported in a `browser_state` block's `tabs` inventory.

activebooleanWhether this tab is the active tab after this call. Whenever `tabs` is non-empty, exactly one entry is marked `active: true`.
tab_id*stringThe caller-assigned identifier for this tab, unique within the inventory.length ≥ 1 · length ≤ 4096
title*stringThe title of the page the tab is showing. May be empty.length ≤ 4096
url*stringThe URL of the page the tab is showing. May be empty.length ≤ 4096

BetaBrowserSwitchTabConfigobject

``switch_tab``'s config overrides.

defer_loadingbooleanDefer loading for this member. Must resolve to the same value on every enabled member of the toolset.nullable
enabledbooleanWhether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.nullable

BetaBrowserToolset_20260801object

The browser toolset: a single ``tools[]`` entry (carrying no ``name``) that declares the browser tool family. The model is served the family's tool with any members disabled via ``configs`` removed from its schema.

cache_controlBetaCacheControlEphemeralCreate a cache control breakpoint at this content block.nullable
configsBetaBrowserToolsetConfigsPer-member configuration for ``browser_toolset_20260801``: one optional field per member tool, keyed by the member name — the same name the member's ``tool_use`` blocks carry. Every member is an accepted key, and a member's defaults apply wherever its key is a…nullable
type*const"browser_toolset_20260801"

BetaBrowserToolsetConfigsobject

Per-member configuration for ``browser_toolset_20260801``: one optional field per member tool, keyed by the member name — the same name the member's ``tool_use`` blocks carry. Every member is an accepted key, and a member's defaults apply wherever its key is a…

close_tabBetaBrowserCloseTabConfig``close_tab``'s config overrides.nullable
double_clickBetaBrowserDoubleClickConfig``double_click``'s config overrides.nullable
file_uploadBetaBrowserFileUploadConfig``file_upload``'s config overrides.nullable
findBetaBrowserFindConfig``find``'s config overrides.nullable
form_inputBetaBrowserFormInputConfig``form_input``'s config overrides.nullable
get_page_textBetaBrowserGetPageTextConfig``get_page_text``'s config overrides.nullable
hold_keyBetaBrowserHoldKeyConfig``hold_key``'s config overrides.nullable
hoverBetaBrowserHoverConfig``hover``'s config overrides.nullable
javascript_execBetaBrowserJavascriptExecConfig``javascript_exec``'s config overrides.nullable
keyBetaBrowserKeyConfig``key``'s config overrides.nullable
left_clickBetaBrowserLeftClickConfig``left_click``'s config overrides.nullable
left_click_dragBetaBrowserLeftClickDragConfig``left_click_drag``'s config overrides.nullable
left_mouse_downBetaBrowserLeftMouseDownConfig``left_mouse_down``'s config overrides.nullable
left_mouse_upBetaBrowserLeftMouseUpConfig``left_mouse_up``'s config overrides.nullable
list_tabsBetaBrowserListTabsConfig``list_tabs``'s config overrides.nullable
middle_clickBetaBrowserMiddleClickConfig``middle_click``'s config overrides.nullable
mouse_moveBetaBrowserMouseMoveConfig``mouse_move``'s config overrides.nullable
navigateBetaBrowserNavigateConfig``navigate``'s config overrides.nullable
new_tabBetaBrowserNewTabConfig``new_tab``'s config overrides.nullable
read_consoleBetaBrowserReadConsoleConfig``read_console``'s config overrides.nullable
read_networkBetaBrowserReadNetworkConfig``read_network``'s config overrides.nullable
read_pageBetaBrowserReadPageConfig``read_page``'s config overrides.nullable
right_clickBetaBrowserRightClickConfig``right_click``'s config overrides.nullable
screenshotBetaBrowserScreenshotConfig``screenshot``'s config overrides.nullable
scrollBetaBrowserScrollConfig``scroll``'s config overrides.nullable
scroll_toBetaBrowserScrollToConfig``scroll_to``'s config overrides.nullable
switch_tabBetaBrowserSwitchTabConfig``switch_tab``'s config overrides.nullable
triple_clickBetaBrowserTripleClickConfig``triple_click``'s config overrides.nullable
typeBetaBrowserTypeConfig``type``'s config overrides.nullable
waitBetaBrowserWaitConfig``wait``'s config overrides.nullable
zoomBetaBrowserZoomConfig``zoom``'s config overrides.nullable

BetaBrowserTripleClickConfigobject

``triple_click``'s config overrides.

defer_loadingbooleanDefer loading for this member. Must resolve to the same value on every enabled member of the toolset.nullable
enabledbooleanWhether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.nullable

BetaBrowserTypeConfigobject

``type``'s config overrides.

defer_loadingbooleanDefer loading for this member. Must resolve to the same value on every enabled member of the toolset.nullable
enabledbooleanWhether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.nullable

BetaBrowserWaitConfigobject

``wait``'s config overrides.

defer_loadingbooleanDefer loading for this member. Must resolve to the same value on every enabled member of the toolset.nullable
enabledbooleanWhether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.nullable

BetaBrowserZoomConfigobject

``zoom``'s config overrides.

defer_loadingbooleanDefer loading for this member. Must resolve to the same value on every enabled member of the toolset.nullable
enabledbooleanWhether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.nullable

BetaCacheControlEphemeralobject

ttlenumThe time-to-live for the cache control breakpoint.5m | 1h
type*const"ephemeral"

BetaClearThinking20251015object

keepBetaThinkingTurns | BetaAllThinkingTurns | "all"Number of most recent assistant turns to keep thinking blocks for. Older turns will have their thinking blocks removed.
type*const"clear_thinking_20251015"

BetaClearToolUses20250919object

clear_at_leastBetaInputTokensClearAtLeastMinimum number of tokens that must be cleared when triggered. Context will only be modified if at least this many tokens can be removed.nullable
clear_tool_inputsboolean | string[]Whether to clear all tool inputs (bool) or specific tool inputs to clear (list)nullable
exclude_toolsstring[]Tool names whose uses are preserved from clearingnullable
keepBetaToolUsesKeepNumber of tool uses to retain in the conversation
triggerInputTokensTrigger | ToolUsesTriggerCondition that triggers the context management strategy
type*const"clear_tool_uses_20250919"

BetaCodeExecutionTool_20250522object

allowed_callersBetaAllowedCaller[]
cache_controlBetaCacheControlEphemeralCreate a cache control breakpoint at this content block.nullable
defer_loadingbooleanIf true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.
name*constName of the tool."code_execution"
strictbooleanWhen true, guarantees schema validation on tool names and inputs
type*const"code_execution_20250522"

BetaCodeExecutionTool_20250825object

allowed_callersBetaAllowedCaller[]
cache_controlBetaCacheControlEphemeralCreate a cache control breakpoint at this content block.nullable
defer_loadingbooleanIf true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.
name*constName of the tool."code_execution"
strictbooleanWhen true, guarantees schema validation on tool names and inputs
type*const"code_execution_20250825"

BetaCodeExecutionTool_20260120object

A `tools` entry for the code execution tool, version `code_execution_20260120`. It adds REPL state persistence to version `code_execution_20250825`.

allowed_callersBetaAllowedCaller[]
cache_controlBetaCacheControlEphemeralCreate a cache control breakpoint at this content block.nullable
defer_loadingbooleanIf true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.
name*constName of the tool."code_execution"
strictbooleanWhen true, guarantees schema validation on tool names and inputs
type*const"code_execution_20260120"

BetaCodeExecutionTool_20260521object

Code execution tool with REPL state persistence.

allowed_callersBetaAllowedCaller[]
cache_controlBetaCacheControlEphemeralCreate a cache control breakpoint at this content block.nullable
defer_loadingbooleanIf true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.
name*constName of the tool."code_execution"
strictbooleanWhen true, guarantees schema validation on tool names and inputs
type*const"code_execution_20260521"

BetaCodeExecutionToolResultErrorCodeenum

invalid_tool_input | unavailable | too_many_requests | execution_time_exceeded

BetaCompact20260112object

Automatically compact older context when reaching the configured trigger threshold.

instructionsstringAdditional instructions for summarization.nullable
pause_after_compactionbooleanWhether to pause after compaction and return the compaction block to the user.
triggerBetaInputTokensTriggerWhen to trigger compaction. Defaults to 150000 input tokens.nullable
type*const"compact_20260112"

BetaCompactionConfigBetaSummarizeCompaction

Compact the whole conversation and return a signed `compaction` block, alone, that a later request sends back first in `messages`, in place of the messages it summarizes. There is no trigger and no pause flag: sending the parameter compacts, and nothing is sam…

instructionsstringReplaces the server's default summarization prompt for this request. An empty or whitespace-only value counts as absent.length ≤ 16384 · nullable
type*const"summarize"

BetaComputerCursorPositionConfigobject

``cursor_position``'s config overrides.

defer_loadingbooleanDefer loading for this member. Must resolve to the same value on every enabled member of the toolset.nullable
enabledbooleanWhether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.nullable

BetaComputerDoubleClickConfigobject

``double_click``'s config overrides.

defer_loadingbooleanDefer loading for this member. Must resolve to the same value on every enabled member of the toolset.nullable
enabledbooleanWhether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.nullable

BetaComputerHoldKeyConfigobject

``hold_key``'s config overrides.

defer_loadingbooleanDefer loading for this member. Must resolve to the same value on every enabled member of the toolset.nullable
enabledbooleanWhether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.nullable

BetaComputerKeyConfigobject

``key``'s config overrides.

defer_loadingbooleanDefer loading for this member. Must resolve to the same value on every enabled member of the toolset.nullable
enabledbooleanWhether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.nullable

BetaComputerLeftClickConfigobject

``left_click``'s config overrides.

defer_loadingbooleanDefer loading for this member. Must resolve to the same value on every enabled member of the toolset.nullable
enabledbooleanWhether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.nullable

BetaComputerLeftClickDragConfigobject

``left_click_drag``'s config overrides.

defer_loadingbooleanDefer loading for this member. Must resolve to the same value on every enabled member of the toolset.nullable
enabledbooleanWhether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.nullable

BetaComputerLeftMouseDownConfigobject

``left_mouse_down``'s config overrides.

defer_loadingbooleanDefer loading for this member. Must resolve to the same value on every enabled member of the toolset.nullable
enabledbooleanWhether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.nullable

BetaComputerLeftMouseUpConfigobject

``left_mouse_up``'s config overrides.

defer_loadingbooleanDefer loading for this member. Must resolve to the same value on every enabled member of the toolset.nullable
enabledbooleanWhether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.nullable

BetaComputerMiddleClickConfigobject

``middle_click``'s config overrides.

defer_loadingbooleanDefer loading for this member. Must resolve to the same value on every enabled member of the toolset.nullable
enabledbooleanWhether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.nullable

BetaComputerMouseMoveConfigobject

``mouse_move``'s config overrides.

defer_loadingbooleanDefer loading for this member. Must resolve to the same value on every enabled member of the toolset.nullable
enabledbooleanWhether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.nullable

BetaComputerRightClickConfigobject

``right_click``'s config overrides.

defer_loadingbooleanDefer loading for this member. Must resolve to the same value on every enabled member of the toolset.nullable
enabledbooleanWhether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.nullable

BetaComputerScreenshotConfigobject

``screenshot``'s config overrides.

defer_loadingbooleanDefer loading for this member. Must resolve to the same value on every enabled member of the toolset.nullable
enabledbooleanWhether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.nullable

BetaComputerScrollConfigobject

``scroll``'s config overrides.

defer_loadingbooleanDefer loading for this member. Must resolve to the same value on every enabled member of the toolset.nullable
enabledbooleanWhether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.nullable

BetaComputerToolset_20260801object

The computer toolset: a single ``tools[]`` entry (carrying no ``name``) that declares the computer tool family. The model is served the family's tool with any members disabled via ``configs`` removed from its schema. Every member is enabled by default, zoom in…

cache_controlBetaCacheControlEphemeralCreate a cache control breakpoint at this content block.nullable
configsBetaComputerToolsetConfigsPer-member configuration for ``computer_toolset_20260801``: one optional field per member tool, keyed by the member name — the same name the member's ``tool_use`` blocks carry. Every member is an accepted key, and a member's defaults apply wherever its key is …nullable
type*const"computer_toolset_20260801"

BetaComputerToolsetConfigsobject

Per-member configuration for ``computer_toolset_20260801``: one optional field per member tool, keyed by the member name — the same name the member's ``tool_use`` blocks carry. Every member is an accepted key, and a member's defaults apply wherever its key is …

cursor_positionBetaComputerCursorPositionConfig``cursor_position``'s config overrides.nullable
double_clickBetaComputerDoubleClickConfig``double_click``'s config overrides.nullable
hold_keyBetaComputerHoldKeyConfig``hold_key``'s config overrides.nullable
keyBetaComputerKeyConfig``key``'s config overrides.nullable
left_clickBetaComputerLeftClickConfig``left_click``'s config overrides.nullable
left_click_dragBetaComputerLeftClickDragConfig``left_click_drag``'s config overrides.nullable
left_mouse_downBetaComputerLeftMouseDownConfig``left_mouse_down``'s config overrides.nullable
left_mouse_upBetaComputerLeftMouseUpConfig``left_mouse_up``'s config overrides.nullable
middle_clickBetaComputerMiddleClickConfig``middle_click``'s config overrides.nullable
mouse_moveBetaComputerMouseMoveConfig``mouse_move``'s config overrides.nullable
right_clickBetaComputerRightClickConfig``right_click``'s config overrides.nullable
screenshotBetaComputerScreenshotConfig``screenshot``'s config overrides.nullable
scrollBetaComputerScrollConfig``scroll``'s config overrides.nullable
triple_clickBetaComputerTripleClickConfig``triple_click``'s config overrides.nullable
typeBetaComputerTypeConfig``type``'s config overrides.nullable
waitBetaComputerWaitConfig``wait``'s config overrides.nullable
zoomBetaComputerZoomConfig``zoom``'s config overrides.nullable

BetaComputerTripleClickConfigobject

``triple_click``'s config overrides.

defer_loadingbooleanDefer loading for this member. Must resolve to the same value on every enabled member of the toolset.nullable
enabledbooleanWhether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.nullable

BetaComputerTypeConfigobject

``type``'s config overrides.

defer_loadingbooleanDefer loading for this member. Must resolve to the same value on every enabled member of the toolset.nullable
enabledbooleanWhether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.nullable

BetaComputerUseTool_20241022object

allowed_callersBetaAllowedCaller[]
cache_controlBetaCacheControlEphemeralCreate a cache control breakpoint at this content block.nullable
defer_loadingbooleanIf true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.
display_height_px*integerThe height of the display in pixels.n ≥ 1
display_numberintegerThe X11 display number (e.g. 0, 1) for the display.n ≥ 0 · nullable
display_width_px*integerThe width of the display in pixels.n ≥ 1
input_examplesobject[]
name*constName of the tool."computer"
strictbooleanWhen true, guarantees schema validation on tool names and inputs
type*const"computer_20241022"

BetaComputerUseTool_20250124object

allowed_callersBetaAllowedCaller[]
cache_controlBetaCacheControlEphemeralCreate a cache control breakpoint at this content block.nullable
defer_loadingbooleanIf true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.
display_height_px*integerThe height of the display in pixels.n ≥ 1
display_numberintegerThe X11 display number (e.g. 0, 1) for the display.n ≥ 0 · nullable
display_width_px*integerThe width of the display in pixels.n ≥ 1
input_examplesobject[]
name*constName of the tool."computer"
strictbooleanWhen true, guarantees schema validation on tool names and inputs
type*const"computer_20250124"

BetaComputerUseTool_20251124object

allowed_callersBetaAllowedCaller[]
cache_controlBetaCacheControlEphemeralCreate a cache control breakpoint at this content block.nullable
defer_loadingbooleanIf true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.
display_height_px*integerThe height of the display in pixels.n ≥ 1
display_numberintegerThe X11 display number (e.g. 0, 1) for the display.n ≥ 0 · nullable
display_width_px*integerThe width of the display in pixels.n ≥ 1
enable_zoombooleanWhether to enable an action to take a zoomed-in screenshot of the screen.
input_examplesobject[]
name*constName of the tool."computer"
strictbooleanWhen true, guarantees schema validation on tool names and inputs
type*const"computer_20251124"

BetaComputerWaitConfigobject

``wait``'s config overrides.

defer_loadingbooleanDefer loading for this member. Must resolve to the same value on every enabled member of the toolset.nullable
enabledbooleanWhether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.nullable

BetaComputerZoomConfigobject

``zoom``'s config overrides.

defer_loadingbooleanDefer loading for this member. Must resolve to the same value on every enabled member of the toolset.nullable
enabledbooleanWhether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.nullable

BetaContentBlockSourceobject

content*string | BetaRequestTextBlock | BetaRequestImageBlock[]
type*const"content"

BetaContextManagementConfigobject

editsBetaClearToolUses20250919 | BetaClearThinking20251015 | BetaCompact20260112[]List of context management edits to applyitems ≥ 0

BetaDirectCallerobject

Tool invocation directly from the model.

type*const"direct"

BetaEffortLevelenum

All possible effort levels.

low | medium | high | xhigh | max

BetaFileDocumentSourceobject

file_id*string
type*const"file"

BetaFileImageSourceobject

file_id*string
type*const"file"

BetaInputContentBlockRequestTextBlock | RequestImageBlock | RequestDocumentBlock | …

BetaInputMessageContentstring | BetaInputContentBlock[]

BetaInputMessageUnionUserInputMessage | AssistantInputMessage | SystemInputMessage

BetaInputSchemaobject

propertiesobjectnullable
requiredstring[]nullable
type*const"object"

BetaInputTokensClearAtLeastobject

type*const"input_tokens"
value*integern ≥ 0

BetaInputTokensTriggerobject

type*const"input_tokens"
value*integern ≥ 1

BetaJsonOutputFormatobject

schema*objectThe JSON schema of the format
type*const"json_schema"

BetaJsonValueany

BetaMCPToolobject

A tool as an MCP server lists it: its name on that server, its description, and its input schema.

descriptionstringThe tool's description as the MCP server lists it.nullable
input_schema*objectThe tool's input schema as the MCP server lists it, verbatim.
name*stringThe tool's name as the MCP server lists it (not prefixed with the server name).length ≥ 1

BetaMCPToolConfigobject

Configuration for a specific tool in an MCP toolset.

defer_loadingboolean
enabledboolean

BetaMCPToolDefaultConfigobject

Default configuration for tools in an MCP toolset.

defer_loadingboolean
enabledboolean

BetaMCPToolsetobject

Configuration for a group of tools from an MCP server.

cache_controlBetaCacheControlEphemeralCreate a cache control breakpoint at this content block.nullable
configsobjectConfiguration overrides for specific tools, keyed by tool namenullable
default_configBetaMCPToolDefaultConfigDefault configuration applied to all tools from this server
mcp_server_name*stringName of the MCP server to configure tools forlength ≥ 1 · length ≤ 255
toolsBetaMCPTool[]The server's tool listing, pinned: when present, the server is not asked for its tools before sampling and exactly these entries, with `default_config` and `configs` applied, are the toolset's tools. Copy it from the `mcp_tool_listing` block of an earlier response.nullable
type*const"mcp_toolset"

BetaMemoryTool_20250818object

allowed_callersBetaAllowedCaller[]
cache_controlBetaCacheControlEphemeralCreate a cache control breakpoint at this content block.nullable
defer_loadingbooleanIf true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.
input_examplesobject[]
name*constName of the tool."memory"
strictbooleanWhen true, guarantees schema validation on tool names and inputs
type*const"memory_20250818"

BetaOutputConfigobject

effortenumAll possible effort levels.low | medium | high | xhigh | max · nullable
formatBetaJsonOutputFormatA schema to specify Claude's output format in responses. See [structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs)nullable
task_budgetBetaTokenTaskBudgetUser-configurable total token budget across contexts.nullable

BetaPlainTextSourceobject

data*string
media_type*const"text/plain"
type*const"text"

BetaRequestAdvisorRedactedResultBlockobject

encrypted_content*stringOpaque blob produced by a prior response; must be round-tripped verbatim.
stop_reasonstringnullable
type*const"advisor_redacted_result"

BetaRequestAdvisorResultBlockobject

stop_reasonstringnullable
text*string
type*const"advisor_result"

BetaRequestAdvisorToolResultBlockobject

cache_controlBetaCacheControlEphemeralCreate a cache control breakpoint at this content block.nullable
content*RequestAdvisorToolResultError | RequestAdvisorResultBlock | RequestAdvisorRedactedResultBlock
tool_use_id*string
type*const"advisor_tool_result"

BetaRequestAdvisorToolResultErrorobject

error_code*enummax_uses_exceeded | prompt_too_long | too_many_requests | overloaded | unavailable | execution_time_exceeded · +1 more
type*const"advisor_tool_result_error"

BetaRequestBashCodeExecutionOutputBlockobject

file_id*string
type*const"bash_code_execution_output"

BetaRequestBashCodeExecutionResultBlockobject

content*BetaRequestBashCodeExecutionOutputBlock[]
return_code*integer
stderr*string
stdout*string
type*const"bash_code_execution_result"

BetaRequestBashCodeExecutionToolResultBlockobject

cache_controlBetaCacheControlEphemeralCreate a cache control breakpoint at this content block.nullable
content*RequestBashCodeExecutionToolResultError | RequestBashCodeExecutionResultBlock
tool_use_id*string
type*const"bash_code_execution_tool_result…

BetaRequestBashCodeExecutionToolResultErrorobject

error_code*enuminvalid_tool_input | unavailable | too_many_requests | execution_time_exceeded | output_file_too_large
type*const"bash_code_execution_tool_result…

BetaRequestBrowserStateBlockobject

The caller's browser state after a browser toolset member call — the full inventory of open tabs, which tab is active, and any side effects (tabs opened, download state changes) the call produced.

cache_controlBetaCacheControlEphemeralCreate a cache control breakpoint at this content block.nullable
state_changesBetaBrowserStateChangeTabOpened | BetaBrowserStateChangeDownloadStarted | BetaBrowserStateChangeDownloadCompleted[]Tabs opened and download state changes during this call. "Nothing to report" is expressed by omitting the field, never by an empty list.items ≥ 1 · items ≤ 200 · nullable
tabs*BetaBrowserStateTabEntry[]All tabs open in the browser after this call — the full inventory, not a delta. May be empty. Whenever non-empty, exactly one entry carries `active: true`.items ≤ 100
type*const"browser_state"

BetaRequestCharLocationCitationobject

cited_text*string
document_index*integern ≥ 0
document_title*stringlength ≥ 1 · length ≤ 500 · nullable
end_char_index*integer
start_char_index*integern ≥ 0
type*const"char_location"

BetaRequestCitationsConfigobject

enabledboolean

BetaRequestCodeExecutionOutputBlockobject

file_id*string
type*const"code_execution_output"

BetaRequestCodeExecutionResultBlockobject

content*BetaRequestCodeExecutionOutputBlock[]
return_code*integer
stderr*string
stdout*string
type*const"code_execution_result"

BetaRequestCodeExecutionToolResultBlockobject

cache_controlBetaCacheControlEphemeralCreate a cache control breakpoint at this content block.nullable
content*Error | Result Block | RequestEncryptedCodeExecutionResultBlock
tool_use_id*string
type*const"code_execution_tool_result"

BetaRequestCodeExecutionToolResultErrorobject

error_code*enuminvalid_tool_input | unavailable | too_many_requests | execution_time_exceeded
type*const"code_execution_tool_result_erro…

BetaRequestCompactionBlockobject

A compaction block containing summary of previous context.

cache_controlBetaCacheControlEphemeralCreate a cache control breakpoint at this content block.nullable
contentstringSummary of previously compacted content, or null if compaction failednullable
encrypted_contentstringOpaque metadata from prior compaction, to be round-tripped verbatimnullable
signaturestringThe block's signature as returned, to be sent back verbatimnullable
tool_changesBetaRequestToolAdditionBlock | BetaRequestToolRemovalBlock[]The tool changes of the compacted range, as the server returned them on this block: the `tool_addition` and `tool_removal` entries that take the request's `tools` to the tool set in effect at the end of the range. Send them back unchanged with the block.nullable
type*const"compaction"

BetaRequestContainerUploadBlockobject

A content block that represents a file to be uploaded to the container Files uploaded via this block will be available in the container's input directory.

cache_controlBetaCacheControlEphemeralCreate a cache control breakpoint at this content block.nullable
file_id*string
type*const"container_upload"

BetaRequestContentBlockLocationCitationobject

cited_text*stringThe full text of the cited block range, concatenated.
document_index*integern ≥ 0
document_title*stringlength ≥ 1 · length ≤ 500 · nullable
end_block_index*integerExclusive 0-based end index of the cited block range in the source's `content` array.
start_block_index*integer0-based index of the first cited block in the source's `content` array.n ≥ 0
type*const"content_block_location"

BetaRequestDocumentBlockobject

cache_controlBetaCacheControlEphemeralCreate a cache control breakpoint at this content block.nullable
citationsBetaRequestCitationsConfignullable
contextstringlength ≥ 1 · nullable
source*Base64PDFSource | PlainTextSource | ContentBlockSource | …
titlestringlength ≥ 1 · length ≤ 500 · nullable
type*const"document"

BetaRequestEncryptedCodeExecutionResultBlockobject

The output and exit code of Python code that Claude ran with the code execution tool, with standard output in encrypted form, sent back in a later request.

content*BetaRequestCodeExecutionOutputBlock[]
encrypted_stdout*string
return_code*integer
stderr*string
type*const"encrypted_code_execution_result…

BetaRequestFallbackBlockobject

A `fallback` block echoed back from a prior response.

from*BetaRequestFallbackHopInfoIdentifies one hop of a fallback transition.
to*BetaRequestFallbackHopInfoIdentifies one hop of a fallback transition.
triggeranyThe response block's `trigger`, echoed verbatim. Accepted and ignored by the server; any object or `null` is allowed.
type*const"fallback"

BetaRequestFallbackHopInfoobject

Identifies one hop of a fallback transition.

model*stringThe model that will complete your prompt.22 known values

BetaRequestImageBlockobject

cache_controlBetaCacheControlEphemeralCreate a cache control breakpoint at this content block.nullable
source*Base64ImageSource | URLImageSource | FileImageSource
transformationsBetaRequestImageTransformationsConfigures the transformations the server applies to this image before the model observes it. Each key names a condition the server transforms images for; its value selects the transformation applied. Omitted keys keep their default behavior, and an empty obje…nullable
type*const"image"

BetaRequestImageTransformationsobject

Configures the transformations the server applies to this image before the model observes it. Each key names a condition the server transforms images for; its value selects the transformation applied. Omitted keys keep their default behavior, and an empty obje…

oversized_imageenumWhat the server does when this image exceeds the model's maximum image size. `"downsize"` (the default) scales the image down to fit, which changes the dimensions the model observes without telling you. `"error"` instead rejects the request with a 400 error na…downsize | error

BetaRequestMCPServerToolConfigurationobject

allowed_toolsstring[]nullable
enabledbooleannullable

BetaRequestMCPServerURLDefinitionobject

authorization_tokenstringnullable
name*string
tool_configurationBetaRequestMCPServerToolConfigurationnullable
type*const"url"
url*string

BetaRequestMCPToolListingBlockobject

The tool listing an MCP server returned while an earlier response was produced, as that response carried it. Send the assistant message back unchanged, this block included, and the server uses this listing for the matching `mcp_toolset` instead of asking the M…

mcp_server_name*stringThe name of the MCP server this listing came from, as `mcp_servers` declares it.length ≥ 1 · length ≤ 255
tools*BetaMCPTool[]The server's tools, exactly as the response listed them.
type*const"mcp_tool_listing"

BetaRequestMCPToolResultBlockobject

cache_controlBetaCacheControlEphemeralCreate a cache control breakpoint at this content block.nullable
contentstring | BetaRequestTextBlock[]
is_errorboolean
tool_use_id*string
type*const"mcp_tool_result"

BetaRequestMCPToolUseBlockobject

cache_controlBetaCacheControlEphemeralCreate a cache control breakpoint at this content block.nullable
id*string
input*object
name*string
server_name*stringThe name of the MCP server
type*const"mcp_tool_use"

BetaRequestPageLocationCitationobject

cited_text*string
document_index*integern ≥ 0
document_title*stringlength ≥ 1 · length ≤ 500 · nullable
end_page_number*integer
start_page_number*integern ≥ 1
type*const"page_location"

BetaRequestRedactedThinkingBlockobject

data*stringThe `data` value of this redacted thinking block, exactly as returned by the API in a previous response. Opaque and encrypted; pass it back unchanged.
type*const"redacted_thinking"

BetaRequestSearchResultBlockobject

cache_controlBetaCacheControlEphemeralCreate a cache control breakpoint at this content block.nullable
citationsBetaRequestCitationsConfig
content*BetaRequestTextBlock[]
source*string
title*string
type*const"search_result"

BetaRequestSearchResultLocationCitationobject

cited_text*stringThe full text of the cited block range, concatenated.
end_block_index*integerExclusive 0-based end index of the cited block range in the source's `content` array.
search_result_index*integer0-based index of the cited search result among all `search_result` content blocks in the request, in the order they appear across messages and tool results.n ≥ 0
source*string
start_block_index*integer0-based index of the first cited block in the source's `content` array.n ≥ 0
title*stringnullable
type*const"search_result_location"

BetaRequestServerToolUseBlockobject

cache_controlBetaCacheControlEphemeralCreate a cache control breakpoint at this content block.nullable
callerDirectCaller | ServerToolCaller | ServerToolCaller_20260120
id*string
input*object
name*enumadvisor | web_search | web_fetch | code_execution | bash_code_execution | text_editor_code_execution · +2 more
type*const"server_tool_use"

BetaRequestTextBlockobject

cache_controlBetaCacheControlEphemeralCreate a cache control breakpoint at this content block.nullable
citationsBetaRequestCharLocationCitation | BetaRequestPageLocationCitation | BetaRequestContentBlockLocationCitation[]nullable
text*stringlength ≥ 1
type*const"text"

BetaRequestTextEditorCodeExecutionCreateResultBlockobject

is_file_update*boolean
type*const"text_editor_code_execution_crea…

BetaRequestTextEditorCodeExecutionStrReplaceResultBlockobject

linesstring[]nullable
new_linesintegernullable
new_startintegernullable
old_linesintegernullable
old_startintegernullable
type*const"text_editor_code_execution_str_…

BetaRequestTextEditorCodeExecutionToolResultBlockobject

cache_controlBetaCacheControlEphemeralCreate a cache control breakpoint at this content block.nullable
content*RequestTextEditorCodeExecutionToolResultError | RequestTextEditorCodeExecutionViewResultBlock | RequestTextEditorCodeExecutionCreateResultBlock | …
tool_use_id*string
type*const"text_editor_code_execution_tool…

BetaRequestTextEditorCodeExecutionToolResultErrorobject

error_code*enuminvalid_tool_input | unavailable | too_many_requests | execution_time_exceeded | file_not_found
error_messagestringnullable
type*const"text_editor_code_execution_tool…

BetaRequestTextEditorCodeExecutionViewResultBlockobject

content*string
file_type*enumtext | image | pdf
num_linesintegernullable
start_lineintegernullable
total_linesintegernullable
type*const"text_editor_code_execution_view…

BetaRequestThinkingBlockobject

signature*stringThe `signature` value of this thinking block, exactly as returned by the API in a previous response. Used to verify that the block was generated by Claude.
thinking*stringThe `thinking` text of this block as returned by the API.
type*const"thinking"

BetaRequestToolAdditionBlockobject

Mid-conversation directive to make a tool available.

cache_controlBetaCacheControlEphemeralCreate a cache control breakpoint at this content block.nullable
tool*ToolChangeToolReference | ToolChangeMCPToolReference | ToolChangeMCPToolsetReference | …
type*const"tool_addition"

BetaRequestToolReferenceBlockobject

Tool reference block that can be included in tool_result content.

cache_controlBetaCacheControlEphemeralCreate a cache control breakpoint at this content block.nullable
tool_name*stringlength ≥ 1 · length ≤ 256
type*const"tool_reference"

BetaRequestToolRemovalBlockobject

Mid-conversation directive to withdraw a tool.

cache_controlBetaCacheControlEphemeralCreate a cache control breakpoint at this content block.nullable
tool*ToolChangeToolReference | ToolChangeMCPToolReference | ToolChangeMCPToolsetReference
type*const"tool_removal"

BetaRequestToolResultBlockobject

cache_controlBetaCacheControlEphemeralCreate a cache control breakpoint at this content block.nullable
contentstring | BetaRequestTextBlock | BetaRequestImageBlock | BetaRequestSearchResultBlock[]
is_errorboolean
tool_use_id*string
toolset_namestringFor a toolset member tool_result, the toolset family of the paired tool_use.length ≥ 1 · length ≤ 64 · nullable
type*const"tool_result"

BetaRequestToolSearchToolResultBlockobject

cache_controlBetaCacheControlEphemeralCreate a cache control breakpoint at this content block.nullable
content*RequestToolSearchToolResultError | RequestToolSearchToolSearchResultBlock
tool_use_id*string
type*const"tool_search_tool_result"

BetaRequestToolSearchToolResultErrorobject

error_code*enuminvalid_tool_input | unavailable | too_many_requests | execution_time_exceeded
error_messagestringnullable
type*const"tool_search_tool_result_error"

BetaRequestToolSearchToolSearchResultBlockobject

tool_references*BetaRequestToolReferenceBlock[]
type*const"tool_search_tool_search_result"

BetaRequestToolUseBlockobject

cache_controlBetaCacheControlEphemeralCreate a cache control breakpoint at this content block.nullable
callerDirectCaller | ServerToolCaller | ServerToolCaller_20260120
id*string
input*object
name*stringlength ≥ 1 · length ≤ 200
toolset_namestringFor a toolset member tool_use, the toolset family this member belongs to.length ≥ 1 · length ≤ 64 · nullable
type*const"tool_use"

BetaRequestWebFetchResultBlockobject

content*BetaRequestDocumentBlock
retrieved_atstringISO 8601 timestamp when the content was retrievednullable
type*const"web_fetch_result"
url*stringFetched content URL

BetaRequestWebFetchToolResultBlockobject

cache_controlBetaCacheControlEphemeralCreate a cache control breakpoint at this content block.nullable
callerDirectCaller | ServerToolCaller | ServerToolCaller_20260120
content*RequestWebFetchToolResultError | RequestWebFetchResultBlock
tool_use_id*string
type*const"web_fetch_tool_result"

BetaRequestWebFetchToolResultErrorobject

error_code*enuminvalid_tool_input | url_too_long | url_not_allowed | url_not_in_prior_context | url_not_accessible | unsupported_content_type · +4 more
type*const"web_fetch_tool_result_error"

BetaRequestWebSearchResultBlockobject

encrypted_content*string
page_agestringnullable
title*string
type*const"web_search_result"
url*string

BetaRequestWebSearchResultLocationCitationobject

cited_text*string
encrypted_index*string
title*stringlength ≥ 1 · length ≤ 512 · nullable
type*const"web_search_result_location"
url*stringlength ≥ 1

BetaRequestWebSearchToolResultBlockobject

cache_controlBetaCacheControlEphemeralCreate a cache control breakpoint at this content block.nullable
callerDirectCaller | ServerToolCaller | ServerToolCaller_20260120
content*BetaRequestWebSearchResultBlock[] | Error
tool_use_id*string
type*const"web_search_tool_result"

BetaRequestWebSearchToolResultErrorobject

error_code*enuminvalid_tool_input | unavailable | max_uses_exceeded | too_many_requests | query_too_long | request_too_large
type*const"web_search_tool_result_error"

BetaServerToolCallerobject

Tool invocation generated by a server-side tool.

tool_id*string
type*const"code_execution_20250825"

BetaServerToolCaller_20260120object

tool_id*string
type*const"code_execution_20260120"

BetaSpeedenum

standard | fast

BetaSummarizeCompactionobject

Compact the whole conversation and return a signed `compaction` block, alone, that a later request sends back first in `messages`, in place of the messages it summarizes. There is no trigger and no pause flag: sending the parameter compacts, and nothing is sam…

instructionsstringReplaces the server's default summarization prompt for this request. An empty or whitespace-only value counts as absent.length ≤ 16384 · nullable
type*const"summarize"

BetaSystemInputMessageobject

clear_atenumHow long this system message's text stays in front of the model. `"never"` (the default) renders it on every request that includes it. `"next_user_message"` renders it only for the user turn it follows: once a later `role: "user"` message exists in `messages` the message stays in the array (send it unchanged) but is no longer shown to the model. Only permitted on `role: "system"` messages.next_user_message | never · nullable
contentstring | BetaRequestTextBlock | BetaRequestToolAdditionBlock | BetaRequestToolRemovalBlock[]
output_configBetaSystemMessageOutputConfigPer-message output configuration on a role:"system" input message.nullable
role*const"system"

BetaSystemMessageOutputConfigobject

Per-message output configuration on a role:"system" input message.

effortenumAll possible effort levels.low | medium | high | xhigh | max · nullable

BetaTextEditor_20241022object

allowed_callersBetaAllowedCaller[]
cache_controlBetaCacheControlEphemeralCreate a cache control breakpoint at this content block.nullable
defer_loadingbooleanIf true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.
input_examplesobject[]
name*constName of the tool."str_replace_editor"
strictbooleanWhen true, guarantees schema validation on tool names and inputs
type*const"text_editor_20241022"

BetaTextEditor_20250124object

allowed_callersBetaAllowedCaller[]
cache_controlBetaCacheControlEphemeralCreate a cache control breakpoint at this content block.nullable
defer_loadingbooleanIf true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.
input_examplesobject[]
name*constName of the tool."str_replace_editor"
strictbooleanWhen true, guarantees schema validation on tool names and inputs
type*const"text_editor_20250124"

BetaTextEditor_20250429object

allowed_callersBetaAllowedCaller[]
cache_controlBetaCacheControlEphemeralCreate a cache control breakpoint at this content block.nullable
defer_loadingbooleanIf true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.
input_examplesobject[]
name*constName of the tool."str_replace_based_edit_tool"
strictbooleanWhen true, guarantees schema validation on tool names and inputs
type*const"text_editor_20250429"

BetaTextEditor_20250728object

allowed_callersBetaAllowedCaller[]
cache_controlBetaCacheControlEphemeralCreate a cache control breakpoint at this content block.nullable
defer_loadingbooleanIf true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.
input_examplesobject[]
max_charactersintegerMaximum number of characters to display when viewing a file. If not specified, defaults to displaying the full file.n ≥ 1 · nullable
name*constName of the tool."str_replace_based_edit_tool"
strictbooleanWhen true, guarantees schema validation on tool names and inputs
type*const"text_editor_20250728"

BetaTextEditorCodeExecutionToolResultErrorCodeenum

invalid_tool_input | unavailable | too_many_requests | execution_time_exceeded | file_not_found

BetaThinkingBlockBindingobject

Controls for block binding: what happens when a thinking block this request sends back fails the conversation check. Every field is optional; an empty object means every default.

prefix_mismatch_behaviorenumWhat happens when a thinking block in `messages` fails the conversation check: it was created in a different conversation, or the messages before it have changed since. `"error"` (the default) fails the request with a 400 error. `"drop_block"` removes the fail…error | drop_block · nullable

BetaThinkingConfigAdaptiveobject

block_bindingBetaThinkingBlockBindingControls for block binding: what happens when a thinking block this request sends back fails the conversation check. Every field is optional; an empty object means every default.nullable
displayenumControls how thinking content appears in the response. When set to `summarized`, thinking is returned normally. When set to `omitted`, thinking content is redacted but a signature is returned for multi-turn continuity. The default depends on the model; see [Controlling thinking display](https://platform.claude.com/docs/en/build-with-claude/thinking#controlling-thinking-display).summarized | omitted | updates · nullable
type*const"adaptive"

BetaThinkingConfigBetweenToolsobject

type*const"between_tools"

BetaThinkingConfigDisabledobject

type*const"disabled"

BetaThinkingConfigEnabledobject

block_bindingBetaThinkingBlockBindingControls for block binding: what happens when a thinking block this request sends back fails the conversation check. Every field is optional; an empty object means every default.nullable
budget_tokens*integerDetermines how many tokens Claude can use for its internal reasoning process. Larger budgets can enable more thorough analysis for complex problems, improving response quality.n ≥ 1024
displayenumControls how thinking content appears in the response. When set to `summarized`, thinking is returned normally. When set to `omitted`, thinking content is redacted but a signature is returned for multi-turn continuity. The default depends on the model; see [Controlling thinking display](https://platform.claude.com/docs/en/build-with-claude/thinking#controlling-thinking-display).summarized | omitted | updates · nullable
type*const"enabled"

BetaThinkingConfigParamThinkingConfigEnabled | ThinkingConfigDisabled | ThinkingConfigBetweenTools | …

Configuration for Claude's thinking.

BetaThinkingDisplayModeenum

summarized | omitted | updates

BetaThinkingPrefixMismatchBehaviorenum

What happens when a thinking block in `messages` fails the conversation check: it was created in a different conversation, or the messages before it have changed since. `"error"` (the default) fails the request with a 400 error. `"drop_block"` removes the fail…

error | drop_block

BetaThinkingTurnsobject

type*const"thinking_turns"
value*integern ≥ 1

BetaTokenTaskBudgetobject

User-configurable total token budget across contexts.

remainingintegerRemaining tokens in the budget. Use this to track usage across contexts when implementing compaction client-side. Defaults to total if not provided.n ≥ 0 · nullable
total*integerTotal token budget across all contexts in the session.n ≥ 1024
type*constThe budget type. Currently only 'tokens' is supported."tokens"

BetaToolobject

typeconst"custom" · nullable
descriptionstringDescription of what this tool does.
name*stringName of the tool.length ≥ 1 · length ≤ 128
input_schema*BetaInputSchema[JSON schema](https://json-schema.org/draft/2020-12) for this tool's input.
cache_controlBetaCacheControlEphemeralCreate a cache control breakpoint at this content block.nullable
strictbooleanWhen true, guarantees schema validation on tool names and inputs
eager_input_streamingbooleanEnable eager input streaming for this tool. When true, tool input parameters will be streamed incrementally as they are generated, and types will be inferred on-the-fly rather than buffering the full JSON output. When false, streaming is disabled for this tool even if the fine-grained-tool-streaming beta is active. When null (default), uses the default behavior based on beta headers.nullable
allowed_callersBetaAllowedCaller[]
defer_loadingbooleanIf true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.
input_examplesobject[]

BetaToolChangeMCPToolReferenceobject

Reference to a single MCP tool by its server and remote name; the same ``server_name``/``name`` pair ``mcp_tool_use`` carries.

name*string
server_name*string
type*const"mcp_tool_reference"

BetaToolChangeMCPToolsetReferenceobject

Reference to every tool in the named MCP server's toolset.

server_name*string
type*const"mcp_toolset_reference"

BetaToolChangeToolDefinitionobject

A tool defined by value: `definition` is a `tools` entry (any kind `tools` accepts, an MCP toolset included). An `mcp_toolset` given here also requires the `mcp-client-2026-09-15` beta.

definition*Tool | BashTool_20241022 | BashTool_20250124 | …
type*const"tool_definition"

BetaToolChangeToolReferenceobject

Reference to a single tool, by the name the model uses to call it: a tool declared in ``tools`` or defined by an earlier ``tool_addition`` block. Does not accept the composed ``{server}_{name}`` form the server assigns to MCP-resolved tools; use ``mcp_tool_ref…

name*string
type*const"tool_reference"

BetaToolChoiceToolChoiceAuto | ToolChoiceAny | ToolChoiceTool | …

How the model should use the provided tools. The model can use a specific tool, any available tool, decide by itself, or not use tools at all.

BetaToolChoiceAnyobject

The model will use any available tools.

disable_parallel_tool_usebooleanWhether to disable parallel tool use.
type*const"any"

BetaToolChoiceAutoobject

The model will automatically decide whether to use tools.

disable_parallel_tool_usebooleanWhether to disable parallel tool use.
type*const"auto"

BetaToolChoiceNoneobject

The model will not be allowed to use tools.

type*const"none"

BetaToolChoiceToolobject

The model will use the specified tool with `tool_choice.name`.

disable_parallel_tool_usebooleanWhether to disable parallel tool use.
name*stringThe name of the tool to use.
type*const"tool"

BetaToolSearchToolBM25_20251119object

allowed_callersBetaAllowedCaller[]
cache_controlBetaCacheControlEphemeralCreate a cache control breakpoint at this content block.nullable
defer_loadingbooleanIf true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.
name*constName of the tool."tool_search_tool_bm25"
strictbooleanWhen true, guarantees schema validation on tool names and inputs
type*enumtool_search_tool_bm25_20251119 | tool_search_tool_bm25

BetaToolSearchToolRegex_20251119object

allowed_callersBetaAllowedCaller[]
cache_controlBetaCacheControlEphemeralCreate a cache control breakpoint at this content block.nullable
defer_loadingbooleanIf true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.
name*constName of the tool."tool_search_tool_regex"
strictbooleanWhen true, guarantees schema validation on tool names and inputs
type*enumtool_search_tool_regex_20251119… | tool_search_tool_regex

BetaToolSearchToolResultErrorCodeenum

invalid_tool_input | unavailable | too_many_requests | execution_time_exceeded

BetaToolUnionTool | BashTool_20241022 | BashTool_20250124 | …

BetaToolUsesKeepobject

type*const"tool_uses"
value*integern ≥ 0

BetaToolUsesTriggerobject

type*const"tool_uses"
value*integern ≥ 1

BetaURLImageSourceobject

type*const"url"
url*string

BetaURLPDFSourceobject

type*const"url"
url*string

BetaUserInputMessageobject

content*string | BetaInputContentBlock[]
role*const"user"

BetaUserLocationobject

citystringThe city of the user.length ≥ 1 · length ≤ 255 · nullable
countrystringThe two letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the user.length ≥ 2 · length ≤ 2 · nullable
regionstringThe region of the user.length ≥ 1 · length ≤ 255 · nullable
timezonestringThe [IANA timezone](https://nodatime.org/TimeZones) of the user.length ≥ 1 · length ≤ 255 · nullable
type*const"approximate"

BetaWebFetchTool_20250910object

allowed_callersBetaAllowedCaller[]
allowed_domainsstring[]List of domains to allow fetching fromnullable
blocked_domainsstring[]List of domains to block fetching fromnullable
cache_controlBetaCacheControlEphemeralCreate a cache control breakpoint at this content block.nullable
citationsBetaRequestCitationsConfigCitations configuration for fetched documents. Citations are disabled by default.nullable
defer_loadingbooleanIf true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.
max_content_tokensintegerMaximum number of tokens used by including web page text content in the context. The limit is approximate and does not apply to binary content such as PDFs.n > 0 · nullable
max_usesintegerMaximum number of times the tool can be used in the API request.n > 0 · nullable
name*constName of the tool."web_fetch"
strictbooleanWhen true, guarantees schema validation on tool names and inputs
type*const"web_fetch_20250910"
url_sourcesBetaWebFetchUrlSourcesWhich sources contribute to the set of URLs web fetch may fetch.nullable

BetaWebFetchTool_20260209object

allowed_callersBetaAllowedCaller[]
allowed_domainsstring[]List of domains to allow fetching fromnullable
blocked_domainsstring[]List of domains to block fetching fromnullable
cache_controlBetaCacheControlEphemeralCreate a cache control breakpoint at this content block.nullable
citationsBetaRequestCitationsConfigCitations configuration for fetched documents. Citations are disabled by default.nullable
defer_loadingbooleanIf true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.
max_content_tokensintegerMaximum number of tokens used by including web page text content in the context. The limit is approximate and does not apply to binary content such as PDFs.n > 0 · nullable
max_usesintegerMaximum number of times the tool can be used in the API request.n > 0 · nullable
name*constName of the tool."web_fetch"
strictbooleanWhen true, guarantees schema validation on tool names and inputs
type*const"web_fetch_20260209"
url_sourcesBetaWebFetchUrlSourcesWhich sources contribute to the set of URLs web fetch may fetch.nullable

BetaWebFetchTool_20260309object

Web fetch tool with use_cache parameter for bypassing cached content.

allowed_callersBetaAllowedCaller[]
allowed_domainsstring[]List of domains to allow fetching fromnullable
blocked_domainsstring[]List of domains to block fetching fromnullable
cache_controlBetaCacheControlEphemeralCreate a cache control breakpoint at this content block.nullable
citationsBetaRequestCitationsConfigCitations configuration for fetched documents. Citations are disabled by default.nullable
defer_loadingbooleanIf true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.
max_content_tokensintegerMaximum number of tokens used by including web page text content in the context. The limit is approximate and does not apply to binary content such as PDFs.n > 0 · nullable
max_usesintegerMaximum number of times the tool can be used in the API request.n > 0 · nullable
name*constName of the tool."web_fetch"
strictbooleanWhen true, guarantees schema validation on tool names and inputs
type*const"web_fetch_20260309"
url_sourcesBetaWebFetchUrlSourcesWhich sources contribute to the set of URLs web fetch may fetch.nullable
use_cachebooleanWhether 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.

BetaWebFetchTool_20260318object

allowed_callersBetaAllowedCaller[]
allowed_domainsstring[]List of domains to allow fetching fromnullable
blocked_domainsstring[]List of domains to block fetching fromnullable
cache_controlBetaCacheControlEphemeralCreate a cache control breakpoint at this content block.nullable
citationsBetaRequestCitationsConfigCitations configuration for fetched documents. Citations are disabled by default.nullable
defer_loadingbooleanIf true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.
max_content_tokensintegerMaximum number of tokens used by including web page text content in the context. The limit is approximate and does not apply to binary content such as PDFs.n > 0 · nullable
max_usesintegerMaximum number of times the tool can be used in the API request.n > 0 · nullable
name*constName of the tool."web_fetch"
response_inclusionenumHow this tool's result blocks appear in the API response when the result was consumed by a completed code_execution call in the same turn. 'full' returns the complete content (default). 'excluded' drops the nested server_tool_use and result block pair entirely…full | excluded
strictbooleanWhen true, guarantees schema validation on tool names and inputs
type*const"web_fetch_20260318"
url_sourcesBetaWebFetchUrlSourcesWhich sources contribute to the set of URLs web fetch may fetch.nullable
use_cachebooleanWhether 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.

BetaWebFetchToolResultErrorCodeenum

invalid_tool_input | url_too_long | url_not_allowed | url_not_in_prior_context | url_not_accessible | unsupported_content_type · +4 more

BetaWebFetchUrlSourceAllobject

The ``url_sources`` variant under which a source contributes in full: every result of the tool filter's source, or all user input.

type*const"all"

BetaWebFetchUrlSourceExceptobject

The tool filter variant under which every result but the named tools' contributes.

tools*BetaWebFetchUrlSourceToolReference[]
type*const"except"

BetaWebFetchUrlSourceNoneobject

The ``url_sources`` variant under which a source contributes nothing: no result of the tool filter's source, or no user input.

type*const"none"

BetaWebFetchUrlSourceOnlyobject

The tool filter variant under which only the named tools' results contribute.

tools*BetaWebFetchUrlSourceToolReference[]
type*const"only"

BetaWebFetchUrlSourcesobject

Which sources contribute to the set of URLs web fetch may fetch.

client_tool_resultsWebFetchUrlSourceAll | WebFetchUrlSourceNone | WebFetchUrlSourceOnly | …Which client tools' results contribute fetchable URLs: "all", "none", or an only or except list of client tool names from tools[].
server_tool_resultsWebFetchUrlSourceAll | WebFetchUrlSourceNone | WebFetchUrlSourceOnly | …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.
user_inputWebFetchUrlSourceAll | WebFetchUrlSourceNoneWhether URLs in user messages are fetchable: "all" or "none".

BetaWebFetchUrlSourceToolReferenceobject

One entry of a tool filter's ``tools``: it must name a tool declared in this request's ``tools[]``.

name*string
type*const"tool_reference"

BetaWebSearchTool_20250305object

allowed_callersBetaAllowedCaller[]
allowed_domainsstring[]If provided, only these domains will be included in results. Cannot be used alongside `blocked_domains`.nullable
blocked_domainsstring[]If provided, these domains will never appear in results. Cannot be used alongside `allowed_domains`.nullable
cache_controlBetaCacheControlEphemeralCreate a cache control breakpoint at this content block.nullable
defer_loadingbooleanIf true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.
max_usesintegerMaximum number of times the tool can be used in the API request.n > 0 · nullable
name*constName of the tool."web_search"
strictbooleanWhen true, guarantees schema validation on tool names and inputs
type*const"web_search_20250305"
user_locationBetaUserLocationParameters for the user's location. Used to provide more relevant search results.nullable

BetaWebSearchTool_20260209object

allowed_callersBetaAllowedCaller[]
allowed_domainsstring[]If provided, only these domains will be included in results. Cannot be used alongside `blocked_domains`.nullable
blocked_domainsstring[]If provided, these domains will never appear in results. Cannot be used alongside `allowed_domains`.nullable
cache_controlBetaCacheControlEphemeralCreate a cache control breakpoint at this content block.nullable
defer_loadingbooleanIf true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.
max_usesintegerMaximum number of times the tool can be used in the API request.n > 0 · nullable
name*constName of the tool."web_search"
strictbooleanWhen true, guarantees schema validation on tool names and inputs
type*const"web_search_20260209"
user_locationBetaUserLocationParameters for the user's location. Used to provide more relevant search results.nullable

BetaWebSearchTool_20260318object

allowed_callersBetaAllowedCaller[]
allowed_domainsstring[]If provided, only these domains will be included in results. Cannot be used alongside `blocked_domains`.nullable
blocked_domainsstring[]If provided, these domains will never appear in results. Cannot be used alongside `allowed_domains`.nullable
cache_controlBetaCacheControlEphemeralCreate a cache control breakpoint at this content block.nullable
defer_loadingbooleanIf true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.
max_usesintegerMaximum number of times the tool can be used in the API request.n > 0 · nullable
name*constName of the tool."web_search"
response_inclusionenumHow this tool's result blocks appear in the API response when the result was consumed by a completed code_execution call in the same turn. 'full' returns the complete content (default). 'excluded' drops the nested server_tool_use and result block pair entirely…full | excluded
strictbooleanWhen true, guarantees schema validation on tool names and inputs
type*const"web_search_20260318"
user_locationBetaUserLocationParameters for the user's location. Used to provide more relevant search results.nullable

BetaWebSearchToolResultErrorCodeenum

invalid_tool_input | unavailable | max_uses_exceeded | too_many_requests | query_too_long | request_too_large

Modelstring

The model that will complete your prompt.

22 known values

Validate a payload

before you spend tokens
shell
$ curl -X POST https://modelschemas.com/v1/validate \
    -d '{"provider":"anthropic","endpointId":"v1/messages/count_tokens?beta=true","payload":{…}}'
→ {"valid": false, "errors": [{"path": "#", "keyword": "required", …}]}