/v1/schemas/anthropic/chat/v1/messages/count_tokens
| field | recorded source |
|---|---|
| schema | Source linked above. upstream-spec Source trace690622377a5eedc0e9f2265ed755ee34dc0c52d35b47327f425777a550f45e1e{
"fetchedAt": 1794374425,
"extractorVersion": "2",
"verifiedAt": null
} |
Request body
9 properties · 2 required · 168 $defs| property | type | description | constraints |
|---|---|---|---|
| messages* | InputMessageUnion[] | Input messages. | |
| model* | string | The model that will complete your prompt. | 22 known values |
| cache_control | CacheControlEphemeral | Top-level cache control automatically applies a cache_control marker to the last cacheable block in the request. | nullable |
| output_config | OutputConfig | Configuration options for the model's output, such as the output format. | |
| 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 |
| system | string | RequestTextBlock[] | System prompt. | |
| thinking | ThinkingConfigEnabled | ThinkingConfigDisabled | ThinkingConfigBetweenTools | … | Configuration for Claude's thinking. | |
| 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 | Tool | BashTool_20250124 | CodeExecutionTool_20250522[] | Definitions of tools that the model may use. |
Types
168 $defsAllowedCallerenum
Specifies who can invoke a tool.
direct | code_execution_20250825 | code_execution_20260120 | code_execution_20260521
AssistantInputMessageobject
| content* | string | InputContentBlock[] | ||
| role* | const | "assistant" |
Base64ImageSourceobject
| data* | string | format: byte | |
| media_type* | enum | image/jpeg | image/png | image/gif | image/webp | |
| type* | const | "base64" |
Base64PDFSourceobject
| data* | string | format: byte | |
| media_type* | const | "application/pdf" | |
| type* | const | "base64" |
BashCodeExecutionToolResultErrorCodeenum
invalid_tool_input | unavailable | too_many_requests | execution_time_exceeded | output_file_too_large
BashTool_20250124object
| allowed_callers | AllowedCaller[] | ||
| cache_control | CacheControlEphemeral | 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" |
BrowserCloseTabConfigobject
``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 |
BrowserDoubleClickConfigobject
``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 |
BrowserFileUploadConfigobject
``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 |
BrowserFindConfigobject
``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 |
BrowserFormInputConfigobject
``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 |
BrowserGetPageTextConfigobject
``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 |
BrowserHoldKeyConfigobject
``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 |
BrowserHoverConfigobject
``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 |
BrowserJavascriptExecConfigobject
``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 |
BrowserKeyConfigobject
``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 |
BrowserLeftClickConfigobject
``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 |
BrowserLeftClickDragConfigobject
``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 |
BrowserLeftMouseDownConfigobject
``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 |
BrowserLeftMouseUpConfigobject
``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 |
BrowserListTabsConfigobject
``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 |
BrowserMiddleClickConfigobject
``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 |
BrowserMouseMoveConfigobject
``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 |
BrowserNewTabConfigobject
``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 |
BrowserReadConsoleConfigobject
``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 |
BrowserReadNetworkConfigobject
``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 |
BrowserReadPageConfigobject
``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 |
BrowserRightClickConfigobject
``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 |
BrowserScreenshotConfigobject
``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 |
BrowserScrollConfigobject
``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 |
BrowserScrollToConfigobject
``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 |
BrowserStateChangeDownloadCompletedobject
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 |
BrowserStateChangeDownloadFailedobject
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 |
BrowserStateChangeDownloadStartedobject
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 |
BrowserStateChangeTabOpenedobject
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" |
BrowserStateTabEntryobject
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 |
BrowserSwitchTabConfigobject
``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 |
BrowserToolset_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 | CacheControlEphemeral | Create a cache control breakpoint at this content block. | nullable |
| configs | BrowserToolsetConfigs | 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" |
BrowserToolsetConfigsobject
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 | BrowserCloseTabConfig | ``close_tab``'s config overrides. | nullable |
| double_click | BrowserDoubleClickConfig | ``double_click``'s config overrides. | nullable |
| file_upload | BrowserFileUploadConfig | ``file_upload``'s config overrides. | nullable |
| find | BrowserFindConfig | ``find``'s config overrides. | nullable |
| form_input | BrowserFormInputConfig | ``form_input``'s config overrides. | nullable |
| get_page_text | BrowserGetPageTextConfig | ``get_page_text``'s config overrides. | nullable |
| hold_key | BrowserHoldKeyConfig | ``hold_key``'s config overrides. | nullable |
| hover | BrowserHoverConfig | ``hover``'s config overrides. | nullable |
| javascript_exec | BrowserJavascriptExecConfig | ``javascript_exec``'s config overrides. | nullable |
| key | BrowserKeyConfig | ``key``'s config overrides. | nullable |
| left_click | BrowserLeftClickConfig | ``left_click``'s config overrides. | nullable |
| left_click_drag | BrowserLeftClickDragConfig | ``left_click_drag``'s config overrides. | nullable |
| left_mouse_down | BrowserLeftMouseDownConfig | ``left_mouse_down``'s config overrides. | nullable |
| left_mouse_up | BrowserLeftMouseUpConfig | ``left_mouse_up``'s config overrides. | nullable |
| list_tabs | BrowserListTabsConfig | ``list_tabs``'s config overrides. | nullable |
| middle_click | BrowserMiddleClickConfig | ``middle_click``'s config overrides. | nullable |
| mouse_move | BrowserMouseMoveConfig | ``mouse_move``'s config overrides. | nullable |
| navigate | BrowserNavigateConfig | ``navigate``'s config overrides. | nullable |
| new_tab | BrowserNewTabConfig | ``new_tab``'s config overrides. | nullable |
| read_console | BrowserReadConsoleConfig | ``read_console``'s config overrides. | nullable |
| read_network | BrowserReadNetworkConfig | ``read_network``'s config overrides. | nullable |
| read_page | BrowserReadPageConfig | ``read_page``'s config overrides. | nullable |
| right_click | BrowserRightClickConfig | ``right_click``'s config overrides. | nullable |
| screenshot | BrowserScreenshotConfig | ``screenshot``'s config overrides. | nullable |
| scroll | BrowserScrollConfig | ``scroll``'s config overrides. | nullable |
| scroll_to | BrowserScrollToConfig | ``scroll_to``'s config overrides. | nullable |
| switch_tab | BrowserSwitchTabConfig | ``switch_tab``'s config overrides. | nullable |
| triple_click | BrowserTripleClickConfig | ``triple_click``'s config overrides. | nullable |
| type | BrowserTypeConfig | ``type``'s config overrides. | nullable |
| wait | BrowserWaitConfig | ``wait``'s config overrides. | nullable |
| zoom | BrowserZoomConfig | ``zoom``'s config overrides. | nullable |
BrowserTripleClickConfigobject
``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 |
BrowserTypeConfigobject
``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 |
BrowserWaitConfigobject
``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 |
BrowserZoomConfigobject
``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 |
CacheControlEphemeralobject
| ttl | enum | The time-to-live for the cache control breakpoint. | 5m | 1h |
| type* | const | "ephemeral" |
CodeExecutionTool_20250522object
| allowed_callers | AllowedCaller[] | ||
| cache_control | CacheControlEphemeral | 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" |
CodeExecutionTool_20250825object
| allowed_callers | AllowedCaller[] | ||
| cache_control | CacheControlEphemeral | 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" |
CodeExecutionTool_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 | AllowedCaller[] | ||
| cache_control | CacheControlEphemeral | 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" |
CodeExecutionTool_20260521object
Code execution tool with REPL state persistence.
| allowed_callers | AllowedCaller[] | ||
| cache_control | CacheControlEphemeral | 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" |
CodeExecutionToolResultErrorCodeenum
invalid_tool_input | unavailable | too_many_requests | execution_time_exceeded
ComputerCursorPositionConfigobject
``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 |
ComputerDoubleClickConfigobject
``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 |
ComputerHoldKeyConfigobject
``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 |
ComputerKeyConfigobject
``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 |
ComputerLeftClickConfigobject
``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 |
ComputerLeftClickDragConfigobject
``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 |
ComputerLeftMouseDownConfigobject
``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 |
ComputerLeftMouseUpConfigobject
``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 |
ComputerMiddleClickConfigobject
``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 |
ComputerMouseMoveConfigobject
``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 |
ComputerRightClickConfigobject
``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 |
ComputerScreenshotConfigobject
``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 |
ComputerScrollConfigobject
``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 |
ComputerToolset_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 | CacheControlEphemeral | Create a cache control breakpoint at this content block. | nullable |
| configs | ComputerToolsetConfigs | 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" |
ComputerToolsetConfigsobject
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 | ComputerCursorPositionConfig | ``cursor_position``'s config overrides. | nullable |
| double_click | ComputerDoubleClickConfig | ``double_click``'s config overrides. | nullable |
| hold_key | ComputerHoldKeyConfig | ``hold_key``'s config overrides. | nullable |
| key | ComputerKeyConfig | ``key``'s config overrides. | nullable |
| left_click | ComputerLeftClickConfig | ``left_click``'s config overrides. | nullable |
| left_click_drag | ComputerLeftClickDragConfig | ``left_click_drag``'s config overrides. | nullable |
| left_mouse_down | ComputerLeftMouseDownConfig | ``left_mouse_down``'s config overrides. | nullable |
| left_mouse_up | ComputerLeftMouseUpConfig | ``left_mouse_up``'s config overrides. | nullable |
| middle_click | ComputerMiddleClickConfig | ``middle_click``'s config overrides. | nullable |
| mouse_move | ComputerMouseMoveConfig | ``mouse_move``'s config overrides. | nullable |
| right_click | ComputerRightClickConfig | ``right_click``'s config overrides. | nullable |
| screenshot | ComputerScreenshotConfig | ``screenshot``'s config overrides. | nullable |
| scroll | ComputerScrollConfig | ``scroll``'s config overrides. | nullable |
| triple_click | ComputerTripleClickConfig | ``triple_click``'s config overrides. | nullable |
| type | ComputerTypeConfig | ``type``'s config overrides. | nullable |
| wait | ComputerWaitConfig | ``wait``'s config overrides. | nullable |
| zoom | ComputerZoomConfig | ``zoom``'s config overrides. | nullable |
ComputerTripleClickConfigobject
``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 |
ComputerTypeConfigobject
``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 |
ComputerWaitConfigobject
``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 |
ComputerZoomConfigobject
``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 |
ContentBlockSourceobject
| content* | string | RequestTextBlock | RequestImageBlock[] | ||
| type* | const | "content" |
DirectCallerobject
Tool invocation directly from the model.
| type* | const | "direct" |
EffortLevelenum
All possible effort levels.
low | medium | high | xhigh | max
FileDocumentSourceobject
| file_id* | string | ||
| type* | const | "file" |
FileImageSourceobject
| file_id* | string | ||
| type* | const | "file" |
InputContentBlockRequestTextBlock | RequestImageBlock | RequestDocumentBlock | …
InputMessageContentstring | InputContentBlock[]
InputMessageUnionUserInputMessage | AssistantInputMessage | SystemInputMessage
InputSchemaobject
| properties | object | nullable | |
| required | string[] | nullable | |
| type* | const | "object" |
JsonOutputFormatobject
| schema* | object | The JSON schema of the format | |
| type* | const | "json_schema" |
JsonValueany
MemoryTool_20250818object
| allowed_callers | AllowedCaller[] | ||
| cache_control | CacheControlEphemeral | 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" |
Modelstring
The model that will complete your prompt.
22 known values
OutputConfigobject
| effort | enum | All possible effort levels. | low | medium | high | xhigh | max · nullable |
| format | JsonOutputFormat | 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 |
PlainTextSourceobject
| data* | string | ||
| media_type* | const | "text/plain" | |
| type* | const | "text" |
RequestBashCodeExecutionOutputBlockobject
| file_id* | string | ||
| type* | const | "bash_code_execution_output" |
RequestBashCodeExecutionResultBlockobject
| content* | RequestBashCodeExecutionOutputBlock[] | ||
| return_code* | integer | ||
| stderr* | string | ||
| stdout* | string | ||
| type* | const | "bash_code_execution_result" |
RequestBashCodeExecutionToolResultBlockobject
| cache_control | CacheControlEphemeral | Create a cache control breakpoint at this content block. | nullable |
| content* | RequestBashCodeExecutionToolResultError | RequestBashCodeExecutionResultBlock | ||
| tool_use_id* | string | ||
| type* | const | "bash_code_execution_tool_result… |
RequestBashCodeExecutionToolResultErrorobject
| error_code* | enum | invalid_tool_input | unavailable | too_many_requests | execution_time_exceeded | output_file_too_large | |
| type* | const | "bash_code_execution_tool_result… |
RequestBrowserStateBlockobject
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 | CacheControlEphemeral | Create a cache control breakpoint at this content block. | nullable |
| state_changes | BrowserStateChangeTabOpened | BrowserStateChangeDownloadStarted | BrowserStateChangeDownloadCompleted[] | 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* | BrowserStateTabEntry[] | 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" |
RequestCharLocationCitationobject
| 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" |
RequestCitationsConfigobject
| enabled | boolean |
RequestCodeExecutionOutputBlockobject
| file_id* | string | ||
| type* | const | "code_execution_output" |
RequestCodeExecutionResultBlockobject
| content* | RequestCodeExecutionOutputBlock[] | ||
| return_code* | integer | ||
| stderr* | string | ||
| stdout* | string | ||
| type* | const | "code_execution_result" |
RequestCodeExecutionToolResultBlockobject
| cache_control | CacheControlEphemeral | Create a cache control breakpoint at this content block. | nullable |
| content* | RequestCodeExecutionToolResultError | RequestCodeExecutionResultBlock | RequestEncryptedCodeExecutionResultBlock | ||
| tool_use_id* | string | ||
| type* | const | "code_execution_tool_result" |
RequestCodeExecutionToolResultErrorobject
| error_code* | enum | invalid_tool_input | unavailable | too_many_requests | execution_time_exceeded | |
| type* | const | "code_execution_tool_result_erro… |
RequestContainerUploadBlockobject
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 | CacheControlEphemeral | Create a cache control breakpoint at this content block. | nullable |
| file_id* | string | ||
| type* | const | "container_upload" |
RequestContentBlockLocationCitationobject
| 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" |
RequestDocumentBlockobject
| cache_control | CacheControlEphemeral | Create a cache control breakpoint at this content block. | nullable |
| citations | RequestCitationsConfig | nullable | |
| context | string | length ≥ 1 · nullable | |
| source* | Base64PDFSource | PlainTextSource | ContentBlockSource | … | ||
| title | string | length ≥ 1 · length ≤ 500 · nullable | |
| type* | const | "document" |
RequestEncryptedCodeExecutionResultBlockobject
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* | RequestCodeExecutionOutputBlock[] | ||
| encrypted_stdout* | string | ||
| return_code* | integer | ||
| stderr* | string | ||
| type* | const | "encrypted_code_execution_result… |
RequestImageBlockobject
| cache_control | CacheControlEphemeral | Create a cache control breakpoint at this content block. | nullable |
| source* | Base64ImageSource | URLImageSource | FileImageSource | ||
| transformations | RequestImageTransformations | 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" |
RequestImageTransformationsobject
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 |
RequestPageLocationCitationobject
| 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" |
RequestRedactedThinkingBlockobject
| 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" |
RequestSearchResultBlockobject
| cache_control | CacheControlEphemeral | Create a cache control breakpoint at this content block. | nullable |
| citations | RequestCitationsConfig | ||
| content* | RequestTextBlock[] | ||
| source* | string | ||
| title* | string | ||
| type* | const | "search_result" |
RequestSearchResultLocationCitationobject
| 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" |
RequestServerToolUseBlockobject
| cache_control | CacheControlEphemeral | Create a cache control breakpoint at this content block. | nullable |
| caller | DirectCaller | ServerToolCaller | ServerToolCaller_20260120 | ||
| id* | string | ||
| input* | object | ||
| name* | enum | web_search | web_fetch | code_execution | bash_code_execution | text_editor_code_execution | tool_search_tool_regex · +1 more | |
| type* | const | "server_tool_use" |
RequestTextBlockobject
| cache_control | CacheControlEphemeral | Create a cache control breakpoint at this content block. | nullable |
| citations | RequestCharLocationCitation | RequestPageLocationCitation | RequestContentBlockLocationCitation[] | nullable | |
| text* | string | length ≥ 1 | |
| type* | const | "text" |
RequestTextEditorCodeExecutionCreateResultBlockobject
| is_file_update* | boolean | ||
| type* | const | "text_editor_code_execution_crea… |
RequestTextEditorCodeExecutionStrReplaceResultBlockobject
| 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_… |
RequestTextEditorCodeExecutionToolResultBlockobject
| cache_control | CacheControlEphemeral | 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… |
RequestTextEditorCodeExecutionToolResultErrorobject
| 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… |
RequestTextEditorCodeExecutionViewResultBlockobject
| 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… |
RequestThinkingBlockobject
| 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" |
RequestToolReferenceBlockobject
Tool reference block that can be included in tool_result content.
| cache_control | CacheControlEphemeral | Create a cache control breakpoint at this content block. | nullable |
| tool_name* | string | length ≥ 1 · length ≤ 256 | |
| type* | const | "tool_reference" |
RequestToolResultBlockobject
| cache_control | CacheControlEphemeral | Create a cache control breakpoint at this content block. | nullable |
| content | string | RequestTextBlock | RequestImageBlock | RequestSearchResultBlock[] | ||
| 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" |
RequestToolSearchToolResultBlockobject
| cache_control | CacheControlEphemeral | Create a cache control breakpoint at this content block. | nullable |
| content* | RequestToolSearchToolResultError | RequestToolSearchToolSearchResultBlock | ||
| tool_use_id* | string | ||
| type* | const | "tool_search_tool_result" |
RequestToolSearchToolResultErrorobject
| error_code* | enum | invalid_tool_input | unavailable | too_many_requests | execution_time_exceeded | |
| error_message | string | nullable | |
| type* | const | "tool_search_tool_result_error" |
RequestToolSearchToolSearchResultBlockobject
| tool_references* | RequestToolReferenceBlock[] | ||
| type* | const | "tool_search_tool_search_result" |
RequestToolUseBlockobject
| cache_control | CacheControlEphemeral | 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" |
RequestWebFetchResultBlockobject
| content* | RequestDocumentBlock | ||
| retrieved_at | string | ISO 8601 timestamp when the content was retrieved | nullable |
| type* | const | "web_fetch_result" | |
| url* | string | Fetched content URL |
RequestWebFetchToolResultBlockobject
| cache_control | CacheControlEphemeral | 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" |
RequestWebFetchToolResultErrorobject
| 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" |
RequestWebSearchResultBlockobject
| encrypted_content* | string | ||
| page_age | string | nullable | |
| title* | string | ||
| type* | const | "web_search_result" | |
| url* | string |
RequestWebSearchResultLocationCitationobject
| cited_text* | string | ||
| encrypted_index* | string | ||
| title* | string | length ≥ 1 · length ≤ 512 · nullable | |
| type* | const | "web_search_result_location" | |
| url* | string | length ≥ 1 |
RequestWebSearchToolResultBlockobject
| cache_control | CacheControlEphemeral | Create a cache control breakpoint at this content block. | nullable |
| caller | DirectCaller | ServerToolCaller | ServerToolCaller_20260120 | ||
| content* | RequestWebSearchResultBlock[] | RequestWebSearchToolResultError | ||
| tool_use_id* | string | ||
| type* | const | "web_search_tool_result" |
RequestWebSearchToolResultErrorobject
| 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" |
ServerToolCallerobject
Tool invocation generated by a server-side tool.
| tool_id* | string | ||
| type* | const | "code_execution_20250825" |
ServerToolCaller_20260120object
| tool_id* | string | ||
| type* | const | "code_execution_20260120" |
Speedenum
standard | fast
SystemInputMessageobject
| content* | string | RequestTextBlock[] | ||
| role* | const | "system" |
TextEditor_20250124object
| allowed_callers | AllowedCaller[] | ||
| cache_control | CacheControlEphemeral | 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" |
TextEditor_20250429object
| allowed_callers | AllowedCaller[] | ||
| cache_control | CacheControlEphemeral | 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" |
TextEditor_20250728object
| allowed_callers | AllowedCaller[] | ||
| cache_control | CacheControlEphemeral | 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" |
TextEditorCodeExecutionToolResultErrorCodeenum
invalid_tool_input | unavailable | too_many_requests | execution_time_exceeded | file_not_found
ThinkingConfigAdaptiveobject
| 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 · nullable |
| type* | const | "adaptive" |
ThinkingConfigBetweenToolsobject
| type* | const | "between_tools" |
ThinkingConfigDisabledobject
| type* | const | "disabled" |
ThinkingConfigEnabledobject
| 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 · nullable |
| type* | const | "enabled" |
ThinkingConfigParamThinkingConfigEnabled | ThinkingConfigDisabled | ThinkingConfigBetweenTools | …
Configuration for Claude's thinking.
ThinkingDisplayModeenum
summarized | omitted
Toolobject
| type | const | "custom" · nullable | |
| description | string | Description of what this tool does. | |
| name* | string | Name of the tool. | length ≥ 1 · length ≤ 128 |
| input_schema* | InputSchema | [JSON schema](https://json-schema.org/draft/2020-12) for this tool's input. | |
| cache_control | CacheControlEphemeral | 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 | AllowedCaller[] | ||
| 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[] |
ToolChoiceToolChoiceAuto | 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.
ToolChoiceAnyobject
The model will use any available tools.
| disable_parallel_tool_use | boolean | Whether to disable parallel tool use. | |
| type* | const | "any" |
ToolChoiceAutoobject
The model will automatically decide whether to use tools.
| disable_parallel_tool_use | boolean | Whether to disable parallel tool use. | |
| type* | const | "auto" |
ToolChoiceNoneobject
The model will not be allowed to use tools.
| type* | const | "none" |
ToolChoiceToolobject
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" |
ToolSearchToolBM25_20251119object
| allowed_callers | AllowedCaller[] | ||
| cache_control | CacheControlEphemeral | 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 |
ToolSearchToolRegex_20251119object
| allowed_callers | AllowedCaller[] | ||
| cache_control | CacheControlEphemeral | 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 |
ToolSearchToolResultErrorCodeenum
invalid_tool_input | unavailable | too_many_requests | execution_time_exceeded
URLImageSourceobject
| type* | const | "url" | |
| url* | string |
URLPDFSourceobject
| type* | const | "url" | |
| url* | string |
UserInputMessageobject
| content* | string | InputContentBlock[] | ||
| role* | const | "user" |
UserLocationobject
| 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" |
WebFetchTool_20250910object
| allowed_callers | AllowedCaller[] | ||
| allowed_domains | string[] | List of domains to allow fetching from | nullable |
| blocked_domains | string[] | List of domains to block fetching from | nullable |
| cache_control | CacheControlEphemeral | Create a cache control breakpoint at this content block. | nullable |
| citations | RequestCitationsConfig | 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 | WebFetchUrlSources | Which sources contribute to the set of URLs web fetch may fetch. | nullable |
WebFetchTool_20260209object
| allowed_callers | AllowedCaller[] | ||
| allowed_domains | string[] | List of domains to allow fetching from | nullable |
| blocked_domains | string[] | List of domains to block fetching from | nullable |
| cache_control | CacheControlEphemeral | Create a cache control breakpoint at this content block. | nullable |
| citations | RequestCitationsConfig | 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 | WebFetchUrlSources | Which sources contribute to the set of URLs web fetch may fetch. | nullable |
WebFetchTool_20260309object
Web fetch tool with use_cache parameter for bypassing cached content.
| allowed_callers | AllowedCaller[] | ||
| allowed_domains | string[] | List of domains to allow fetching from | nullable |
| blocked_domains | string[] | List of domains to block fetching from | nullable |
| cache_control | CacheControlEphemeral | Create a cache control breakpoint at this content block. | nullable |
| citations | RequestCitationsConfig | 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 | WebFetchUrlSources | 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. |
WebFetchTool_20260318object
| allowed_callers | AllowedCaller[] | ||
| allowed_domains | string[] | List of domains to allow fetching from | nullable |
| blocked_domains | string[] | List of domains to block fetching from | nullable |
| cache_control | CacheControlEphemeral | Create a cache control breakpoint at this content block. | nullable |
| citations | RequestCitationsConfig | 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 | WebFetchUrlSources | 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. |
WebFetchToolResultErrorCodeenum
invalid_tool_input | url_too_long | url_not_allowed | url_not_in_prior_context | url_not_accessible | unsupported_content_type · +4 more
WebFetchUrlSourceAllobject
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" |
WebFetchUrlSourceExceptobject
The tool filter variant under which every result but the named tools' contributes.
| tools* | WebFetchUrlSourceToolReference[] | ||
| type* | const | "except" |
WebFetchUrlSourceNoneobject
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" |
WebFetchUrlSourceOnlyobject
The tool filter variant under which only the named tools' results contribute.
| tools* | WebFetchUrlSourceToolReference[] | ||
| type* | const | "only" |
WebFetchUrlSourcesobject
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". |
WebFetchUrlSourceToolReferenceobject
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" |
WebSearchTool_20250305object
| allowed_callers | AllowedCaller[] | ||
| 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 | CacheControlEphemeral | 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 | UserLocation | Parameters for the user's location. Used to provide more relevant search results. | nullable |
WebSearchTool_20260209object
| allowed_callers | AllowedCaller[] | ||
| 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 | CacheControlEphemeral | 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 | UserLocation | Parameters for the user's location. Used to provide more relevant search results. | nullable |
WebSearchTool_20260318object
| allowed_callers | AllowedCaller[] | ||
| 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 | CacheControlEphemeral | 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 | UserLocation | Parameters for the user's location. Used to provide more relevant search results. | nullable |
WebSearchToolResultErrorCodeenum
invalid_tool_input | unavailable | max_uses_exceeded | too_many_requests | query_too_long | request_too_large
Validate a payload
before you spend tokens$ curl -X POST https://modelschemas.com/v1/validate \
-d '{"provider":"anthropic","endpointId":"v1/messages/count_tokens","payload":{…}}'
→ {"valid": false, "errors": [{"path": "#", "keyword": "required", …}]}