Messages
Create a Message
Count tokens in a Message
ModelsExpand Collapse
BetaAllThinkingTurns = object { type }
BetaBase64ImageSource = object { data, media_type, type }
media_type: "image/jpeg" or "image/png" or "image/gif" or "image/webp"
BetaBase64PDFSource = object { data, media_type, type }
BetaBashCodeExecutionOutputBlock = object { file_id, type }
BetaBashCodeExecutionOutputBlockParam = object { file_id, type }
BetaBashCodeExecutionResultBlock = object { content, return_code, stderr, 2 more }
content: array of BetaBashCodeExecutionOutputBlock { file_id, type }
BetaBashCodeExecutionResultBlockParam = object { content, return_code, stderr, 2 more }
content: array of BetaBashCodeExecutionOutputBlockParam { file_id, type }
BetaBashCodeExecutionToolResultBlock = object { content, tool_use_id, type }
content: BetaBashCodeExecutionToolResultError { error_code, type } or BetaBashCodeExecutionResultBlock { content, return_code, stderr, 2 more }
BetaBashCodeExecutionToolResultError = object { error_code, type }
error_code: "invalid_tool_input" or "unavailable" or "too_many_requests" or 2 more
BetaBashCodeExecutionResultBlock = object { content, return_code, stderr, 2 more }
content: array of BetaBashCodeExecutionOutputBlock { file_id, type }
BetaBashCodeExecutionToolResultBlockParam = object { content, tool_use_id, type, cache_control }
content: BetaBashCodeExecutionToolResultErrorParam { error_code, type } or BetaBashCodeExecutionResultBlockParam { content, return_code, stderr, 2 more }
BetaBashCodeExecutionToolResultErrorParam = object { error_code, type }
error_code: "invalid_tool_input" or "unavailable" or "too_many_requests" or 2 more
BetaBashCodeExecutionResultBlockParam = object { content, return_code, stderr, 2 more }
content: array of BetaBashCodeExecutionOutputBlockParam { file_id, type }
cache_control: optional BetaCacheControlEphemeral { 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.
BetaBashCodeExecutionToolResultError = object { error_code, type }
error_code: "invalid_tool_input" or "unavailable" or "too_many_requests" or 2 more
BetaBashCodeExecutionToolResultErrorParam = object { error_code, type }
error_code: "invalid_tool_input" or "unavailable" or "too_many_requests" or 2 more
BetaCacheControlEphemeral = 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.
BetaCacheCreation = 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.
BetaCitationCharLocation = object { cited_text, document_index, document_title, 4 more }
BetaCitationCharLocationParam = object { cited_text, document_index, document_title, 3 more }
BetaCitationConfig = object { enabled }
BetaCitationContentBlockLocation = object { cited_text, document_index, document_title, 4 more }
BetaCitationContentBlockLocationParam = object { cited_text, document_index, document_title, 3 more }
BetaCitationPageLocation = object { cited_text, document_index, document_title, 4 more }
BetaCitationPageLocationParam = object { cited_text, document_index, document_title, 3 more }
BetaCitationSearchResultLocation = object { cited_text, end_block_index, search_result_index, 4 more }
BetaCitationSearchResultLocationParam = object { cited_text, end_block_index, search_result_index, 4 more }
BetaCitationWebSearchResultLocationParam = object { cited_text, encrypted_index, title, 2 more }
BetaCitationsConfigParam = object { enabled }
BetaCitationsDelta = object { citation, type }
citation: BetaCitationCharLocation { cited_text, document_index, document_title, 4 more } or BetaCitationPageLocation { cited_text, document_index, document_title, 4 more } or BetaCitationContentBlockLocation { cited_text, document_index, document_title, 4 more } or 2 more
BetaCitationCharLocation = object { cited_text, document_index, document_title, 4 more }
BetaCitationPageLocation = object { cited_text, document_index, document_title, 4 more }
BetaCitationContentBlockLocation = object { cited_text, document_index, document_title, 4 more }
BetaCitationsWebSearchResultLocation = object { cited_text, encrypted_index, title, 2 more }
BetaCitationSearchResultLocation = object { cited_text, end_block_index, search_result_index, 4 more }
BetaCitationsWebSearchResultLocation = object { cited_text, encrypted_index, title, 2 more }
BetaClearThinking20251015Edit = object { type, keep }
keep: optional BetaThinkingTurns { type, value } or BetaAllThinkingTurns { type } or "all"Number of most recent assistant turns to keep thinking blocks for. Older turns will have their thinking blocks removed.
Number of most recent assistant turns to keep thinking blocks for. Older turns will have their thinking blocks removed.
BetaThinkingTurns = object { type, value }
BetaAllThinkingTurns = object { type }
BetaClearThinking20251015EditResponse = object { cleared_input_tokens, cleared_thinking_turns, type }
Number of input tokens cleared by this edit.
Number of thinking turns that were cleared.
The type of context management edit applied.
BetaClearToolUses20250919Edit = object { type, clear_at_least, clear_tool_inputs, 3 more }
clear_at_least: optional BetaInputTokensClearAtLeast { type, value } Minimum number of tokens that must be cleared when triggered. Context will only be modified if at least this many tokens can be removed.
Minimum number of tokens that must be cleared when triggered. Context will only be modified if at least this many tokens can be removed.
clear_tool_inputs: optional boolean or array of stringWhether to clear all tool inputs (bool) or specific tool inputs to clear (list)
Whether to clear all tool inputs (bool) or specific tool inputs to clear (list)
Tool names whose uses are preserved from clearing
keep: optional BetaToolUsesKeep { type, value } Number of tool uses to retain in the conversation
Number of tool uses to retain in the conversation
trigger: optional BetaInputTokensTrigger { type, value } or BetaToolUsesTrigger { type, value } Condition that triggers the context management strategy
Condition that triggers the context management strategy
BetaInputTokensTrigger = object { type, value }
BetaToolUsesTrigger = object { type, value }
BetaClearToolUses20250919EditResponse = object { cleared_input_tokens, cleared_tool_uses, type }
Number of input tokens cleared by this edit.
Number of tool uses that were cleared.
The type of context management edit applied.
BetaCodeExecutionOutputBlock = object { file_id, type }
BetaCodeExecutionOutputBlockParam = object { file_id, type }
BetaCodeExecutionResultBlock = object { content, return_code, stderr, 2 more }
content: array of BetaCodeExecutionOutputBlock { file_id, type }
BetaCodeExecutionResultBlockParam = object { content, return_code, stderr, 2 more }
content: array of BetaCodeExecutionOutputBlockParam { file_id, type }
BetaCodeExecutionTool20250522 = 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 BetaCacheControlEphemeral { 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
BetaCodeExecutionTool20250825 = 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 BetaCacheControlEphemeral { 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
BetaCodeExecutionTool20260120 = 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 BetaCacheControlEphemeral { 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
BetaCodeExecutionToolResultBlock = object { content, tool_use_id, type }
Code execution result with encrypted stdout for PFC + web_search results.
Code execution result with encrypted stdout for PFC + web_search results.
BetaCodeExecutionToolResultError = object { error_code, type }
error_code: BetaCodeExecutionToolResultErrorCode
BetaCodeExecutionResultBlock = object { content, return_code, stderr, 2 more }
content: array of BetaCodeExecutionOutputBlock { file_id, type }
BetaEncryptedCodeExecutionResultBlock = 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 BetaCodeExecutionOutputBlock { file_id, type }
BetaCodeExecutionToolResultBlockContent = BetaCodeExecutionToolResultError { error_code, type } or BetaCodeExecutionResultBlock { content, return_code, stderr, 2 more } or BetaEncryptedCodeExecutionResultBlock { 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.
BetaCodeExecutionToolResultError = object { error_code, type }
error_code: BetaCodeExecutionToolResultErrorCode
BetaCodeExecutionResultBlock = object { content, return_code, stderr, 2 more }
content: array of BetaCodeExecutionOutputBlock { file_id, type }
BetaEncryptedCodeExecutionResultBlock = 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 BetaCodeExecutionOutputBlock { file_id, type }
BetaCodeExecutionToolResultBlockParam = 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.
BetaCodeExecutionToolResultErrorParam = object { error_code, type }
error_code: BetaCodeExecutionToolResultErrorCode
BetaCodeExecutionResultBlockParam = object { content, return_code, stderr, 2 more }
content: array of BetaCodeExecutionOutputBlockParam { file_id, type }
BetaEncryptedCodeExecutionResultBlockParam = 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 BetaCodeExecutionOutputBlockParam { file_id, type }
cache_control: optional BetaCacheControlEphemeral { 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.
BetaCodeExecutionToolResultBlockParamContent = BetaCodeExecutionToolResultErrorParam { error_code, type } or BetaCodeExecutionResultBlockParam { content, return_code, stderr, 2 more } or BetaEncryptedCodeExecutionResultBlockParam { 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.
BetaCodeExecutionToolResultErrorParam = object { error_code, type }
error_code: BetaCodeExecutionToolResultErrorCode
BetaCodeExecutionResultBlockParam = object { content, return_code, stderr, 2 more }
content: array of BetaCodeExecutionOutputBlockParam { file_id, type }
BetaEncryptedCodeExecutionResultBlockParam = 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 BetaCodeExecutionOutputBlockParam { file_id, type }
BetaCodeExecutionToolResultError = object { error_code, type }
error_code: BetaCodeExecutionToolResultErrorCode
BetaCodeExecutionToolResultErrorCode = "invalid_tool_input" or "unavailable" or "too_many_requests" or "execution_time_exceeded"
BetaCodeExecutionToolResultErrorParam = object { error_code, type }
error_code: BetaCodeExecutionToolResultErrorCode
BetaCompact20260112Edit = object { type, instructions, pause_after_compaction, trigger } Automatically compact older context when reaching the configured trigger threshold.
Automatically compact older context when reaching the configured trigger threshold.
Additional instructions for summarization.
Whether to pause after compaction and return the compaction block to the user.
trigger: optional BetaInputTokensTrigger { type, value } When to trigger compaction. Defaults to 150000 input tokens.
When to trigger compaction. Defaults to 150000 input tokens.
BetaCompactionBlock = object { content, type } A compaction block returned when autocompact is triggered.
A compaction block returned when autocompact is triggered.
When content is None, it indicates the compaction failed to produce a valid summary (e.g., malformed output from the model). Clients may round-trip compaction blocks with null content; the server treats them as no-ops.
Summary of compacted content, or null if compaction failed
BetaCompactionBlockParam = object { content, type, cache_control } A compaction block containing summary of previous context.
A compaction block containing summary of previous context.
Users should round-trip these blocks from responses to subsequent requests to maintain context across compaction boundaries.
When content is None, the block represents a failed compaction. The server treats these as no-ops. Empty string content is not allowed.
Summary of previously compacted content, or null if compaction failed
cache_control: optional BetaCacheControlEphemeral { 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.
BetaCompactionContentBlockDelta = object { content, type }
BetaCompactionIterationUsage = object { cache_creation, cache_creation_input_tokens, cache_read_input_tokens, 3 more } Token usage for a compaction iteration.
Token usage for a compaction iteration.
cache_creation: BetaCacheCreation { ephemeral_1h_input_tokens, ephemeral_5m_input_tokens } Breakdown of cached tokens by TTL
Breakdown of cached tokens by TTL
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.
The number of input tokens used to create the cache entry.
The number of input tokens read from the cache.
The number of input tokens which were used.
The number of output tokens which were used.
Usage for a compaction iteration
BetaContainer = object { id, expires_at, 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
The time at which the container will expire.
skills: array of BetaSkill { skill_id, type, version } Skills loaded in the container
Skills loaded in the container
Skill ID
type: "anthropic" or "custom"Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined)
Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined)
Skill version or 'latest' for most recent version
BetaContainerParams = object { id, skills } Container parameters with skills to be loaded.
Container parameters with skills to be loaded.
Container id
skills: optional array of BetaSkillParams { skill_id, type, version } List of skills to load in the container
List of skills to load in the container
Skill ID
type: "anthropic" or "custom"Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined)
Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined)
Skill version or 'latest' for most recent version
BetaContainerUploadBlock = object { file_id, type } Response model for a file uploaded to the container.
Response model for a file uploaded to the container.
BetaContainerUploadBlockParam = 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 BetaCacheControlEphemeral { 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.
BetaContentBlock = BetaTextBlock { citations, text, type } or BetaThinkingBlock { signature, thinking, type } or BetaRedactedThinkingBlock { data, type } or 12 moreResponse model for a file uploaded to the container.
Response model for a file uploaded to the container.
BetaTextBlock = object { citations, text, type }
citations: array of BetaTextCitationCitations 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.
BetaCitationCharLocation = object { cited_text, document_index, document_title, 4 more }
BetaCitationPageLocation = object { cited_text, document_index, document_title, 4 more }
BetaCitationContentBlockLocation = object { cited_text, document_index, document_title, 4 more }
BetaCitationsWebSearchResultLocation = object { cited_text, encrypted_index, title, 2 more }
BetaCitationSearchResultLocation = object { cited_text, end_block_index, search_result_index, 4 more }
BetaThinkingBlock = object { signature, thinking, type }
BetaRedactedThinkingBlock = object { data, type }
BetaToolUseBlock = object { id, input, name, 2 more }
caller: optional BetaDirectCaller { type } or BetaServerToolCaller { tool_id, type } or BetaServerToolCaller20260120 { tool_id, type } Tool invocation directly from the model.
Tool invocation directly from the model.
BetaDirectCaller = object { type } Tool invocation directly from the model.
Tool invocation directly from the model.
BetaServerToolCaller = object { tool_id, type } Tool invocation generated by a server-side tool.
Tool invocation generated by a server-side tool.
BetaServerToolCaller20260120 = object { tool_id, type }
BetaServerToolUseBlock = object { id, input, name, 2 more }
name: "web_search" or "web_fetch" or "code_execution" or 4 more
caller: optional BetaDirectCaller { type } or BetaServerToolCaller { tool_id, type } or BetaServerToolCaller20260120 { tool_id, type } Tool invocation directly from the model.
Tool invocation directly from the model.
BetaDirectCaller = object { type } Tool invocation directly from the model.
Tool invocation directly from the model.
BetaServerToolCaller = object { tool_id, type } Tool invocation generated by a server-side tool.
Tool invocation generated by a server-side tool.
BetaServerToolCaller20260120 = object { tool_id, type }
BetaWebSearchToolResultBlock = object { content, tool_use_id, type, caller }
content: BetaWebSearchToolResultBlockContent
BetaWebSearchToolResultError = object { error_code, type }
error_code: BetaWebSearchToolResultErrorCode
UnionMember1 = array of BetaWebSearchResultBlock { encrypted_content, page_age, title, 2 more }
caller: optional BetaDirectCaller { type } or BetaServerToolCaller { tool_id, type } or BetaServerToolCaller20260120 { tool_id, type } Tool invocation directly from the model.
Tool invocation directly from the model.
BetaDirectCaller = object { type } Tool invocation directly from the model.
Tool invocation directly from the model.
BetaServerToolCaller = object { tool_id, type } Tool invocation generated by a server-side tool.
Tool invocation generated by a server-side tool.
BetaServerToolCaller20260120 = object { tool_id, type }
BetaWebFetchToolResultBlock = object { content, tool_use_id, type, caller }
content: BetaWebFetchToolResultErrorBlock { error_code, type } or BetaWebFetchBlock { content, retrieved_at, type, url }
BetaWebFetchToolResultErrorBlock = object { error_code, type }
error_code: BetaWebFetchToolResultErrorCode
BetaWebFetchBlock = object { content, retrieved_at, type, url }
content: BetaDocumentBlock { citations, source, title, type }
citations: BetaCitationConfig { enabled } Citation configuration for the document
Citation configuration for the document
source: BetaBase64PDFSource { data, media_type, type } or BetaPlainTextSource { data, media_type, type }
BetaBase64PDFSource = object { data, media_type, type }
BetaPlainTextSource = object { data, media_type, type }
The title of the document
ISO 8601 timestamp when the content was retrieved
Fetched content URL
caller: optional BetaDirectCaller { type } or BetaServerToolCaller { tool_id, type } or BetaServerToolCaller20260120 { tool_id, type } Tool invocation directly from the model.
Tool invocation directly from the model.
BetaDirectCaller = object { type } Tool invocation directly from the model.
Tool invocation directly from the model.
BetaServerToolCaller = object { tool_id, type } Tool invocation generated by a server-side tool.
Tool invocation generated by a server-side tool.
BetaServerToolCaller20260120 = object { tool_id, type }
BetaCodeExecutionToolResultBlock = object { content, tool_use_id, type }
Code execution result with encrypted stdout for PFC + web_search results.
Code execution result with encrypted stdout for PFC + web_search results.
BetaCodeExecutionToolResultError = object { error_code, type }
error_code: BetaCodeExecutionToolResultErrorCode
BetaCodeExecutionResultBlock = object { content, return_code, stderr, 2 more }
content: array of BetaCodeExecutionOutputBlock { file_id, type }
BetaEncryptedCodeExecutionResultBlock = 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 BetaCodeExecutionOutputBlock { file_id, type }
BetaBashCodeExecutionToolResultBlock = object { content, tool_use_id, type }
content: BetaBashCodeExecutionToolResultError { error_code, type } or BetaBashCodeExecutionResultBlock { content, return_code, stderr, 2 more }
BetaBashCodeExecutionToolResultError = object { error_code, type }
error_code: "invalid_tool_input" or "unavailable" or "too_many_requests" or 2 more
BetaBashCodeExecutionResultBlock = object { content, return_code, stderr, 2 more }
content: array of BetaBashCodeExecutionOutputBlock { file_id, type }
BetaTextEditorCodeExecutionToolResultBlock = object { content, tool_use_id, type }
content: BetaTextEditorCodeExecutionToolResultError { error_code, error_message, type } or BetaTextEditorCodeExecutionViewResultBlock { content, file_type, num_lines, 3 more } or BetaTextEditorCodeExecutionCreateResultBlock { is_file_update, type } or BetaTextEditorCodeExecutionStrReplaceResultBlock { lines, new_lines, new_start, 3 more }
BetaTextEditorCodeExecutionToolResultError = object { error_code, error_message, type }
error_code: "invalid_tool_input" or "unavailable" or "too_many_requests" or 2 more
BetaTextEditorCodeExecutionViewResultBlock = object { content, file_type, num_lines, 3 more }
file_type: "text" or "image" or "pdf"
BetaTextEditorCodeExecutionCreateResultBlock = object { is_file_update, type }
BetaTextEditorCodeExecutionStrReplaceResultBlock = object { lines, new_lines, new_start, 3 more }
BetaToolSearchToolResultBlock = object { content, tool_use_id, type }
content: BetaToolSearchToolResultError { error_code, error_message, type } or BetaToolSearchToolSearchResultBlock { tool_references, type }
BetaToolSearchToolResultError = object { error_code, error_message, type }
error_code: "invalid_tool_input" or "unavailable" or "too_many_requests" or "execution_time_exceeded"
BetaToolSearchToolSearchResultBlock = object { tool_references, type }
tool_references: array of BetaToolReferenceBlock { tool_name, type }
BetaMCPToolUseBlock = object { id, input, name, 2 more }
The name of the MCP tool
The name of the MCP server
BetaMCPToolResultBlock = object { content, is_error, tool_use_id, type }
content: string or array of BetaTextBlock { citations, text, type }
BetaMCPToolResultBlockContent = array of BetaTextBlock { citations, text, type }
citations: array of BetaTextCitationCitations 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.
BetaCitationCharLocation = object { cited_text, document_index, document_title, 4 more }
BetaCitationPageLocation = object { cited_text, document_index, document_title, 4 more }
BetaCitationContentBlockLocation = object { cited_text, document_index, document_title, 4 more }
BetaCitationsWebSearchResultLocation = object { cited_text, encrypted_index, title, 2 more }
BetaCitationSearchResultLocation = object { cited_text, end_block_index, search_result_index, 4 more }
BetaContainerUploadBlock = object { file_id, type } Response model for a file uploaded to the container.
Response model for a file uploaded to the container.
BetaCompactionBlock = object { content, type } A compaction block returned when autocompact is triggered.
A compaction block returned when autocompact is triggered.
When content is None, it indicates the compaction failed to produce a valid summary (e.g., malformed output from the model). Clients may round-trip compaction blocks with null content; the server treats them as no-ops.
Summary of compacted content, or null if compaction failed
BetaContentBlockParam = BetaTextBlockParam { text, type, cache_control, citations } or BetaImageBlockParam { source, type, cache_control } or BetaRequestDocumentBlock { source, type, cache_control, 3 more } or 16 moreRegular text content.
Regular text content.
BetaTextBlockParam = object { text, type, cache_control, citations }
cache_control: optional BetaCacheControlEphemeral { 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 BetaTextCitationParam
BetaCitationCharLocationParam = object { cited_text, document_index, document_title, 3 more }
BetaCitationPageLocationParam = object { cited_text, document_index, document_title, 3 more }
BetaCitationContentBlockLocationParam = object { cited_text, document_index, document_title, 3 more }
BetaCitationWebSearchResultLocationParam = object { cited_text, encrypted_index, title, 2 more }
BetaCitationSearchResultLocationParam = object { cited_text, end_block_index, search_result_index, 4 more }
BetaImageBlockParam = object { source, type, cache_control }
source: BetaBase64ImageSource { data, media_type, type } or BetaURLImageSource { type, url } or BetaFileImageSource { file_id, type }
BetaBase64ImageSource = object { data, media_type, type }
media_type: "image/jpeg" or "image/png" or "image/gif" or "image/webp"
BetaURLImageSource = object { type, url }
BetaFileImageSource = object { file_id, type }
cache_control: optional BetaCacheControlEphemeral { 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.
BetaRequestDocumentBlock = object { source, type, cache_control, 3 more }
source: BetaBase64PDFSource { data, media_type, type } or BetaPlainTextSource { data, media_type, type } or BetaContentBlockSource { content, type } or 2 more
BetaBase64PDFSource = object { data, media_type, type }
BetaPlainTextSource = object { data, media_type, type }
BetaContentBlockSource = object { content, type }
content: string or array of BetaContentBlockSourceContent
BetaContentBlockSourceContent = array of BetaContentBlockSourceContent
BetaTextBlockParam = object { text, type, cache_control, citations }
cache_control: optional BetaCacheControlEphemeral { 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 BetaTextCitationParam
BetaCitationCharLocationParam = object { cited_text, document_index, document_title, 3 more }
BetaCitationPageLocationParam = object { cited_text, document_index, document_title, 3 more }
BetaCitationContentBlockLocationParam = object { cited_text, document_index, document_title, 3 more }
BetaCitationWebSearchResultLocationParam = object { cited_text, encrypted_index, title, 2 more }
BetaCitationSearchResultLocationParam = object { cited_text, end_block_index, search_result_index, 4 more }
BetaImageBlockParam = object { source, type, cache_control }
source: BetaBase64ImageSource { data, media_type, type } or BetaURLImageSource { type, url } or BetaFileImageSource { file_id, type }
BetaBase64ImageSource = object { data, media_type, type }
media_type: "image/jpeg" or "image/png" or "image/gif" or "image/webp"
BetaURLImageSource = object { type, url }
BetaFileImageSource = object { file_id, type }
cache_control: optional BetaCacheControlEphemeral { 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.
BetaURLPDFSource = object { type, url }
BetaFileDocumentSource = object { file_id, type }
cache_control: optional BetaCacheControlEphemeral { 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 BetaCitationsConfigParam { enabled }
BetaSearchResultBlockParam = object { content, source, title, 3 more }
content: array of BetaTextBlockParam { text, type, cache_control, citations }
cache_control: optional BetaCacheControlEphemeral { 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 BetaTextCitationParam
BetaCitationCharLocationParam = object { cited_text, document_index, document_title, 3 more }
BetaCitationPageLocationParam = object { cited_text, document_index, document_title, 3 more }
BetaCitationContentBlockLocationParam = object { cited_text, document_index, document_title, 3 more }
BetaCitationWebSearchResultLocationParam = object { cited_text, encrypted_index, title, 2 more }
BetaCitationSearchResultLocationParam = object { cited_text, end_block_index, search_result_index, 4 more }
cache_control: optional BetaCacheControlEphemeral { 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 BetaCitationsConfigParam { enabled }
BetaThinkingBlockParam = object { signature, thinking, type }
BetaRedactedThinkingBlockParam = object { data, type }
BetaToolUseBlockParam = object { id, input, name, 3 more }
cache_control: optional BetaCacheControlEphemeral { 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 BetaDirectCaller { type } or BetaServerToolCaller { tool_id, type } or BetaServerToolCaller20260120 { tool_id, type } Tool invocation directly from the model.
Tool invocation directly from the model.
BetaDirectCaller = object { type } Tool invocation directly from the model.
Tool invocation directly from the model.
BetaServerToolCaller = object { tool_id, type } Tool invocation generated by a server-side tool.
Tool invocation generated by a server-side tool.
BetaServerToolCaller20260120 = object { tool_id, type }
BetaToolResultBlockParam = object { tool_use_id, type, cache_control, 2 more }
cache_control: optional BetaCacheControlEphemeral { 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 BetaTextBlockParam { text, type, cache_control, citations } or BetaImageBlockParam { source, type, cache_control } or BetaSearchResultBlockParam { content, source, title, 3 more } or 2 more
UnionMember1 = array of BetaTextBlockParam { text, type, cache_control, citations } or BetaImageBlockParam { source, type, cache_control } or BetaSearchResultBlockParam { content, source, title, 3 more } or 2 more
BetaTextBlockParam = object { text, type, cache_control, citations }
cache_control: optional BetaCacheControlEphemeral { 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 BetaTextCitationParam
BetaCitationCharLocationParam = object { cited_text, document_index, document_title, 3 more }
BetaCitationPageLocationParam = object { cited_text, document_index, document_title, 3 more }
BetaCitationContentBlockLocationParam = object { cited_text, document_index, document_title, 3 more }
BetaCitationWebSearchResultLocationParam = object { cited_text, encrypted_index, title, 2 more }
BetaCitationSearchResultLocationParam = object { cited_text, end_block_index, search_result_index, 4 more }
BetaImageBlockParam = object { source, type, cache_control }
source: BetaBase64ImageSource { data, media_type, type } or BetaURLImageSource { type, url } or BetaFileImageSource { file_id, type }
BetaBase64ImageSource = object { data, media_type, type }
media_type: "image/jpeg" or "image/png" or "image/gif" or "image/webp"
BetaURLImageSource = object { type, url }
BetaFileImageSource = object { file_id, type }
cache_control: optional BetaCacheControlEphemeral { 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.
BetaSearchResultBlockParam = object { content, source, title, 3 more }
content: array of BetaTextBlockParam { text, type, cache_control, citations }
cache_control: optional BetaCacheControlEphemeral { 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 BetaTextCitationParam
BetaCitationCharLocationParam = object { cited_text, document_index, document_title, 3 more }
BetaCitationPageLocationParam = object { cited_text, document_index, document_title, 3 more }
BetaCitationContentBlockLocationParam = object { cited_text, document_index, document_title, 3 more }
BetaCitationWebSearchResultLocationParam = object { cited_text, encrypted_index, title, 2 more }
BetaCitationSearchResultLocationParam = object { cited_text, end_block_index, search_result_index, 4 more }
cache_control: optional BetaCacheControlEphemeral { 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 BetaCitationsConfigParam { enabled }
BetaRequestDocumentBlock = object { source, type, cache_control, 3 more }
source: BetaBase64PDFSource { data, media_type, type } or BetaPlainTextSource { data, media_type, type } or BetaContentBlockSource { content, type } or 2 more
BetaBase64PDFSource = object { data, media_type, type }
BetaPlainTextSource = object { data, media_type, type }
BetaContentBlockSource = object { content, type }
content: string or array of BetaContentBlockSourceContent
BetaContentBlockSourceContent = array of BetaContentBlockSourceContent
BetaTextBlockParam = object { text, type, cache_control, citations }
cache_control: optional BetaCacheControlEphemeral { 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 BetaTextCitationParam
BetaCitationCharLocationParam = object { cited_text, document_index, document_title, 3 more }
BetaCitationPageLocationParam = object { cited_text, document_index, document_title, 3 more }
BetaCitationContentBlockLocationParam = object { cited_text, document_index, document_title, 3 more }
BetaCitationWebSearchResultLocationParam = object { cited_text, encrypted_index, title, 2 more }
BetaCitationSearchResultLocationParam = object { cited_text, end_block_index, search_result_index, 4 more }
BetaImageBlockParam = object { source, type, cache_control }
source: BetaBase64ImageSource { data, media_type, type } or BetaURLImageSource { type, url } or BetaFileImageSource { file_id, type }
BetaBase64ImageSource = object { data, media_type, type }
media_type: "image/jpeg" or "image/png" or "image/gif" or "image/webp"
BetaURLImageSource = object { type, url }
BetaFileImageSource = object { file_id, type }
cache_control: optional BetaCacheControlEphemeral { 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.
BetaURLPDFSource = object { type, url }
BetaFileDocumentSource = object { file_id, type }
cache_control: optional BetaCacheControlEphemeral { 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 BetaCitationsConfigParam { enabled }
BetaToolReferenceBlockParam = 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 BetaCacheControlEphemeral { 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.
BetaServerToolUseBlockParam = object { id, input, name, 3 more }
name: "web_search" or "web_fetch" or "code_execution" or 4 more
cache_control: optional BetaCacheControlEphemeral { 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 BetaDirectCaller { type } or BetaServerToolCaller { tool_id, type } or BetaServerToolCaller20260120 { tool_id, type } Tool invocation directly from the model.
Tool invocation directly from the model.
BetaDirectCaller = object { type } Tool invocation directly from the model.
Tool invocation directly from the model.
BetaServerToolCaller = object { tool_id, type } Tool invocation generated by a server-side tool.
Tool invocation generated by a server-side tool.
BetaServerToolCaller20260120 = object { tool_id, type }
BetaWebSearchToolResultBlockParam = object { content, tool_use_id, type, 2 more }
ResultBlock = array of BetaWebSearchResultBlockParam { encrypted_content, title, type, 2 more }
BetaWebSearchToolRequestError = object { error_code, type }
error_code: BetaWebSearchToolResultErrorCode
cache_control: optional BetaCacheControlEphemeral { 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 BetaDirectCaller { type } or BetaServerToolCaller { tool_id, type } or BetaServerToolCaller20260120 { tool_id, type } Tool invocation directly from the model.
Tool invocation directly from the model.
BetaDirectCaller = object { type } Tool invocation directly from the model.
Tool invocation directly from the model.
BetaServerToolCaller = object { tool_id, type } Tool invocation generated by a server-side tool.
Tool invocation generated by a server-side tool.
BetaServerToolCaller20260120 = object { tool_id, type }
BetaWebFetchToolResultBlockParam = object { content, tool_use_id, type, 2 more }
content: BetaWebFetchToolResultErrorBlockParam { error_code, type } or BetaWebFetchBlockParam { content, type, url, retrieved_at }
BetaWebFetchToolResultErrorBlockParam = object { error_code, type }
error_code: BetaWebFetchToolResultErrorCode
BetaWebFetchBlockParam = object { content, type, url, retrieved_at }
content: BetaRequestDocumentBlock { source, type, cache_control, 3 more }
source: BetaBase64PDFSource { data, media_type, type } or BetaPlainTextSource { data, media_type, type } or BetaContentBlockSource { content, type } or 2 more
BetaBase64PDFSource = object { data, media_type, type }
BetaPlainTextSource = object { data, media_type, type }
BetaContentBlockSource = object { content, type }
content: string or array of BetaContentBlockSourceContent
BetaContentBlockSourceContent = array of BetaContentBlockSourceContent
BetaTextBlockParam = object { text, type, cache_control, citations }
cache_control: optional BetaCacheControlEphemeral { 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 BetaTextCitationParam
BetaCitationCharLocationParam = object { cited_text, document_index, document_title, 3 more }
BetaCitationPageLocationParam = object { cited_text, document_index, document_title, 3 more }
BetaCitationContentBlockLocationParam = object { cited_text, document_index, document_title, 3 more }
BetaCitationWebSearchResultLocationParam = object { cited_text, encrypted_index, title, 2 more }
BetaCitationSearchResultLocationParam = object { cited_text, end_block_index, search_result_index, 4 more }
BetaImageBlockParam = object { source, type, cache_control }
source: BetaBase64ImageSource { data, media_type, type } or BetaURLImageSource { type, url } or BetaFileImageSource { file_id, type }
BetaBase64ImageSource = object { data, media_type, type }
media_type: "image/jpeg" or "image/png" or "image/gif" or "image/webp"
BetaURLImageSource = object { type, url }
BetaFileImageSource = object { file_id, type }
cache_control: optional BetaCacheControlEphemeral { 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.
BetaURLPDFSource = object { type, url }
BetaFileDocumentSource = object { file_id, type }
cache_control: optional BetaCacheControlEphemeral { 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 BetaCitationsConfigParam { enabled }
Fetched content URL
ISO 8601 timestamp when the content was retrieved
cache_control: optional BetaCacheControlEphemeral { 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 BetaDirectCaller { type } or BetaServerToolCaller { tool_id, type } or BetaServerToolCaller20260120 { tool_id, type } Tool invocation directly from the model.
Tool invocation directly from the model.
BetaDirectCaller = object { type } Tool invocation directly from the model.
Tool invocation directly from the model.
BetaServerToolCaller = object { tool_id, type } Tool invocation generated by a server-side tool.
Tool invocation generated by a server-side tool.
BetaServerToolCaller20260120 = object { tool_id, type }
BetaCodeExecutionToolResultBlockParam = 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.
BetaCodeExecutionToolResultErrorParam = object { error_code, type }
error_code: BetaCodeExecutionToolResultErrorCode
BetaCodeExecutionResultBlockParam = object { content, return_code, stderr, 2 more }
content: array of BetaCodeExecutionOutputBlockParam { file_id, type }
BetaEncryptedCodeExecutionResultBlockParam = 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 BetaCodeExecutionOutputBlockParam { file_id, type }
cache_control: optional BetaCacheControlEphemeral { 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.
BetaBashCodeExecutionToolResultBlockParam = object { content, tool_use_id, type, cache_control }
content: BetaBashCodeExecutionToolResultErrorParam { error_code, type } or BetaBashCodeExecutionResultBlockParam { content, return_code, stderr, 2 more }
BetaBashCodeExecutionToolResultErrorParam = object { error_code, type }
error_code: "invalid_tool_input" or "unavailable" or "too_many_requests" or 2 more
BetaBashCodeExecutionResultBlockParam = object { content, return_code, stderr, 2 more }
content: array of BetaBashCodeExecutionOutputBlockParam { file_id, type }
cache_control: optional BetaCacheControlEphemeral { 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.
BetaTextEditorCodeExecutionToolResultBlockParam = object { content, tool_use_id, type, cache_control }
content: BetaTextEditorCodeExecutionToolResultErrorParam { error_code, type, error_message } or BetaTextEditorCodeExecutionViewResultBlockParam { content, file_type, type, 3 more } or BetaTextEditorCodeExecutionCreateResultBlockParam { is_file_update, type } or BetaTextEditorCodeExecutionStrReplaceResultBlockParam { type, lines, new_lines, 3 more }
BetaTextEditorCodeExecutionToolResultErrorParam = object { error_code, type, error_message }
error_code: "invalid_tool_input" or "unavailable" or "too_many_requests" or 2 more
BetaTextEditorCodeExecutionViewResultBlockParam = object { content, file_type, type, 3 more }
file_type: "text" or "image" or "pdf"
BetaTextEditorCodeExecutionCreateResultBlockParam = object { is_file_update, type }
BetaTextEditorCodeExecutionStrReplaceResultBlockParam = object { type, lines, new_lines, 3 more }
cache_control: optional BetaCacheControlEphemeral { 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.