Beta
ModelsExpand Collapse
type AnthropicBeta interface{…}
type AnthropicBeta string
type BetaAPIError struct{…}
type BetaAuthenticationError struct{…}
type BetaBillingError struct{…}
type BetaErrorUnion interface{…}
type BetaInvalidRequestError struct{…}
type BetaAuthenticationError struct{…}
type BetaBillingError struct{…}
type BetaPermissionError struct{…}
type BetaNotFoundError struct{…}
type BetaRateLimitError struct{…}
type BetaGatewayTimeoutError struct{…}
type BetaAPIError struct{…}
type BetaOverloadedError struct{…}
type BetaErrorResponse struct{…}
Error BetaErrorUnion
type BetaInvalidRequestError struct{…}
type BetaAuthenticationError struct{…}
type BetaBillingError struct{…}
type BetaPermissionError struct{…}
type BetaNotFoundError struct{…}
type BetaRateLimitError struct{…}
type BetaGatewayTimeoutError struct{…}
type BetaAPIError struct{…}
type BetaOverloadedError struct{…}
type BetaGatewayTimeoutError struct{…}
type BetaInvalidRequestError struct{…}
type BetaNotFoundError struct{…}
type BetaOverloadedError struct{…}
type BetaPermissionError struct{…}
type BetaRateLimitError struct{…}
BetaModels
Get a Model
ModelsExpand Collapse
type BetaModelInfo struct{…}
Unique model identifier.
RFC 3339 datetime string representing the time at which the model was released. May be set to an epoch value if the release date is unknown.
A human-readable name for the model.
Type ModelObject type.
Object type.
For Models, this is always "model".
BetaMessages
Count tokens in a Message
ModelsExpand Collapse
type BetaAllThinkingTurns struct{…}
type BetaBase64ImageSource struct{…}
MediaType BetaBase64ImageSourceMediaType
type BetaBase64PDFSource struct{…}
type BetaBashCodeExecutionOutputBlock struct{…}
type BetaBashCodeExecutionOutputBlockParamResp struct{…}
type BetaBashCodeExecutionResultBlock struct{…}
Content []BetaBashCodeExecutionOutputBlock
type BetaBashCodeExecutionResultBlockParamResp struct{…}
type BetaBashCodeExecutionToolResultBlock struct{…}
Content BetaBashCodeExecutionToolResultBlockContentUnion
type BetaBashCodeExecutionToolResultError struct{…}
ErrorCode BetaBashCodeExecutionToolResultErrorErrorCode
type BetaBashCodeExecutionResultBlock struct{…}
Content []BetaBashCodeExecutionOutputBlock
type BetaBashCodeExecutionToolResultBlockParamResp struct{…}
Content BetaBashCodeExecutionToolResultBlockParamContentUnionResp
type BetaBashCodeExecutionToolResultErrorParamResp struct{…}
ErrorCode BetaBashCodeExecutionToolResultErrorParamErrorCode
type BetaBashCodeExecutionResultBlockParamResp struct{…}
CacheControl BetaCacheControlEphemeraloptionalCreate a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
TTL BetaCacheControlEphemeralTTLoptionalThe 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.
type BetaBashCodeExecutionToolResultError struct{…}
ErrorCode BetaBashCodeExecutionToolResultErrorErrorCode
type BetaBashCodeExecutionToolResultErrorParamResp struct{…}
ErrorCode BetaBashCodeExecutionToolResultErrorParamErrorCode
type BetaCacheControlEphemeral struct{…}
TTL BetaCacheControlEphemeralTTLoptionalThe 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.
type BetaCacheCreation struct{…}
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.
type BetaCitationCharLocation struct{…}
type BetaCitationCharLocationParamResp struct{…}
type BetaCitationConfig struct{…}
type BetaCitationContentBlockLocation struct{…}
type BetaCitationContentBlockLocationParamResp struct{…}
type BetaCitationPageLocation struct{…}
type BetaCitationPageLocationParamResp struct{…}
type BetaCitationSearchResultLocation struct{…}
type BetaCitationSearchResultLocationParamResp struct{…}
type BetaCitationWebSearchResultLocationParamResp struct{…}
type BetaCitationsConfigParamResp struct{…}
type BetaCitationsDelta struct{…}
Citation BetaCitationsDeltaCitationUnion
type BetaCitationCharLocation struct{…}
type BetaCitationPageLocation struct{…}
type BetaCitationContentBlockLocation struct{…}
type BetaCitationsWebSearchResultLocation struct{…}
type BetaCitationSearchResultLocation struct{…}
type BetaCitationsWebSearchResultLocation struct{…}
type BetaClearThinking20251015Edit struct{…}
Keep BetaClearThinking20251015EditKeepUnionoptionalNumber 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.
type BetaThinkingTurns struct{…}
type BetaAllThinkingTurns struct{…}
type BetaClearThinking20251015EditResponse struct{…}
Number of input tokens cleared by this edit.
Number of thinking turns that were cleared.
The type of context management edit applied.
type BetaClearToolUses20250919Edit struct{…}
ClearAtLeast BetaInputTokensClearAtLeastoptionalMinimum 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.
ClearToolInputs BetaClearToolUses20250919EditClearToolInputsUnionoptionalWhether 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 BetaToolUsesKeepoptionalNumber of tool uses to retain in the conversation
Number of tool uses to retain in the conversation
Trigger BetaClearToolUses20250919EditTriggerUnionoptionalCondition that triggers the context management strategy
Condition that triggers the context management strategy
type BetaInputTokensTrigger struct{…}
type BetaToolUsesTrigger struct{…}
type BetaClearToolUses20250919EditResponse struct{…}
Number of input tokens cleared by this edit.
Number of tool uses that were cleared.
The type of context management edit applied.
type BetaCodeExecutionOutputBlock struct{…}
type BetaCodeExecutionOutputBlockParamResp struct{…}
type BetaCodeExecutionResultBlock struct{…}
Content []BetaCodeExecutionOutputBlock
type BetaCodeExecutionResultBlockParamResp struct{…}
Content []BetaCodeExecutionOutputBlockParamResp
type BetaCodeExecutionTool20250522 struct{…}
Name CodeExecutionName of the tool.
Name of the tool.
This is how the tool will be called by the model and in tool_use blocks.
AllowedCallers []stringoptional
CacheControl BetaCacheControlEphemeraloptionalCreate a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
TTL BetaCacheControlEphemeralTTLoptionalThe 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
type BetaCodeExecutionTool20250825 struct{…}
Name CodeExecutionName of the tool.
Name of the tool.
This is how the tool will be called by the model and in tool_use blocks.
AllowedCallers []stringoptional
CacheControl BetaCacheControlEphemeraloptionalCreate a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
TTL BetaCacheControlEphemeralTTLoptionalThe 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
type BetaCodeExecutionTool20260120 struct{…}Code execution tool with REPL state persistence (daemon mode + gVisor checkpoint).
Code execution tool with REPL state persistence (daemon mode + gVisor checkpoint).
Name CodeExecutionName of the tool.
Name of the tool.
This is how the tool will be called by the model and in tool_use blocks.
AllowedCallers []stringoptional
CacheControl BetaCacheControlEphemeraloptionalCreate a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
TTL BetaCacheControlEphemeralTTLoptionalThe 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
type BetaCodeExecutionToolResultBlock struct{…}
Code execution result with encrypted stdout for PFC + web_search results.
Code execution result with encrypted stdout for PFC + web_search results.
type BetaCodeExecutionToolResultError struct{…}
ErrorCode BetaCodeExecutionToolResultErrorCode
type BetaCodeExecutionResultBlock struct{…}
Content []BetaCodeExecutionOutputBlock
type BetaEncryptedCodeExecutionResultBlock struct{…}Code execution result with encrypted stdout for PFC + web_search results.
Code execution result with encrypted stdout for PFC + web_search results.
Content []BetaCodeExecutionOutputBlock
type BetaCodeExecutionToolResultBlockContentUnion interface{…}Code execution result with encrypted stdout for PFC + web_search results.
Code execution result with encrypted stdout for PFC + web_search results.
type BetaCodeExecutionToolResultError struct{…}
ErrorCode BetaCodeExecutionToolResultErrorCode
type BetaCodeExecutionResultBlock struct{…}
Content []BetaCodeExecutionOutputBlock
type BetaEncryptedCodeExecutionResultBlock struct{…}Code execution result with encrypted stdout for PFC + web_search results.
Code execution result with encrypted stdout for PFC + web_search results.
Content []BetaCodeExecutionOutputBlock
type BetaCodeExecutionToolResultBlockParamResp struct{…}
Code execution result with encrypted stdout for PFC + web_search results.
Code execution result with encrypted stdout for PFC + web_search results.
type BetaCodeExecutionToolResultErrorParamResp struct{…}
ErrorCode BetaCodeExecutionToolResultErrorCode
type BetaCodeExecutionResultBlockParamResp struct{…}
Content []BetaCodeExecutionOutputBlockParamResp
type BetaEncryptedCodeExecutionResultBlockParamResp struct{…}Code execution result with encrypted stdout for PFC + web_search results.
Code execution result with encrypted stdout for PFC + web_search results.
Content []BetaCodeExecutionOutputBlockParamResp
CacheControl BetaCacheControlEphemeraloptionalCreate a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
TTL BetaCacheControlEphemeralTTLoptionalThe 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.
type BetaCodeExecutionToolResultBlockParamContentUnionResp interface{…}Code execution result with encrypted stdout for PFC + web_search results.
Code execution result with encrypted stdout for PFC + web_search results.
type BetaCodeExecutionToolResultErrorParamResp struct{…}
ErrorCode BetaCodeExecutionToolResultErrorCode
type BetaCodeExecutionResultBlockParamResp struct{…}
Content []BetaCodeExecutionOutputBlockParamResp
type BetaEncryptedCodeExecutionResultBlockParamResp struct{…}Code execution result with encrypted stdout for PFC + web_search results.
Code execution result with encrypted stdout for PFC + web_search results.
Content []BetaCodeExecutionOutputBlockParamResp
type BetaCodeExecutionToolResultError struct{…}
ErrorCode BetaCodeExecutionToolResultErrorCode
type BetaCodeExecutionToolResultErrorCode string
type BetaCodeExecutionToolResultErrorParamResp struct{…}
ErrorCode BetaCodeExecutionToolResultErrorCode
type BetaCompact20260112Edit struct{…}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 BetaInputTokensTriggeroptionalWhen to trigger compaction. Defaults to 150000 input tokens.
When to trigger compaction. Defaults to 150000 input tokens.
type BetaCompactionBlock struct{…}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
type BetaCompactionBlockParamResp struct{…}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
CacheControl BetaCacheControlEphemeraloptionalCreate a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
TTL BetaCacheControlEphemeralTTLoptionalThe 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.
type BetaCompactionContentBlockDelta struct{…}
type BetaCompactionIterationUsage struct{…}Token usage for a compaction iteration.
Token usage for a compaction iteration.
CacheCreation BetaCacheCreationBreakdown 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
type BetaContainer struct{…}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 []BetaSkillSkills loaded in the container
Skills loaded in the container
Skill ID
Type BetaSkillTypeType 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
type BetaContainerParamsResp struct{…}Container parameters with skills to be loaded.
Container parameters with skills to be loaded.
Container id
Skills []BetaSkillParamsRespoptionalList of skills to load in the container
List of skills to load in the container
Skill ID
Type BetaSkillParamsTypeType 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
type BetaContainerUploadBlock struct{…}Response model for a file uploaded to the container.
Response model for a file uploaded to the container.
type BetaContainerUploadBlockParamResp struct{…}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.
CacheControl BetaCacheControlEphemeraloptionalCreate a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
TTL BetaCacheControlEphemeralTTLoptionalThe 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.
type BetaContentBlockUnion interface{…}Response model for a file uploaded to the container.
Response model for a file uploaded to the container.
type BetaTextBlock struct{…}
Citations []BetaTextCitationUnionCitations 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.
type BetaCitationCharLocation struct{…}
type BetaCitationPageLocation struct{…}
type BetaCitationContentBlockLocation struct{…}
type BetaCitationsWebSearchResultLocation struct{…}
type BetaCitationSearchResultLocation struct{…}
type BetaThinkingBlock struct{…}
type BetaRedactedThinkingBlock struct{…}
type BetaToolUseBlock struct{…}
Caller BetaToolUseBlockCallerUnionoptionalTool invocation directly from the model.
Tool invocation directly from the model.
type BetaDirectCaller struct{…}Tool invocation directly from the model.
Tool invocation directly from the model.
type BetaServerToolCaller struct{…}Tool invocation generated by a server-side tool.
Tool invocation generated by a server-side tool.
type BetaServerToolCaller20260120 struct{…}
type BetaServerToolUseBlock struct{…}
Name BetaServerToolUseBlockName
Caller BetaServerToolUseBlockCallerUnionoptionalTool invocation directly from the model.
Tool invocation directly from the model.
type BetaDirectCaller struct{…}Tool invocation directly from the model.
Tool invocation directly from the model.
type BetaServerToolCaller struct{…}Tool invocation generated by a server-side tool.
Tool invocation generated by a server-side tool.
type BetaServerToolCaller20260120 struct{…}
type BetaWebSearchToolResultBlock struct{…}
type BetaWebSearchToolResultError struct{…}
ErrorCode BetaWebSearchToolResultErrorCode
type BetaWebSearchToolResultBlockContentArray []BetaWebSearchResultBlock
Caller BetaWebSearchToolResultBlockCallerUnionoptionalTool invocation directly from the model.
Tool invocation directly from the model.
type BetaDirectCaller struct{…}Tool invocation directly from the model.
Tool invocation directly from the model.
type BetaServerToolCaller struct{…}Tool invocation generated by a server-side tool.
Tool invocation generated by a server-side tool.
type BetaServerToolCaller20260120 struct{…}
type BetaWebFetchToolResultBlock struct{…}
Content BetaWebFetchToolResultBlockContentUnion
type BetaWebFetchToolResultErrorBlock struct{…}
ErrorCode BetaWebFetchToolResultErrorCode
type BetaWebFetchBlock struct{…}
Content BetaDocumentBlock
Citations BetaCitationConfigCitation configuration for the document
Citation configuration for the document
Source BetaDocumentBlockSourceUnion
type BetaBase64PDFSource struct{…}
type BetaPlainTextSource struct{…}
The title of the document
ISO 8601 timestamp when the content was retrieved
Fetched content URL
Caller BetaWebFetchToolResultBlockCallerUnionoptionalTool invocation directly from the model.
Tool invocation directly from the model.
type BetaDirectCaller struct{…}Tool invocation directly from the model.
Tool invocation directly from the model.
type BetaServerToolCaller struct{…}Tool invocation generated by a server-side tool.
Tool invocation generated by a server-side tool.
type BetaServerToolCaller20260120 struct{…}
type BetaCodeExecutionToolResultBlock struct{…}
Code execution result with encrypted stdout for PFC + web_search results.
Code execution result with encrypted stdout for PFC + web_search results.
type BetaCodeExecutionToolResultError struct{…}
ErrorCode BetaCodeExecutionToolResultErrorCode
type BetaCodeExecutionResultBlock struct{…}
Content []BetaCodeExecutionOutputBlock
type BetaEncryptedCodeExecutionResultBlock struct{…}Code execution result with encrypted stdout for PFC + web_search results.
Code execution result with encrypted stdout for PFC + web_search results.
Content []BetaCodeExecutionOutputBlock
type BetaBashCodeExecutionToolResultBlock struct{…}
Content BetaBashCodeExecutionToolResultBlockContentUnion
type BetaBashCodeExecutionToolResultError struct{…}
ErrorCode BetaBashCodeExecutionToolResultErrorErrorCode
type BetaBashCodeExecutionResultBlock struct{…}
Content []BetaBashCodeExecutionOutputBlock
type BetaTextEditorCodeExecutionToolResultBlock struct{…}
Content BetaTextEditorCodeExecutionToolResultBlockContentUnion
type BetaTextEditorCodeExecutionToolResultError struct{…}
ErrorCode BetaTextEditorCodeExecutionToolResultErrorErrorCode
type BetaTextEditorCodeExecutionViewResultBlock struct{…}
FileType BetaTextEditorCodeExecutionViewResultBlockFileType
type BetaTextEditorCodeExecutionCreateResultBlock struct{…}
type BetaTextEditorCodeExecutionStrReplaceResultBlock struct{…}
type BetaToolSearchToolResultBlock struct{…}
Content BetaToolSearchToolResultBlockContentUnion
type BetaToolSearchToolResultError struct{…}
ErrorCode BetaToolSearchToolResultErrorErrorCode
type BetaToolSearchToolSearchResultBlock struct{…}
ToolReferences []BetaToolReferenceBlock
type BetaMCPToolUseBlock struct{…}
The name of the MCP tool
The name of the MCP server
type BetaMCPToolResultBlock struct{…}
Content BetaMCPToolResultBlockContentUnion
type BetaMCPToolResultBlockContentBetaMCPToolResultBlockContent []BetaTextBlock
Citations []BetaTextCitationUnionCitations 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.
type BetaCitationCharLocation struct{…}
type BetaCitationPageLocation struct{…}
type BetaCitationContentBlockLocation struct{…}
type BetaCitationsWebSearchResultLocation struct{…}
type BetaCitationSearchResultLocation struct{…}
type BetaContainerUploadBlock struct{…}Response model for a file uploaded to the container.
Response model for a file uploaded to the container.
type BetaCompactionBlock struct{…}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
type BetaContentBlockParamUnionResp interface{…}Regular text content.
Regular text content.
type BetaTextBlockParamResp struct{…}
CacheControl BetaCacheControlEphemeraloptionalCreate a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
TTL BetaCacheControlEphemeralTTLoptionalThe 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 []BetaTextCitationParamUnionRespoptional
type BetaCitationCharLocationParamResp struct{…}
type BetaCitationPageLocationParamResp struct{…}
type BetaCitationContentBlockLocationParamResp struct{…}
type BetaCitationWebSearchResultLocationParamResp struct{…}
type BetaCitationSearchResultLocationParamResp struct{…}
type BetaImageBlockParamResp struct{…}
Source BetaImageBlockParamSourceUnionResp
type BetaBase64ImageSource struct{…}
MediaType BetaBase64ImageSourceMediaType
type BetaURLImageSource struct{…}
type BetaFileImageSource struct{…}
CacheControl BetaCacheControlEphemeraloptionalCreate a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
TTL BetaCacheControlEphemeralTTLoptionalThe 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.
type BetaRequestDocumentBlock struct{…}
Source BetaRequestDocumentBlockSourceUnion
type BetaBase64PDFSource struct{…}
type BetaPlainTextSource struct{…}
type BetaContentBlockSource struct{…}
Content BetaContentBlockSourceContentUnion
type BetaTextBlockParamResp struct{…}
CacheControl BetaCacheControlEphemeraloptionalCreate a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
TTL BetaCacheControlEphemeralTTLoptionalThe 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 []BetaTextCitationParamUnionRespoptional
type BetaCitationCharLocationParamResp struct{…}
type BetaCitationPageLocationParamResp struct{…}
type BetaCitationContentBlockLocationParamResp struct{…}
type BetaCitationWebSearchResultLocationParamResp struct{…}
type BetaCitationSearchResultLocationParamResp struct{…}
type BetaImageBlockParamResp struct{…}
Source BetaImageBlockParamSourceUnionResp
type BetaBase64ImageSource struct{…}
MediaType BetaBase64ImageSourceMediaType
type BetaURLImageSource struct{…}
type BetaFileImageSource struct{…}
CacheControl BetaCacheControlEphemeraloptionalCreate a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
TTL BetaCacheControlEphemeralTTLoptionalThe 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.
type BetaURLPDFSource struct{…}
type BetaFileDocumentSource struct{…}
CacheControl BetaCacheControlEphemeraloptionalCreate a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
TTL BetaCacheControlEphemeralTTLoptionalThe 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 BetaCitationsConfigParamRespoptional
type BetaSearchResultBlockParamResp struct{…}
Content []BetaTextBlockParamResp
CacheControl BetaCacheControlEphemeraloptionalCreate a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
TTL BetaCacheControlEphemeralTTLoptionalThe 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 []BetaTextCitationParamUnionRespoptional
type BetaCitationCharLocationParamResp struct{…}
type BetaCitationPageLocationParamResp struct{…}
type BetaCitationContentBlockLocationParamResp struct{…}
type BetaCitationWebSearchResultLocationParamResp struct{…}
type BetaCitationSearchResultLocationParamResp struct{…}
CacheControl BetaCacheControlEphemeraloptionalCreate a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
TTL BetaCacheControlEphemeralTTLoptionalThe 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 BetaCitationsConfigParamRespoptional
type BetaThinkingBlockParamResp struct{…}
type BetaRedactedThinkingBlockParamResp struct{…}
type BetaToolUseBlockParamResp struct{…}
CacheControl BetaCacheControlEphemeraloptionalCreate a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
TTL BetaCacheControlEphemeralTTLoptionalThe 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 BetaToolUseBlockParamCallerUnionRespoptionalTool invocation directly from the model.
Tool invocation directly from the model.
type BetaDirectCaller struct{…}Tool invocation directly from the model.
Tool invocation directly from the model.
type BetaServerToolCaller struct{…}Tool invocation generated by a server-side tool.
Tool invocation generated by a server-side tool.
type BetaServerToolCaller20260120 struct{…}
type BetaToolResultBlockParamResp struct{…}
CacheControl BetaCacheControlEphemeraloptionalCreate a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
TTL BetaCacheControlEphemeralTTLoptionalThe 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 []BetaToolResultBlockParamContentUnionRespoptional
[]BetaToolResultBlockParamContentUnionResp
type BetaTextBlockParamResp struct{…}
CacheControl BetaCacheControlEphemeraloptionalCreate a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
TTL BetaCacheControlEphemeralTTLoptionalThe 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 []BetaTextCitationParamUnionRespoptional
type BetaCitationCharLocationParamResp struct{…}
type BetaCitationPageLocationParamResp struct{…}
type BetaCitationContentBlockLocationParamResp struct{…}
type BetaCitationWebSearchResultLocationParamResp struct{…}
type BetaCitationSearchResultLocationParamResp struct{…}
type BetaImageBlockParamResp struct{…}
Source BetaImageBlockParamSourceUnionResp
type BetaBase64ImageSource struct{…}
MediaType BetaBase64ImageSourceMediaType
type BetaURLImageSource struct{…}
type BetaFileImageSource struct{…}
CacheControl BetaCacheControlEphemeraloptionalCreate a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
TTL BetaCacheControlEphemeralTTLoptionalThe 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.
type BetaSearchResultBlockParamResp struct{…}
Content []BetaTextBlockParamResp
CacheControl BetaCacheControlEphemeraloptionalCreate a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
TTL BetaCacheControlEphemeralTTLoptionalThe 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 []BetaTextCitationParamUnionRespoptional
type BetaCitationCharLocationParamResp struct{…}
type BetaCitationPageLocationParamResp struct{…}
type BetaCitationContentBlockLocationParamResp struct{…}
type BetaCitationWebSearchResultLocationParamResp struct{…}
type BetaCitationSearchResultLocationParamResp struct{…}
CacheControl BetaCacheControlEphemeraloptionalCreate a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
TTL BetaCacheControlEphemeralTTLoptionalThe 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 BetaCitationsConfigParamRespoptional
type BetaRequestDocumentBlock struct{…}
Source BetaRequestDocumentBlockSourceUnion
type BetaBase64PDFSource struct{…}
type BetaPlainTextSource struct{…}
type BetaContentBlockSource struct{…}
Content BetaContentBlockSourceContentUnion
type BetaTextBlockParamResp struct{…}
CacheControl BetaCacheControlEphemeraloptionalCreate a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
TTL BetaCacheControlEphemeralTTLoptionalThe 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 []BetaTextCitationParamUnionRespoptional
type BetaCitationCharLocationParamResp struct{…}
type BetaCitationPageLocationParamResp struct{…}
type BetaCitationContentBlockLocationParamResp struct{…}
type BetaCitationWebSearchResultLocationParamResp struct{…}
type BetaCitationSearchResultLocationParamResp struct{…}
type BetaImageBlockParamResp struct{…}
Source BetaImageBlockParamSourceUnionResp
type BetaBase64ImageSource struct{…}
MediaType BetaBase64ImageSourceMediaType
type BetaURLImageSource struct{…}
type BetaFileImageSource struct{…}
CacheControl BetaCacheControlEphemeraloptionalCreate a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
TTL BetaCacheControlEphemeralTTLoptionalThe 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.
type BetaURLPDFSource struct{…}
type BetaFileDocumentSource struct{…}
CacheControl BetaCacheControlEphemeraloptionalCreate a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
TTL BetaCacheControlEphemeralTTLoptionalThe 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 BetaCitationsConfigParamRespoptional
type BetaToolReferenceBlockParamResp struct{…}Tool reference block that can be included in tool_result content.
Tool reference block that can be included in tool_result content.
CacheControl BetaCacheControlEphemeraloptionalCreate a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
TTL BetaCacheControlEphemeralTTLoptionalThe 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.
type BetaServerToolUseBlockParamResp struct{…}
Name BetaServerToolUseBlockParamName
CacheControl BetaCacheControlEphemeraloptionalCreate a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
TTL BetaCacheControlEphemeralTTLoptionalThe 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 BetaServerToolUseBlockParamCallerUnionRespoptionalTool invocation directly from the model.
Tool invocation directly from the model.
type BetaDirectCaller struct{…}Tool invocation directly from the model.
Tool invocation directly from the model.
type BetaServerToolCaller struct{…}Tool invocation generated by a server-side tool.
Tool invocation generated by a server-side tool.
type BetaServerToolCaller20260120 struct{…}
type BetaWebSearchToolResultBlockParamResp struct{…}
type BetaWebSearchToolRequestError struct{…}
ErrorCode BetaWebSearchToolResultErrorCode
CacheControl BetaCacheControlEphemeraloptionalCreate a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
TTL BetaCacheControlEphemeralTTLoptionalThe 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 BetaWebSearchToolResultBlockParamCallerUnionRespoptionalTool invocation directly from the model.
Tool invocation directly from the model.
type BetaDirectCaller struct{…}Tool invocation directly from the model.
Tool invocation directly from the model.
type BetaServerToolCaller struct{…}Tool invocation generated by a server-side tool.
Tool invocation generated by a server-side tool.
type BetaServerToolCaller20260120 struct{…}
type BetaWebFetchToolResultBlockParamResp struct{…}
Content BetaWebFetchToolResultBlockParamContentUnionResp
type BetaWebFetchToolResultErrorBlockParamResp struct{…}
ErrorCode BetaWebFetchToolResultErrorCode
type BetaWebFetchBlockParamResp struct{…}
Content BetaRequestDocumentBlock
Source BetaRequestDocumentBlockSourceUnion
type BetaBase64PDFSource struct{…}
type BetaPlainTextSource struct{…}
type BetaContentBlockSource struct{…}
Content BetaContentBlockSourceContentUnion
type BetaTextBlockParamResp struct{…}
CacheControl BetaCacheControlEphemeraloptionalCreate a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
TTL BetaCacheControlEphemeralTTLoptionalThe 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 []BetaTextCitationParamUnionRespoptional
type BetaCitationCharLocationParamResp struct{…}
type BetaCitationPageLocationParamResp struct{…}
type BetaCitationContentBlockLocationParamResp struct{…}
type BetaCitationWebSearchResultLocationParamResp struct{…}
type BetaCitationSearchResultLocationParamResp struct{…}
type BetaImageBlockParamResp struct{…}
Source BetaImageBlockParamSourceUnionResp
type BetaBase64ImageSource struct{…}
MediaType BetaBase64ImageSourceMediaType
type BetaURLImageSource struct{…}
type BetaFileImageSource struct{…}
CacheControl BetaCacheControlEphemeraloptionalCreate a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
TTL BetaCacheControlEphemeralTTLoptionalThe 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.
type BetaURLPDFSource struct{…}
type BetaFileDocumentSource struct{…}
CacheControl BetaCacheControlEphemeraloptionalCreate a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
TTL BetaCacheControlEphemeralTTLoptionalThe 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 BetaCitationsConfigParamRespoptional
Fetched content URL
ISO 8601 timestamp when the content was retrieved
CacheControl BetaCacheControlEphemeraloptionalCreate a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
TTL BetaCacheControlEphemeralTTLoptionalThe 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 BetaWebFetchToolResultBlockParamCallerUnionRespoptionalTool invocation directly from the model.
Tool invocation directly from the model.
type BetaDirectCaller struct{…}Tool invocation directly from the model.
Tool invocation directly from the model.
type BetaServerToolCaller struct{…}Tool invocation generated by a server-side tool.
Tool invocation generated by a server-side tool.
type BetaServerToolCaller20260120 struct{…}
type BetaCodeExecutionToolResultBlockParamResp struct{…}
Code execution result with encrypted stdout for PFC + web_search results.
Code execution result with encrypted stdout for PFC + web_search results.
type BetaCodeExecutionToolResultErrorParamResp struct{…}
ErrorCode BetaCodeExecutionToolResultErrorCode
type BetaCodeExecutionResultBlockParamResp struct{…}
Content []BetaCodeExecutionOutputBlockParamResp
type BetaEncryptedCodeExecutionResultBlockParamResp struct{…}Code execution result with encrypted stdout for PFC + web_search results.
Code execution result with encrypted stdout for PFC + web_search results.
Content []BetaCodeExecutionOutputBlockParamResp
CacheControl BetaCacheControlEphemeraloptionalCreate a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
TTL BetaCacheControlEphemeralTTLoptionalThe 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.
type BetaBashCodeExecutionToolResultBlockParamResp struct{…}
Content BetaBashCodeExecutionToolResultBlockParamContentUnionResp
type BetaBashCodeExecutionToolResultErrorParamResp struct{…}
ErrorCode BetaBashCodeExecutionToolResultErrorParamErrorCode
type BetaBashCodeExecutionResultBlockParamResp struct{…}
CacheControl BetaCacheControlEphemeraloptionalCreate a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
TTL BetaCacheControlEphemeralTTLoptionalThe 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.
type BetaTextEditorCodeExecutionToolResultBlockParamResp struct{…}
Content BetaTextEditorCodeExecutionToolResultBlockParamContentUnionResp
type BetaTextEditorCodeExecutionToolResultErrorParamResp struct{…}
ErrorCode BetaTextEditorCodeExecutionToolResultErrorParamErrorCode
type BetaTextEditorCodeExecutionViewResultBlockParamResp struct{…}
FileType BetaTextEditorCodeExecutionViewResultBlockParamFileType
type BetaTextEditorCodeExecutionCreateResultBlockParamResp struct{…}
type BetaTextEditorCodeExecutionStrReplaceResultBlockParamResp struct{…}
CacheControl BetaCacheControlEphemeraloptionalCreate a cache control breakpoint at this content block.
Create a cache control breakpoint at this content block.
TTL BetaCacheControlEphemeralTTLoptionalThe 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.