Messages
Count tokens in a Message
ModelsExpand Collapse
class Base64ImageSource: …
media_type: Literal["image/jpeg", "image/png", "image/gif", "image/webp"]
class Base64PDFSource: …
class BashCodeExecutionOutputBlock: …
class BashCodeExecutionOutputBlockParam: …
class BashCodeExecutionResultBlock: …
content: List[BashCodeExecutionOutputBlock]
class BashCodeExecutionResultBlockParam: …
content: List[BashCodeExecutionOutputBlockParam]
class BashCodeExecutionToolResultBlock: …
content: Content
class BashCodeExecutionToolResultError: …
error_code: BashCodeExecutionToolResultErrorCode
class BashCodeExecutionResultBlock: …
content: List[BashCodeExecutionOutputBlock]
class BashCodeExecutionToolResultBlockParam: …
content: Content
class BashCodeExecutionToolResultErrorParam: …
error_code: BashCodeExecutionToolResultErrorCode
class BashCodeExecutionResultBlockParam: …
content: List[BashCodeExecutionOutputBlockParam]
cache_control: Optional[CacheControlEphemeral]Create a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
ttl: Optional[Literal["5m", "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.
class BashCodeExecutionToolResultError: …
error_code: BashCodeExecutionToolResultErrorCode
Literal["invalid_tool_input", "unavailable", "too_many_requests", 2 more]
class BashCodeExecutionToolResultErrorParam: …
error_code: BashCodeExecutionToolResultErrorCode
class CacheControlEphemeral: …
ttl: Optional[Literal["5m", "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.
class CacheCreation: …
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.
class CitationCharLocation: …
class CitationCharLocationParam: …
class CitationContentBlockLocation: …
class CitationContentBlockLocationParam: …
class CitationPageLocation: …
class CitationPageLocationParam: …
class CitationSearchResultLocationParam: …
class CitationWebSearchResultLocationParam: …
class CitationsConfig: …
class CitationsConfigParam: …
class CitationsDelta: …
citation: Citation
class CitationCharLocation: …
class CitationPageLocation: …
class CitationContentBlockLocation: …
class CitationsWebSearchResultLocation: …
class CitationsSearchResultLocation: …
class CitationsSearchResultLocation: …
class CitationsWebSearchResultLocation: …
class CodeExecutionOutputBlock: …
class CodeExecutionOutputBlockParam: …
class CodeExecutionResultBlock: …
content: List[CodeExecutionOutputBlock]
class CodeExecutionResultBlockParam: …
content: List[CodeExecutionOutputBlockParam]
class CodeExecutionTool20250522: …
name: Literal["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[List[Literal["direct", "code_execution_20250825", "code_execution_20260120"]]]
cache_control: Optional[CacheControlEphemeral]Create a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
ttl: Optional[Literal["5m", "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
class CodeExecutionTool20250825: …
name: Literal["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[List[Literal["direct", "code_execution_20250825", "code_execution_20260120"]]]
cache_control: Optional[CacheControlEphemeral]Create a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
ttl: Optional[Literal["5m", "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
class CodeExecutionTool20260120: …Code execution tool with REPL state persistence (daemon mode + gVisor checkpoint).
Code execution tool with REPL state persistence (daemon mode + gVisor checkpoint).
name: Literal["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[List[Literal["direct", "code_execution_20250825", "code_execution_20260120"]]]
cache_control: Optional[CacheControlEphemeral]Create a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
ttl: Optional[Literal["5m", "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
class CodeExecutionToolResultBlock: …
content: CodeExecutionToolResultBlockContentCode execution result with encrypted stdout for PFC + web_search results.
Code execution result with encrypted stdout for PFC + web_search results.
class CodeExecutionToolResultError: …
error_code: CodeExecutionToolResultErrorCode
class CodeExecutionResultBlock: …
content: List[CodeExecutionOutputBlock]
class EncryptedCodeExecutionResultBlock: …Code execution result with encrypted stdout for PFC + web_search results.
Code execution result with encrypted stdout for PFC + web_search results.
content: List[CodeExecutionOutputBlock]
Code execution result with encrypted stdout for PFC + web_search results.
Code execution result with encrypted stdout for PFC + web_search results.
class CodeExecutionToolResultError: …
error_code: CodeExecutionToolResultErrorCode
class CodeExecutionResultBlock: …
content: List[CodeExecutionOutputBlock]
class EncryptedCodeExecutionResultBlock: …Code execution result with encrypted stdout for PFC + web_search results.
Code execution result with encrypted stdout for PFC + web_search results.
content: List[CodeExecutionOutputBlock]
class CodeExecutionToolResultBlockParam: …
Code execution result with encrypted stdout for PFC + web_search results.
Code execution result with encrypted stdout for PFC + web_search results.
class CodeExecutionToolResultErrorParam: …
error_code: CodeExecutionToolResultErrorCode
class CodeExecutionResultBlockParam: …
content: List[CodeExecutionOutputBlockParam]
class EncryptedCodeExecutionResultBlockParam: …Code execution result with encrypted stdout for PFC + web_search results.
Code execution result with encrypted stdout for PFC + web_search results.
content: List[CodeExecutionOutputBlockParam]
cache_control: Optional[CacheControlEphemeral]Create a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
ttl: Optional[Literal["5m", "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.
Code execution result with encrypted stdout for PFC + web_search results.
Code execution result with encrypted stdout for PFC + web_search results.
class CodeExecutionToolResultErrorParam: …
error_code: CodeExecutionToolResultErrorCode
class CodeExecutionResultBlockParam: …
content: List[CodeExecutionOutputBlockParam]
class EncryptedCodeExecutionResultBlockParam: …Code execution result with encrypted stdout for PFC + web_search results.
Code execution result with encrypted stdout for PFC + web_search results.
content: List[CodeExecutionOutputBlockParam]
class CodeExecutionToolResultError: …
error_code: CodeExecutionToolResultErrorCode
Literal["invalid_tool_input", "unavailable", "too_many_requests", "execution_time_exceeded"]
class CodeExecutionToolResultErrorParam: …
error_code: CodeExecutionToolResultErrorCode
class Container: …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.
class ContainerUploadBlock: …Response model for a file uploaded to the container.
Response model for a file uploaded to the container.
class ContainerUploadBlockParam: …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]Create a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
ttl: Optional[Literal["5m", "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.
Response model for a file uploaded to the container.
Response model for a file uploaded to the container.
class TextBlock: …
citations: Optional[List[TextCitation]]Citations 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.
class CitationCharLocation: …
class CitationPageLocation: …
class CitationContentBlockLocation: …
class CitationsWebSearchResultLocation: …
class CitationsSearchResultLocation: …
class ThinkingBlock: …
class RedactedThinkingBlock: …
class ToolUseBlock: …
caller: CallerTool invocation directly from the model.
Tool invocation directly from the model.
class DirectCaller: …Tool invocation directly from the model.
Tool invocation directly from the model.
class ServerToolCaller: …Tool invocation generated by a server-side tool.
Tool invocation generated by a server-side tool.
class ServerToolCaller20260120: …
class ServerToolUseBlock: …
caller: CallerTool invocation directly from the model.
Tool invocation directly from the model.
class DirectCaller: …Tool invocation directly from the model.
Tool invocation directly from the model.
class ServerToolCaller: …Tool invocation generated by a server-side tool.
Tool invocation generated by a server-side tool.
class ServerToolCaller20260120: …
name: Literal["web_search", "web_fetch", "code_execution", 4 more]
class WebSearchToolResultBlock: …
caller: CallerTool invocation directly from the model.
Tool invocation directly from the model.
class DirectCaller: …Tool invocation directly from the model.
Tool invocation directly from the model.
class ServerToolCaller: …Tool invocation generated by a server-side tool.
Tool invocation generated by a server-side tool.
class ServerToolCaller20260120: …
content: WebSearchToolResultBlockContent
class WebSearchToolResultError: …
error_code: WebSearchToolResultErrorCode
List[WebSearchResultBlock]
class WebFetchToolResultBlock: …
caller: CallerTool invocation directly from the model.
Tool invocation directly from the model.
class DirectCaller: …Tool invocation directly from the model.
Tool invocation directly from the model.
class ServerToolCaller: …Tool invocation generated by a server-side tool.
Tool invocation generated by a server-side tool.
class ServerToolCaller20260120: …
content: Content
class WebFetchToolResultErrorBlock: …
error_code: WebFetchToolResultErrorCode
class WebFetchBlock: …
content: DocumentBlock
citations: Optional[CitationsConfig]Citation configuration for the document
Citation configuration for the document
source: Source
class Base64PDFSource: …
class PlainTextSource: …
The title of the document
ISO 8601 timestamp when the content was retrieved
Fetched content URL
class CodeExecutionToolResultBlock: …
content: CodeExecutionToolResultBlockContentCode execution result with encrypted stdout for PFC + web_search results.
Code execution result with encrypted stdout for PFC + web_search results.
class CodeExecutionToolResultError: …
error_code: CodeExecutionToolResultErrorCode
class CodeExecutionResultBlock: …
content: List[CodeExecutionOutputBlock]
class EncryptedCodeExecutionResultBlock: …Code execution result with encrypted stdout for PFC + web_search results.
Code execution result with encrypted stdout for PFC + web_search results.
content: List[CodeExecutionOutputBlock]
class BashCodeExecutionToolResultBlock: …
content: Content
class BashCodeExecutionToolResultError: …
error_code: BashCodeExecutionToolResultErrorCode
class BashCodeExecutionResultBlock: …
content: List[BashCodeExecutionOutputBlock]
class TextEditorCodeExecutionToolResultBlock: …
content: Content
class TextEditorCodeExecutionToolResultError: …
error_code: TextEditorCodeExecutionToolResultErrorCode
class TextEditorCodeExecutionViewResultBlock: …
file_type: Literal["text", "image", "pdf"]
class TextEditorCodeExecutionCreateResultBlock: …
class TextEditorCodeExecutionStrReplaceResultBlock: …
class ToolSearchToolResultBlock: …
content: Content
class ToolSearchToolResultError: …
error_code: ToolSearchToolResultErrorCode
class ToolSearchToolSearchResultBlock: …
tool_references: List[ToolReferenceBlock]
class ContainerUploadBlock: …Response model for a file uploaded to the container.
Response model for a file uploaded to the container.
Union[TextBlockParam, ImageBlockParam, DocumentBlockParam, 13 more]Regular text content.
Regular text content.
class TextBlockParam: …
cache_control: Optional[CacheControlEphemeral]Create a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
ttl: Optional[Literal["5m", "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[List[TextCitationParam]]
class CitationCharLocationParam: …
class CitationPageLocationParam: …
class CitationContentBlockLocationParam: …
class CitationWebSearchResultLocationParam: …
class CitationSearchResultLocationParam: …
class ImageBlockParam: …
source: Source
class Base64ImageSource: …
media_type: Literal["image/jpeg", "image/png", "image/gif", "image/webp"]
class URLImageSource: …
cache_control: Optional[CacheControlEphemeral]Create a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
ttl: Optional[Literal["5m", "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.
class DocumentBlockParam: …
source: Source
class Base64PDFSource: …
class PlainTextSource: …
class ContentBlockSource: …
content: Union[str, List[ContentBlockSourceContent]]
class TextBlockParam: …
cache_control: Optional[CacheControlEphemeral]Create a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
ttl: Optional[Literal["5m", "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[List[TextCitationParam]]
class CitationCharLocationParam: …
class CitationPageLocationParam: …
class CitationContentBlockLocationParam: …
class CitationWebSearchResultLocationParam: …
class CitationSearchResultLocationParam: …
class ImageBlockParam: …
source: Source
class Base64ImageSource: …
media_type: Literal["image/jpeg", "image/png", "image/gif", "image/webp"]
class URLImageSource: …
cache_control: Optional[CacheControlEphemeral]Create a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
ttl: Optional[Literal["5m", "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.
class URLPDFSource: …
cache_control: Optional[CacheControlEphemeral]Create a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
ttl: Optional[Literal["5m", "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]
class SearchResultBlockParam: …
content: List[TextBlockParam]
cache_control: Optional[CacheControlEphemeral]Create a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
ttl: Optional[Literal["5m", "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[List[TextCitationParam]]
class CitationCharLocationParam: …
class CitationPageLocationParam: …
class CitationContentBlockLocationParam: …
class CitationWebSearchResultLocationParam: …
class CitationSearchResultLocationParam: …
cache_control: Optional[CacheControlEphemeral]Create a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
ttl: Optional[Literal["5m", "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]
class ThinkingBlockParam: …
class RedactedThinkingBlockParam: …
class ToolUseBlockParam: …
cache_control: Optional[CacheControlEphemeral]Create a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
ttl: Optional[Literal["5m", "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[Caller]Tool invocation directly from the model.
Tool invocation directly from the model.
class DirectCaller: …Tool invocation directly from the model.
Tool invocation directly from the model.
class ServerToolCaller: …Tool invocation generated by a server-side tool.
Tool invocation generated by a server-side tool.
class ServerToolCaller20260120: …
class ToolResultBlockParam: …
cache_control: Optional[CacheControlEphemeral]Create a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
ttl: Optional[Literal["5m", "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[Union[str, List[Content], null]]
List[Content]
class TextBlockParam: …
cache_control: Optional[CacheControlEphemeral]Create a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
ttl: Optional[Literal["5m", "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[List[TextCitationParam]]
class CitationCharLocationParam: …
class CitationPageLocationParam: …
class CitationContentBlockLocationParam: …
class CitationWebSearchResultLocationParam: …
class CitationSearchResultLocationParam: …
class ImageBlockParam: …
source: Source
class Base64ImageSource: …
media_type: Literal["image/jpeg", "image/png", "image/gif", "image/webp"]
class URLImageSource: …
cache_control: Optional[CacheControlEphemeral]Create a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
ttl: Optional[Literal["5m", "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.
class SearchResultBlockParam: …
content: List[TextBlockParam]
cache_control: Optional[CacheControlEphemeral]Create a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
ttl: Optional[Literal["5m", "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[List[TextCitationParam]]
class CitationCharLocationParam: …
class CitationPageLocationParam: …
class CitationContentBlockLocationParam: …
class CitationWebSearchResultLocationParam: …
class CitationSearchResultLocationParam: …
cache_control: Optional[CacheControlEphemeral]Create a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
ttl: Optional[Literal["5m", "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]
class DocumentBlockParam: …
source: Source
class Base64PDFSource: …
class PlainTextSource: …
class ContentBlockSource: …
content: Union[str, List[ContentBlockSourceContent]]
class TextBlockParam: …
cache_control: Optional[CacheControlEphemeral]Create a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
ttl: Optional[Literal["5m", "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[List[TextCitationParam]]
class CitationCharLocationParam: …
class CitationPageLocationParam: …
class CitationContentBlockLocationParam: …
class CitationWebSearchResultLocationParam: …
class CitationSearchResultLocationParam: …
class ImageBlockParam: …
source: Source
class Base64ImageSource: …
media_type: Literal["image/jpeg", "image/png", "image/gif", "image/webp"]
class URLImageSource: …
cache_control: Optional[CacheControlEphemeral]Create a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
ttl: Optional[Literal["5m", "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.
class URLPDFSource: …
cache_control: Optional[CacheControlEphemeral]Create a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
ttl: Optional[Literal["5m", "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]
class ToolReferenceBlockParam: …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]Create a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
ttl: Optional[Literal["5m", "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.
class ServerToolUseBlockParam: …
name: Literal["web_search", "web_fetch", "code_execution", 4 more]
cache_control: Optional[CacheControlEphemeral]Create a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
ttl: Optional[Literal["5m", "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[Caller]Tool invocation directly from the model.
Tool invocation directly from the model.
class DirectCaller: …Tool invocation directly from the model.
Tool invocation directly from the model.
class ServerToolCaller: …Tool invocation generated by a server-side tool.
Tool invocation generated by a server-side tool.
class ServerToolCaller20260120: …
class WebSearchToolResultBlockParam: …
content: WebSearchToolResultBlockParamContent
class WebSearchToolRequestError: …
error_code: WebSearchToolResultErrorCode
cache_control: Optional[CacheControlEphemeral]Create a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
ttl: Optional[Literal["5m", "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[Caller]Tool invocation directly from the model.
Tool invocation directly from the model.
class DirectCaller: …Tool invocation directly from the model.
Tool invocation directly from the model.
class ServerToolCaller: …Tool invocation generated by a server-side tool.
Tool invocation generated by a server-side tool.
class ServerToolCaller20260120: …
class WebFetchToolResultBlockParam: …
content: Content
class WebFetchToolResultErrorBlockParam: …
error_code: WebFetchToolResultErrorCode
class WebFetchBlockParam: …
content: DocumentBlockParam
source: Source
class Base64PDFSource: …
class PlainTextSource: …
class ContentBlockSource: …
content: Union[str, List[ContentBlockSourceContent]]
class TextBlockParam: …
cache_control: Optional[CacheControlEphemeral]Create a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
ttl: Optional[Literal["5m", "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[List[TextCitationParam]]
class CitationCharLocationParam: …
class CitationPageLocationParam: …
class CitationContentBlockLocationParam: …
class CitationWebSearchResultLocationParam: …
class CitationSearchResultLocationParam: …
class ImageBlockParam: …
source: Source
class Base64ImageSource: …
media_type: Literal["image/jpeg", "image/png", "image/gif", "image/webp"]
class URLImageSource: …
cache_control: Optional[CacheControlEphemeral]Create a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
ttl: Optional[Literal["5m", "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.
class URLPDFSource: …
cache_control: Optional[CacheControlEphemeral]Create a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
ttl: Optional[Literal["5m", "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]
Fetched content URL
ISO 8601 timestamp when the content was retrieved
cache_control: Optional[CacheControlEphemeral]Create a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
ttl: Optional[Literal["5m", "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[Caller]Tool invocation directly from the model.
Tool invocation directly from the model.
class DirectCaller: …Tool invocation directly from the model.
Tool invocation directly from the model.
class ServerToolCaller: …Tool invocation generated by a server-side tool.
Tool invocation generated by a server-side tool.
class ServerToolCaller20260120: …
class CodeExecutionToolResultBlockParam: …
Code execution result with encrypted stdout for PFC + web_search results.
Code execution result with encrypted stdout for PFC + web_search results.
class CodeExecutionToolResultErrorParam: …
error_code: CodeExecutionToolResultErrorCode
class CodeExecutionResultBlockParam: …
content: List[CodeExecutionOutputBlockParam]
class EncryptedCodeExecutionResultBlockParam: …Code execution result with encrypted stdout for PFC + web_search results.
Code execution result with encrypted stdout for PFC + web_search results.
content: List[CodeExecutionOutputBlockParam]
cache_control: Optional[CacheControlEphemeral]Create a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
ttl: Optional[Literal["5m", "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.
class BashCodeExecutionToolResultBlockParam: …
content: Content
class BashCodeExecutionToolResultErrorParam: …
error_code: BashCodeExecutionToolResultErrorCode
class BashCodeExecutionResultBlockParam: …
content: List[BashCodeExecutionOutputBlockParam]
cache_control: Optional[CacheControlEphemeral]Create a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
ttl: Optional[Literal["5m", "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.
class TextEditorCodeExecutionToolResultBlockParam: …
content: Content
class TextEditorCodeExecutionToolResultErrorParam: …
error_code: TextEditorCodeExecutionToolResultErrorCode
class TextEditorCodeExecutionViewResultBlockParam: …
file_type: Literal["text", "image", "pdf"]
class TextEditorCodeExecutionCreateResultBlockParam: …
class TextEditorCodeExecutionStrReplaceResultBlockParam: …
cache_control: Optional[CacheControlEphemeral]Create a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
ttl: Optional[Literal["5m", "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.
class ToolSearchToolResultBlockParam: …
content: Content
class ToolSearchToolResultErrorParam: …
error_code: ToolSearchToolResultErrorCode
class ToolSearchToolSearchResultBlockParam: …
tool_references: List[ToolReferenceBlockParam]
cache_control: Optional[CacheControlEphemeral]Create a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
ttl: Optional[Literal["5m", "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]Create a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
ttl: Optional[Literal["5m", "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.
class ContainerUploadBlockParam: …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]Create a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
ttl: Optional[Literal["5m", "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.
class ContentBlockSource: …
content: Union[str, List[ContentBlockSourceContent]]
class TextBlockParam: …
cache_control: Optional[CacheControlEphemeral]Create a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
ttl: Optional[Literal["5m", "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[List[TextCitationParam]]
class CitationCharLocationParam: …
class CitationPageLocationParam: …
class CitationContentBlockLocationParam: …
class CitationWebSearchResultLocationParam: …
class CitationSearchResultLocationParam: …
class ImageBlockParam: …
source: Source
class Base64ImageSource: …
media_type: Literal["image/jpeg", "image/png", "image/gif", "image/webp"]
class URLImageSource: …
cache_control: Optional[CacheControlEphemeral]Create a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
ttl: Optional[Literal["5m", "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.
class TextBlockParam: …
cache_control: Optional[CacheControlEphemeral]Create a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
ttl: Optional[Literal["5m", "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[List[TextCitationParam]]
class CitationCharLocationParam: …
class CitationPageLocationParam: …
class CitationContentBlockLocationParam: …
class CitationWebSearchResultLocationParam: …
class CitationSearchResultLocationParam: …
class ImageBlockParam: …
source: Source
class Base64ImageSource: …
media_type: Literal["image/jpeg", "image/png", "image/gif", "image/webp"]
class URLImageSource: …
cache_control: Optional[CacheControlEphemeral]Create a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
ttl: Optional[Literal["5m", "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.
class DirectCaller: …Tool invocation directly from the model.
Tool invocation directly from the model.
class DocumentBlock: …
citations: Optional[CitationsConfig]Citation configuration for the document
Citation configuration for the document
source: Source
class Base64PDFSource: …
class PlainTextSource: …
The title of the document
class DocumentBlockParam: …
source: Source
class Base64PDFSource: …
class PlainTextSource: …
class ContentBlockSource: …
content: Union[str, List[ContentBlockSourceContent]]
class TextBlockParam: …
cache_control: Optional[CacheControlEphemeral]Create a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
ttl: Optional[Literal["5m", "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.