/v1/schemas/anthropic/chat/v1/messages?beta=true
| field | recorded source |
|---|---|
| schema | Source linked above. upstream-spec Source trace690622377a5eedc0e9f2265ed755ee34dc0c52d35b47327f425777a550f45e1e{
"fetchedAt": 1794374425,
"extractorVersion": "2",
"verifiedAt": null
} |
Request body
24 properties · 3 required · 222 $defs| property | type | description | constraints |
|---|---|---|---|
| model* | string | The model that will complete your prompt. | 22 known values |
| messages* | BetaInputMessageUnion[] | Input messages. | |
| max_tokens* | integer | The maximum number of tokens to generate before stopping. | n ≥ 0 |
| cache_control | BetaCacheControlEphemeral | Top-level cache control automatically applies a cache_control marker to the last cacheable block in the request. | nullable |
| compaction | BetaSummarizeCompaction | 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… | nullable |
| container | ContainerParams | string | Container identifier for reuse across requests. | nullable |
| context_management | BetaContextManagementConfig | Context management configuration. This allows you to control how Claude manages context across multiple requests, such as whether to clear function results or not. | nullable |
| diagnostics | BetaDiagnosticsParam | Request-level diagnostics. Currently carries the previous response id for prompt-cache divergence reporting. | nullable |
| fallback_credit_token | string | FallbackCreditTokenParam | The `fallback_credit_token` from a prior refusal's `stop_details`. | nullable |
| fallbacks | BetaFallbackConfigV2[] | "default" | Opt-in server-side retry on one or more substitute models when the requested model declines for policy reasons. Tried in order: if the first entry also declines, the second is tried, and so on. Some models don't support fallbacks; on those models, a list of fa… | nullable |
| inference_geo | string | Specifies the geographic region for inference processing. If not specified, the workspace's `default_inference_geo` is used. | nullable |
| mcp_servers | BetaRequestMCPServerURLDefinition[] | MCP servers to be utilized in this request | items ≤ 20 |
| metadata | BetaMetadata | An object describing metadata about the request. | |
| output_config | BetaOutputConfig | Configuration options for the model's output, such as the output format. | |
| output_format | BetaJsonOutputFormat | Deprecated: 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 |
| service_tier | enum | Determines whether to use priority capacity (if available) or standard capacity for this request. | auto | standard_only |
| speed | enum | The 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 |
| stop_sequences | string[] | Custom text sequences that will cause the model to stop generating. | |
| stream | boolean | Whether to incrementally stream the response using server-sent events. When `true`, SDKs return a raw event stream. | |
| system | string | BetaRequestTextBlock[] | System prompt. | |
| thinking | ThinkingConfigEnabled | ThinkingConfigDisabled | ThinkingConfigBetweenTools | … | Configuration for Claude's thinking. | |
| thread | ThreadCreateParams | ThreadContinueParams | Server-held conversation state (a Thread). `{"type": "create"}` asks the server to hold this conversation's state under the response's `id`; `{"type": "continue", "previous_message_id": ...}` resumes from a previous response so only the new turn's messages are sent. The response shape is unchanged. | nullable |
| tool_choice | ToolChoiceAuto | 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. | |
| tools | BetaToolUnion[] | Definitions of tools that the model may use. |
Types
222 $defsBetaAdvisorTool_20260301object
| allowed_callers | BetaAllowedCaller[] | ||
| cache_control | BetaCacheControlEphemeral | Create a cache control breakpoint at this content block. | nullable |
| caching | BetaCacheControlEphemeral | Caching 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_loading | boolean | If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. | |
| max_tokens | integer | Bounds 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_uses | integer | Maximum number of times the tool can be used in the API request. | n > 0 · nullable |
| model* | string | The model that will complete your prompt. | 22 known values |
| name* | const | Name of the tool. | "advisor" |
| strict | boolean | When 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* | string | format: byte | |
| media_type* | enum | image/jpeg | image/png | image/gif | image/webp | |
| type* | const | "base64" |
BetaBase64PDFSourceobject
| data* | string | format: 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_callers | BetaAllowedCaller[] | ||
| cache_control | BetaCacheControlEphemeral | Create a cache control breakpoint at this content block. | nullable |
| defer_loading | boolean | If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. | |
| input_examples | object[] | ||
| name* | const | Name of the tool. | "bash" |
| strict | boolean | When true, guarantees schema validation on tool names and inputs | |
| type* | const | "bash_20241022" |
BetaBashTool_20250124object
| allowed_callers | BetaAllowedCaller[] | ||
| cache_control | BetaCacheControlEphemeral | Create a cache control breakpoint at this content block. | nullable |
| defer_loading | boolean | If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. | |
| input_examples | object[] | ||
| name* | const | Name of the tool. | "bash" |
| strict | boolean | When true, guarantees schema validation on tool names and inputs | |
| type* | const | "bash_20250124" |
BetaBrowserCloseTabConfigobject
``close_tab``'s config overrides.
| defer_loading | boolean | Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. | nullable |
| enabled | boolean | Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. | nullable |
BetaBrowserDoubleClickConfigobject
``double_click``'s config overrides.
| defer_loading | boolean | Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. | nullable |
| enabled | boolean | Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. | nullable |
BetaBrowserFileUploadConfigobject
``file_upload``'s config overrides.
| defer_loading | boolean | Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. | nullable |
| enabled | boolean | Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. | nullable |
BetaBrowserFindConfigobject
``find``'s config overrides.
| defer_loading | boolean | Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. | nullable |
| enabled | boolean | Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. | nullable |
BetaBrowserFormInputConfigobject
``form_input``'s config overrides.
| defer_loading | boolean | Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. | nullable |
| enabled | boolean | Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. | nullable |
BetaBrowserGetPageTextConfigobject
``get_page_text``'s config overrides.
| defer_loading | boolean | Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. | nullable |
| enabled | boolean | Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. | nullable |
BetaBrowserHoldKeyConfigobject
``hold_key``'s config overrides.
| defer_loading | boolean | Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. | nullable |
| enabled | boolean | Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. | nullable |
BetaBrowserHoverConfigobject
``hover``'s config overrides.
| defer_loading | boolean | Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. | nullable |
| enabled | boolean | Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. | nullable |
BetaBrowserJavascriptExecConfigobject
``javascript_exec``'s config overrides.
| defer_loading | boolean | Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. | nullable |
| enabled | boolean | Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. | nullable |
BetaBrowserKeyConfigobject
``key``'s config overrides.
| defer_loading | boolean | Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. | nullable |
| enabled | boolean | Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. | nullable |
BetaBrowserLeftClickConfigobject
``left_click``'s config overrides.
| defer_loading | boolean | Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. | nullable |
| enabled | boolean | Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. | nullable |
BetaBrowserLeftClickDragConfigobject
``left_click_drag``'s config overrides.
| defer_loading | boolean | Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. | nullable |
| enabled | boolean | Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. | nullable |
BetaBrowserLeftMouseDownConfigobject
``left_mouse_down``'s config overrides.
| defer_loading | boolean | Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. | nullable |
| enabled | boolean | Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. | nullable |
BetaBrowserLeftMouseUpConfigobject
``left_mouse_up``'s config overrides.
| defer_loading | boolean | Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. | nullable |
| enabled | boolean | Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. | nullable |
BetaBrowserListTabsConfigobject
``list_tabs``'s config overrides.
| defer_loading | boolean | Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. | nullable |
| enabled | boolean | Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. | nullable |
BetaBrowserMiddleClickConfigobject
``middle_click``'s config overrides.
| defer_loading | boolean | Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. | nullable |
| enabled | boolean | Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. | nullable |
BetaBrowserMouseMoveConfigobject
``mouse_move``'s config overrides.
| defer_loading | boolean | Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. | nullable |
| enabled | boolean | Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. | nullable |
BetaBrowserNewTabConfigobject
``new_tab``'s config overrides.
| defer_loading | boolean | Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. | nullable |
| enabled | boolean | Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. | nullable |
BetaBrowserReadConsoleConfigobject
``read_console``'s config overrides.
| defer_loading | boolean | Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. | nullable |
| enabled | boolean | Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. | nullable |
BetaBrowserReadNetworkConfigobject
``read_network``'s config overrides.
| defer_loading | boolean | Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. | nullable |
| enabled | boolean | Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. | nullable |
BetaBrowserReadPageConfigobject
``read_page``'s config overrides.
| defer_loading | boolean | Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. | nullable |
| enabled | boolean | Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. | nullable |
BetaBrowserRightClickConfigobject
``right_click``'s config overrides.
| defer_loading | boolean | Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. | nullable |
| enabled | boolean | Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. | nullable |
BetaBrowserScreenshotConfigobject
``screenshot``'s config overrides.
| defer_loading | boolean | Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. | nullable |
| enabled | boolean | Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. | nullable |
BetaBrowserScrollConfigobject
``scroll``'s config overrides.
| defer_loading | boolean | Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. | nullable |
| enabled | boolean | Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. | nullable |
BetaBrowserScrollToConfigobject
``scroll_to``'s config overrides.
| defer_loading | boolean | Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. | nullable |
| enabled | boolean | Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. | 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* | string | The caller-assigned identifier for this download, stable across the state changes reporting it. | length ≥ 1 · length ≤ 4096 |
| path | string | Where 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_bytes | integer | The completed download's size. | n ≥ 0 · nullable |
| type* | const | "download_completed" | |
| url* | string | The 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* | string | The caller-assigned identifier for this download, stable across the state changes reporting it. | length ≥ 1 · length ≤ 4096 |
| error | string | The failure or cancellation detail, when known. | length ≤ 4096 · nullable |
| type* | const | "download_failed" | |
| url* | string | The final post-redirect URL the download was served from. | length ≤ 4096 |
BetaBrowserStateChangeDownloadStartedobject
A file download that started during this call.
| download_id* | string | The caller-assigned identifier for this download, stable across the state changes reporting it. | length ≥ 1 · length ≤ 4096 |
| type* | const | "download_started" | |
| url* | string | The 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* | string | The `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.
| active | boolean | Whether this tab is the active tab after this call. Whenever `tabs` is non-empty, exactly one entry is marked `active: true`. | |
| tab_id* | string | The caller-assigned identifier for this tab, unique within the inventory. | length ≥ 1 · length ≤ 4096 |
| title* | string | The title of the page the tab is showing. May be empty. | length ≤ 4096 |
| url* | string | The URL of the page the tab is showing. May be empty. | length ≤ 4096 |
BetaBrowserSwitchTabConfigobject
``switch_tab``'s config overrides.
| defer_loading | boolean | Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. | nullable |
| enabled | boolean | Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. | 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_control | BetaCacheControlEphemeral | Create a cache control breakpoint at this content block. | nullable |
| configs | BetaBrowserToolsetConfigs | 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… | 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_tab | BetaBrowserCloseTabConfig | ``close_tab``'s config overrides. | nullable |
| double_click | BetaBrowserDoubleClickConfig | ``double_click``'s config overrides. | nullable |
| file_upload | BetaBrowserFileUploadConfig | ``file_upload``'s config overrides. | nullable |
| find | BetaBrowserFindConfig | ``find``'s config overrides. | nullable |
| form_input | BetaBrowserFormInputConfig | ``form_input``'s config overrides. | nullable |
| get_page_text | BetaBrowserGetPageTextConfig | ``get_page_text``'s config overrides. | nullable |
| hold_key | BetaBrowserHoldKeyConfig | ``hold_key``'s config overrides. | nullable |
| hover | BetaBrowserHoverConfig | ``hover``'s config overrides. | nullable |
| javascript_exec | BetaBrowserJavascriptExecConfig | ``javascript_exec``'s config overrides. | nullable |
| key | BetaBrowserKeyConfig | ``key``'s config overrides. | nullable |
| left_click | BetaBrowserLeftClickConfig | ``left_click``'s config overrides. | nullable |
| left_click_drag | BetaBrowserLeftClickDragConfig | ``left_click_drag``'s config overrides. | nullable |
| left_mouse_down | BetaBrowserLeftMouseDownConfig | ``left_mouse_down``'s config overrides. | nullable |
| left_mouse_up | BetaBrowserLeftMouseUpConfig | ``left_mouse_up``'s config overrides. | nullable |
| list_tabs | BetaBrowserListTabsConfig | ``list_tabs``'s config overrides. | nullable |
| middle_click | BetaBrowserMiddleClickConfig | ``middle_click``'s config overrides. | nullable |
| mouse_move | BetaBrowserMouseMoveConfig | ``mouse_move``'s config overrides. | nullable |
| navigate | BetaBrowserNavigateConfig | ``navigate``'s config overrides. | nullable |
| new_tab | BetaBrowserNewTabConfig | ``new_tab``'s config overrides. | nullable |
| read_console | BetaBrowserReadConsoleConfig | ``read_console``'s config overrides. | nullable |
| read_network | BetaBrowserReadNetworkConfig | ``read_network``'s config overrides. | nullable |
| read_page | BetaBrowserReadPageConfig | ``read_page``'s config overrides. | nullable |
| right_click | BetaBrowserRightClickConfig | ``right_click``'s config overrides. | nullable |
| screenshot | BetaBrowserScreenshotConfig | ``screenshot``'s config overrides. | nullable |
| scroll | BetaBrowserScrollConfig | ``scroll``'s config overrides. | nullable |
| scroll_to | BetaBrowserScrollToConfig | ``scroll_to``'s config overrides. | nullable |
| switch_tab | BetaBrowserSwitchTabConfig | ``switch_tab``'s config overrides. | nullable |
| triple_click | BetaBrowserTripleClickConfig | ``triple_click``'s config overrides. | nullable |
| type | BetaBrowserTypeConfig | ``type``'s config overrides. | nullable |
| wait | BetaBrowserWaitConfig | ``wait``'s config overrides. | nullable |
| zoom | BetaBrowserZoomConfig | ``zoom``'s config overrides. | nullable |
BetaBrowserTripleClickConfigobject
``triple_click``'s config overrides.
| defer_loading | boolean | Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. | nullable |
| enabled | boolean | Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. | nullable |
BetaBrowserTypeConfigobject
``type``'s config overrides.
| defer_loading | boolean | Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. | nullable |
| enabled | boolean | Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. | nullable |
BetaBrowserWaitConfigobject
``wait``'s config overrides.
| defer_loading | boolean | Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. | nullable |
| enabled | boolean | Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. | nullable |
BetaBrowserZoomConfigobject
``zoom``'s config overrides.
| defer_loading | boolean | Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. | nullable |
| enabled | boolean | Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. | nullable |
BetaCacheControlEphemeralobject
| ttl | enum | The time-to-live for the cache control breakpoint. | 5m | 1h |
| type* | const | "ephemeral" |
BetaClearThinking20251015object
| keep | BetaThinkingTurns | 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_least | BetaInputTokensClearAtLeast | Minimum 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_inputs | boolean | string[] | Whether to clear all tool inputs (bool) or specific tool inputs to clear (list) | nullable |
| exclude_tools | string[] | Tool names whose uses are preserved from clearing | nullable |
| keep | BetaToolUsesKeep | Number of tool uses to retain in the conversation | |
| trigger | InputTokensTrigger | ToolUsesTrigger | Condition that triggers the context management strategy | |
| type* | const | "clear_tool_uses_20250919" |
BetaCodeExecutionTool_20250522object
| allowed_callers | BetaAllowedCaller[] | ||
| cache_control | BetaCacheControlEphemeral | Create a cache control breakpoint at this content block. | nullable |
| defer_loading | boolean | If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. | |
| name* | const | Name of the tool. | "code_execution" |
| strict | boolean | When true, guarantees schema validation on tool names and inputs | |
| type* | const | "code_execution_20250522" |
BetaCodeExecutionTool_20250825object
| allowed_callers | BetaAllowedCaller[] | ||
| cache_control | BetaCacheControlEphemeral | Create a cache control breakpoint at this content block. | nullable |
| defer_loading | boolean | If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. | |
| name* | const | Name of the tool. | "code_execution" |
| strict | boolean | When 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_callers | BetaAllowedCaller[] | ||
| cache_control | BetaCacheControlEphemeral | Create a cache control breakpoint at this content block. | nullable |
| defer_loading | boolean | If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. | |
| name* | const | Name of the tool. | "code_execution" |
| strict | boolean | When true, guarantees schema validation on tool names and inputs | |
| type* | const | "code_execution_20260120" |
BetaCodeExecutionTool_20260521object
Code execution tool with REPL state persistence.
| allowed_callers | BetaAllowedCaller[] | ||
| cache_control | BetaCacheControlEphemeral | Create a cache control breakpoint at this content block. | nullable |
| defer_loading | boolean | If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. | |
| name* | const | Name of the tool. | "code_execution" |
| strict | boolean | When 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.
| instructions | string | Additional instructions for summarization. | nullable |
| pause_after_compaction | boolean | Whether to pause after compaction and return the compaction block to the user. | |
| trigger | BetaInputTokensTrigger | When 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…
| instructions | string | Replaces 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_loading | boolean | Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. | nullable |
| enabled | boolean | Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. | nullable |
BetaComputerDoubleClickConfigobject
``double_click``'s config overrides.
| defer_loading | boolean | Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. | nullable |
| enabled | boolean | Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. | nullable |
BetaComputerHoldKeyConfigobject
``hold_key``'s config overrides.
| defer_loading | boolean | Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. | nullable |
| enabled | boolean | Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. | nullable |
BetaComputerKeyConfigobject
``key``'s config overrides.
| defer_loading | boolean | Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. | nullable |
| enabled | boolean | Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. | nullable |
BetaComputerLeftClickConfigobject
``left_click``'s config overrides.
| defer_loading | boolean | Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. | nullable |
| enabled | boolean | Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. | nullable |
BetaComputerLeftClickDragConfigobject
``left_click_drag``'s config overrides.
| defer_loading | boolean | Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. | nullable |
| enabled | boolean | Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. | nullable |
BetaComputerLeftMouseDownConfigobject
``left_mouse_down``'s config overrides.
| defer_loading | boolean | Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. | nullable |
| enabled | boolean | Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. | nullable |
BetaComputerLeftMouseUpConfigobject
``left_mouse_up``'s config overrides.
| defer_loading | boolean | Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. | nullable |
| enabled | boolean | Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. | nullable |
BetaComputerMiddleClickConfigobject
``middle_click``'s config overrides.
| defer_loading | boolean | Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. | nullable |
| enabled | boolean | Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. | nullable |
BetaComputerMouseMoveConfigobject
``mouse_move``'s config overrides.
| defer_loading | boolean | Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. | nullable |
| enabled | boolean | Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. | nullable |
BetaComputerRightClickConfigobject
``right_click``'s config overrides.
| defer_loading | boolean | Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. | nullable |
| enabled | boolean | Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. | nullable |
BetaComputerScreenshotConfigobject
``screenshot``'s config overrides.
| defer_loading | boolean | Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. | nullable |
| enabled | boolean | Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. | nullable |
BetaComputerScrollConfigobject
``scroll``'s config overrides.
| defer_loading | boolean | Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. | nullable |
| enabled | boolean | Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. | 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_control | BetaCacheControlEphemeral | Create a cache control breakpoint at this content block. | nullable |
| configs | BetaComputerToolsetConfigs | 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 … | 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_position | BetaComputerCursorPositionConfig | ``cursor_position``'s config overrides. | nullable |
| double_click | BetaComputerDoubleClickConfig | ``double_click``'s config overrides. | nullable |
| hold_key | BetaComputerHoldKeyConfig | ``hold_key``'s config overrides. | nullable |
| key | BetaComputerKeyConfig | ``key``'s config overrides. | nullable |
| left_click | BetaComputerLeftClickConfig | ``left_click``'s config overrides. | nullable |
| left_click_drag | BetaComputerLeftClickDragConfig | ``left_click_drag``'s config overrides. | nullable |
| left_mouse_down | BetaComputerLeftMouseDownConfig | ``left_mouse_down``'s config overrides. | nullable |
| left_mouse_up | BetaComputerLeftMouseUpConfig | ``left_mouse_up``'s config overrides. | nullable |
| middle_click | BetaComputerMiddleClickConfig | ``middle_click``'s config overrides. | nullable |
| mouse_move | BetaComputerMouseMoveConfig | ``mouse_move``'s config overrides. | nullable |
| right_click | BetaComputerRightClickConfig | ``right_click``'s config overrides. | nullable |
| screenshot | BetaComputerScreenshotConfig | ``screenshot``'s config overrides. | nullable |
| scroll | BetaComputerScrollConfig | ``scroll``'s config overrides. | nullable |
| triple_click | BetaComputerTripleClickConfig | ``triple_click``'s config overrides. | nullable |
| type | BetaComputerTypeConfig | ``type``'s config overrides. | nullable |
| wait | BetaComputerWaitConfig | ``wait``'s config overrides. | nullable |
| zoom | BetaComputerZoomConfig | ``zoom``'s config overrides. | nullable |
BetaComputerTripleClickConfigobject
``triple_click``'s config overrides.
| defer_loading | boolean | Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. | nullable |
| enabled | boolean | Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. | nullable |
BetaComputerTypeConfigobject
``type``'s config overrides.
| defer_loading | boolean | Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. | nullable |
| enabled | boolean | Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. | nullable |
BetaComputerUseTool_20241022object
| allowed_callers | BetaAllowedCaller[] | ||
| cache_control | BetaCacheControlEphemeral | Create a cache control breakpoint at this content block. | nullable |
| defer_loading | boolean | If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. | |
| display_height_px* | integer | The height of the display in pixels. | n ≥ 1 |
| display_number | integer | The X11 display number (e.g. 0, 1) for the display. | n ≥ 0 · nullable |
| display_width_px* | integer | The width of the display in pixels. | n ≥ 1 |
| input_examples | object[] | ||
| name* | const | Name of the tool. | "computer" |
| strict | boolean | When true, guarantees schema validation on tool names and inputs | |
| type* | const | "computer_20241022" |
BetaComputerUseTool_20250124object
| allowed_callers | BetaAllowedCaller[] | ||
| cache_control | BetaCacheControlEphemeral | Create a cache control breakpoint at this content block. | nullable |
| defer_loading | boolean | If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. | |
| display_height_px* | integer | The height of the display in pixels. | n ≥ 1 |
| display_number | integer | The X11 display number (e.g. 0, 1) for the display. | n ≥ 0 · nullable |
| display_width_px* | integer | The width of the display in pixels. | n ≥ 1 |
| input_examples | object[] | ||
| name* | const | Name of the tool. | "computer" |
| strict | boolean | When true, guarantees schema validation on tool names and inputs | |
| type* | const | "computer_20250124" |
BetaComputerUseTool_20251124object
| allowed_callers | BetaAllowedCaller[] | ||
| cache_control | BetaCacheControlEphemeral | Create a cache control breakpoint at this content block. | nullable |
| defer_loading | boolean | If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. | |
| display_height_px* | integer | The height of the display in pixels. | n ≥ 1 |
| display_number | integer | The X11 display number (e.g. 0, 1) for the display. | n ≥ 0 · nullable |
| display_width_px* | integer | The width of the display in pixels. | n ≥ 1 |
| enable_zoom | boolean | Whether to enable an action to take a zoomed-in screenshot of the screen. | |
| input_examples | object[] | ||
| name* | const | Name of the tool. | "computer" |
| strict | boolean | When true, guarantees schema validation on tool names and inputs | |
| type* | const | "computer_20251124" |
BetaComputerWaitConfigobject
``wait``'s config overrides.
| defer_loading | boolean | Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. | nullable |
| enabled | boolean | Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. | nullable |
BetaComputerZoomConfigobject
``zoom``'s config overrides.
| defer_loading | boolean | Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. | nullable |
| enabled | boolean | Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. | nullable |
BetaContainerParamsobject
Container parameters with skills to be loaded.
| id | string | Container id | nullable |
| skills | BetaSkillParams[] | List of skills to load in the container | items ≤ 20 · nullable |
BetaContentBlockSourceobject
| content* | string | BetaRequestTextBlock | BetaRequestImageBlock[] | ||
| type* | const | "content" |
BetaContextManagementConfigobject
| edits | BetaClearToolUses20250919 | BetaClearThinking20251015 | BetaCompact20260112[] | List of context management edits to apply | items ≥ 0 |
BetaDiagnosticsParamobject
Request-level diagnostics. Currently carries the previous response id for prompt-cache divergence reporting.
| previous_message_id | string | The `id` (`msg_...`) from this client's previous /v1/messages response. The server compares that request's prompt fingerprint against this one and returns `diagnostics.cache_miss_reason` when the prompt-cache prefix could not be reused. Pass `null` on the first turn to opt in without a prior message to compare. | length ≤ 256 · nullable |
BetaDirectCallerobject
Tool invocation directly from the model.
| type* | const | "direct" |
BetaEffortLevelenum
All possible effort levels.
low | medium | high | xhigh | max
BetaFallbackConfigV2object
One entry in the `fallbacks` chain on a `/v1/messages` request.
| max_tokens | integer | The `max_tokens` for the fallback attempt that uses this `fallbacks` entry's `model`, in place of the request's `max_tokens`. If you leave it out or set it to `null`, the attempt uses the request's `max_tokens`. See the [refusals and fallback guide](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback#naming-your-own-fallback-models) to learn more about fallback entries. | nullable |
| model* | string | The model that will complete your prompt. | 22 known values |
| output_config | BetaOutputConfig | Output parameters for the fallback attempt that uses this `fallbacks` entry's `model`, combined with the request's `output_config` one field at a time. - `format`: If you leave it out, the attempt uses the request's `format`. If you set it to `null`, the attempt runs without a format. - `effort`: If you leave it out, the attempt uses the request's `effort` when `model` supports that level with the attempt's `thinking`. If the request doesn't set `effort`, if `model` doesn't support the level, or if you set `effort` to `null`, the attempt runs at the default effort of `model`. - `task_budget`: If you leave it out, the attempt uses the request's `task_budget` when `model` accepts a task budget of that size. If the request doesn't set `task_budget`, if `model` doesn't accept it, or if you set `task_budget` to `null`, the attempt runs without a task budget. Set `output_config` to `null` to run the attempt without a format or a task budget, at the default effort of `model`. These rules apply with the `server-side-fallback-2026-07-01` beta header. | nullable |
| speed | enum | The inference speed mode for the fallback attempt that uses this `fallbacks` entry's `model`. If you leave it out, the attempt runs at `fast` speed only when the request sets `speed` to `fast` and your organization can use fast mode on `model`. Otherwise, or when you set this field to `null`, the attempt runs at `standard` speed. These rules apply with the `server-side-fallback-2026-07-01` beta header. | standard | fast · nullable |
| thinking | ThinkingConfigEnabled | ThinkingConfigDisabled | ThinkingConfigBetweenTools | … | The thinking configuration for the fallback attempt that uses this `fallbacks` entry's `model`. If you leave it out, the attempt uses the request's `thinking` when `model` supports that thinking `type`. If you leave it out and the request's thinking `type` is `between_tools` but `model` doesn't support `between_tools`, the attempt uses `disabled` if `model` supports it. Otherwise, if `model` doesn't support the request's thinking `type`, if the request doesn't set `thinking`, or if you set this field to `null`, the attempt uses the thinking `type` that `model` uses when a request leaves out `thinking`. The request's `thinking.display` still applies where `model` allows it. These rules apply with the `server-side-fallback-2026-07-01` beta header. | nullable |
BetaFallbackCreditTokenParamobject
Object form of ``fallback_credit_token``: the token plus a redemption mode.
| mode | enum | How a failing token affects the retry. `strict` (the default, and the bare-string behavior): a failing redemption is a 400 and the retry is not served. `best_effort`: the retry is served either way — a token-layer failure no longer rejects the request; the ret… | strict | best_effort |
| token* | string | The opaque `fallback_credit_token` from a prior refusal's `stop_details` — the same string the bare-string form carries. | length ≥ 1 · length ≤ 2048 |
BetaFileDocumentSourceobject
| file_id* | string | ||
| type* | const | "file" |
BetaFileImageSourceobject
| file_id* | string | ||
| type* | const | "file" |
BetaInputContentBlockRequestTextBlock | RequestImageBlock | RequestDocumentBlock | …
BetaInputMessageContentstring | BetaInputContentBlock[]
BetaInputMessageUnionUserInputMessage | AssistantInputMessage | SystemInputMessage
BetaInputSchemaobject
| properties | object | nullable | |
| required | string[] | nullable | |
| type* | const | "object" |
BetaInputTokensClearAtLeastobject
| type* | const | "input_tokens" | |
| value* | integer | n ≥ 0 |
BetaInputTokensTriggerobject
| type* | const | "input_tokens" | |
| value* | integer | n ≥ 1 |
BetaJsonOutputFormatobject
| schema* | object | The 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.
| description | string | The tool's description as the MCP server lists it. | nullable |
| input_schema* | object | The tool's input schema as the MCP server lists it, verbatim. | |
| name* | string | The 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_loading | boolean | ||
| enabled | boolean |
BetaMCPToolDefaultConfigobject
Default configuration for tools in an MCP toolset.
| defer_loading | boolean | ||
| enabled | boolean |
BetaMCPToolsetobject
Configuration for a group of tools from an MCP server.
| cache_control | BetaCacheControlEphemeral | Create a cache control breakpoint at this content block. | nullable |
| configs | object | Configuration overrides for specific tools, keyed by tool name | nullable |
| default_config | BetaMCPToolDefaultConfig | Default configuration applied to all tools from this server | |
| mcp_server_name* | string | Name of the MCP server to configure tools for | length ≥ 1 · length ≤ 255 |
| tools | BetaMCPTool[] | 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_callers | BetaAllowedCaller[] | ||
| cache_control | BetaCacheControlEphemeral | Create a cache control breakpoint at this content block. | nullable |
| defer_loading | boolean | If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. | |
| input_examples | object[] | ||
| name* | const | Name of the tool. | "memory" |
| strict | boolean | When true, guarantees schema validation on tool names and inputs | |
| type* | const | "memory_20250818" |
BetaMetadataobject
| user_id | string | An external identifier for the user who is associated with the request. This should be a uuid, hash value, or other opaque identifier. Anthropic may use this id to help detect abuse. Do not include any identifying information such as name, email address, or phone number. | length ≤ 512 · nullable |
BetaOutputConfigobject
| effort | enum | All possible effort levels. | low | medium | high | xhigh | max · nullable |
| format | BetaJsonOutputFormat | A 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_budget | BetaTokenTaskBudget | User-configurable total token budget across contexts. | nullable |
BetaPlainTextSourceobject
| data* | string | ||
| media_type* | const | "text/plain" | |
| type* | const | "text" |
BetaRequestAdvisorRedactedResultBlockobject
| encrypted_content* | string | Opaque blob produced by a prior response; must be round-tripped verbatim. | |
| stop_reason | string | nullable | |
| type* | const | "advisor_redacted_result" |
BetaRequestAdvisorResultBlockobject
| stop_reason | string | nullable | |
| text* | string | ||
| type* | const | "advisor_result" |
BetaRequestAdvisorToolResultBlockobject
| cache_control | BetaCacheControlEphemeral | Create 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* | enum | max_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_control | BetaCacheControlEphemeral | Create 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* | enum | invalid_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_control | BetaCacheControlEphemeral | Create a cache control breakpoint at this content block. | nullable |
| state_changes | BetaBrowserStateChangeTabOpened | 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* | integer | n ≥ 0 | |
| document_title* | string | length ≥ 1 · length ≤ 500 · nullable | |
| end_char_index* | integer | ||
| start_char_index* | integer | n ≥ 0 | |
| type* | const | "char_location" |
BetaRequestCitationsConfigobject
| enabled | boolean |
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_control | BetaCacheControlEphemeral | Create 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* | enum | invalid_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_control | BetaCacheControlEphemeral | Create a cache control breakpoint at this content block. | nullable |
| content | string | Summary of previously compacted content, or null if compaction failed | nullable |
| encrypted_content | string | Opaque metadata from prior compaction, to be round-tripped verbatim | nullable |
| signature | string | The block's signature as returned, to be sent back verbatim | nullable |
| tool_changes | BetaRequestToolAdditionBlock | 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_control | BetaCacheControlEphemeral | Create a cache control breakpoint at this content block. | nullable |
| file_id* | string | ||
| type* | const | "container_upload" |
BetaRequestContentBlockLocationCitationobject
| cited_text* | string | The full text of the cited block range, concatenated. | |
| document_index* | integer | n ≥ 0 | |
| document_title* | string | length ≥ 1 · length ≤ 500 · nullable | |
| end_block_index* | integer | Exclusive 0-based end index of the cited block range in the source's `content` array. | |
| start_block_index* | integer | 0-based index of the first cited block in the source's `content` array. | n ≥ 0 |
| type* | const | "content_block_location" |
BetaRequestDocumentBlockobject
| cache_control | BetaCacheControlEphemeral | Create a cache control breakpoint at this content block. | nullable |
| citations | BetaRequestCitationsConfig | nullable | |
| context | string | length ≥ 1 · nullable | |
| source* | Base64PDFSource | PlainTextSource | ContentBlockSource | … | ||
| title | string | length ≥ 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* | BetaRequestFallbackHopInfo | Identifies one hop of a fallback transition. | |
| to* | BetaRequestFallbackHopInfo | Identifies one hop of a fallback transition. | |
| trigger | any | The 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* | string | The model that will complete your prompt. | 22 known values |
BetaRequestImageBlockobject
| cache_control | BetaCacheControlEphemeral | Create a cache control breakpoint at this content block. | nullable |
| source* | Base64ImageSource | URLImageSource | FileImageSource | ||
| transformations | BetaRequestImageTransformations | 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… | 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_image | enum | What 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_tools | string[] | nullable | |
| enabled | boolean | nullable |
BetaRequestMCPServerURLDefinitionobject
| authorization_token | string | nullable | |
| name* | string | ||
| tool_configuration | BetaRequestMCPServerToolConfiguration | nullable | |
| 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* | string | The 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_control | BetaCacheControlEphemeral | Create a cache control breakpoint at this content block. | nullable |
| content | string | BetaRequestTextBlock[] | ||
| is_error | boolean | ||
| tool_use_id* | string | ||
| type* | const | "mcp_tool_result" |
BetaRequestMCPToolUseBlockobject
| cache_control | BetaCacheControlEphemeral | Create a cache control breakpoint at this content block. | nullable |
| id* | string | ||
| input* | object | ||
| name* | string | ||
| server_name* | string | The name of the MCP server | |
| type* | const | "mcp_tool_use" |
BetaRequestPageLocationCitationobject
| cited_text* | string | ||
| document_index* | integer | n ≥ 0 | |
| document_title* | string | length ≥ 1 · length ≤ 500 · nullable | |
| end_page_number* | integer | ||
| start_page_number* | integer | n ≥ 1 | |
| type* | const | "page_location" |
BetaRequestRedactedThinkingBlockobject
| data* | string | The `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_control | BetaCacheControlEphemeral | Create a cache control breakpoint at this content block. | nullable |
| citations | BetaRequestCitationsConfig | ||
| content* | BetaRequestTextBlock[] | ||
| source* | string | ||
| title* | string | ||
| type* | const | "search_result" |
BetaRequestSearchResultLocationCitationobject
| cited_text* | string | The full text of the cited block range, concatenated. | |
| end_block_index* | integer | Exclusive 0-based end index of the cited block range in the source's `content` array. | |
| search_result_index* | integer | 0-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* | integer | 0-based index of the first cited block in the source's `content` array. | n ≥ 0 |
| title* | string | nullable | |
| type* | const | "search_result_location" |
BetaRequestServerToolUseBlockobject
| cache_control | BetaCacheControlEphemeral | Create a cache control breakpoint at this content block. | nullable |
| caller | DirectCaller | ServerToolCaller | ServerToolCaller_20260120 | ||
| id* | string | ||
| input* | object | ||
| name* | enum | advisor | web_search | web_fetch | code_execution | bash_code_execution | text_editor_code_execution · +2 more | |
| type* | const | "server_tool_use" |
BetaRequestTextBlockobject
| cache_control | BetaCacheControlEphemeral | Create a cache control breakpoint at this content block. | nullable |
| citations | BetaRequestCharLocationCitation | BetaRequestPageLocationCitation | BetaRequestContentBlockLocationCitation[] | nullable | |
| text* | string | length ≥ 1 | |
| type* | const | "text" |
BetaRequestTextEditorCodeExecutionCreateResultBlockobject
| is_file_update* | boolean | ||
| type* | const | "text_editor_code_execution_crea… |
BetaRequestTextEditorCodeExecutionStrReplaceResultBlockobject
| lines | string[] | nullable | |
| new_lines | integer | nullable | |
| new_start | integer | nullable | |
| old_lines | integer | nullable | |
| old_start | integer | nullable | |
| type* | const | "text_editor_code_execution_str_… |
BetaRequestTextEditorCodeExecutionToolResultBlockobject
| cache_control | BetaCacheControlEphemeral | Create 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* | enum | invalid_tool_input | unavailable | too_many_requests | execution_time_exceeded | file_not_found | |
| error_message | string | nullable | |
| type* | const | "text_editor_code_execution_tool… |
BetaRequestTextEditorCodeExecutionViewResultBlockobject
| content* | string | ||
| file_type* | enum | text | image | pdf | |
| num_lines | integer | nullable | |
| start_line | integer | nullable | |
| total_lines | integer | nullable | |
| type* | const | "text_editor_code_execution_view… |
BetaRequestThinkingBlockobject
| signature* | string | The `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* | string | The `thinking` text of this block as returned by the API. | |
| type* | const | "thinking" |
BetaRequestToolAdditionBlockobject
Mid-conversation directive to make a tool available.
| cache_control | BetaCacheControlEphemeral | Create 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_control | BetaCacheControlEphemeral | Create a cache control breakpoint at this content block. | nullable |
| tool_name* | string | length ≥ 1 · length ≤ 256 | |
| type* | const | "tool_reference" |
BetaRequestToolRemovalBlockobject
Mid-conversation directive to withdraw a tool.
| cache_control | BetaCacheControlEphemeral | Create a cache control breakpoint at this content block. | nullable |
| tool* | ToolChangeToolReference | ToolChangeMCPToolReference | ToolChangeMCPToolsetReference | ||
| type* | const | "tool_removal" |
BetaRequestToolResultBlockobject
| cache_control | BetaCacheControlEphemeral | Create a cache control breakpoint at this content block. | nullable |
| content | string | BetaRequestTextBlock | BetaRequestImageBlock | BetaRequestSearchResultBlock[] | ||
| is_error | boolean | ||
| tool_use_id* | string | ||
| toolset_name | string | For a toolset member tool_result, the toolset family of the paired tool_use. | length ≥ 1 · length ≤ 64 · nullable |
| type* | const | "tool_result" |
BetaRequestToolSearchToolResultBlockobject
| cache_control | BetaCacheControlEphemeral | Create 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* | enum | invalid_tool_input | unavailable | too_many_requests | execution_time_exceeded | |
| error_message | string | nullable | |
| type* | const | "tool_search_tool_result_error" |
BetaRequestToolSearchToolSearchResultBlockobject
| tool_references* | BetaRequestToolReferenceBlock[] | ||
| type* | const | "tool_search_tool_search_result" |
BetaRequestToolUseBlockobject
| cache_control | BetaCacheControlEphemeral | Create a cache control breakpoint at this content block. | nullable |
| caller | DirectCaller | ServerToolCaller | ServerToolCaller_20260120 | ||
| id* | string | ||
| input* | object | ||
| name* | string | length ≥ 1 · length ≤ 200 | |
| toolset_name | string | For 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_at | string | ISO 8601 timestamp when the content was retrieved | nullable |
| type* | const | "web_fetch_result" | |
| url* | string | Fetched content URL |
BetaRequestWebFetchToolResultBlockobject
| cache_control | BetaCacheControlEphemeral | Create a cache control breakpoint at this content block. | nullable |
| caller | DirectCaller | ServerToolCaller | ServerToolCaller_20260120 | ||
| content* | RequestWebFetchToolResultError | RequestWebFetchResultBlock | ||
| tool_use_id* | string | ||
| type* | const | "web_fetch_tool_result" |
BetaRequestWebFetchToolResultErrorobject
| error_code* | enum | invalid_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_age | string | nullable | |
| title* | string | ||
| type* | const | "web_search_result" | |
| url* | string |
BetaRequestWebSearchResultLocationCitationobject
| cited_text* | string | ||
| encrypted_index* | string | ||
| title* | string | length ≥ 1 · length ≤ 512 · nullable | |
| type* | const | "web_search_result_location" | |
| url* | string | length ≥ 1 |
BetaRequestWebSearchToolResultBlockobject
| cache_control | BetaCacheControlEphemeral | Create a cache control breakpoint at this content block. | nullable |
| caller | DirectCaller | ServerToolCaller | ServerToolCaller_20260120 | ||
| content* | BetaRequestWebSearchResultBlock[] | Error | ||
| tool_use_id* | string | ||
| type* | const | "web_search_tool_result" |
BetaRequestWebSearchToolResultErrorobject
| error_code* | enum | invalid_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" |
BetaSkillParamsobject
Specification for a skill to be loaded in a container.
| skill_id* | string | Skill ID | length ≥ 1 · length ≤ 64 |
| type* | enum | Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined) | anthropic | custom |
| version | string | Skill version or 'latest' for most recent version | length ≥ 1 · length ≤ 64 |
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…
| instructions | string | Replaces 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_at | enum | How 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 |
| content | string | BetaRequestTextBlock | BetaRequestToolAdditionBlock | BetaRequestToolRemovalBlock[] | ||
| output_config | BetaSystemMessageOutputConfig | Per-message output configuration on a role:"system" input message. | nullable |
| role* | const | "system" |
BetaSystemMessageOutputConfigobject
Per-message output configuration on a role:"system" input message.
| effort | enum | All possible effort levels. | low | medium | high | xhigh | max · nullable |
BetaTextEditor_20241022object
| allowed_callers | BetaAllowedCaller[] | ||
| cache_control | BetaCacheControlEphemeral | Create a cache control breakpoint at this content block. | nullable |
| defer_loading | boolean | If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. | |
| input_examples | object[] | ||
| name* | const | Name of the tool. | "str_replace_editor" |
| strict | boolean | When true, guarantees schema validation on tool names and inputs | |
| type* | const | "text_editor_20241022" |
BetaTextEditor_20250124object
| allowed_callers | BetaAllowedCaller[] | ||
| cache_control | BetaCacheControlEphemeral | Create a cache control breakpoint at this content block. | nullable |
| defer_loading | boolean | If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. | |
| input_examples | object[] | ||
| name* | const | Name of the tool. | "str_replace_editor" |
| strict | boolean | When true, guarantees schema validation on tool names and inputs | |
| type* | const | "text_editor_20250124" |
BetaTextEditor_20250429object
| allowed_callers | BetaAllowedCaller[] | ||
| cache_control | BetaCacheControlEphemeral | Create a cache control breakpoint at this content block. | nullable |
| defer_loading | boolean | If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. | |
| input_examples | object[] | ||
| name* | const | Name of the tool. | "str_replace_based_edit_tool" |
| strict | boolean | When true, guarantees schema validation on tool names and inputs | |
| type* | const | "text_editor_20250429" |
BetaTextEditor_20250728object
| allowed_callers | BetaAllowedCaller[] | ||
| cache_control | BetaCacheControlEphemeral | Create a cache control breakpoint at this content block. | nullable |
| defer_loading | boolean | If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. | |
| input_examples | object[] | ||
| max_characters | integer | Maximum number of characters to display when viewing a file. If not specified, defaults to displaying the full file. | n ≥ 1 · nullable |
| name* | const | Name of the tool. | "str_replace_based_edit_tool" |
| strict | boolean | When 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_behavior | enum | 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 · nullable |
BetaThinkingConfigAdaptiveobject
| block_binding | BetaThinkingBlockBinding | 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. | nullable |
| display | enum | Controls how thinking content appears in the response. When set to `summarized`, thinking is returned normally. When set to `omitted`, thinking content is redacted but a signature is returned for multi-turn continuity. The default depends on the model; see [Controlling thinking display](https://platform.claude.com/docs/en/build-with-claude/thinking#controlling-thinking-display). | summarized | omitted | updates · nullable |
| type* | const | "adaptive" |
BetaThinkingConfigBetweenToolsobject
| type* | const | "between_tools" |
BetaThinkingConfigDisabledobject
| type* | const | "disabled" |
BetaThinkingConfigEnabledobject
| block_binding | BetaThinkingBlockBinding | 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. | nullable |
| budget_tokens* | integer | Determines 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 |
| display | enum | Controls how thinking content appears in the response. When set to `summarized`, thinking is returned normally. When set to `omitted`, thinking content is redacted but a signature is returned for multi-turn continuity. The default depends on the model; see [Controlling thinking display](https://platform.claude.com/docs/en/build-with-claude/thinking#controlling-thinking-display). | 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* | integer | n ≥ 1 |
BetaThreadContinueParamsobject
Resume from the response named by ``previous_message_id``.
| previous_message_id* | string | The `id` of the previous response in this Thread. | |
| type* | const | "continue" |
BetaThreadCreateParamsobject
Start holding conversation state under this response's ``id``.
| type* | const | "create" |
BetaTokenTaskBudgetobject
User-configurable total token budget across contexts.
| remaining | integer | Remaining 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* | integer | Total token budget across all contexts in the session. | n ≥ 1024 |
| type* | const | The budget type. Currently only 'tokens' is supported. | "tokens" |
BetaToolobject
| type | const | "custom" · nullable | |
| description | string | Description of what this tool does. | |
| name* | string | Name 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_control | BetaCacheControlEphemeral | Create a cache control breakpoint at this content block. | nullable |
| strict | boolean | When true, guarantees schema validation on tool names and inputs | |
| eager_input_streaming | boolean | Enable 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_callers | BetaAllowedCaller[] | ||
| defer_loading | boolean | If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. | |
| input_examples | object[] |
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_use | boolean | Whether to disable parallel tool use. | |
| type* | const | "any" |
BetaToolChoiceAutoobject
The model will automatically decide whether to use tools.
| disable_parallel_tool_use | boolean | Whether 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_use | boolean | Whether to disable parallel tool use. | |
| name* | string | The name of the tool to use. | |
| type* | const | "tool" |
BetaToolSearchToolBM25_20251119object
| allowed_callers | BetaAllowedCaller[] | ||
| cache_control | BetaCacheControlEphemeral | Create a cache control breakpoint at this content block. | nullable |
| defer_loading | boolean | If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. | |
| name* | const | Name of the tool. | "tool_search_tool_bm25" |
| strict | boolean | When true, guarantees schema validation on tool names and inputs | |
| type* | enum | tool_search_tool_bm25_20251119 | tool_search_tool_bm25 |
BetaToolSearchToolRegex_20251119object
| allowed_callers | BetaAllowedCaller[] | ||
| cache_control | BetaCacheControlEphemeral | Create a cache control breakpoint at this content block. | nullable |
| defer_loading | boolean | If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. | |
| name* | const | Name of the tool. | "tool_search_tool_regex" |
| strict | boolean | When true, guarantees schema validation on tool names and inputs | |
| type* | enum | tool_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* | integer | n ≥ 0 |
BetaToolUsesTriggerobject
| type* | const | "tool_uses" | |
| value* | integer | n ≥ 1 |
BetaURLImageSourceobject
| type* | const | "url" | |
| url* | string |
BetaURLPDFSourceobject
| type* | const | "url" | |
| url* | string |
BetaUserInputMessageobject
| content* | string | BetaInputContentBlock[] | ||
| role* | const | "user" |
BetaUserLocationobject
| city | string | The city of the user. | length ≥ 1 · length ≤ 255 · nullable |
| country | string | The two letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the user. | length ≥ 2 · length ≤ 2 · nullable |
| region | string | The region of the user. | length ≥ 1 · length ≤ 255 · nullable |
| timezone | string | The [IANA timezone](https://nodatime.org/TimeZones) of the user. | length ≥ 1 · length ≤ 255 · nullable |
| type* | const | "approximate" |
BetaWebFetchTool_20250910object
| allowed_callers | BetaAllowedCaller[] | ||
| allowed_domains | string[] | List of domains to allow fetching from | nullable |
| blocked_domains | string[] | List of domains to block fetching from | nullable |
| cache_control | BetaCacheControlEphemeral | Create a cache control breakpoint at this content block. | nullable |
| citations | BetaRequestCitationsConfig | Citations configuration for fetched documents. Citations are disabled by default. | nullable |
| defer_loading | boolean | If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. | |
| max_content_tokens | integer | Maximum 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_uses | integer | Maximum number of times the tool can be used in the API request. | n > 0 · nullable |
| name* | const | Name of the tool. | "web_fetch" |
| strict | boolean | When true, guarantees schema validation on tool names and inputs | |
| type* | const | "web_fetch_20250910" | |
| url_sources | BetaWebFetchUrlSources | Which sources contribute to the set of URLs web fetch may fetch. | nullable |
BetaWebFetchTool_20260209object
| allowed_callers | BetaAllowedCaller[] | ||
| allowed_domains | string[] | List of domains to allow fetching from | nullable |
| blocked_domains | string[] | List of domains to block fetching from | nullable |
| cache_control | BetaCacheControlEphemeral | Create a cache control breakpoint at this content block. | nullable |
| citations | BetaRequestCitationsConfig | Citations configuration for fetched documents. Citations are disabled by default. | nullable |
| defer_loading | boolean | If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. | |
| max_content_tokens | integer | Maximum 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_uses | integer | Maximum number of times the tool can be used in the API request. | n > 0 · nullable |
| name* | const | Name of the tool. | "web_fetch" |
| strict | boolean | When true, guarantees schema validation on tool names and inputs | |
| type* | const | "web_fetch_20260209" | |
| url_sources | BetaWebFetchUrlSources | Which 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_callers | BetaAllowedCaller[] | ||
| allowed_domains | string[] | List of domains to allow fetching from | nullable |
| blocked_domains | string[] | List of domains to block fetching from | nullable |
| cache_control | BetaCacheControlEphemeral | Create a cache control breakpoint at this content block. | nullable |
| citations | BetaRequestCitationsConfig | Citations configuration for fetched documents. Citations are disabled by default. | nullable |
| defer_loading | boolean | If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. | |
| max_content_tokens | integer | Maximum 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_uses | integer | Maximum number of times the tool can be used in the API request. | n > 0 · nullable |
| name* | const | Name of the tool. | "web_fetch" |
| strict | boolean | When true, guarantees schema validation on tool names and inputs | |
| type* | const | "web_fetch_20260309" | |
| url_sources | BetaWebFetchUrlSources | Which sources contribute to the set of URLs web fetch may fetch. | nullable |
| use_cache | boolean | 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. |
BetaWebFetchTool_20260318object
| allowed_callers | BetaAllowedCaller[] | ||
| allowed_domains | string[] | List of domains to allow fetching from | nullable |
| blocked_domains | string[] | List of domains to block fetching from | nullable |
| cache_control | BetaCacheControlEphemeral | Create a cache control breakpoint at this content block. | nullable |
| citations | BetaRequestCitationsConfig | Citations configuration for fetched documents. Citations are disabled by default. | nullable |
| defer_loading | boolean | If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. | |
| max_content_tokens | integer | Maximum 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_uses | integer | Maximum number of times the tool can be used in the API request. | n > 0 · nullable |
| name* | const | Name of the tool. | "web_fetch" |
| response_inclusion | enum | How 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 |
| strict | boolean | When true, guarantees schema validation on tool names and inputs | |
| type* | const | "web_fetch_20260318" | |
| url_sources | BetaWebFetchUrlSources | Which sources contribute to the set of URLs web fetch may fetch. | nullable |
| use_cache | boolean | 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. |
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_results | WebFetchUrlSourceAll | 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_results | WebFetchUrlSourceAll | 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_input | WebFetchUrlSourceAll | WebFetchUrlSourceNone | Whether 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_callers | BetaAllowedCaller[] | ||
| allowed_domains | string[] | If provided, only these domains will be included in results. Cannot be used alongside `blocked_domains`. | nullable |
| blocked_domains | string[] | If provided, these domains will never appear in results. Cannot be used alongside `allowed_domains`. | nullable |
| cache_control | BetaCacheControlEphemeral | Create a cache control breakpoint at this content block. | nullable |
| defer_loading | boolean | If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. | |
| max_uses | integer | Maximum number of times the tool can be used in the API request. | n > 0 · nullable |
| name* | const | Name of the tool. | "web_search" |
| strict | boolean | When true, guarantees schema validation on tool names and inputs | |
| type* | const | "web_search_20250305" | |
| user_location | BetaUserLocation | Parameters for the user's location. Used to provide more relevant search results. | nullable |
BetaWebSearchTool_20260209object
| allowed_callers | BetaAllowedCaller[] | ||
| allowed_domains | string[] | If provided, only these domains will be included in results. Cannot be used alongside `blocked_domains`. | nullable |
| blocked_domains | string[] | If provided, these domains will never appear in results. Cannot be used alongside `allowed_domains`. | nullable |
| cache_control | BetaCacheControlEphemeral | Create a cache control breakpoint at this content block. | nullable |
| defer_loading | boolean | If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. | |
| max_uses | integer | Maximum number of times the tool can be used in the API request. | n > 0 · nullable |
| name* | const | Name of the tool. | "web_search" |
| strict | boolean | When true, guarantees schema validation on tool names and inputs | |
| type* | const | "web_search_20260209" | |
| user_location | BetaUserLocation | Parameters for the user's location. Used to provide more relevant search results. | nullable |
BetaWebSearchTool_20260318object
| allowed_callers | BetaAllowedCaller[] | ||
| allowed_domains | string[] | If provided, only these domains will be included in results. Cannot be used alongside `blocked_domains`. | nullable |
| blocked_domains | string[] | If provided, these domains will never appear in results. Cannot be used alongside `allowed_domains`. | nullable |
| cache_control | BetaCacheControlEphemeral | Create a cache control breakpoint at this content block. | nullable |
| defer_loading | boolean | If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. | |
| max_uses | integer | Maximum number of times the tool can be used in the API request. | n > 0 · nullable |
| name* | const | Name of the tool. | "web_search" |
| response_inclusion | enum | How 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 |
| strict | boolean | When true, guarantees schema validation on tool names and inputs | |
| type* | const | "web_search_20260318" | |
| user_location | BetaUserLocation | Parameters 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$ curl -X POST https://modelschemas.com/v1/validate \
-d '{"provider":"anthropic","endpointId":"v1/messages?beta=true","payload":{…}}'
→ {"valid": false, "errors": [{"path": "#", "keyword": "required", …}]}