Messages
Create a Message
Message Messages.Create(parameters, cancellationToken = default)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
MessageTokensCount Messages.CountTokens(parameters, cancellationToken = default)Count the number of tokens in a Message.
Models
class Base64ImageSource { Type = "base64"; Data; MediaType; }
required string Data
required MediaType MediaType
class Base64PdfSource { Type = "base64"; Data; MediaType; }
required string Data
class BashCodeExecutionOutputBlock { Type = "bash_code_execution_output"; FileID; }
class BashCodeExecutionOutputBlockParam { Type = "bash_code_execution_output"; FileID; }
class BashCodeExecutionResultBlock { Type = "bash_code_execution_result"; Content; ReturnCode; /* 2 more */ }
required IReadOnlyList<BashCodeExecutionOutputBlock> Content
class BashCodeExecutionResultBlockParam { Type = "bash_code_execution_result"; Content; ReturnCode; /* 2 more */ }
required IReadOnlyList<BashCodeExecutionOutputBlockParam> Content
class BashCodeExecutionToolResultBlock { Type = "bash_code_execution_tool_result"; Content; ToolUseID; }
class BashCodeExecutionToolResultBlockParam { Type = "bash_code_execution_tool_result"; Content; ToolUseID; CacheControl; }
class BashCodeExecutionToolResultError { Type = "bash_code_execution_tool_result_error"; ErrorCode; }
required BashCodeExecutionToolResultErrorCode ErrorCode
enum BashCodeExecutionToolResultErrorCode
class BashCodeExecutionToolResultErrorParam { Type = "bash_code_execution_tool_result_error"; ErrorCode; }
required BashCodeExecutionToolResultErrorCode ErrorCode
class BrowserCloseTabConfig { DeferLoading; Enabled; }close_tab's config overrides.
close_tab's config overrides.
Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
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.
class BrowserDoubleClickConfig { DeferLoading; Enabled; }double_click's config overrides.
double_click's config overrides.
Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
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.
class BrowserFileUploadConfig { DeferLoading; Enabled; }file_upload's config overrides.
file_upload's config overrides.
Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
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.
class BrowserFindConfig { DeferLoading; Enabled; }find's config overrides.
find's config overrides.
Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
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.
class BrowserFormInputConfig { DeferLoading; Enabled; }form_input's config overrides.
form_input's config overrides.
Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
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.
class BrowserGetPageTextConfig { DeferLoading; Enabled; }get_page_text's config overrides.
get_page_text's config overrides.
Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
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.
class BrowserHoldKeyConfig { DeferLoading; Enabled; }hold_key's config overrides.
hold_key's config overrides.
Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
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.
class BrowserHoverConfig { DeferLoading; Enabled; }hover's config overrides.
hover's config overrides.
Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
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.
class BrowserJavascriptExecConfig { DeferLoading; Enabled; }javascript_exec's config overrides.
javascript_exec's config overrides.
Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
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.
class BrowserKeyConfig { DeferLoading; Enabled; }key's config overrides.
key's config overrides.
Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
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.
class BrowserLeftClickConfig { DeferLoading; Enabled; }left_click's config overrides.
left_click's config overrides.
Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
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.
class BrowserLeftClickDragConfig { DeferLoading; Enabled; }left_click_drag's config overrides.
left_click_drag's config overrides.
Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
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.
class BrowserLeftMouseDownConfig { DeferLoading; Enabled; }left_mouse_down's config overrides.
left_mouse_down's config overrides.
Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
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.
class BrowserLeftMouseUpConfig { DeferLoading; Enabled; }left_mouse_up's config overrides.
left_mouse_up's config overrides.
Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
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.
class BrowserListTabsConfig { DeferLoading; Enabled; }list_tabs's config overrides.
list_tabs's config overrides.
Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
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.
class BrowserMiddleClickConfig { DeferLoading; Enabled; }middle_click's config overrides.
middle_click's config overrides.
Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
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.
class BrowserMouseMoveConfig { DeferLoading; Enabled; }mouse_move's config overrides.
mouse_move's config overrides.
Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
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.
class BrowserNavigateConfig { DeferLoading; Enabled; }navigate's config overrides.
navigate's config overrides.
Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
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.
class BrowserNewTabConfig { DeferLoading; Enabled; }new_tab's config overrides.
new_tab's config overrides.
Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
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.
class BrowserReadConsoleConfig { DeferLoading; Enabled; }read_console's config overrides.
read_console's config overrides.
Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
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.
class BrowserReadNetworkConfig { DeferLoading; Enabled; }read_network's config overrides.
read_network's config overrides.
Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
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.
class BrowserReadPageConfig { DeferLoading; Enabled; }read_page's config overrides.
read_page's config overrides.
Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
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.
class BrowserRightClickConfig { DeferLoading; Enabled; }right_click's config overrides.
right_click's config overrides.
Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
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.
class BrowserScreenshotConfig { DeferLoading; Enabled; }screenshot's config overrides.
screenshot's config overrides.
Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
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.
class BrowserScrollConfig { DeferLoading; Enabled; }scroll's config overrides.
scroll's config overrides.
Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
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.
class BrowserScrollToConfig { DeferLoading; Enabled; }scroll_to's config overrides.
scroll_to's config overrides.
Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
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.
class BrowserStateBlockParam { Type = "browser_state"; Tabs; CacheControl; StateChanges; }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.
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.
class BrowserStateChange: union
class BrowserStateChangeDownloadCompleted { Type = "download_completed"; DownloadID; 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).
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).
required string DownloadIDThe caller-assigned identifier for this download, stable across the state changes reporting it.
The caller-assigned identifier for this download, stable across the state changes reporting it.
required string UrlThe final post-redirect URL the download was served from.
The final post-redirect URL the download was served from.
string? PathWhere 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.
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.
long? SizeBytesThe completed download's size.
The completed download's size.
class BrowserStateChangeDownloadFailed { Type = "download_failed"; DownloadID; Url; Error; }A file download that failed — or was cancelled — during this call.
A file download that failed — or was cancelled — during this call.
required string DownloadIDThe caller-assigned identifier for this download, stable across the state changes reporting it.
The caller-assigned identifier for this download, stable across the state changes reporting it.
required string UrlThe final post-redirect URL the download was served from.
The final post-redirect URL the download was served from.
string? ErrorThe failure or cancellation detail, when known.
The failure or cancellation detail, when known.
class BrowserStateChangeDownloadStarted { Type = "download_started"; DownloadID; Url; }A file download that started during this call.
A file download that started during this call.
required string DownloadIDThe caller-assigned identifier for this download, stable across the state changes reporting it.
The caller-assigned identifier for this download, stable across the state changes reporting it.
required string UrlThe final post-redirect URL the download was served from.
The final post-redirect URL the download was served from.
class BrowserStateChangeTabOpened { Type = "tab_opened"; TabID; }A tab this call's execution opened that remains open at its end —
the creation delta of the tabs inventory, not an event log.
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.
required string TabIDThe tab_id of the opened tab, present in tabs.
The tab_id of the opened tab, present in tabs.
class BrowserStateTabEntry { TabID; Title; Url; Active; }One open browser tab reported in a browser_state block's tabs
inventory.
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.
required string TabIDThe caller-assigned identifier for this tab, unique within the inventory.
The caller-assigned identifier for this tab, unique within the inventory.
required string TitleThe title of the page the tab is showing. May be empty.
The title of the page the tab is showing. May be empty.
required string UrlThe URL of the page the tab is showing. May be empty.
The URL of the page the tab is showing. May be empty.
Whether this tab is the active tab after this call. Whenever tabs is non-empty, exactly one entry is marked active: true.
class BrowserSwitchTabConfig { DeferLoading; Enabled; }switch_tab's config overrides.
switch_tab's config overrides.
Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
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.
class BrowserToolset20260801 { Type = "browser_toolset_20260801"; CacheControl; 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.
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.
CacheControlEphemeral? CacheControlCreate a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
Ttl TtlThe time-to-live for the cache control breakpoint.
The time-to-live for the cache control breakpoint.
This may be one the following values:
5m: 5 minutes1h: 1 hour
Defaults to 5m. See prompt caching pricing for details.
BrowserToolsetConfigs? ConfigsPer-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.
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.
class BrowserToolsetConfigs { Type; CloseTab; DoubleClick; /* 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.
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.
class BrowserTripleClickConfig { DeferLoading; Enabled; }triple_click's config overrides.
triple_click's config overrides.
Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
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.
class BrowserTypeConfig { DeferLoading; Enabled; }type's config overrides.
type's config overrides.
Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
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.
class BrowserWaitConfig { DeferLoading; Enabled; }wait's config overrides.
wait's config overrides.
Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
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.
class BrowserZoomConfig { DeferLoading; Enabled; }zoom's config overrides.
zoom's config overrides.
Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
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.
class CacheControlEphemeral { Type = "ephemeral"; Ttl; }
Ttl TtlThe time-to-live for the cache control breakpoint.
The time-to-live for the cache control breakpoint.
This may be one the following values:
5m: 5 minutes1h: 1 hour
Defaults to 5m. See prompt caching pricing for details.
class CacheCreation { Ephemeral1hInputTokens; Ephemeral5mInputTokens; }
required long Ephemeral1hInputTokensThe number of input tokens used to create the 1 hour cache entry.
The number of input tokens used to create the 1 hour cache entry.
required long Ephemeral5mInputTokensThe number of input tokens used to create the 5 minute cache entry.
The number of input tokens used to create the 5 minute cache entry.
class CitationCharLocation { Type = "char_location"; CitedText; DocumentIndex; /* 4 more */ }
required long DocumentIndex
required long StartCharIndex
class CitationCharLocationParam { Type = "char_location"; CitedText; DocumentIndex; /* 3 more */ }
required long DocumentIndex
required string? DocumentTitle
required long StartCharIndex
class CitationContentBlockLocation { Type = "content_block_location"; CitedText; DocumentIndex; /* 4 more */ }
required string CitedTextThe full text of the cited block range, concatenated.
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.
required long DocumentIndex
required long EndBlockIndexExclusive 0-based end index of the cited block range in the source's content array.
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.
required long StartBlockIndex0-based index of the first cited block in the source's content array.
0-based index of the first cited block in the source's content array.
class CitationContentBlockLocationParam { Type = "content_block_location"; CitedText; DocumentIndex; /* 3 more */ }
required string CitedTextThe full text of the cited block range, concatenated.
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.
required long DocumentIndex
required string? DocumentTitle
required long EndBlockIndexExclusive 0-based end index of the cited block range in the source's content array.
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.
required long StartBlockIndex0-based index of the first cited block in the source's content array.
0-based index of the first cited block in the source's content array.
class CitationPageLocation { Type = "page_location"; CitedText; DocumentIndex; /* 4 more */ }
required long DocumentIndex
required long StartPageNumber
class CitationPageLocationParam { Type = "page_location"; CitedText; DocumentIndex; /* 3 more */ }
required long DocumentIndex
required string? DocumentTitle
required long StartPageNumber
class CitationSearchResultLocationParam { Type = "search_result_location"; CitedText; EndBlockIndex; /* 4 more */ }
required string CitedTextThe full text of the cited block range, concatenated.
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.
required long EndBlockIndexExclusive 0-based end index of the cited block range in the source's content array.
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.
required long SearchResultIndex0-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.
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.
required long StartBlockIndex0-based index of the first cited block in the source's content array.
0-based index of the first cited block in the source's content array.
class CitationWebSearchResultLocationParam { Type = "web_search_result_location"; CitedText; EncryptedIndex; /* 2 more */ }
required string? Title
required string Url
class CitationsConfig { Enabled; }
class CitationsConfigParam { Enabled; }
class CitationsDelta { Type = "citations_delta"; Citation; }
class CitationsSearchResultLocation { Type = "search_result_location"; CitedText; EndBlockIndex; /* 4 more */ }
required string CitedTextThe full text of the cited block range, concatenated.
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.
required long EndBlockIndexExclusive 0-based end index of the cited block range in the source's content array.
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.
required long SearchResultIndex0-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.
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.
required long StartBlockIndex0-based index of the first cited block in the source's content array.
0-based index of the first cited block in the source's content array.
class CitationsWebSearchResultLocation { Type = "web_search_result_location"; CitedText; EncryptedIndex; /* 2 more */ }
required string? Title
class CodeExecutionOutputBlock { Type = "code_execution_output"; FileID; }
class CodeExecutionOutputBlockParam { Type = "code_execution_output"; FileID; }
class CodeExecutionResultBlock { Type = "code_execution_result"; Content; ReturnCode; /* 2 more */ }
required IReadOnlyList<CodeExecutionOutputBlock> Content
class CodeExecutionResultBlockParam { Type = "code_execution_result"; Content; ReturnCode; /* 2 more */ }
required IReadOnlyList<CodeExecutionOutputBlockParam> Content
class CodeExecutionTool20250522 { Type = "code_execution_20250522"; Name; AllowedCallers; /* 3 more */ }
class CodeExecutionTool20250825 { Type = "code_execution_20250825"; Name; AllowedCallers; /* 3 more */ }
class CodeExecutionTool20260120 { Type = "code_execution_20260120"; Name; AllowedCallers; /* 3 more */ }Code execution tool with REPL state persistence (daemon mode + gVisor checkpoint).
Code execution tool with REPL state persistence (daemon mode + gVisor checkpoint).
class CodeExecutionTool20260521 { Type = "code_execution_20260521"; Name; AllowedCallers; /* 3 more */ }Code execution tool with REPL state persistence.
Code execution tool with REPL state persistence.
class CodeExecutionToolResultBlock { Type = "code_execution_tool_result"; Content; ToolUseID; }
required CodeExecutionToolResultBlockContent Content
required string ToolUseID
class CodeExecutionToolResultBlockContent: union
class CodeExecutionToolResultBlockParam { Type = "code_execution_tool_result"; Content; ToolUseID; CacheControl; }
required CodeExecutionToolResultBlockParamContent Content
required string ToolUseID
CacheControlEphemeral? CacheControlCreate a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
Ttl TtlThe time-to-live for the cache control breakpoint.
The time-to-live for the cache control breakpoint.
This may be one the following values:
5m: 5 minutes1h: 1 hour
Defaults to 5m. See prompt caching pricing for details.
class CodeExecutionToolResultBlockParamContent: union
class CodeExecutionToolResultError { Type = "code_execution_tool_result_error"; ErrorCode; }
required CodeExecutionToolResultErrorCode ErrorCode
enum CodeExecutionToolResultErrorCode
class CodeExecutionToolResultErrorParam { Type = "code_execution_tool_result_error"; ErrorCode; }
required CodeExecutionToolResultErrorCode ErrorCode
class ComputerCursorPositionConfig { DeferLoading; Enabled; }cursor_position's config overrides.
cursor_position's config overrides.
Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
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.
class ComputerDoubleClickConfig { DeferLoading; Enabled; }double_click's config overrides.
double_click's config overrides.
Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
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.
class ComputerHoldKeyConfig { DeferLoading; Enabled; }hold_key's config overrides.
hold_key's config overrides.
Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
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.
class ComputerKeyConfig { DeferLoading; Enabled; }key's config overrides.
key's config overrides.
Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
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.
class ComputerLeftClickConfig { DeferLoading; Enabled; }left_click's config overrides.
left_click's config overrides.
Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
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.
class ComputerLeftClickDragConfig { DeferLoading; Enabled; }left_click_drag's config overrides.
left_click_drag's config overrides.
Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
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.
class ComputerLeftMouseDownConfig { DeferLoading; Enabled; }left_mouse_down's config overrides.
left_mouse_down's config overrides.
Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
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.
class ComputerLeftMouseUpConfig { DeferLoading; Enabled; }left_mouse_up's config overrides.
left_mouse_up's config overrides.
Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
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.
class ComputerMiddleClickConfig { DeferLoading; Enabled; }middle_click's config overrides.
middle_click's config overrides.
Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
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.
class ComputerMouseMoveConfig { DeferLoading; Enabled; }mouse_move's config overrides.
mouse_move's config overrides.
Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
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.
class ComputerRightClickConfig { DeferLoading; Enabled; }right_click's config overrides.
right_click's config overrides.
Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
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.
class ComputerScreenshotConfig { DeferLoading; Enabled; }screenshot's config overrides.
screenshot's config overrides.
Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
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.
class ComputerScrollConfig { DeferLoading; Enabled; }scroll's config overrides.
scroll's config overrides.
Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
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.
class ComputerToolset20260801 { Type = "computer_toolset_20260801"; CacheControl; 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.
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.
CacheControlEphemeral? CacheControlCreate a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
Ttl TtlThe time-to-live for the cache control breakpoint.
The time-to-live for the cache control breakpoint.
This may be one the following values:
5m: 5 minutes1h: 1 hour
Defaults to 5m. See prompt caching pricing for details.
ComputerToolsetConfigs? ConfigsPer-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.
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.
class ComputerToolsetConfigs { Type; CursorPosition; DoubleClick; /* 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.
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.
class ComputerTripleClickConfig { DeferLoading; Enabled; }triple_click's config overrides.
triple_click's config overrides.
Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
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.
class ComputerTypeConfig { DeferLoading; Enabled; }type's config overrides.
type's config overrides.
Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
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.
class ComputerWaitConfig { DeferLoading; Enabled; }wait's config overrides.
wait's config overrides.
Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
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.
class ComputerZoomConfig { DeferLoading; Enabled; }zoom's config overrides.
zoom's config overrides.
Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
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.
class Container { ID; ExpiresAt; Skills; }Information about the container used in the request (for the code execution tool)
Information about the container used in the request (for the code execution tool)
Identifier for the container used in this request
required DateTimeOffset ExpiresAtThe time at which the container will expire.
The time at which the container will expire.
required IReadOnlyList<ContainerSkill>? SkillsSkills loaded in the container
Skills loaded in the container
required ContainerSkillType TypeType of skill - either 'anthropic' (built-in) or 'custom' (user-defined)
Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined)
required string SkillIDSkill ID
Skill ID
required string VersionThe resolved version: a skill version ID for custom skills.
The resolved version: a skill version ID for custom skills.
class ContainerParams { ID; Skills; }Container parameters with skills to be loaded.
Container parameters with skills to be loaded.
Container id
IReadOnlyList<SkillParams>? SkillsList of skills to load in the container
List of skills to load in the container
required SkillParamsType TypeType of skill - either 'anthropic' (built-in) or 'custom' (user-defined)
Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined)
required string SkillIDSkill ID
Skill ID
string VersionSkill version or 'latest' for most recent version
Skill version or 'latest' for most recent version
class ContainerSkill { Type; SkillID; Version; }A skill that was loaded in a container (response model).
A skill that was loaded in a container (response model).
required ContainerSkillType TypeType of skill - either 'anthropic' (built-in) or 'custom' (user-defined)
Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined)
required string SkillIDSkill ID
Skill ID
required string VersionThe resolved version: a skill version ID for custom skills.
The resolved version: a skill version ID for custom skills.
class ContainerUploadBlock { Type = "container_upload"; FileID; }Response model for a file uploaded to the container.
Response model for a file uploaded to the container.
class ContainerUploadBlockParam { Type = "container_upload"; FileID; CacheControl; }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.
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.
CacheControlEphemeral? CacheControlCreate a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
Ttl TtlThe time-to-live for the cache control breakpoint.
The time-to-live for the cache control breakpoint.
This may be one the following values:
5m: 5 minutes1h: 1 hour
Defaults to 5m. See prompt caching pricing for details.
class ContentBlock: union
class ContentBlockParam: union
class ContentBlockSource { Type = "content"; Content; }
required Content Content
IReadOnlyList<ContentBlockSourceContent>
class TextBlockParam { Type = "text"; Text; CacheControl; Citations; }
class ImageBlockParam { Type = "image"; Source; CacheControl; Transformations; }
class ContentBlockSourceContent: union
class TextBlockParam { Type = "text"; Text; CacheControl; Citations; }
class ImageBlockParam { Type = "image"; Source; CacheControl; Transformations; }
class DirectCaller { Type = "direct"; }Tool invocation directly from the model.
Tool invocation directly from the model.
class DocumentBlock { Type = "document"; Citations; Source; Title; }
class DocumentBlockParam { Type = "document"; Source; CacheControl; /* 3 more */ }
class EncryptedCodeExecutionResultBlock { Type = "encrypted_code_execution_result"; Content; EncryptedStdout; /* 2 more */ }Code execution result with encrypted stdout for PFC + web_search results.
Code execution result with encrypted stdout for PFC + web_search results.
required IReadOnlyList<CodeExecutionOutputBlock> Content
class EncryptedCodeExecutionResultBlockParam { Type = "encrypted_code_execution_result"; Content; EncryptedStdout; /* 2 more */ }Code execution result with encrypted stdout for PFC + web_search results.
Code execution result with encrypted stdout for PFC + web_search results.
required IReadOnlyList<CodeExecutionOutputBlockParam> Content
class FileDocumentSource { Type = "file"; FileID; }
class FileImageSource { Type = "file"; FileID; }
class ImageBlockParam { Type = "image"; Source; CacheControl; Transformations; }
class ImageTransformationsParam { OversizedImage; }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.
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.
OversizedImage OversizedImageWhat 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.
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.
class InputJsonDelta { Type = "input_json_delta"; PartialJson; }
class JsonOutputFormat { Type = "json_schema"; Schema; }
The JSON schema of the format
class MemoryTool20250818 { Type = "memory_20250818"; Name; AllowedCallers; /* 4 more */ }
class Message { Type = "message"; ID; Container; /* 7 more */ }
class MessageCountTokensTool: union
class MessageCreateParamsContainer: unionContainer identifier for reuse across requests.
Container identifier for reuse across requests.
class ContainerParams { ID; Skills; }Container parameters with skills to be loaded.
Container parameters with skills to be loaded.
Container id
IReadOnlyList<SkillParams>? SkillsList of skills to load in the container
List of skills to load in the container
required SkillParamsType TypeType of skill - either 'anthropic' (built-in) or 'custom' (user-defined)
Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined)
required string SkillIDSkill ID
Skill ID
string VersionSkill version or 'latest' for most recent version
Skill version or 'latest' for most recent version
class MessageDeltaUsage { CacheCreationInputTokens; CacheReadInputTokens; InputTokens; /* 3 more */ }
required long? CacheCreationInputTokensThe cumulative number of input tokens used to create the cache entry.
The cumulative number of input tokens used to create the cache entry.
required long? CacheReadInputTokensThe cumulative number of input tokens read from the cache.
The cumulative number of input tokens read from the cache.
required long? InputTokensThe cumulative number of input tokens which were used.
The cumulative number of input tokens which were used.
The cumulative number of output tokens which were used.
required OutputTokensDetails? OutputTokensDetailsBreakdown of output tokens by category.
Breakdown of output tokens by category.
output_tokens remains the inclusive, authoritative total used for billing.
This object provides a read-only decomposition for observability — for example,
how many of the billed output tokens were spent on internal reasoning that may
have been summarized before being returned to you.
required long ThinkingTokensNumber of output tokens the model generated as internal reasoning, including
the thinking-block delimiter tokens.
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.
required ServerToolUsage? ServerToolUseThe number of server tool requests.
The number of server tool requests.
required long WebFetchRequestsThe number of web fetch tool requests.
The number of web fetch tool requests.
required long WebSearchRequestsThe number of web search tool requests.
The number of web search tool requests.
class MessageParam { Content; Role; }
class MessageTokensCount { InputTokens; }
The total number of tokens across the provided list of messages, system prompt, and tools.
class Metadata { UserID; }
string? UserIDAn external identifier for the user who is associated with the request.
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.
class OutputConfig { Effort; Format; }
Effort? EffortAll possible effort levels.
All possible effort levels.
JsonOutputFormat? FormatA schema to specify Claude's output format in responses. See structured outputs
A schema to specify Claude's output format in responses. See structured outputs
The JSON schema of the format
class OutputTokensDetails { ThinkingTokens; }
required long ThinkingTokensNumber of output tokens the model generated as internal reasoning, including
the thinking-block delimiter tokens.
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.
class PlainTextSource { Type = "text"; Data; MediaType; }
class RawContentBlockDelta: union
class RawContentBlockDeltaEvent { Type = "content_block_delta"; Delta; Index; }
required RawContentBlockDelta Delta
class RawContentBlockStartEvent { Type = "content_block_start"; ContentBlock; Index; }
class RawContentBlockStopEvent { Type = "content_block_stop"; Index; }
class RawMessageDeltaEvent { Type = "message_delta"; Delta; Usage; }
class RawMessageStartEvent { Type = "message_start"; Message; }
required Message Message
class RawMessageStopEvent { Type = "message_stop"; }
class RawMessageStreamEvent: union
class RedactedThinkingBlock { Type = "redacted_thinking"; Data; }
required string DataThe 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.
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.
class RedactedThinkingBlockParam { Type = "redacted_thinking"; Data; }
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.
class RefusalStopDetails { Type = "refusal"; Category; Explanation; }Structured information about a refusal.
Structured information about a refusal.
required Category? CategoryThe policy category that triggered a refusal.
The policy category that triggered a refusal.
The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category.
The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category.
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.
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.
The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category.
required string? ExplanationHuman-readable explanation of the refusal.
Human-readable explanation of the refusal.
This text is not guaranteed to be stable. null when no explanation is available for the category.
class SearchResultBlockParam { Type = "search_result"; Content; Source; /* 3 more */ }
class ServerToolCaller { Type = "code_execution_20250825"; ToolID; }Tool invocation generated by a server-side tool.
Tool invocation generated by a server-side tool.
required string ToolID
class ServerToolCaller20260120 { Type = "code_execution_20260120"; ToolID; }
required string ToolID
class ServerToolUsage { WebFetchRequests; WebSearchRequests; }
required long WebFetchRequestsThe number of web fetch tool requests.
The number of web fetch tool requests.
required long WebSearchRequestsThe number of web search tool requests.
The number of web search tool requests.
class ServerToolUseBlock { Type = "server_tool_use"; ID; Caller; /* 2 more */ }
class ServerToolUseBlockParam { Type = "server_tool_use"; ID; Input; /* 3 more */ }
class SignatureDelta { Type = "signature_delta"; Signature; }
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.
class SkillParams { Type; SkillID; Version; }Specification for a skill to be loaded in a container (request model).
Specification for a skill to be loaded in a container (request model).
required SkillParamsType TypeType of skill - either 'anthropic' (built-in) or 'custom' (user-defined)
Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined)
required string SkillIDSkill ID
Skill ID
string VersionSkill version or 'latest' for most recent version
Skill version or 'latest' for most recent version
enum StopReason
class TextBlock { Type = "text"; Citations; Text; }
class TextBlockParam { Type = "text"; Text; CacheControl; Citations; }
class TextCitation: union
class TextCitationParam: union
class TextDelta { Type = "text_delta"; Text; }
class TextEditorCodeExecutionCreateResultBlock { Type = "text_editor_code_execution_create_result"; IsFileUpdate; }
class TextEditorCodeExecutionCreateResultBlockParam { Type = "text_editor_code_execution_create_result"; IsFileUpdate; }
class TextEditorCodeExecutionStrReplaceResultBlock { Type = "text_editor_code_execution_str_replace_result"; Lines; NewLines; /* 3 more */ }
class TextEditorCodeExecutionStrReplaceResultBlockParam { Type = "text_editor_code_execution_str_replace_result"; Lines; NewLines; /* 3 more */ }
class TextEditorCodeExecutionToolResultBlock { Type = "text_editor_code_execution_tool_result"; Content; ToolUseID; }
class TextEditorCodeExecutionToolResultBlockParam { Type = "text_editor_code_execution_tool_result"; Content; ToolUseID; CacheControl; }
class TextEditorCodeExecutionToolResultError { Type = "text_editor_code_execution_tool_result_error"; ErrorCode; ErrorMessage; }
required TextEditorCodeExecutionToolResultErrorCode ErrorCode
enum TextEditorCodeExecutionToolResultErrorCode
class TextEditorCodeExecutionToolResultErrorParam { Type = "text_editor_code_execution_tool_result_error"; ErrorCode; ErrorMessage; }
required TextEditorCodeExecutionToolResultErrorCode ErrorCode
class TextEditorCodeExecutionViewResultBlock { Type = "text_editor_code_execution_view_result"; Content; FileType; /* 3 more */ }
required FileType FileType
class TextEditorCodeExecutionViewResultBlockParam { Type = "text_editor_code_execution_view_result"; Content; FileType; /* 3 more */ }
required FileType FileType
class ThinkingBlock { Type = "thinking"; Signature; Thinking; }
required string SignatureA value used to verify that this thinking block was generated by Claude when it is passed back to the API.
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.
The text of Claude's thinking process for this block.
class ThinkingBlockParam { Type = "thinking"; Signature; Thinking; }
required string SignatureThe 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.
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.
The thinking text of this block as returned by the API.
class ThinkingConfigAdaptive { Type = "adaptive"; Display; }
Display? DisplayControls 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. Defaults to summarized.
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. Defaults to summarized.
class ThinkingConfigDisabled { Type = "disabled"; }
class ThinkingConfigEnabled { Type = "enabled"; BudgetTokens; Display; }
required long BudgetTokensDetermines how many tokens Claude can use for its internal reasoning process. Larger budgets can enable more thorough analysis for complex problems, improving response quality.
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.
Display? DisplayControls 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. Defaults to summarized.
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. Defaults to summarized.
class ThinkingConfigParam: unionConfiguration for enabling Claude's extended thinking.
Configuration for enabling Claude's extended thinking.
When enabled, responses include thinking content blocks showing Claude's thinking process before the final answer. Requires a minimum budget of 1,024 tokens and counts towards your max_tokens limit.
See extended thinking for details.
class ThinkingDelta { Type = "thinking_delta"; Thinking; }
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.
class Tool { Type; InputSchema; Name; /* 7 more */ }
class ToolBash20250124 { Type = "bash_20250124"; Name; AllowedCallers; /* 4 more */ }
class ToolChoice: unionHow 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.
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.
class ToolChoiceAny { Type = "any"; DisableParallelToolUse; }The model will use any available tools.
The model will use any available tools.
bool DisableParallelToolUseWhether to disable parallel tool use.
Whether to disable parallel tool use.
Defaults to false. If set to true, the model will output exactly one tool use.
class ToolChoiceAuto { Type = "auto"; DisableParallelToolUse; }The model will automatically decide whether to use tools.
The model will automatically decide whether to use tools.
bool DisableParallelToolUseWhether to disable parallel tool use.
Whether to disable parallel tool use.
Defaults to false. If set to true, the model will output at most one tool use.
class ToolChoiceNone { Type = "none"; }The model will not be allowed to use tools.
The model will not be allowed to use tools.
class ToolChoiceTool { Type = "tool"; Name; DisableParallelToolUse; }The model will use the specified tool with tool_choice.name.
The model will use the specified tool with tool_choice.name.
The name of the tool to use.
bool DisableParallelToolUseWhether to disable parallel tool use.
Whether to disable parallel tool use.
Defaults to false. If set to true, the model will output exactly one tool use.
class ToolReferenceBlock { Type = "tool_reference"; ToolName; }
required string ToolName
class ToolReferenceBlockParam { Type = "tool_reference"; ToolName; CacheControl; }Tool reference block that can be included in tool_result content.
Tool reference block that can be included in tool_result content.
required string ToolName
CacheControlEphemeral? CacheControlCreate a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
Ttl TtlThe time-to-live for the cache control breakpoint.
The time-to-live for the cache control breakpoint.
This may be one the following values:
5m: 5 minutes1h: 1 hour
Defaults to 5m. See prompt caching pricing for details.
class ToolResultBlockParam { Type = "tool_result"; ToolUseID; CacheControl; /* 3 more */ }
class ToolSearchToolBm25_20251119 { Type; Name; AllowedCallers; /* 3 more */ }
class ToolSearchToolRegex20251119 { Type; Name; AllowedCallers; /* 3 more */ }
class ToolSearchToolResultBlock { Type = "tool_search_tool_result"; Content; ToolUseID; }
class ToolSearchToolResultBlockParam { Type = "tool_search_tool_result"; Content; ToolUseID; CacheControl; }
class ToolSearchToolResultError { Type = "tool_search_tool_result_error"; ErrorCode; ErrorMessage; }
required ToolSearchToolResultErrorCode ErrorCode
enum ToolSearchToolResultErrorCode
class ToolSearchToolResultErrorParam { Type = "tool_search_tool_result_error"; ErrorCode; ErrorMessage; }
required ToolSearchToolResultErrorCode ErrorCode
class ToolSearchToolSearchResultBlock { Type = "tool_search_tool_search_result"; ToolReferences; }
required IReadOnlyList<ToolReferenceBlock> ToolReferences
required string ToolName
class ToolSearchToolSearchResultBlockParam { Type = "tool_search_tool_search_result"; ToolReferences; }
required IReadOnlyList<ToolReferenceBlockParam> ToolReferences
required string ToolName
CacheControlEphemeral? CacheControlCreate a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
Ttl TtlThe time-to-live for the cache control breakpoint.
The time-to-live for the cache control breakpoint.
This may be one the following values:
5m: 5 minutes1h: 1 hour
Defaults to 5m. See prompt caching pricing for details.
class ToolTextEditor20250124 { Type = "text_editor_20250124"; Name; AllowedCallers; /* 4 more */ }
class ToolTextEditor20250429 { Type = "text_editor_20250429"; Name; AllowedCallers; /* 4 more */ }
class ToolTextEditor20250728 { Type = "text_editor_20250728"; Name; AllowedCallers; /* 5 more */ }
class ToolUnion: union
class ToolUseBlock { Type = "tool_use"; ID; Caller; /* 3 more */ }
class ToolUseBlockParam { Type = "tool_use"; ID; Input; /* 4 more */ }
class UrlImageSource { Type = "url"; Url; }
class UrlPdfSource { Type = "url"; Url; }
class Usage { CacheCreation; CacheCreationInputTokens; CacheReadInputTokens; /* 6 more */ }
class UserLocation { Type = "approximate"; City; Country; /* 2 more */ }
string? CityThe city of the user.
The city of the user.
string? CountryThe two letter ISO country code of the user.
The two letter ISO country code of the user.
string? RegionThe region of the user.
The region of the user.
string? TimezoneThe IANA timezone of the user.
The IANA timezone of the user.
class WebFetchBlock { Type = "web_fetch_result"; Content; RetrievedAt; Url; }
required DocumentBlock Content
ISO 8601 timestamp when the content was retrieved
Fetched content URL
class WebFetchBlockParam { Type = "web_fetch_result"; Content; Url; RetrievedAt; }
required DocumentBlockParam Content
Fetched content URL
ISO 8601 timestamp when the content was retrieved
class WebFetchTool20250910 { Type = "web_fetch_20250910"; Name; AllowedCallers; /* 9 more */ }
class WebFetchTool20260209 { Type = "web_fetch_20260209"; Name; AllowedCallers; /* 9 more */ }
class WebFetchTool20260309 { Type = "web_fetch_20260309"; Name; AllowedCallers; /* 10 more */ }Web fetch tool with use_cache parameter for bypassing cached content.
Web fetch tool with use_cache parameter for bypassing cached content.
class WebFetchTool20260318 { Type = "web_fetch_20260318"; Name; AllowedCallers; /* 11 more */ }
class WebFetchToolResultBlock { Type = "web_fetch_tool_result"; Caller; Content; ToolUseID; }
class WebFetchToolResultBlockParam { Type = "web_fetch_tool_result"; Content; ToolUseID; /* 2 more */ }
class WebFetchToolResultErrorBlock { Type = "web_fetch_tool_result_error"; ErrorCode; }
required WebFetchToolResultErrorCode ErrorCode
class WebFetchToolResultErrorBlockParam { Type = "web_fetch_tool_result_error"; ErrorCode; }
required WebFetchToolResultErrorCode ErrorCode
enum WebFetchToolResultErrorCode
class WebFetchUrlSourceAll { 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.
The url_sources variant under which a source contributes in
full: every result of the tool filter's source, or all user input.
class WebFetchUrlSourceExcept { Type = "except"; Tools; }The tool filter variant under which every result but the named
tools' contributes.
The tool filter variant under which every result but the named tools' contributes.
required IReadOnlyList<WebFetchUrlSourceToolReference> Tools
class WebFetchUrlSourceNone { Type = "none"; }The url_sources variant under which a source contributes nothing:
no result of the tool filter's source, or no user input.
The url_sources variant under which a source contributes nothing:
no result of the tool filter's source, or no user input.
class WebFetchUrlSourceOnly { Type = "only"; Tools; }The tool filter variant under which only the named tools' results
contribute.
The tool filter variant under which only the named tools' results contribute.
required IReadOnlyList<WebFetchUrlSourceToolReference> Tools
class WebFetchUrlSourceToolReference { Type = "tool_reference"; Name; }One entry of a tool filter's tools: it must name a tool declared
in this request's tools[].
One entry of a tool filter's tools: it must name a tool declared
in this request's tools[].
class WebFetchUrlSources { ClientToolResults; ServerToolResults; UserInput; }Which sources contribute to the set of URLs web fetch may fetch.
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[].
class WebSearchResultBlock { Type = "web_search_result"; EncryptedContent; PageAge; /* 2 more */ }
class WebSearchResultBlockParam { Type = "web_search_result"; EncryptedContent; Title; /* 2 more */ }
class WebSearchTool20250305 { Type = "web_search_20250305"; Name; AllowedCallers; /* 7 more */ }
class WebSearchTool20260209 { Type = "web_search_20260209"; Name; AllowedCallers; /* 7 more */ }
class WebSearchTool20260318 { Type = "web_search_20260318"; Name; AllowedCallers; /* 8 more */ }
class WebSearchToolRequestError { Type = "web_search_tool_result_error"; ErrorCode; }
required WebSearchToolResultErrorCode ErrorCode
class WebSearchToolResultBlock { Type = "web_search_tool_result"; Caller; Content; ToolUseID; }
class WebSearchToolResultBlockContent: union
class WebSearchToolResultBlockParam { Type = "web_search_tool_result"; Content; ToolUseID; /* 2 more */ }
class WebSearchToolResultBlockParamContent: union
class WebSearchToolResultError { Type = "web_search_tool_result_error"; ErrorCode; }
required WebSearchToolResultErrorCode ErrorCode
enum WebSearchToolResultErrorCode
MessagesBatches
Create a Message Batch
MessageBatch Messages.Batches.Create(parameters, cancellationToken = default)Send a batch of Message creation requests.
Retrieve a Message Batch
MessageBatch Messages.Batches.Retrieve(parameters, cancellationToken = default)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
BatchListPage Messages.Batches.List(parameters, cancellationToken = default)List all Message Batches within a Workspace. Most recently created batches are returned first.
Cancel a Message Batch
MessageBatch Messages.Batches.Cancel(parameters, cancellationToken = default)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
DeletedMessageBatch Messages.Batches.Delete(parameters, cancellationToken = default)Retrieve Message Batch results
MessageBatchIndividualResponse Messages.Batches.ResultsStreaming(parameters, cancellationToken = default)Streams the results of a Message Batch as a .jsonl file.