Claude Platform Docs

Messages

Create a Message
$ ant messages create
POST/v1/messages

Send a structured list of input messages with text and/or image content, and the model will generate the next message in the conversation.

Count tokens in a Message
$ ant messages count-tokens
POST/v1/messages/count_tokens

Count the number of tokens in a Message.

Models
base64_image_source: object{ type: "base64", data, media_type }
type: "base64"
data: string
formatbyte
media_type: "image/jpeg" or "image/png" or "image/gif" or "image/webp"
One of the following:
"image/jpeg"
"image/png"
"image/gif"
"image/webp"
base64_pdf_source: object{ type: "base64", data, media_type }
type: "base64"
data: string
formatbyte
media_type: "application/pdf"
bash_code_execution_output_block: object{ type: "bash_code_execution_output", file_id }
type: "bash_code_execution_output"
file_id: string
bash_code_execution_output_block_param: object{ type: "bash_code_execution_output", file_id }
type: "bash_code_execution_output"
file_id: string
bash_code_execution_result_block: object{ type: "bash_code_execution_result", content, return_code, 2 more }
type: "bash_code_execution_result"
content: array of BashCodeExecutionOutputBlock { type: "bash_code_execution_output", file_id }
type: "bash_code_execution_output"
file_id: string
return_code: number
stderr: string
stdout: string
bash_code_execution_result_block_param: object{ type: "bash_code_execution_result", content, return_code, 2 more }
type: "bash_code_execution_result"
content: array of BashCodeExecutionOutputBlockParam { type: "bash_code_execution_output", file_id }
type: "bash_code_execution_output"
file_id: string
return_code: number
stderr: string
stdout: string
bash_code_execution_tool_result_block: object{ type: "bash_code_execution_tool_result", content, tool_use_id }
bash_code_execution_tool_result_block_param: object{ type: "bash_code_execution_tool_result", content, tool_use_id, cache_control }
bash_code_execution_tool_result_error: object{ type: "bash_code_execution_tool_result_error", error_code }
type: "bash_code_execution_tool_result_error"
error_code: "invalid_tool_input" or "unavailable" or "too_many_requests" or 2 more
One of the following:
"invalid_tool_input"
"unavailable"
"too_many_requests"
"execution_time_exceeded"
"output_file_too_large"
bash_code_execution_tool_result_error_code: "invalid_tool_input" or "unavailable" or "too_many_requests" or 2 more
"invalid_tool_input"
"unavailable"
"too_many_requests"
"execution_time_exceeded"
"output_file_too_large"
bash_code_execution_tool_result_error_param: object{ type: "bash_code_execution_tool_result_error", error_code }
type: "bash_code_execution_tool_result_error"
error_code: "invalid_tool_input" or "unavailable" or "too_many_requests" or 2 more
One of the following:
"invalid_tool_input"
"unavailable"
"too_many_requests"
"execution_time_exceeded"
"output_file_too_large"
browser_click_target: BrowserCoordinateTarget or BrowserRefTarget

Where to act: either a viewport coordinate or an element reference.

browser_coordinate_target: object{ type: "coordinate", x, y }

A point in the browser viewport, in viewport pixels (the same frame as a full-viewport screenshot).

type: "coordinate"
x: number

Pixels from the left edge of the viewport.

minimum0
y: number

Pixels from the top edge of the viewport.

minimum0
browser_ref_target: object{ type: "ref", ref }

An element on the page, identified by a reference from a prior read_page or find result. References are scoped to the tab that produced them and become stale after navigation or a major re-render.

type: "ref"
ref: string

An element reference (e.g. "ref_7") returned by a prior read_page or find result.

browser_close_tab_config: object{ defer_loading, enabled }

close_tab's config overrides.

defer_loading: optional boolean

Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

enabled: optional 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.

browser_close_tab_input: object{ tab_id }

Close the tab with the given tab_id.

tab_id: string

The tab to close.

browser_close_tab_tool_use_block: object{ type: "tool_use", id, caller, 3 more }
browser_coordinate_target: object{ type: "coordinate", x, y }

A point in the browser viewport, in viewport pixels (the same frame as a full-viewport screenshot).

type: "coordinate"
x: number

Pixels from the left edge of the viewport.

minimum0
y: number

Pixels from the top edge of the viewport.

minimum0
browser_double_click_config: object{ defer_loading, enabled }

double_click's config overrides.

defer_loading: optional boolean

Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

enabled: optional 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.

browser_double_click_input: object{ target, modifiers, tab_id }

Double left-click at a viewport coordinate or on an element by reference.

browser_double_click_tool_use_block: object{ type: "tool_use", id, caller, 3 more }
browser_file_upload_config: object{ defer_loading, enabled }

file_upload's config overrides.

defer_loading: optional boolean

Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

enabled: optional 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.

browser_file_upload_input: object{ target, document_ids, paths, tab_id }

Set the value of a file-input element to one or more files. The target must be an element reference; at least one of paths or document_ids is required.

target: object{ type: "ref", ref }

An element on the page, identified by a reference from a prior read_page or find result. References are scoped to the tab that produced them and become stale after navigation or a major re-render.

type: "ref"
ref: string

An element reference (e.g. "ref_7") returned by a prior read_page or find result.

document_ids: optional array of string

References to files the harness has staged, for deployments where the browser executor cannot read the caller's filesystem.

minItems1
paths: optional array of string

File paths on the browser executor's filesystem.

minItems1
tab_id: optional string

Tab to act on. Defaults to the active tab when omitted.

browser_file_upload_tool_use_block: object{ type: "tool_use", id, caller, 3 more }
browser_find_config: object{ defer_loading, enabled }

find's config overrides.

defer_loading: optional boolean

Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

enabled: optional 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.

browser_find_input: object{ query, tab_id }

Find elements matching a natural-language description (e.g. "search bar", "add to cart button") and return up to 20 matches with element references.

query: string

Natural-language description of the element(s) to find.

tab_id: optional string

Tab to act on. Defaults to the active tab when omitted.

browser_find_tool_use_block: object{ type: "tool_use", id, caller, 3 more }
browser_form_input_config: object{ defer_loading, enabled }

form_input's config overrides.

defer_loading: optional boolean

Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

enabled: optional 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.

browser_form_input_input: object{ target, value, tab_id }

Set the value of a form element (input, textarea, select, checkbox). Use a boolean for checkboxes, an option value or text for selects.

target: object{ type: "ref", ref }

An element on the page, identified by a reference from a prior read_page or find result. References are scoped to the tab that produced them and become stale after navigation or a major re-render.

type: "ref"
ref: string

An element reference (e.g. "ref_7") returned by a prior read_page or find result.

value: string or number or boolean

The value to set.

One of the following:
union_member_0: string
union_member_1: number
union_member_2: boolean
tab_id: optional string

Tab to act on. Defaults to the active tab when omitted.

browser_form_input_tool_use_block: object{ type: "tool_use", id, caller, 3 more }
browser_form_input_value: string or number or boolean
union_member_0: string
union_member_1: number
union_member_2: boolean
browser_get_page_text_config: object{ defer_loading, enabled }

get_page_text's config overrides.

defer_loading: optional boolean

Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

enabled: optional 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.

browser_get_page_text_input: object{ tab_id }

Return the page's visible text content as plain text, prioritizing article content. Suited to articles, documentation, and other text-heavy pages.

tab_id: optional string

Tab to act on. Defaults to the active tab when omitted.

browser_get_page_text_tool_use_block: object{ type: "tool_use", id, caller, 3 more }
browser_hold_key_config: object{ defer_loading, enabled }

hold_key's config overrides.

defer_loading: optional boolean

Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

enabled: optional 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.

browser_hold_key_input: object{ duration, text, tab_id }

Hold a key or key chord down for a duration, then release it. Uses the same key names and "+" chord syntax as the key action.

duration: number

Seconds to hold the key down (maximum 30).

minimum0
maximum30
text: string

The key or chord to hold.

tab_id: optional string

Tab to act on. Defaults to the active tab when omitted.

browser_hold_key_tool_use_block: object{ type: "tool_use", id, caller, 3 more }
browser_hover_config: object{ defer_loading, enabled }

hover's config overrides.

defer_loading: optional boolean

Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

enabled: optional 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.

browser_hover_input: object{ target, tab_id }

Move the cursor to a coordinate or element without clicking.

browser_hover_tool_use_block: object{ type: "tool_use", id, caller, 3 more }
browser_javascript_exec_config: object{ defer_loading, enabled }

javascript_exec's config overrides.

defer_loading: optional boolean

Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

enabled: optional 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.

browser_javascript_exec_input: object{ text, tab_id }

Execute JavaScript in the page context and return the value of the last expression. The code runs with access to the DOM, window, and page variables. Write the expression you want evaluated — do NOT use return.

text: string

JavaScript to execute in the page context.

tab_id: optional string

Tab to act on. Defaults to the active tab when omitted.

browser_javascript_exec_tool_use_block: object{ type: "tool_use", id, caller, 3 more }
browser_key_config: object{ defer_loading, enabled }

key's config overrides.

defer_loading: optional boolean

Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

enabled: optional 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.

browser_key_input: object{ text, repeat, tab_id }

Press a key or key chord. Use "+" to combine modifiers with a key (e.g. "ctrl+a", "cmd+shift+p") and space to sequence presses (e.g. "Backspace Backspace Delete"). Common names like "Return", "Tab", "Escape", "BackSpace" are supported.

text: string

The key, chord, or space-separated sequence to press.

repeat: optional number

Number of times to repeat. Default 1.

minimum1
maximum100
tab_id: optional string

Tab to act on. Defaults to the active tab when omitted.

browser_key_tool_use_block: object{ type: "tool_use", id, caller, 3 more }
browser_left_click_config: object{ defer_loading, enabled }

left_click's config overrides.

defer_loading: optional boolean

Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

enabled: optional 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.

browser_left_click_drag_config: object{ defer_loading, enabled }

left_click_drag's config overrides.

defer_loading: optional boolean

Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

enabled: optional 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.

browser_left_click_drag_input: object{ from, target, tab_id }

Press at from, drag to target, release. Both must be coordinate targets.

browser_left_click_drag_tool_use_block: object{ type: "tool_use", id, caller, 3 more }
browser_left_click_input: object{ target, modifiers, tab_id }

Left-click at a viewport coordinate or on an element by reference.

browser_left_click_tool_use_block: object{ type: "tool_use", id, caller, 3 more }
browser_left_mouse_down_config: object{ defer_loading, enabled }

left_mouse_down's config overrides.

defer_loading: optional boolean

Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

enabled: optional 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.

browser_left_mouse_down_input: object{ target, tab_id }

Press and hold the left mouse button at a viewport coordinate. Pair with left_mouse_up to perform a custom drag.

target: object{ type: "coordinate", x, y }

A point in the browser viewport, in viewport pixels (the same frame as a full-viewport screenshot).

type: "coordinate"
x: number

Pixels from the left edge of the viewport.

minimum0
y: number

Pixels from the top edge of the viewport.

minimum0
tab_id: optional string

Tab to act on. Defaults to the active tab when omitted.

browser_left_mouse_down_tool_use_block: object{ type: "tool_use", id, caller, 3 more }
browser_left_mouse_up_config: object{ defer_loading, enabled }

left_mouse_up's config overrides.

defer_loading: optional boolean

Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

enabled: optional 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.

browser_left_mouse_up_input: object{ target, tab_id }

Release the left mouse button at a viewport coordinate.

target: object{ type: "coordinate", x, y }

A point in the browser viewport, in viewport pixels (the same frame as a full-viewport screenshot).

type: "coordinate"
x: number

Pixels from the left edge of the viewport.

minimum0
y: number

Pixels from the top edge of the viewport.

minimum0
tab_id: optional string

Tab to act on. Defaults to the active tab when omitted.

browser_left_mouse_up_tool_use_block: object{ type: "tool_use", id, caller, 3 more }
browser_list_tabs_config: object{ defer_loading, enabled }

list_tabs's config overrides.

defer_loading: optional boolean

Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

enabled: optional 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.

browser_list_tabs_input: object{  }

List all open tabs with each tab's tab_id, title, and URL.

browser_list_tabs_tool_use_block: object{ type: "tool_use", id, caller, 3 more }
browser_middle_click_config: object{ defer_loading, enabled }

middle_click's config overrides.

defer_loading: optional boolean

Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

enabled: optional 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.

browser_middle_click_input: object{ target, modifiers, tab_id }

Middle-click at a viewport coordinate or on an element by reference.

browser_middle_click_tool_use_block: object{ type: "tool_use", id, caller, 3 more }
browser_mouse_move_config: object{ defer_loading, enabled }

mouse_move's config overrides.

defer_loading: optional boolean

Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

enabled: optional 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.

browser_mouse_move_input: object{ target, tab_id }

Move the pointer to a viewport coordinate without clicking.

target: object{ type: "coordinate", x, y }

A point in the browser viewport, in viewport pixels (the same frame as a full-viewport screenshot).

type: "coordinate"
x: number

Pixels from the left edge of the viewport.

minimum0
y: number

Pixels from the top edge of the viewport.

minimum0
tab_id: optional string

Tab to act on. Defaults to the active tab when omitted.

browser_mouse_move_tool_use_block: object{ type: "tool_use", id, caller, 3 more }
browser_navigate_config: object{ defer_loading, enabled }

navigate's config overrides.

defer_loading: optional boolean

Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

enabled: optional 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.

browser_navigate_input: object{ url, tab_id }

Navigate to a URL, or go back/forward/reload in history. The protocol may be omitted (defaults to https://).

url: string

The URL to navigate to, or "back" / "forward" / "reload" for history navigation.

tab_id: optional string

Tab to act on. Defaults to the active tab when omitted.

browser_navigate_tool_use_block: object{ type: "tool_use", id, caller, 3 more }
browser_new_tab_config: object{ defer_loading, enabled }

new_tab's config overrides.

defer_loading: optional boolean

Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

enabled: optional 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.

browser_new_tab_input: object{  }

Open a new empty tab and return its tab_id.

browser_new_tab_tool_use_block: object{ type: "tool_use", id, caller, 3 more }
browser_read_console_config: object{ defer_loading, enabled }

read_console's config overrides.

defer_loading: optional boolean

Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

enabled: optional 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.

browser_read_console_input: object{ tab_id }

Return console output (log entries, errors, warnings) accumulated since the driver attached to the tab and since the last read, one line per entry. An empty result does not mean no traffic for a tab that predates attach.

tab_id: optional string

Tab to act on. Defaults to the active tab when omitted.

browser_read_console_tool_use_block: object{ type: "tool_use", id, caller, 3 more }
browser_read_network_config: object{ defer_loading, enabled }

read_network's config overrides.

defer_loading: optional boolean

Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

enabled: optional 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.

browser_read_network_input: object{ tab_id }

Return the network requests (method, URL, status, MIME type, timing) recorded since the driver attached to the tab and since the last read, one line per entry. An empty result does not mean no traffic for a tab that predates attach.

tab_id: optional string

Tab to act on. Defaults to the active tab when omitted.

browser_read_network_tool_use_block: object{ type: "tool_use", id, caller, 3 more }
browser_read_page_config: object{ defer_loading, enabled }

read_page's config overrides.

defer_loading: optional boolean

Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

enabled: optional 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.

browser_read_page_filter: "all" or "interactive"
"all"
"interactive"
browser_read_page_input: object{ depth, filter, ref, tab_id }

Return a structured accessibility tree of the page (or the subtree rooted at ref), with element references like [ref_7] that can be used as targets on later actions. Output is capped at 50,000 characters — narrow with ref or a smaller depth when exceeded.

depth: optional number

Maximum tree depth. Default 15.

minimum1
filter: optional "all" or "interactive"

Which elements to include. Omitted: every visible element. "interactive": interactive elements only. "all": additionally includes off-viewport elements.

One of the following:
"all"
"interactive"
ref: optional string

Element reference to read a subtree from. Omit to read from the page root.

tab_id: optional string

Tab to act on. Defaults to the active tab when omitted.

browser_read_page_tool_use_block: object{ type: "tool_use", id, caller, 3 more }
browser_ref_target: object{ type: "ref", ref }

An element on the page, identified by a reference from a prior read_page or find result. References are scoped to the tab that produced them and become stale after navigation or a major re-render.

type: "ref"
ref: string

An element reference (e.g. "ref_7") returned by a prior read_page or find result.

browser_right_click_config: object{ defer_loading, enabled }

right_click's config overrides.

defer_loading: optional boolean

Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

enabled: optional 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.

browser_right_click_input: object{ target, modifiers, tab_id }

Right-click at a viewport coordinate or on an element by reference.

browser_right_click_tool_use_block: object{ type: "tool_use", id, caller, 3 more }
browser_screenshot_config: object{ defer_loading, enabled }

screenshot's config overrides.

defer_loading: optional boolean

Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

enabled: optional 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.

browser_screenshot_input: object{ tab_id }

Capture the current browser viewport.

tab_id: optional string

Tab to act on. Defaults to the active tab when omitted.

browser_screenshot_tool_use_block: object{ type: "tool_use", id, caller, 3 more }
browser_scroll_config: object{ defer_loading, enabled }

scroll's config overrides.

defer_loading: optional boolean

Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

enabled: optional 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.

browser_scroll_direction: "up" or "down" or "left" or "right"
"up"
"down"
"left"
"right"
browser_scroll_input: object{ scroll_direction, target, scroll_amount, tab_id }

Scroll at a viewport position. target must be a coordinate target.

scroll_direction: "up" or "down" or "left" or "right"
One of the following:
"up"
"down"
"left"
"right"
target: object{ type: "coordinate", x, y }

A point in the browser viewport, in viewport pixels (the same frame as a full-viewport screenshot).

type: "coordinate"
x: number

Pixels from the left edge of the viewport.

minimum0
y: number

Pixels from the top edge of the viewport.

minimum0
scroll_amount: optional number

Scroll-wheel notches (1–10). Default 3.

minimum1
maximum10
tab_id: optional string

Tab to act on. Defaults to the active tab when omitted.

browser_scroll_to_config: object{ defer_loading, enabled }

scroll_to's config overrides.

defer_loading: optional boolean

Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

enabled: optional 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.

browser_scroll_to_input: object{ target, tab_id }

Scroll an element into view.

target: object{ type: "ref", ref }

An element on the page, identified by a reference from a prior read_page or find result. References are scoped to the tab that produced them and become stale after navigation or a major re-render.

type: "ref"
ref: string

An element reference (e.g. "ref_7") returned by a prior read_page or find result.

tab_id: optional string

Tab to act on. Defaults to the active tab when omitted.

browser_scroll_to_tool_use_block: object{ type: "tool_use", id, caller, 3 more }
browser_scroll_tool_use_block: object{ type: "tool_use", id, caller, 3 more }
browser_state_block_param: object{ type: "browser_state", tabs, cache_control, state_changes }

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.

At most one per tool_result, only on a non-error result answering a browser toolset member tool_use. The server renders the model-visible text from it; the model never sees the raw fields.

browser_state_change_download_completed: object{ type: "download_completed", download_id, url, 2 more }

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 result).

type: "download_completed"
download_id: string

The caller-assigned identifier for this download, stable across the state changes reporting it.

minLength1
maxLength4096
pattern^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$
url: string

The final post-redirect URL the download was served from.

maxLength4096
pattern^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$
path: optional 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.

maxLength4096
pattern^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$
size_bytes: optional number

The completed download's size.

minimum0
browser_state_change_download_failed: object{ type: "download_failed", download_id, url, error }

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

type: "download_failed"
download_id: string

The caller-assigned identifier for this download, stable across the state changes reporting it.

minLength1
maxLength4096
pattern^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$
url: string

The final post-redirect URL the download was served from.

maxLength4096
pattern^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$
error: optional string

The failure or cancellation detail, when known.

maxLength4096
pattern^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$
browser_state_change_download_started: object{ type: "download_started", download_id, url }

A file download that started during this call.

type: "download_started"
download_id: string

The caller-assigned identifier for this download, stable across the state changes reporting it.

minLength1
maxLength4096
pattern^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$
url: string

The final post-redirect URL the download was served from.

maxLength4096
pattern^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$
browser_state_change_tab_opened: object{ type: "tab_opened", tab_id }

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

Carries only the tab_id; the tab's title and url live on its tabs entry, which must include the same tab_id. A tab opened during a failed call gets no deferred tab_opened; it simply appears in the next result's tabs inventory.

type: "tab_opened"
tab_id: string

The tab_id of the opened tab, present in tabs.

minLength1
maxLength4096
pattern^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$
browser_state_tab_entry: object{ tab_id, title, url, active }

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

tab_id is the caller-assigned identifier for the tab; title and url describe the page the tab is currently showing and may be empty strings (a blank tab legitimately has both empty). active marks the tab that is active after this call; whenever tabs is non-empty, exactly one entry is marked.

tab_id: string

The caller-assigned identifier for this tab, unique within the inventory.

minLength1
maxLength4096
pattern^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$
title: string

The title of the page the tab is showing. May be empty.

maxLength4096
pattern^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$
url: string

The URL of the page the tab is showing. May be empty.

maxLength4096
pattern^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$
active: optional boolean

Whether this tab is the active tab after this call. Whenever tabs is non-empty, exactly one entry is marked active: true.

browser_switch_tab_config: object{ defer_loading, enabled }

switch_tab's config overrides.

defer_loading: optional boolean

Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

enabled: optional 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.

browser_switch_tab_input: object{ tab_id }

Make the tab with the given tab_id the active tab — the tab that actions without a tab_id apply to.

tab_id: string

The tab to switch to.

browser_switch_tab_tool_use_block: object{ type: "tool_use", id, caller, 3 more }
browser_toolset_20260801: object{ type: "browser_toolset_20260801", cache_control, configs }

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.

browser_toolset_configs: object{ type, close_tab, double_click, 28 more }

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 absent. Unknown keys are rejected: the field set is this toolset version's complete member set.

browser_triple_click_config: object{ defer_loading, enabled }

triple_click's config overrides.

defer_loading: optional boolean

Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

enabled: optional 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.

browser_triple_click_input: object{ target, modifiers, tab_id }

Triple left-click at a viewport coordinate or on an element by reference (typically selects a line or paragraph).

browser_triple_click_tool_use_block: object{ type: "tool_use", id, caller, 3 more }
browser_type_config: object{ defer_loading, enabled }

type's config overrides.

defer_loading: optional boolean

Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

enabled: optional 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.

browser_type_input: object{ text, tab_id }

Type a literal string at the current focus.

text: string

The text to type.

tab_id: optional string

Tab to act on. Defaults to the active tab when omitted.

browser_type_tool_use_block: object{ type: "tool_use", id, caller, 3 more }
browser_wait_config: object{ defer_loading, enabled }

wait's config overrides.

defer_loading: optional boolean

Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

enabled: optional 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.

browser_wait_input: object{ duration, tab_id }

Pause for the given duration.

duration: number

Seconds to wait (maximum 30).

minimum0
maximum30
tab_id: optional string

Tab to act on. Defaults to the active tab when omitted.

browser_wait_tool_use_block: object{ type: "tool_use", id, caller, 3 more }
browser_zoom_config: object{ defer_loading, enabled }

zoom's config overrides.

defer_loading: optional boolean

Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

enabled: optional 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.

browser_zoom_input: object{ region, tab_id }

Return a cropped screenshot of the given viewport region, scaled up for closer inspection — useful for small icons, buttons, or text. Coordinates are in the same viewport-pixel space as a full screenshot.

region: array of number

[x0, y0, x1, y1] in viewport pixels.

minItems4
maxItems4
tab_id: optional string

Tab to act on. Defaults to the active tab when omitted.

browser_zoom_tool_use_block: object{ type: "tool_use", id, caller, 3 more }
cache_control_ephemeral: object{ type: "ephemeral", ttl }
type: "ephemeral"
ttl: optional "5m" or "1h"

The time-to-live for the cache control breakpoint.

This may be one the following values:

  • 5m: 5 minutes
  • 1h: 1 hour

Defaults to 5m. See prompt caching pricing for details.

One of the following:
"5m"
"1h"
cache_creation: object{ ephemeral_1h_input_tokens, ephemeral_5m_input_tokens }
ephemeral_1h_input_tokens: number

The number of input tokens used to create the 1 hour cache entry.

minimum0
ephemeral_5m_input_tokens: number

The number of input tokens used to create the 5 minute cache entry.

minimum0
cache_miss_messages_changed: object{ type: "messages_changed", cache_missed_input_tokens }
type: "messages_changed"
cache_missed_input_tokens: number

Approximate number of input tokens that would have been read from cache had the prefix matched the previous request.

cache_miss_model_changed: object{ type: "model_changed", cache_missed_input_tokens }
type: "model_changed"
cache_missed_input_tokens: number

Approximate number of input tokens that would have been read from cache had the prefix matched the previous request.

cache_miss_previous_message_not_found: object{ type: "previous_message_not_found" }
type: "previous_message_not_found"
cache_miss_system_changed: object{ type: "system_changed", cache_missed_input_tokens }
type: "system_changed"
cache_missed_input_tokens: number

Approximate number of input tokens that would have been read from cache had the prefix matched the previous request.

cache_miss_tools_changed: object{ type: "tools_changed", cache_missed_input_tokens }
type: "tools_changed"
cache_missed_input_tokens: number

Approximate number of input tokens that would have been read from cache had the prefix matched the previous request.

cache_miss_unavailable: object{ type: "unavailable" }
type: "unavailable"
citation_char_location: object{ type: "char_location", cited_text, document_index, 4 more }
type: "char_location"
cited_text: string
document_index: number
minimum0
document_title: string
end_char_index: number
file_id: string
start_char_index: number
minimum0
citation_char_location_param: object{ type: "char_location", cited_text, document_index, 3 more }
type: "char_location"
cited_text: string
document_index: number
minimum0
document_title: string
minLength1
maxLength500
end_char_index: number
start_char_index: number
minimum0
citation_content_block_location: object{ type: "content_block_location", cited_text, document_index, 4 more }
type: "content_block_location"
cited_text: string

The full text of the cited block range, concatenated.

Always equals the contents of content[start_block_index:end_block_index] joined together. The text block is the minimal citable unit; this field is never a substring of a single block. Not counted toward output tokens, and not counted toward input tokens when sent back in subsequent turns.

document_index: number
minimum0
document_title: string
end_block_index: number

Exclusive 0-based end index of the cited block range in the source's content array.

Always greater than start_block_index; a single-block citation has end_block_index = start_block_index + 1.

file_id: string
start_block_index: number

0-based index of the first cited block in the source's content array.

minimum0
citation_content_block_location_param: object{ type: "content_block_location", cited_text, document_index, 3 more }
type: "content_block_location"
cited_text: string

The full text of the cited block range, concatenated.

Always equals the contents of content[start_block_index:end_block_index] joined together. The text block is the minimal citable unit; this field is never a substring of a single block. Not counted toward output tokens, and not counted toward input tokens when sent back in subsequent turns.

document_index: number
minimum0
document_title: string
minLength1
maxLength500
end_block_index: number

Exclusive 0-based end index of the cited block range in the source's content array.

Always greater than start_block_index; a single-block citation has end_block_index = start_block_index + 1.

start_block_index: number

0-based index of the first cited block in the source's content array.

minimum0
citation_page_location: object{ type: "page_location", cited_text, document_index, 4 more }
type: "page_location"
cited_text: string
document_index: number
minimum0
document_title: string
end_page_number: number
file_id: string
start_page_number: number
minimum1
citation_page_location_param: object{ type: "page_location", cited_text, document_index, 3 more }
type: "page_location"
cited_text: string
document_index: number
minimum0
document_title: string
minLength1
maxLength500
end_page_number: number
start_page_number: number
minimum1
citation_search_result_location_param: object{ type: "search_result_location", cited_text, end_block_index, 4 more }
type: "search_result_location"
cited_text: string

The full text of the cited block range, concatenated.

Always equals the contents of content[start_block_index:end_block_index] joined together. The text block is the minimal citable unit; this field is never a substring of a single block. Not counted toward output tokens, and not counted toward input tokens when sent back in subsequent turns.

end_block_index: number

Exclusive 0-based end index of the cited block range in the source's content array.

Always greater than start_block_index; a single-block citation has end_block_index = start_block_index + 1.

search_result_index: number

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.

Counted separately from document_index; server-side web search results are not included in this count.

minimum0
source: string
start_block_index: number

0-based index of the first cited block in the source's content array.

minimum0
title: string
citation_web_search_result_location_param: object{ type: "web_search_result_location", cited_text, encrypted_index, 2 more }
type: "web_search_result_location"
cited_text: string
encrypted_index: string
title: string
minLength1
maxLength512
url: string
minLength1
citations_config: object{ enabled }
enabled: boolean
citations_config_param: object{ enabled }
enabled: optional boolean
citations_delta: object{ type: "citations_delta", citation }
citations_search_result_location: object{ type: "search_result_location", cited_text, end_block_index, 4 more }
type: "search_result_location"
cited_text: string

The full text of the cited block range, concatenated.

Always equals the contents of content[start_block_index:end_block_index] joined together. The text block is the minimal citable unit; this field is never a substring of a single block. Not counted toward output tokens, and not counted toward input tokens when sent back in subsequent turns.

end_block_index: number

Exclusive 0-based end index of the cited block range in the source's content array.

Always greater than start_block_index; a single-block citation has end_block_index = start_block_index + 1.

search_result_index: number

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.

Counted separately from document_index; server-side web search results are not included in this count.

minimum0
source: string
start_block_index: number

0-based index of the first cited block in the source's content array.

minimum0
title: string
citations_web_search_result_location: object{ type: "web_search_result_location", cited_text, encrypted_index, 2 more }
type: "web_search_result_location"
cited_text: string
encrypted_index: string
title: string
maxLength512
url: string
code_execution_output_block: object{ type: "code_execution_output", file_id }
type: "code_execution_output"
file_id: string
code_execution_output_block_param: object{ type: "code_execution_output", file_id }
type: "code_execution_output"
file_id: string
code_execution_result_block: object{ type: "code_execution_result", content, return_code, 2 more }
type: "code_execution_result"
content: array of CodeExecutionOutputBlock { type: "code_execution_output", file_id }
type: "code_execution_output"
file_id: string
return_code: number
stderr: string
stdout: string
code_execution_result_block_param: object{ type: "code_execution_result", content, return_code, 2 more }
type: "code_execution_result"
content: array of CodeExecutionOutputBlockParam { type: "code_execution_output", file_id }
type: "code_execution_output"
file_id: string
return_code: number
stderr: string
stdout: string
code_execution_tool_20250522: object{ type: "code_execution_20250522", name, allowed_callers, 3 more }
code_execution_tool_20250825: object{ type: "code_execution_20250825", name, allowed_callers, 3 more }
code_execution_tool_20260120: object{ type: "code_execution_20260120", name, allowed_callers, 3 more }

Code execution tool with REPL state persistence (daemon mode + gVisor checkpoint).

code_execution_tool_20260521: object{ type: "code_execution_20260521", name, allowed_callers, 3 more }

Code execution tool with REPL state persistence.

code_execution_tool_result_block: object{ type: "code_execution_tool_result", content, tool_use_id }
code_execution_tool_result_block_param: object{ type: "code_execution_tool_result", content, tool_use_id, cache_control }
code_execution_tool_result_error: object{ type: "code_execution_tool_result_error", error_code }
type: "code_execution_tool_result_error"
error_code: "invalid_tool_input" or "unavailable" or "too_many_requests" or "execution_time_exceeded"
One of the following:
"invalid_tool_input"
"unavailable"
"too_many_requests"
"execution_time_exceeded"
code_execution_tool_result_error_code: "invalid_tool_input" or "unavailable" or "too_many_requests" or "execution_time_exceeded"
"invalid_tool_input"
"unavailable"
"too_many_requests"
"execution_time_exceeded"
code_execution_tool_result_error_param: object{ type: "code_execution_tool_result_error", error_code }
type: "code_execution_tool_result_error"
error_code: "invalid_tool_input" or "unavailable" or "too_many_requests" or "execution_time_exceeded"
One of the following:
"invalid_tool_input"
"unavailable"
"too_many_requests"
"execution_time_exceeded"
computer_cursor_position_config: object{ defer_loading, enabled }

cursor_position's config overrides.

defer_loading: optional boolean

Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

enabled: optional 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.

computer_cursor_position_input: object{  }

Get the current (x, y) pixel coordinate of the cursor.

computer_cursor_position_tool_use_block: object{ type: "tool_use", id, caller, 3 more }
computer_double_click_config: object{ defer_loading, enabled }

double_click's config overrides.

defer_loading: optional boolean

Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

enabled: optional 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.

computer_double_click_input: object{ coordinate, text }

Double-click the left mouse button at the specified (x, y) pixel coordinate, or the current cursor position if coordinate is omitted.

coordinate: optional array of number

(x, y): x pixels from the left edge, y pixels from the top edge.

minItems2
maxItems2
text: optional string

Optional key combination to hold down during this action (e.g. "ctrl", "shift", "ctrl+shift").

computer_double_click_tool_use_block: object{ type: "tool_use", id, caller, 3 more }
computer_hold_key_config: object{ defer_loading, enabled }

hold_key's config overrides.

defer_loading: optional boolean

Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

enabled: optional 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.

computer_hold_key_input: object{ duration, text }

Hold down a key or key-combination for a specified duration. Uses the same key syntax as key.

duration: number

Duration to hold the key, in seconds.

maximum300
text: string

The key or key-combination to hold.

computer_hold_key_tool_use_block: object{ type: "tool_use", id, caller, 3 more }
computer_key_config: object{ defer_loading, enabled }

key's config overrides.

defer_loading: optional boolean

Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

enabled: optional 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.

computer_key_input: object{ text, repeat }

Press a key or key-combination on the keyboard. Use "+" to combine modifiers with a key (e.g. "ctrl+s", "alt+Tab", "ctrl+shift+Escape"). Key names are case-insensitive; common names like "Return", "Tab", "Escape", "Up", "Down", "Left", "Right", "Home", "End", "Page_Up", "Page_Down", "Delete", "BackSpace" are supported.

text: string

The key or key-combination to press.

repeat: optional number

Number of times to repeat the key press. Default is 1.

minimum1
maximum100
computer_key_tool_use_block: object{ type: "tool_use", id, caller, 3 more }
computer_left_click_config: object{ defer_loading, enabled }

left_click's config overrides.

defer_loading: optional boolean

Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

enabled: optional 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.

computer_left_click_drag_config: object{ defer_loading, enabled }

left_click_drag's config overrides.

defer_loading: optional boolean

Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

enabled: optional 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.

computer_left_click_drag_input: object{ coordinate, start_coordinate, text }

Click and drag the cursor from start_coordinate to coordinate.

coordinate: array of number

(x, y): x pixels from the left edge, y pixels from the top edge.

minItems2
maxItems2
start_coordinate: array of number

(x, y): x pixels from the left edge, y pixels from the top edge.

minItems2
maxItems2
text: optional string

Optional key combination to hold down during this action (e.g. "ctrl", "shift", "ctrl+shift").

computer_left_click_drag_tool_use_block: object{ type: "tool_use", id, caller, 3 more }
computer_left_click_input: object{ coordinate, text }

Click the left mouse button at the specified (x, y) pixel coordinate, or the current cursor position if coordinate is omitted.

coordinate: optional array of number

(x, y): x pixels from the left edge, y pixels from the top edge.

minItems2
maxItems2
text: optional string

Optional key combination to hold down during this action (e.g. "ctrl", "shift", "ctrl+shift").

computer_left_click_tool_use_block: object{ type: "tool_use", id, caller, 3 more }
computer_left_mouse_down_config: object{ defer_loading, enabled }

left_mouse_down's config overrides.

defer_loading: optional boolean

Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

enabled: optional 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.

computer_left_mouse_down_input: object{  }

Press and hold the left mouse button at the current cursor position.

computer_left_mouse_down_tool_use_block: object{ type: "tool_use", id, caller, 3 more }
computer_left_mouse_up_config: object{ defer_loading, enabled }

left_mouse_up's config overrides.

defer_loading: optional boolean

Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

enabled: optional 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.

computer_left_mouse_up_input: object{  }

Release the left mouse button.

computer_left_mouse_up_tool_use_block: object{ type: "tool_use", id, caller, 3 more }
computer_middle_click_config: object{ defer_loading, enabled }

middle_click's config overrides.

defer_loading: optional boolean

Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

enabled: optional 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.

computer_middle_click_input: object{ coordinate, text }

Click the middle mouse button at the specified (x, y) pixel coordinate, or the current cursor position if coordinate is omitted.

coordinate: optional array of number

(x, y): x pixels from the left edge, y pixels from the top edge.

minItems2
maxItems2
text: optional string

Optional key combination to hold down during this action (e.g. "ctrl", "shift", "ctrl+shift").

computer_middle_click_tool_use_block: object{ type: "tool_use", id, caller, 3 more }
computer_mouse_move_config: object{ defer_loading, enabled }

mouse_move's config overrides.

defer_loading: optional boolean

Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

enabled: optional 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.

computer_mouse_move_input: object{ coordinate }

Move the cursor to a specified (x, y) pixel coordinate. Use this ONLY to hover without clicking; otherwise use a click action directly.

coordinate: array of number

(x, y): x pixels from the left edge, y pixels from the top edge.

minItems2
maxItems2
computer_mouse_move_tool_use_block: object{ type: "tool_use", id, caller, 3 more }
computer_right_click_config: object{ defer_loading, enabled }

right_click's config overrides.

defer_loading: optional boolean

Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

enabled: optional 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.

computer_right_click_input: object{ coordinate, text }

Click the right mouse button at the specified (x, y) pixel coordinate, or the current cursor position if coordinate is omitted.

coordinate: optional array of number

(x, y): x pixels from the left edge, y pixels from the top edge.

minItems2
maxItems2
text: optional string

Optional key combination to hold down during this action (e.g. "ctrl", "shift", "ctrl+shift").

computer_right_click_tool_use_block: object{ type: "tool_use", id, caller, 3 more }
computer_screenshot_config: object{ defer_loading, enabled }

screenshot's config overrides.

defer_loading: optional boolean

Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

enabled: optional 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.

computer_screenshot_input: object{  }

Take a screenshot of the screen.

computer_screenshot_tool_use_block: object{ type: "tool_use", id, caller, 3 more }
computer_scroll_config: object{ defer_loading, enabled }

scroll's config overrides.

defer_loading: optional boolean

Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

enabled: optional 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.

computer_scroll_direction: "up" or "down" or "left" or "right"
"up"
"down"
"left"
"right"
computer_scroll_input: object{ scroll_amount, scroll_direction, coordinate, text }

Scroll the screen at the specified (x, y) pixel coordinate, or the current cursor position if coordinate is omitted. Do NOT use PageUp/PageDown to scroll.

scroll_amount: number

Number of 'clicks' of the scroll wheel.

scroll_direction: "up" or "down" or "left" or "right"
One of the following:
"up"
"down"
"left"
"right"
coordinate: optional array of number

(x, y): x pixels from the left edge, y pixels from the top edge.

minItems2
maxItems2
text: optional string

Optional key combination to hold down during this action (e.g. "ctrl", "shift", "ctrl+shift").

computer_scroll_tool_use_block: object{ type: "tool_use", id, caller, 3 more }
computer_toolset_20260801: object{ type: "computer_toolset_20260801", cache_control, configs }

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 included. The single-tool options display_number and enable_zoom are not fields of a toolset entry — it carries only type, configs, and cache_control; zoom is controlled via configs.zoom.enabled.

computer_toolset_configs: object{ type, cursor_position, double_click, 14 more }

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 absent. Unknown keys are rejected: the field set is this toolset version's complete member set.

computer_triple_click_config: object{ defer_loading, enabled }

triple_click's config overrides.

defer_loading: optional boolean

Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

enabled: optional 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.

computer_triple_click_input: object{ coordinate, text }

Triple-click the left mouse button at the specified (x, y) pixel coordinate, or the current cursor position if coordinate is omitted.

coordinate: optional array of number

(x, y): x pixels from the left edge, y pixels from the top edge.

minItems2
maxItems2
text: optional string

Optional key combination to hold down during this action (e.g. "ctrl", "shift", "ctrl+shift").

computer_triple_click_tool_use_block: object{ type: "tool_use", id, caller, 3 more }
computer_type_config: object{ defer_loading, enabled }

type's config overrides.

defer_loading: optional boolean

Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

enabled: optional 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.

computer_type_input: object{ text }

Type a string of text on the keyboard.

text: string

The text to type.

computer_type_tool_use_block: object{ type: "tool_use", id, caller, 3 more }
computer_wait_config: object{ defer_loading, enabled }

wait's config overrides.

defer_loading: optional boolean

Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

enabled: optional 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.

computer_wait_input: object{ duration }

Wait for a specified duration.

duration: number

Duration to wait, in seconds.

maximum300
computer_wait_tool_use_block: object{ type: "tool_use", id, caller, 3 more }
computer_zoom_config: object{ defer_loading, enabled }

zoom's config overrides.

defer_loading: optional boolean

Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

enabled: optional 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.

computer_zoom_input: object{ region }

Take a screenshot of a rectangular region. Region coordinates are in the full-screenshot space (not physical display pixels). The crop is scaled up to fill the image budget so fine details become legible.

region: array of number

(x0, y0, x1, y1): The region to capture.

minItems4
maxItems4
computer_zoom_tool_use_block: object{ type: "tool_use", id, caller, 3 more }
container: object{ id, expires_at, skills }

Information about the container used in the request (for the code execution tool)

id: string

Identifier for the container used in this request

expires_at: string

The time at which the container will expire.

formatdate-time
skills: array of ContainerSkill { type, skill_id, version }

Skills loaded in the container

type: "anthropic" or "custom"

Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined)

One of the following:
"anthropic"
"custom"
skill_id: string

Skill ID

minLength1
maxLength64
version: string

The resolved version: a skill version ID for custom skills.

minLength1
maxLength64
container_params: object{ id, skills }

Container parameters with skills to be loaded.

id: optional string

Container id

skills: optional array of SkillParams { type, skill_id, version }

List of skills to load in the container

maxItems20
type: "anthropic" or "custom"

Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined)

One of the following:
"anthropic"
"custom"
skill_id: string

Skill ID

minLength1
maxLength64
version: optional string

Skill version or 'latest' for most recent version

minLength1
maxLength64
container_skill: object{ type, skill_id, version }

A skill that was loaded in a container (response model).

type: "anthropic" or "custom"

Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined)

One of the following:
"anthropic"
"custom"
skill_id: string

Skill ID

minLength1
maxLength64
version: string

The resolved version: a skill version ID for custom skills.

minLength1
maxLength64
container_upload_block: object{ type: "container_upload", file_id }

Response model for a file uploaded to the container.

type: "container_upload"
file_id: string
container_upload_block_param: object{ type: "container_upload", file_id, cache_control }

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.

type: "container_upload"
file_id: string
cache_control: optional object{ type: "ephemeral", ttl }

Create a cache control breakpoint at this content block.

type: "ephemeral"
ttl: optional "5m" or "1h"

The time-to-live for the cache control breakpoint.

This may be one the following values:

  • 5m: 5 minutes
  • 1h: 1 hour

Defaults to 5m. See prompt caching pricing for details.

One of the following:
"5m"
"1h"
content_block: TextBlock or ThinkingBlock or RedactedThinkingBlock or 9 more
content_block_param: TextBlockParam or ImageBlockParam or DocumentBlockParam or 13 more
content_block_source: object{ type: "content", content }
content_block_source_content: TextBlockParam or ImageBlockParam
diagnostics: object{ cache_miss_reason }

Request-level diagnostics: why the prompt cache could not fully reuse the prefix of the request named by diagnostics.previous_message_id.

diagnostics_param: object{ previous_message_id }

Request-level diagnostics. Currently carries the previous response id for prompt-cache divergence reporting.

previous_message_id: optional 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.

maxLength256
direct_caller: object{ type: "direct" }

Tool invocation directly from the model.

type: "direct"
document_block: object{ type: "document", citations, source, title }
document_block_param: object{ type: "document", source, cache_control, 3 more }
encrypted_code_execution_result_block: object{ type: "encrypted_code_execution_result", content, encrypted_stdout, 2 more }

Code execution result with encrypted stdout for PFC + web_search results.

type: "encrypted_code_execution_result"
content: array of CodeExecutionOutputBlock { type: "code_execution_output", file_id }
type: "code_execution_output"
file_id: string
encrypted_stdout: string
return_code: number
stderr: string
encrypted_code_execution_result_block_param: object{ type: "encrypted_code_execution_result", content, encrypted_stdout, 2 more }

Code execution result with encrypted stdout for PFC + web_search results.

type: "encrypted_code_execution_result"
content: array of CodeExecutionOutputBlockParam { type: "code_execution_output", file_id }
type: "code_execution_output"
file_id: string
encrypted_stdout: string
return_code: number
stderr: string
file_document_source: object{ type: "file", file_id }
type: "file"
file_id: string
file_image_source: object{ type: "file", file_id }
type: "file"
file_id: string
image_block_param: object{ type: "image", source, cache_control, transformations }
image_transformations_param: object{ oversized_image }

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 object is equivalent to omitting the field.

oversized_image: optional "downsize" or "error"

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 naming the image's dimensions and the largest dimensions that fit, so you can scale the image deliberately — your image is never silently scaled down.

One of the following:
"downsize"
"error"
input_json_delta: object{ type: "input_json_delta", partial_json }
type: "input_json_delta"
partial_json: string
json_output_format: object{ type: "json_schema", schema }
type: "json_schema"
schema: map[unknown]

The JSON schema of the format

memory_tool_20250818: object{ type: "memory_20250818", name, allowed_callers, 4 more }
message: object{ type: "message", id, container, 8 more }
message_count_tokens_tool: Tool or ToolBash20250124 or CodeExecutionTool20250522 or 18 more
message_create_params_container: ContainerParams or string

Container identifier for reuse across requests.

container_params: object{ id, skills }

Container parameters with skills to be loaded.

id: optional string

Container id

skills: optional array of SkillParams { type, skill_id, version }

List of skills to load in the container

maxItems20
type: "anthropic" or "custom"

Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined)

One of the following:
"anthropic"
"custom"
skill_id: string

Skill ID

minLength1
maxLength64
version: optional string

Skill version or 'latest' for most recent version

minLength1
maxLength64
union_member_1: string
message_delta_usage: object{ cache_creation_input_tokens, cache_read_input_tokens, input_tokens, 3 more }
message_param: object{ content, role }
message_tokens_count: object{ input_tokens }
input_tokens: number

The total number of tokens across the provided list of messages, system prompt, and tools.

metadata: object{ user_id }
user_id: optional 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.

maxLength512
output_config: object{ effort, format }
effort: optional "low" or "medium" or "high" or 2 more

How much effort the model should put into its response. Higher effort levels may result in more thorough analysis but take longer.

Valid values are low, medium, high, xhigh, or max.

One of the following:
"low"
"medium"
"high"
"xhigh"
"max"
format: optional object{ type: "json_schema", schema }

A schema to specify Claude's output format in responses. See structured outputs

type: "json_schema"
schema: map[unknown]

The JSON schema of the format

output_tokens_details: object{ thinking_tokens }
thinking_tokens: number

Number of output tokens the model generated as internal reasoning, including the thinking-block delimiter tokens.

Reflects the raw reasoning the model produced, not the (possibly shorter) summarized thinking text returned in the response body. Computed by re-tokenizing the raw reasoning text, so it may differ from the model's exact generation count by a small number of tokens. Always ≤ output_tokens; output_tokens - thinking_tokens approximates the non-reasoning output.

minimum0
plain_text_source: object{ type: "text", data, media_type }
type: "text"
data: string
media_type: "text/plain"
raw_content_block_delta: TextDelta or InputJSONDelta or CitationsDelta or 2 more
raw_content_block_delta_event: object{ type: "content_block_delta", delta, index }
raw_content_block_start_event: object{ type: "content_block_start", content_block, index }
raw_content_block_stop_event: object{ type: "content_block_stop", index }
type: "content_block_stop"
index: number
raw_message_delta_event: object{ type: "message_delta", delta, usage }
raw_message_start_event: object{ type: "message_start", message }
raw_message_stop_event: object{ type: "message_stop" }
type: "message_stop"
raw_message_stream_event: RawMessageStartEvent or RawMessageDeltaEvent or RawMessageStopEvent or 3 more
redacted_thinking_block: object{ type: "redacted_thinking", data }
type: "redacted_thinking"
data: string

The contents of this redacted thinking block, returned when portions of the model's thinking were safety-redacted. This field is opaque and encrypted, with no readable content.

Pass redacted_thinking blocks back to the API unchanged when continuing a multi-turn conversation.

See extended thinking for details.

redacted_thinking_block_param: object{ type: "redacted_thinking", data }
type: "redacted_thinking"
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.

refusal_stop_details: object{ type: "refusal", category, explanation }

Structured information about a refusal.

type: "refusal"
category: "cyber" or "bio" or "frontier_llm" or 2 more

The policy category that triggered the refusal.

null when the refusal doesn't map to a named category.

One of the following:
"cyber"

The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category.

"bio"

The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category.

"frontier_llm"

The request could assist the development of competing AI models, which is restricted under Anthropic's commercial terms. Benign machine learning work can also trigger this category.

"reasoning_extraction"

The request asks the model to reproduce its internal reasoning in the response text. To get reasoning in a structured form instead, use adaptive thinking.

"general_harms"

The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category.

explanation: string

Human-readable explanation of the refusal.

This text is not guaranteed to be stable. null when no explanation is available for the category.

search_result_block_param: object{ type: "search_result", content, source, 3 more }
server_tool_caller: object{ type: "code_execution_20250825", tool_id }

Tool invocation generated by a server-side tool.

type: "code_execution_20250825"
tool_id: string
pattern^srvtoolu_[a-zA-Z0-9_]+$
server_tool_caller_20260120: object{ type: "code_execution_20260120", tool_id }
type: "code_execution_20260120"
tool_id: string
pattern^srvtoolu_[a-zA-Z0-9_]+$
server_tool_usage: object{ web_fetch_requests, web_search_requests }
web_fetch_requests: number

The number of web fetch tool requests.

minimum0
web_search_requests: number

The number of web search tool requests.

minimum0
server_tool_use_block: object{ type: "server_tool_use", id, caller, 2 more }
server_tool_use_block_param: object{ type: "server_tool_use", id, input, 3 more }
signature_delta: object{ type: "signature_delta", signature }
type: "signature_delta"
signature: string

The signature for this thinking block: an opaque value used to verify that the block was generated by Claude when it is passed back to the API. Delivered in a signature_delta event just before the block's content_block_stop event.

skill_params: object{ type, skill_id, version }

Specification for a skill to be loaded in a container (request model).

type: "anthropic" or "custom"

Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined)

One of the following:
"anthropic"
"custom"
skill_id: string

Skill ID

minLength1
maxLength64
version: optional string

Skill version or 'latest' for most recent version

minLength1
maxLength64
stop_reason: "end_turn" or "max_tokens" or "stop_sequence" or 4 more
"end_turn"
"max_tokens"
"stop_sequence"
"tool_use"
"pause_turn"
"refusal"
"model_context_window_exceeded"
text_block: object{ type: "text", citations, text }
text_block_param: object{ type: "text", text, cache_control, citations }
text_delta: object{ type: "text_delta", text }
type: "text_delta"
text: string
text_editor_code_execution_create_result_block: object{ type: "text_editor_code_execution_create_result", is_file_update }
type: "text_editor_code_execution_create_result"
is_file_update: boolean
text_editor_code_execution_create_result_block_param: object{ type: "text_editor_code_execution_create_result", is_file_update }
type: "text_editor_code_execution_create_result"
is_file_update: boolean
text_editor_code_execution_str_replace_result_block: object{ type: "text_editor_code_execution_str_replace_result", lines, new_lines, 3 more }
type: "text_editor_code_execution_str_replace_result"
lines: array of string
new_lines: number
new_start: number
old_lines: number
old_start: number
text_editor_code_execution_str_replace_result_block_param: object{ type: "text_editor_code_execution_str_replace_result", lines, new_lines, 3 more }
type: "text_editor_code_execution_str_replace_result"
lines: optional array of string
new_lines: optional number
new_start: optional number
old_lines: optional number
old_start: optional number
text_editor_code_execution_tool_result_block: object{ type: "text_editor_code_execution_tool_result", content, tool_use_id }
text_editor_code_execution_tool_result_block_param: object{ type: "text_editor_code_execution_tool_result", content, tool_use_id, cache_control }
text_editor_code_execution_tool_result_error: object{ type: "text_editor_code_execution_tool_result_error", error_code, error_message }
type: "text_editor_code_execution_tool_result_error"
error_code: "invalid_tool_input" or "unavailable" or "too_many_requests" or 2 more
One of the following:
"invalid_tool_input"
"unavailable"
"too_many_requests"
"execution_time_exceeded"
"file_not_found"
error_message: string
text_editor_code_execution_tool_result_error_code: "invalid_tool_input" or "unavailable" or "too_many_requests" or 2 more
"invalid_tool_input"
"unavailable"
"too_many_requests"
"execution_time_exceeded"
"file_not_found"
text_editor_code_execution_tool_result_error_param: object{ type: "text_editor_code_execution_tool_result_error", error_code, error_message }
type: "text_editor_code_execution_tool_result_error"
error_code: "invalid_tool_input" or "unavailable" or "too_many_requests" or 2 more
One of the following:
"invalid_tool_input"
"unavailable"
"too_many_requests"
"execution_time_exceeded"
"file_not_found"
error_message: optional string
text_editor_code_execution_view_result_block: object{ type: "text_editor_code_execution_view_result", content, file_type, 3 more }
type: "text_editor_code_execution_view_result"
content: string
file_type: "text" or "image" or "pdf"
One of the following:
"text"
"image"
"pdf"
num_lines: number
start_line: number
total_lines: number
text_editor_code_execution_view_result_block_param: object{ type: "text_editor_code_execution_view_result", content, file_type, 3 more }
type: "text_editor_code_execution_view_result"
content: string
file_type: "text" or "image" or "pdf"
One of the following:
"text"
"image"
"pdf"
num_lines: optional number
start_line: optional number
total_lines: optional number
thinking_block: object{ type: "thinking", signature, thinking }
type: "thinking"
signature: string

A value used to verify that this thinking block was generated by Claude when it is passed back to the API.

This is an opaque field and should not be interpreted or parsed. When passing thinking blocks back to the API (required when using tools with extended thinking), pass them back exactly as received, with this field intact.

See extended thinking for details.

thinking: string

The text of Claude's thinking process for this block.

thinking_block_param: object{ type: "thinking", signature, thinking }
type: "thinking"
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 blocks must be passed back unmodified and in their original order; a modified block results in a 400 invalid_request_error.

thinking: string

The thinking text of this block as returned by the API.

thinking_config_adaptive: object{ type: "adaptive", display }
type: "adaptive"
display: optional "summarized" or "omitted"

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.

One of the following:
"summarized"
"omitted"
thinking_config_between_tools: object{ type: "between_tools" }
type: "between_tools"
thinking_config_disabled: object{ type: "disabled" }
type: "disabled"
thinking_config_enabled: object{ type: "enabled", budget_tokens, display }
type: "enabled"
budget_tokens: number

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.

Must be ≥1024 and less than max_tokens.

See extended thinking for details.

minimum1024
display: optional "summarized" or "omitted"

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.

One of the following:
"summarized"
"omitted"

Configuration for Claude's thinking.

With {"type": "adaptive"}, Claude decides when and how much to think. With {"type": "enabled"} (manual extended thinking), you set a budget_tokens of at least 1,024. Thinking tokens count toward your max_tokens limit.

Which type values are accepted, and what happens when you omit thinking, depend on the model. See thinking for each model's behavior.

thinking_delta: object{ type: "thinking_delta", thinking }
type: "thinking_delta"
thinking: string

The incremental thinking text for this content block. Concatenate the thinking values of successive thinking_delta events to assemble the block's full thinking value.

tool: object{ type: "custom", input_schema, name, 7 more }
tool_bash_20250124: object{ type: "bash_20250124", name, allowed_callers, 4 more }

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.

tool_choice_any: object{ type: "any", disable_parallel_tool_use }

The model will use any available tools.

type: "any"
disable_parallel_tool_use: optional boolean

Whether to disable parallel tool use.

Defaults to false. If set to true, the model will output exactly one tool use.

tool_choice_auto: object{ type: "auto", disable_parallel_tool_use }

The model will automatically decide whether to use tools.

type: "auto"
disable_parallel_tool_use: optional boolean

Whether to disable parallel tool use.

Defaults to false. If set to true, the model will output at most one tool use.

tool_choice_none: object{ type: "none" }

The model will not be allowed to use tools.

type: "none"
tool_choice_tool: object{ type: "tool", name, disable_parallel_tool_use }

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

type: "tool"
name: string

The name of the tool to use.

disable_parallel_tool_use: optional boolean

Whether to disable parallel tool use.

Defaults to false. If set to true, the model will output exactly one tool use.

tool_reference_block: object{ type: "tool_reference", tool_name }
type: "tool_reference"
tool_name: string
minLength1
maxLength256
pattern^[a-zA-Z0-9_-]{1,256}$
tool_reference_block_param: object{ type: "tool_reference", tool_name, cache_control }

Tool reference block that can be included in tool_result content.

type: "tool_reference"
tool_name: string
minLength1
maxLength256
pattern^[a-zA-Z0-9_-]{1,256}$
cache_control: optional object{ type: "ephemeral", ttl }

Create a cache control breakpoint at this content block.

type: "ephemeral"
ttl: optional "5m" or "1h"

The time-to-live for the cache control breakpoint.

This may be one the following values:

  • 5m: 5 minutes
  • 1h: 1 hour

Defaults to 5m. See prompt caching pricing for details.

One of the following:
"5m"
"1h"
tool_result_block_param: object{ type: "tool_result", tool_use_id, cache_control, 3 more }
tool_search_tool_bm25_20251119: object{ type, name, allowed_callers, 3 more }
tool_search_tool_regex_20251119: object{ type, name, allowed_callers, 3 more }
tool_search_tool_result_block: object{ type: "tool_search_tool_result", content, tool_use_id }
tool_search_tool_result_block_param: object{ type: "tool_search_tool_result", content, tool_use_id, cache_control }
tool_search_tool_result_error: object{ type: "tool_search_tool_result_error", error_code, error_message }
type: "tool_search_tool_result_error"
error_code: "invalid_tool_input" or "unavailable" or "too_many_requests" or "execution_time_exceeded"
One of the following:
"invalid_tool_input"
"unavailable"
"too_many_requests"
"execution_time_exceeded"
error_message: string
tool_search_tool_result_error_code: "invalid_tool_input" or "unavailable" or "too_many_requests" or "execution_time_exceeded"
"invalid_tool_input"
"unavailable"
"too_many_requests"
"execution_time_exceeded"
tool_search_tool_result_error_param: object{ type: "tool_search_tool_result_error", error_code, error_message }
type: "tool_search_tool_result_error"
error_code: "invalid_tool_input" or "unavailable" or "too_many_requests" or "execution_time_exceeded"
One of the following:
"invalid_tool_input"
"unavailable"
"too_many_requests"
"execution_time_exceeded"
error_message: optional string
tool_search_tool_search_result_block: object{ type: "tool_search_tool_search_result", tool_references }
type: "tool_search_tool_search_result"
tool_references: array of ToolReferenceBlock { type: "tool_reference", tool_name }
type: "tool_reference"
tool_name: string
minLength1
maxLength256
pattern^[a-zA-Z0-9_-]{1,256}$
tool_search_tool_search_result_block_param: object{ type: "tool_search_tool_search_result", tool_references }
tool_text_editor_20250124: object{ type: "text_editor_20250124", name, allowed_callers, 4 more }
tool_text_editor_20250429: object{ type: "text_editor_20250429", name, allowed_callers, 4 more }
tool_text_editor_20250728: object{ type: "text_editor_20250728", name, allowed_callers, 5 more }
tool_union: Tool or ToolBash20250124 or CodeExecutionTool20250522 or 18 more
tool_use_block: object{ type: "tool_use", id, caller, 3 more }
tool_use_block_param: object{ type: "tool_use", id, input, 4 more }

Which party invoked the tool call: the model directly, or a server tool on its behalf.

direct_caller: object{ type: "direct" }

Tool invocation directly from the model.

type: "direct"
server_tool_caller: object{ type: "code_execution_20250825", tool_id }

Tool invocation generated by a server-side tool.

type: "code_execution_20250825"
tool_id: string
pattern^srvtoolu_[a-zA-Z0-9_]+$
server_tool_caller_20260120: object{ type: "code_execution_20260120", tool_id }
type: "code_execution_20260120"
tool_id: string
pattern^srvtoolu_[a-zA-Z0-9_]+$
toolset_tool_use_block: BrowserToolUseBlock or ComputerToolUseBlock or ToolUseBlock
url_image_source: object{ type: "url", url }
type: "url"
url: string
url_pdf_source: object{ type: "url", url }
type: "url"
url: string
usage: object{ cache_creation, cache_creation_input_tokens, cache_read_input_tokens, 6 more }
user_location: object{ type: "approximate", city, country, 2 more }
type: "approximate"
city: optional string

The city of the user.

minLength1
maxLength255
country: optional string

The two letter ISO country code of the user.

minLength2
maxLength2
region: optional string

The region of the user.

minLength1
maxLength255
timezone: optional string

The IANA timezone of the user.

minLength1
maxLength255
web_fetch_block: object{ type: "web_fetch_result", content, retrieved_at, url }
web_fetch_block_param: object{ type: "web_fetch_result", content, url, retrieved_at }
web_fetch_tool_20250910: object{ type: "web_fetch_20250910", name, allowed_callers, 9 more }
web_fetch_tool_20260209: object{ type: "web_fetch_20260209", name, allowed_callers, 9 more }
web_fetch_tool_20260309: object{ type: "web_fetch_20260309", name, allowed_callers, 10 more }

Web fetch tool with use_cache parameter for bypassing cached content.

web_fetch_tool_20260318: object{ type: "web_fetch_20260318", name, allowed_callers, 11 more }
web_fetch_tool_result_block: object{ type: "web_fetch_tool_result", caller, content, tool_use_id }
web_fetch_tool_result_block_param: object{ type: "web_fetch_tool_result", content, tool_use_id, 2 more }
web_fetch_tool_result_error_block: object{ type: "web_fetch_tool_result_error", error_code }
type: "web_fetch_tool_result_error"
error_code: "invalid_tool_input" or "url_too_long" or "url_not_allowed" or 7 more
One of the following:
"invalid_tool_input"
"url_too_long"
"url_not_allowed"
"url_not_in_prior_context"
"url_not_accessible"
"unsupported_content_type"
"too_many_requests"
"max_uses_exceeded"
"unavailable"
"content_too_large"
web_fetch_tool_result_error_block_param: object{ type: "web_fetch_tool_result_error", error_code }
type: "web_fetch_tool_result_error"
error_code: "invalid_tool_input" or "url_too_long" or "url_not_allowed" or 7 more
One of the following:
"invalid_tool_input"
"url_too_long"
"url_not_allowed"
"url_not_in_prior_context"
"url_not_accessible"
"unsupported_content_type"
"too_many_requests"
"max_uses_exceeded"
"unavailable"
"content_too_large"
web_fetch_tool_result_error_code: "invalid_tool_input" or "url_too_long" or "url_not_allowed" or 7 more
"invalid_tool_input"
"url_too_long"
"url_not_allowed"
"url_not_in_prior_context"
"url_not_accessible"
"unsupported_content_type"
"too_many_requests"
"max_uses_exceeded"
"unavailable"
"content_too_large"
web_fetch_url_source_all: object{ type: "all" }

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

type: "all"
web_fetch_url_source_except: object{ type: "except", tools }

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

type: "except"
tools: array of WebFetchURLSourceToolReference { type: "tool_reference", name }
type: "tool_reference"
name: string
web_fetch_url_source_none: object{ type: "none" }

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

type: "none"
web_fetch_url_source_only: object{ type: "only", tools }

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

type: "only"
tools: array of WebFetchURLSourceToolReference { type: "tool_reference", name }
type: "tool_reference"
name: string
web_fetch_url_source_tool_reference: object{ type: "tool_reference", name }

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

type: "tool_reference"
name: string
web_fetch_url_sources: object{ client_tool_results, server_tool_results, user_input }

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

Each key is a tagged variant: user_input is all or none; the two tool filters are all, none, only (only the named tools' results) or except (every result but the named tools'). A named tool must be declared in this request's tools[].

web_search_result_block: object{ type: "web_search_result", encrypted_content, page_age, 2 more }
type: "web_search_result"
encrypted_content: string
page_age: string
title: string
url: string
web_search_result_block_param: object{ type: "web_search_result", encrypted_content, title, 2 more }
type: "web_search_result"
encrypted_content: string
title: string
url: string
page_age: optional string
web_search_tool_20250305: object{ type: "web_search_20250305", name, allowed_callers, 7 more }
web_search_tool_20260209: object{ type: "web_search_20260209", name, allowed_callers, 7 more }
web_search_tool_20260318: object{ type: "web_search_20260318", name, allowed_callers, 8 more }
web_search_tool_request_error: object{ type: "web_search_tool_result_error", error_code }
type: "web_search_tool_result_error"
error_code: "invalid_tool_input" or "unavailable" or "max_uses_exceeded" or 3 more
One of the following:
"invalid_tool_input"
"unavailable"
"max_uses_exceeded"
"too_many_requests"
"query_too_long"
"request_too_large"
web_search_tool_result_block: object{ type: "web_search_tool_result", caller, content, tool_use_id }
web_search_tool_result_block_content: WebSearchToolResultError or array of WebSearchResultBlock
web_search_tool_result_block_param: object{ type: "web_search_tool_result", content, tool_use_id, 2 more }
web_search_tool_result_block_param_content: array of WebSearchResultBlockParam or WebSearchToolRequestError
web_search_tool_result_error: object{ type: "web_search_tool_result_error", error_code }
type: "web_search_tool_result_error"
error_code: "invalid_tool_input" or "unavailable" or "max_uses_exceeded" or 3 more
One of the following:
"invalid_tool_input"
"unavailable"
"max_uses_exceeded"
"too_many_requests"
"query_too_long"
"request_too_large"
web_search_tool_result_error_code: "invalid_tool_input" or "unavailable" or "max_uses_exceeded" or 3 more
"invalid_tool_input"
"unavailable"
"max_uses_exceeded"
"too_many_requests"
"query_too_long"
"request_too_large"

MessagesBatches

Create a Message Batch
$ ant messages:batches create
POST/v1/messages/batches

Send a batch of Message creation requests.

Retrieve a Message Batch
$ ant messages:batches retrieve
GET/v1/messages/batches/{message_batch_id}

This endpoint is idempotent and can be used to poll for Message Batch completion. To access the results of a Message Batch, make a request to the results_url field in the response.

List Message Batches
$ ant messages:batches list
GET/v1/messages/batches

List all Message Batches within a Workspace. Most recently created batches are returned first.

Cancel a Message Batch
$ ant messages:batches cancel
POST/v1/messages/batches/{message_batch_id}/cancel

Batches may be canceled any time before processing ends. Once cancellation is initiated, the batch enters a canceling state, at which time the system may complete any in-progress, non-interruptible requests before finalizing cancellation.

Delete a Message Batch
$ ant messages:batches delete
DELETE/v1/messages/batches/{message_batch_id}
Retrieve Message Batch results
$ ant messages:batches results
GET/v1/messages/batches/{message_batch_id}/results

Streams the results of a Message Batch as a .jsonl file.