Messages
Create a Message
Count tokens in a Message
ModelsExpand Collapse
Base64ImageSource = object { data, media_type, type }
media_type: "image/jpeg" or "image/png" or "image/gif" or "image/webp"
Base64PDFSource = object { data, media_type, type }
BashCodeExecutionOutputBlock = object { file_id, type }
BashCodeExecutionOutputBlockParam = object { file_id, type }
BashCodeExecutionResultBlock = object { content, return_code, stderr, 2 more }
content: array of BashCodeExecutionOutputBlock { file_id, type }
BashCodeExecutionResultBlockParam = object { content, return_code, stderr, 2 more }
content: array of BashCodeExecutionOutputBlockParam { file_id, type }
BashCodeExecutionToolResultBlock = object { content, tool_use_id, type }
content: BashCodeExecutionToolResultError { error_code, type } or BashCodeExecutionResultBlock { content, return_code, stderr, 2 more }
BashCodeExecutionToolResultError = object { error_code, type }
error_code: BashCodeExecutionToolResultErrorCode
BashCodeExecutionResultBlock = object { content, return_code, stderr, 2 more }
content: array of BashCodeExecutionOutputBlock { file_id, type }
BashCodeExecutionToolResultBlockParam = object { content, tool_use_id, type, cache_control }
content: BashCodeExecutionToolResultErrorParam { error_code, type } or BashCodeExecutionResultBlockParam { content, return_code, stderr, 2 more }
BashCodeExecutionToolResultErrorParam = object { error_code, type }
error_code: BashCodeExecutionToolResultErrorCode
BashCodeExecutionResultBlockParam = object { content, return_code, stderr, 2 more }
content: array of BashCodeExecutionOutputBlockParam { file_id, type }
cache_control: optional CacheControlEphemeral { type, ttl } Create a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
ttl: optional "5m" or "1h"The 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.
BashCodeExecutionToolResultError = object { error_code, type }
error_code: BashCodeExecutionToolResultErrorCode
BashCodeExecutionToolResultErrorCode = "invalid_tool_input" or "unavailable" or "too_many_requests" or 2 more
BashCodeExecutionToolResultErrorParam = object { error_code, type }
error_code: BashCodeExecutionToolResultErrorCode
CacheControlEphemeral = object { type, ttl }
ttl: optional "5m" or "1h"The 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.
CacheCreation = object { ephemeral_1h_input_tokens, ephemeral_5m_input_tokens }
The number of input tokens used to create the 1 hour cache entry.
The number of input tokens used to create the 5 minute cache entry.
CitationCharLocation = object { cited_text, document_index, document_title, 4 more }
CitationCharLocationParam = object { cited_text, document_index, document_title, 3 more }
CitationContentBlockLocation = object { cited_text, document_index, document_title, 4 more }
CitationContentBlockLocationParam = object { cited_text, document_index, document_title, 3 more }
CitationPageLocation = object { cited_text, document_index, document_title, 4 more }
CitationPageLocationParam = object { cited_text, document_index, document_title, 3 more }
CitationSearchResultLocationParam = object { cited_text, end_block_index, search_result_index, 4 more }
CitationWebSearchResultLocationParam = object { cited_text, encrypted_index, title, 2 more }
CitationsConfig = object { enabled }
CitationsConfigParam = object { enabled }
CitationsDelta = object { citation, type }
citation: CitationCharLocation { cited_text, document_index, document_title, 4 more } or CitationPageLocation { cited_text, document_index, document_title, 4 more } or CitationContentBlockLocation { cited_text, document_index, document_title, 4 more } or 2 more
CitationCharLocation = object { cited_text, document_index, document_title, 4 more }
CitationPageLocation = object { cited_text, document_index, document_title, 4 more }
CitationContentBlockLocation = object { cited_text, document_index, document_title, 4 more }
CitationsWebSearchResultLocation = object { cited_text, encrypted_index, title, 2 more }
CitationsSearchResultLocation = object { cited_text, end_block_index, search_result_index, 4 more }
CitationsSearchResultLocation = object { cited_text, end_block_index, search_result_index, 4 more }
CitationsWebSearchResultLocation = object { cited_text, encrypted_index, title, 2 more }
CodeExecutionOutputBlock = object { file_id, type }
CodeExecutionOutputBlockParam = object { file_id, type }
CodeExecutionResultBlock = object { content, return_code, stderr, 2 more }
content: array of CodeExecutionOutputBlock { file_id, type }
CodeExecutionResultBlockParam = object { content, return_code, stderr, 2 more }
content: array of CodeExecutionOutputBlockParam { file_id, type }
CodeExecutionTool20250522 = object { name, type, allowed_callers, 3 more }
name: "code_execution"Name of the tool.
Name of the tool.
This is how the tool will be called by the model and in tool_use blocks.
allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120"
cache_control: optional CacheControlEphemeral { type, ttl } Create a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
ttl: optional "5m" or "1h"The 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.
If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.
When true, guarantees schema validation on tool names and inputs
CodeExecutionTool20250825 = object { name, type, allowed_callers, 3 more }
name: "code_execution"Name of the tool.
Name of the tool.
This is how the tool will be called by the model and in tool_use blocks.
allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120"
cache_control: optional CacheControlEphemeral { type, ttl } Create a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
ttl: optional "5m" or "1h"The 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.
If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.
When true, guarantees schema validation on tool names and inputs
CodeExecutionTool20260120 = object { name, type, allowed_callers, 3 more } Code execution tool with REPL state persistence (daemon mode + gVisor checkpoint).
Code execution tool with REPL state persistence (daemon mode + gVisor checkpoint).
name: "code_execution"Name of the tool.
Name of the tool.
This is how the tool will be called by the model and in tool_use blocks.
allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120"
cache_control: optional CacheControlEphemeral { type, ttl } Create a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
ttl: optional "5m" or "1h"The 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.
If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.
When true, guarantees schema validation on tool names and inputs
CodeExecutionToolResultBlock = object { content, tool_use_id, type }
content: CodeExecutionToolResultBlockContentCode execution result with encrypted stdout for PFC + web_search results.
Code execution result with encrypted stdout for PFC + web_search results.
CodeExecutionToolResultError = object { error_code, type }
error_code: CodeExecutionToolResultErrorCode
CodeExecutionResultBlock = object { content, return_code, stderr, 2 more }
content: array of CodeExecutionOutputBlock { file_id, type }
EncryptedCodeExecutionResultBlock = object { content, encrypted_stdout, return_code, 2 more } Code execution result with encrypted stdout for PFC + web_search results.
Code execution result with encrypted stdout for PFC + web_search results.
content: array of CodeExecutionOutputBlock { file_id, type }
CodeExecutionToolResultBlockContent = CodeExecutionToolResultError { error_code, type } or CodeExecutionResultBlock { content, return_code, stderr, 2 more } or EncryptedCodeExecutionResultBlock { content, encrypted_stdout, return_code, 2 more } Code execution result with encrypted stdout for PFC + web_search results.
Code execution result with encrypted stdout for PFC + web_search results.
CodeExecutionToolResultError = object { error_code, type }
error_code: CodeExecutionToolResultErrorCode
CodeExecutionResultBlock = object { content, return_code, stderr, 2 more }
content: array of CodeExecutionOutputBlock { file_id, type }
EncryptedCodeExecutionResultBlock = object { content, encrypted_stdout, return_code, 2 more } Code execution result with encrypted stdout for PFC + web_search results.
Code execution result with encrypted stdout for PFC + web_search results.
content: array of CodeExecutionOutputBlock { file_id, type }
CodeExecutionToolResultBlockParam = object { content, tool_use_id, type, cache_control }
Code execution result with encrypted stdout for PFC + web_search results.
Code execution result with encrypted stdout for PFC + web_search results.
CodeExecutionToolResultErrorParam = object { error_code, type }
error_code: CodeExecutionToolResultErrorCode
CodeExecutionResultBlockParam = object { content, return_code, stderr, 2 more }
content: array of CodeExecutionOutputBlockParam { file_id, type }
EncryptedCodeExecutionResultBlockParam = object { content, encrypted_stdout, return_code, 2 more } Code execution result with encrypted stdout for PFC + web_search results.
Code execution result with encrypted stdout for PFC + web_search results.
content: array of CodeExecutionOutputBlockParam { file_id, type }
cache_control: optional CacheControlEphemeral { type, ttl } Create a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
ttl: optional "5m" or "1h"The 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.
CodeExecutionToolResultBlockParamContent = CodeExecutionToolResultErrorParam { error_code, type } or CodeExecutionResultBlockParam { content, return_code, stderr, 2 more } or EncryptedCodeExecutionResultBlockParam { content, encrypted_stdout, return_code, 2 more } Code execution result with encrypted stdout for PFC + web_search results.
Code execution result with encrypted stdout for PFC + web_search results.
CodeExecutionToolResultErrorParam = object { error_code, type }
error_code: CodeExecutionToolResultErrorCode
CodeExecutionResultBlockParam = object { content, return_code, stderr, 2 more }
content: array of CodeExecutionOutputBlockParam { file_id, type }
EncryptedCodeExecutionResultBlockParam = object { content, encrypted_stdout, return_code, 2 more } Code execution result with encrypted stdout for PFC + web_search results.
Code execution result with encrypted stdout for PFC + web_search results.
content: array of CodeExecutionOutputBlockParam { file_id, type }
CodeExecutionToolResultError = object { error_code, type }
error_code: CodeExecutionToolResultErrorCode
CodeExecutionToolResultErrorCode = "invalid_tool_input" or "unavailable" or "too_many_requests" or "execution_time_exceeded"
CodeExecutionToolResultErrorParam = object { error_code, type }
error_code: CodeExecutionToolResultErrorCode
Container = object { id, expires_at } 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
The time at which the container will expire.
ContainerUploadBlock = object { file_id, type } Response model for a file uploaded to the container.
Response model for a file uploaded to the container.
ContainerUploadBlockParam = object { file_id, type, 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.
A content block that represents a file to be uploaded to the container Files uploaded via this block will be available in the container's input directory.
cache_control: optional CacheControlEphemeral { type, ttl } Create a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
ttl: optional "5m" or "1h"The 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.
ContentBlock = TextBlock { citations, text, type } or ThinkingBlock { signature, thinking, type } or RedactedThinkingBlock { data, type } or 9 moreResponse model for a file uploaded to the container.
Response model for a file uploaded to the container.
TextBlock = object { citations, text, type }
citations: array of TextCitationCitations supporting the text block.
Citations supporting the text block.
The type of citation returned will depend on the type of document being cited. Citing a PDF results in page_location, plain text results in char_location, and content document results in content_block_location.
CitationCharLocation = object { cited_text, document_index, document_title, 4 more }
CitationPageLocation = object { cited_text, document_index, document_title, 4 more }
CitationContentBlockLocation = object { cited_text, document_index, document_title, 4 more }
CitationsWebSearchResultLocation = object { cited_text, encrypted_index, title, 2 more }
CitationsSearchResultLocation = object { cited_text, end_block_index, search_result_index, 4 more }
ThinkingBlock = object { signature, thinking, type }
RedactedThinkingBlock = object { data, type }
ToolUseBlock = object { id, caller, input, 2 more }
caller: DirectCaller { type } or ServerToolCaller { tool_id, type } or ServerToolCaller20260120 { tool_id, type } Tool invocation directly from the model.
Tool invocation directly from the model.
DirectCaller = object { type } Tool invocation directly from the model.
Tool invocation directly from the model.
ServerToolCaller = object { tool_id, type } Tool invocation generated by a server-side tool.
Tool invocation generated by a server-side tool.
ServerToolCaller20260120 = object { tool_id, type }
ServerToolUseBlock = object { id, caller, input, 2 more }
caller: DirectCaller { type } or ServerToolCaller { tool_id, type } or ServerToolCaller20260120 { tool_id, type } Tool invocation directly from the model.
Tool invocation directly from the model.
DirectCaller = object { type } Tool invocation directly from the model.
Tool invocation directly from the model.
ServerToolCaller = object { tool_id, type } Tool invocation generated by a server-side tool.
Tool invocation generated by a server-side tool.
ServerToolCaller20260120 = object { tool_id, type }
name: "web_search" or "web_fetch" or "code_execution" or 4 more
WebSearchToolResultBlock = object { caller, content, tool_use_id, type }
caller: DirectCaller { type } or ServerToolCaller { tool_id, type } or ServerToolCaller20260120 { tool_id, type } Tool invocation directly from the model.
Tool invocation directly from the model.
DirectCaller = object { type } Tool invocation directly from the model.
Tool invocation directly from the model.
ServerToolCaller = object { tool_id, type } Tool invocation generated by a server-side tool.
Tool invocation generated by a server-side tool.
ServerToolCaller20260120 = object { tool_id, type }
content: WebSearchToolResultBlockContent
WebSearchToolResultError = object { error_code, type }
error_code: WebSearchToolResultErrorCode
UnionMember1 = array of WebSearchResultBlock { encrypted_content, page_age, title, 2 more }
WebFetchToolResultBlock = object { caller, content, tool_use_id, type }
caller: DirectCaller { type } or ServerToolCaller { tool_id, type } or ServerToolCaller20260120 { tool_id, type } Tool invocation directly from the model.
Tool invocation directly from the model.
DirectCaller = object { type } Tool invocation directly from the model.
Tool invocation directly from the model.
ServerToolCaller = object { tool_id, type } Tool invocation generated by a server-side tool.
Tool invocation generated by a server-side tool.
ServerToolCaller20260120 = object { tool_id, type }
content: WebFetchToolResultErrorBlock { error_code, type } or WebFetchBlock { content, retrieved_at, type, url }
WebFetchToolResultErrorBlock = object { error_code, type }
error_code: WebFetchToolResultErrorCode
WebFetchBlock = object { content, retrieved_at, type, url }
content: DocumentBlock { citations, source, title, type }
citations: CitationsConfig { enabled } Citation configuration for the document
Citation configuration for the document
source: Base64PDFSource { data, media_type, type } or PlainTextSource { data, media_type, type }
Base64PDFSource = object { data, media_type, type }
PlainTextSource = object { data, media_type, type }
The title of the document
ISO 8601 timestamp when the content was retrieved
Fetched content URL
CodeExecutionToolResultBlock = object { content, tool_use_id, type }
content: CodeExecutionToolResultBlockContentCode execution result with encrypted stdout for PFC + web_search results.
Code execution result with encrypted stdout for PFC + web_search results.
CodeExecutionToolResultError = object { error_code, type }
error_code: CodeExecutionToolResultErrorCode
CodeExecutionResultBlock = object { content, return_code, stderr, 2 more }
content: array of CodeExecutionOutputBlock { file_id, type }
EncryptedCodeExecutionResultBlock = object { content, encrypted_stdout, return_code, 2 more } Code execution result with encrypted stdout for PFC + web_search results.
Code execution result with encrypted stdout for PFC + web_search results.
content: array of CodeExecutionOutputBlock { file_id, type }
BashCodeExecutionToolResultBlock = object { content, tool_use_id, type }
content: BashCodeExecutionToolResultError { error_code, type } or BashCodeExecutionResultBlock { content, return_code, stderr, 2 more }
BashCodeExecutionToolResultError = object { error_code, type }
error_code: BashCodeExecutionToolResultErrorCode
BashCodeExecutionResultBlock = object { content, return_code, stderr, 2 more }
content: array of BashCodeExecutionOutputBlock { file_id, type }
TextEditorCodeExecutionToolResultBlock = object { content, tool_use_id, type }
content: TextEditorCodeExecutionToolResultError { error_code, error_message, type } or TextEditorCodeExecutionViewResultBlock { content, file_type, num_lines, 3 more } or TextEditorCodeExecutionCreateResultBlock { is_file_update, type } or TextEditorCodeExecutionStrReplaceResultBlock { lines, new_lines, new_start, 3 more }
TextEditorCodeExecutionToolResultError = object { error_code, error_message, type }
error_code: TextEditorCodeExecutionToolResultErrorCode
TextEditorCodeExecutionViewResultBlock = object { content, file_type, num_lines, 3 more }
file_type: "text" or "image" or "pdf"
TextEditorCodeExecutionCreateResultBlock = object { is_file_update, type }
TextEditorCodeExecutionStrReplaceResultBlock = object { lines, new_lines, new_start, 3 more }
ToolSearchToolResultBlock = object { content, tool_use_id, type }
content: ToolSearchToolResultError { error_code, error_message, type } or ToolSearchToolSearchResultBlock { tool_references, type }
ToolSearchToolResultError = object { error_code, error_message, type }
error_code: ToolSearchToolResultErrorCode
ToolSearchToolSearchResultBlock = object { tool_references, type }
tool_references: array of ToolReferenceBlock { tool_name, type }
ContainerUploadBlock = object { file_id, type } Response model for a file uploaded to the container.
Response model for a file uploaded to the container.
ContentBlockParam = TextBlockParam { text, type, cache_control, citations } or ImageBlockParam { source, type, cache_control } or DocumentBlockParam { source, type, cache_control, 3 more } or 13 moreRegular text content.
Regular text content.
TextBlockParam = object { text, type, cache_control, citations }
cache_control: optional CacheControlEphemeral { type, ttl } Create a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
ttl: optional "5m" or "1h"The 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.
citations: optional array of TextCitationParam
CitationCharLocationParam = object { cited_text, document_index, document_title, 3 more }
CitationPageLocationParam = object { cited_text, document_index, document_title, 3 more }
CitationContentBlockLocationParam = object { cited_text, document_index, document_title, 3 more }
CitationWebSearchResultLocationParam = object { cited_text, encrypted_index, title, 2 more }
CitationSearchResultLocationParam = object { cited_text, end_block_index, search_result_index, 4 more }
ImageBlockParam = object { source, type, cache_control }
source: Base64ImageSource { data, media_type, type } or URLImageSource { type, url }
Base64ImageSource = object { data, media_type, type }
media_type: "image/jpeg" or "image/png" or "image/gif" or "image/webp"
URLImageSource = object { type, url }
cache_control: optional CacheControlEphemeral { type, ttl } Create a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
ttl: optional "5m" or "1h"The 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.
DocumentBlockParam = object { source, type, cache_control, 3 more }
source: Base64PDFSource { data, media_type, type } or PlainTextSource { data, media_type, type } or ContentBlockSource { content, type } or URLPDFSource { type, url }
Base64PDFSource = object { data, media_type, type }
PlainTextSource = object { data, media_type, type }
ContentBlockSource = object { content, type }
content: string or array of ContentBlockSourceContent
ContentBlockSourceContent = array of ContentBlockSourceContent
TextBlockParam = object { text, type, cache_control, citations }
cache_control: optional CacheControlEphemeral { type, ttl } Create a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
ttl: optional "5m" or "1h"The 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.
citations: optional array of TextCitationParam
CitationCharLocationParam = object { cited_text, document_index, document_title, 3 more }
CitationPageLocationParam = object { cited_text, document_index, document_title, 3 more }
CitationContentBlockLocationParam = object { cited_text, document_index, document_title, 3 more }
CitationWebSearchResultLocationParam = object { cited_text, encrypted_index, title, 2 more }
CitationSearchResultLocationParam = object { cited_text, end_block_index, search_result_index, 4 more }
ImageBlockParam = object { source, type, cache_control }
source: Base64ImageSource { data, media_type, type } or URLImageSource { type, url }
Base64ImageSource = object { data, media_type, type }
media_type: "image/jpeg" or "image/png" or "image/gif" or "image/webp"
URLImageSource = object { type, url }
cache_control: optional CacheControlEphemeral { type, ttl } Create a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
ttl: optional "5m" or "1h"The 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.
URLPDFSource = object { type, url }
cache_control: optional CacheControlEphemeral { type, ttl } Create a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
ttl: optional "5m" or "1h"The 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.
citations: optional CitationsConfigParam { enabled }
SearchResultBlockParam = object { content, source, title, 3 more }
content: array of TextBlockParam { text, type, cache_control, citations }
cache_control: optional CacheControlEphemeral { type, ttl } Create a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
ttl: optional "5m" or "1h"The 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.
citations: optional array of TextCitationParam
CitationCharLocationParam = object { cited_text, document_index, document_title, 3 more }
CitationPageLocationParam = object { cited_text, document_index, document_title, 3 more }
CitationContentBlockLocationParam = object { cited_text, document_index, document_title, 3 more }
CitationWebSearchResultLocationParam = object { cited_text, encrypted_index, title, 2 more }
CitationSearchResultLocationParam = object { cited_text, end_block_index, search_result_index, 4 more }
cache_control: optional CacheControlEphemeral { type, ttl } Create a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
ttl: optional "5m" or "1h"The 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.
citations: optional CitationsConfigParam { enabled }
ThinkingBlockParam = object { signature, thinking, type }
RedactedThinkingBlockParam = object { data, type }
ToolUseBlockParam = object { id, input, name, 3 more }
cache_control: optional CacheControlEphemeral { type, ttl } Create a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
ttl: optional "5m" or "1h"The 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.
caller: optional DirectCaller { type } or ServerToolCaller { tool_id, type } or ServerToolCaller20260120 { tool_id, type } Tool invocation directly from the model.
Tool invocation directly from the model.
DirectCaller = object { type } Tool invocation directly from the model.
Tool invocation directly from the model.
ServerToolCaller = object { tool_id, type } Tool invocation generated by a server-side tool.
Tool invocation generated by a server-side tool.
ServerToolCaller20260120 = object { tool_id, type }
ToolResultBlockParam = object { tool_use_id, type, cache_control, 2 more }
cache_control: optional CacheControlEphemeral { type, ttl } Create a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
ttl: optional "5m" or "1h"The 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.
content: optional string or array of TextBlockParam { text, type, cache_control, citations } or ImageBlockParam { source, type, cache_control } or SearchResultBlockParam { content, source, title, 3 more } or 2 more
UnionMember1 = array of TextBlockParam { text, type, cache_control, citations } or ImageBlockParam { source, type, cache_control } or SearchResultBlockParam { content, source, title, 3 more } or 2 more
TextBlockParam = object { text, type, cache_control, citations }
cache_control: optional CacheControlEphemeral { type, ttl } Create a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
ttl: optional "5m" or "1h"The 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.
citations: optional array of TextCitationParam
CitationCharLocationParam = object { cited_text, document_index, document_title, 3 more }
CitationPageLocationParam = object { cited_text, document_index, document_title, 3 more }
CitationContentBlockLocationParam = object { cited_text, document_index, document_title, 3 more }
CitationWebSearchResultLocationParam = object { cited_text, encrypted_index, title, 2 more }
CitationSearchResultLocationParam = object { cited_text, end_block_index, search_result_index, 4 more }
ImageBlockParam = object { source, type, cache_control }
source: Base64ImageSource { data, media_type, type } or URLImageSource { type, url }
Base64ImageSource = object { data, media_type, type }
media_type: "image/jpeg" or "image/png" or "image/gif" or "image/webp"
URLImageSource = object { type, url }
cache_control: optional CacheControlEphemeral { type, ttl } Create a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
ttl: optional "5m" or "1h"The 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.
SearchResultBlockParam = object { content, source, title, 3 more }
content: array of TextBlockParam { text, type, cache_control, citations }
cache_control: optional CacheControlEphemeral { type, ttl } Create a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
ttl: optional "5m" or "1h"The 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.
citations: optional array of TextCitationParam
CitationCharLocationParam = object { cited_text, document_index, document_title, 3 more }
CitationPageLocationParam = object { cited_text, document_index, document_title, 3 more }
CitationContentBlockLocationParam = object { cited_text, document_index, document_title, 3 more }
CitationWebSearchResultLocationParam = object { cited_text, encrypted_index, title, 2 more }
CitationSearchResultLocationParam = object { cited_text, end_block_index, search_result_index, 4 more }
cache_control: optional CacheControlEphemeral { type, ttl } Create a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
ttl: optional "5m" or "1h"The 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.
citations: optional CitationsConfigParam { enabled }
DocumentBlockParam = object { source, type, cache_control, 3 more }
source: Base64PDFSource { data, media_type, type } or PlainTextSource { data, media_type, type } or ContentBlockSource { content, type } or URLPDFSource { type, url }
Base64PDFSource = object { data, media_type, type }
PlainTextSource = object { data, media_type, type }
ContentBlockSource = object { content, type }
content: string or array of ContentBlockSourceContent
ContentBlockSourceContent = array of ContentBlockSourceContent
TextBlockParam = object { text, type, cache_control, citations }
cache_control: optional CacheControlEphemeral { type, ttl } Create a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
ttl: optional "5m" or "1h"The 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.
citations: optional array of TextCitationParam
CitationCharLocationParam = object { cited_text, document_index, document_title, 3 more }
CitationPageLocationParam = object { cited_text, document_index, document_title, 3 more }
CitationContentBlockLocationParam = object { cited_text, document_index, document_title, 3 more }
CitationWebSearchResultLocationParam = object { cited_text, encrypted_index, title, 2 more }
CitationSearchResultLocationParam = object { cited_text, end_block_index, search_result_index, 4 more }
ImageBlockParam = object { source, type, cache_control }
source: Base64ImageSource { data, media_type, type } or URLImageSource { type, url }
Base64ImageSource = object { data, media_type, type }
media_type: "image/jpeg" or "image/png" or "image/gif" or "image/webp"
URLImageSource = object { type, url }
cache_control: optional CacheControlEphemeral { type, ttl } Create a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
ttl: optional "5m" or "1h"The 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.
URLPDFSource = object { type, url }
cache_control: optional CacheControlEphemeral { type, ttl } Create a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
ttl: optional "5m" or "1h"The 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.
citations: optional CitationsConfigParam { enabled }
ToolReferenceBlockParam = object { tool_name, type, cache_control } Tool reference block that can be included in tool_result content.
Tool reference block that can be included in tool_result content.
cache_control: optional CacheControlEphemeral { type, ttl } Create a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
ttl: optional "5m" or "1h"The 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.
ServerToolUseBlockParam = object { id, input, name, 3 more }
name: "web_search" or "web_fetch" or "code_execution" or 4 more
cache_control: optional CacheControlEphemeral { type, ttl } Create a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
ttl: optional "5m" or "1h"The 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.
caller: optional DirectCaller { type } or ServerToolCaller { tool_id, type } or ServerToolCaller20260120 { tool_id, type } Tool invocation directly from the model.
Tool invocation directly from the model.
DirectCaller = object { type } Tool invocation directly from the model.
Tool invocation directly from the model.
ServerToolCaller = object { tool_id, type } Tool invocation generated by a server-side tool.
Tool invocation generated by a server-side tool.
ServerToolCaller20260120 = object { tool_id, type }
WebSearchToolResultBlockParam = object { content, tool_use_id, type, 2 more }
content: WebSearchToolResultBlockParamContent
WebSearchToolResultBlockItem = array of WebSearchResultBlockParam { encrypted_content, title, type, 2 more }
WebSearchToolRequestError = object { error_code, type }
error_code: WebSearchToolResultErrorCode
cache_control: optional CacheControlEphemeral { type, ttl } Create a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
ttl: optional "5m" or "1h"The 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.
caller: optional DirectCaller { type } or ServerToolCaller { tool_id, type } or ServerToolCaller20260120 { tool_id, type } Tool invocation directly from the model.
Tool invocation directly from the model.
DirectCaller = object { type } Tool invocation directly from the model.
Tool invocation directly from the model.
ServerToolCaller = object { tool_id, type } Tool invocation generated by a server-side tool.
Tool invocation generated by a server-side tool.
ServerToolCaller20260120 = object { tool_id, type }
WebFetchToolResultBlockParam = object { content, tool_use_id, type, 2 more }
content: WebFetchToolResultErrorBlockParam { error_code, type } or WebFetchBlockParam { content, type, url, retrieved_at }
WebFetchToolResultErrorBlockParam = object { error_code, type }
error_code: WebFetchToolResultErrorCode
WebFetchBlockParam = object { content, type, url, retrieved_at }
content: DocumentBlockParam { source, type, cache_control, 3 more }
source: Base64PDFSource { data, media_type, type } or PlainTextSource { data, media_type, type } or ContentBlockSource { content, type } or URLPDFSource { type, url }
Base64PDFSource = object { data, media_type, type }
PlainTextSource = object { data, media_type, type }
ContentBlockSource = object { content, type }
content: string or array of ContentBlockSourceContent
ContentBlockSourceContent = array of ContentBlockSourceContent
TextBlockParam = object { text, type, cache_control, citations }
cache_control: optional CacheControlEphemeral { type, ttl } Create a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
ttl: optional "5m" or "1h"The 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.
citations: optional array of TextCitationParam
CitationCharLocationParam = object { cited_text, document_index, document_title, 3 more }
CitationPageLocationParam = object { cited_text, document_index, document_title, 3 more }
CitationContentBlockLocationParam = object { cited_text, document_index, document_title, 3 more }
CitationWebSearchResultLocationParam = object { cited_text, encrypted_index, title, 2 more }
CitationSearchResultLocationParam = object { cited_text, end_block_index, search_result_index, 4 more }
ImageBlockParam = object { source, type, cache_control }
source: Base64ImageSource { data, media_type, type } or URLImageSource { type, url }
Base64ImageSource = object { data, media_type, type }
media_type: "image/jpeg" or "image/png" or "image/gif" or "image/webp"
URLImageSource = object { type, url }
cache_control: optional CacheControlEphemeral { type, ttl } Create a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
ttl: optional "5m" or "1h"The 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.
URLPDFSource = object { type, url }
cache_control: optional CacheControlEphemeral { type, ttl } Create a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
ttl: optional "5m" or "1h"The 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.
citations: optional CitationsConfigParam { enabled }
Fetched content URL
ISO 8601 timestamp when the content was retrieved
cache_control: optional CacheControlEphemeral { type, ttl } Create a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
ttl: optional "5m" or "1h"The 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.
caller: optional DirectCaller { type } or ServerToolCaller { tool_id, type } or ServerToolCaller20260120 { tool_id, type } Tool invocation directly from the model.
Tool invocation directly from the model.
DirectCaller = object { type } Tool invocation directly from the model.
Tool invocation directly from the model.
ServerToolCaller = object { tool_id, type } Tool invocation generated by a server-side tool.
Tool invocation generated by a server-side tool.
ServerToolCaller20260120 = object { tool_id, type }
CodeExecutionToolResultBlockParam = object { content, tool_use_id, type, cache_control }
Code execution result with encrypted stdout for PFC + web_search results.
Code execution result with encrypted stdout for PFC + web_search results.
CodeExecutionToolResultErrorParam = object { error_code, type }
error_code: CodeExecutionToolResultErrorCode
CodeExecutionResultBlockParam = object { content, return_code, stderr, 2 more }
content: array of CodeExecutionOutputBlockParam { file_id, type }
EncryptedCodeExecutionResultBlockParam = object { content, encrypted_stdout, return_code, 2 more } Code execution result with encrypted stdout for PFC + web_search results.
Code execution result with encrypted stdout for PFC + web_search results.
content: array of CodeExecutionOutputBlockParam { file_id, type }
cache_control: optional CacheControlEphemeral { type, ttl } Create a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
ttl: optional "5m" or "1h"The 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.
BashCodeExecutionToolResultBlockParam = object { content, tool_use_id, type, cache_control }
content: BashCodeExecutionToolResultErrorParam { error_code, type } or BashCodeExecutionResultBlockParam { content, return_code, stderr, 2 more }
BashCodeExecutionToolResultErrorParam = object { error_code, type }
error_code: BashCodeExecutionToolResultErrorCode
BashCodeExecutionResultBlockParam = object { content, return_code, stderr, 2 more }
content: array of BashCodeExecutionOutputBlockParam { file_id, type }
cache_control: optional CacheControlEphemeral { type, ttl } Create a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
ttl: optional "5m" or "1h"The 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.
TextEditorCodeExecutionToolResultBlockParam = object { content, tool_use_id, type, cache_control }
content: TextEditorCodeExecutionToolResultErrorParam { error_code, type, error_message } or TextEditorCodeExecutionViewResultBlockParam { content, file_type, type, 3 more } or TextEditorCodeExecutionCreateResultBlockParam { is_file_update, type } or TextEditorCodeExecutionStrReplaceResultBlockParam { type, lines, new_lines, 3 more }
TextEditorCodeExecutionToolResultErrorParam = object { error_code, type, error_message }
error_code: TextEditorCodeExecutionToolResultErrorCode
TextEditorCodeExecutionViewResultBlockParam = object { content, file_type, type, 3 more }
file_type: "text" or "image" or "pdf"
TextEditorCodeExecutionCreateResultBlockParam = object { is_file_update, type }
TextEditorCodeExecutionStrReplaceResultBlockParam = object { type, lines, new_lines, 3 more }
cache_control: optional CacheControlEphemeral { type, ttl } Create a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
ttl: optional "5m" or "1h"The 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.
ToolSearchToolResultBlockParam = object { content, tool_use_id, type, cache_control }
content: ToolSearchToolResultErrorParam { error_code, type } or ToolSearchToolSearchResultBlockParam { tool_references, type }
ToolSearchToolResultErrorParam = object { error_code, type }
error_code: ToolSearchToolResultErrorCode
ToolSearchToolSearchResultBlockParam = object { tool_references, type }
tool_references: array of ToolReferenceBlockParam { tool_name, type, cache_control }
cache_control: optional CacheControlEphemeral { type, ttl } Create a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
ttl: optional "5m" or "1h"The 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.
cache_control: optional CacheControlEphemeral { type, ttl } Create a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
ttl: optional "5m" or "1h"The 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.
ContainerUploadBlockParam = object { file_id, type, 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.
A content block that represents a file to be uploaded to the container Files uploaded via this block will be available in the container's input directory.
cache_control: optional CacheControlEphemeral { type, ttl } Create a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
ttl: optional "5m" or "1h"The 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.
ContentBlockSource = object { content, type }
content: string or array of ContentBlockSourceContent
ContentBlockSourceContent = array of ContentBlockSourceContent
TextBlockParam = object { text, type, cache_control, citations }
cache_control: optional CacheControlEphemeral { type, ttl } Create a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
ttl: optional "5m" or "1h"The 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.
citations: optional array of TextCitationParam
CitationCharLocationParam = object { cited_text, document_index, document_title, 3 more }
CitationPageLocationParam = object { cited_text, document_index, document_title, 3 more }
CitationContentBlockLocationParam = object { cited_text, document_index, document_title, 3 more }
CitationWebSearchResultLocationParam = object { cited_text, encrypted_index, title, 2 more }
CitationSearchResultLocationParam = object { cited_text, end_block_index, search_result_index, 4 more }
ImageBlockParam = object { source, type, cache_control }
source: Base64ImageSource { data, media_type, type } or URLImageSource { type, url }
Base64ImageSource = object { data, media_type, type }
media_type: "image/jpeg" or "image/png" or "image/gif" or "image/webp"
URLImageSource = object { type, url }
cache_control: optional CacheControlEphemeral { type, ttl } Create a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
ttl: optional "5m" or "1h"The 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.
ContentBlockSourceContent = TextBlockParam { text, type, cache_control, citations } or ImageBlockParam { source, type, cache_control }
TextBlockParam = object { text, type, cache_control, citations }
cache_control: optional CacheControlEphemeral { type, ttl } Create a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
ttl: optional "5m" or "1h"The 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.
citations: optional array of TextCitationParam
CitationCharLocationParam = object { cited_text, document_index, document_title, 3 more }
CitationPageLocationParam = object { cited_text, document_index, document_title, 3 more }
CitationContentBlockLocationParam = object { cited_text, document_index, document_title, 3 more }
CitationWebSearchResultLocationParam = object { cited_text, encrypted_index, title, 2 more }
CitationSearchResultLocationParam = object { cited_text, end_block_index, search_result_index, 4 more }
ImageBlockParam = object { source, type, cache_control }
source: Base64ImageSource { data, media_type, type } or URLImageSource { type, url }
Base64ImageSource = object { data, media_type, type }
media_type: "image/jpeg" or "image/png" or "image/gif" or "image/webp"
URLImageSource = object { type, url }
cache_control: optional CacheControlEphemeral { type, ttl } Create a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
ttl: optional "5m" or "1h"The 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.
DirectCaller = object { type } Tool invocation directly from the model.
Tool invocation directly from the model.