Loading...
    • Developer Guide
    • API Reference
    • MCP
    • Resources
    • Release Notes
    Search...
    ⌘K
    Using the API
    API overviewBeta headersErrors
    Messages
    Create a Message
    Count tokens in a Message
    Models
    List Models
    Get a Model
    Beta
    Admin
    Completions
    Create a Text Completion
    Support & configuration
    Rate limitsService tiersVersionsIP addressesSupported regionsOpenAI SDK compatibility
    Console
    Log in

    Beta

    ModelsExpand Collapse
    type AnthropicBeta interface{…}
    Accepts one of the following:
    string
    type AnthropicBeta string
    Accepts one of the following:
    const AnthropicBetaMessageBatches2024_09_24 AnthropicBeta = "message-batches-2024-09-24"
    const AnthropicBetaPromptCaching2024_07_31 AnthropicBeta = "prompt-caching-2024-07-31"
    const AnthropicBetaComputerUse2024_10_22 AnthropicBeta = "computer-use-2024-10-22"
    const AnthropicBetaComputerUse2025_01_24 AnthropicBeta = "computer-use-2025-01-24"
    const AnthropicBetaPDFs2024_09_25 AnthropicBeta = "pdfs-2024-09-25"
    const AnthropicBetaTokenCounting2024_11_01 AnthropicBeta = "token-counting-2024-11-01"
    const AnthropicBetaTokenEfficientTools2025_02_19 AnthropicBeta = "token-efficient-tools-2025-02-19"
    const AnthropicBetaOutput128k2025_02_19 AnthropicBeta = "output-128k-2025-02-19"
    const AnthropicBetaFilesAPI2025_04_14 AnthropicBeta = "files-api-2025-04-14"
    const AnthropicBetaMCPClient2025_04_04 AnthropicBeta = "mcp-client-2025-04-04"
    const AnthropicBetaMCPClient2025_11_20 AnthropicBeta = "mcp-client-2025-11-20"
    const AnthropicBetaDevFullThinking2025_05_14 AnthropicBeta = "dev-full-thinking-2025-05-14"
    const AnthropicBetaInterleavedThinking2025_05_14 AnthropicBeta = "interleaved-thinking-2025-05-14"
    const AnthropicBetaCodeExecution2025_05_22 AnthropicBeta = "code-execution-2025-05-22"
    const AnthropicBetaExtendedCacheTTL2025_04_11 AnthropicBeta = "extended-cache-ttl-2025-04-11"
    const AnthropicBetaContext1m2025_08_07 AnthropicBeta = "context-1m-2025-08-07"
    const AnthropicBetaContextManagement2025_06_27 AnthropicBeta = "context-management-2025-06-27"
    const AnthropicBetaModelContextWindowExceeded2025_08_26 AnthropicBeta = "model-context-window-exceeded-2025-08-26"
    const AnthropicBetaSkills2025_10_02 AnthropicBeta = "skills-2025-10-02"
    const AnthropicBetaFastMode2026_02_01 AnthropicBeta = "fast-mode-2026-02-01"
    type BetaAPIError struct{…}
    Message string
    Type APIError
    type BetaAuthenticationError struct{…}
    Message string
    Type AuthenticationError
    type BetaBillingError struct{…}
    Message string
    Type BillingError
    type BetaErrorUnion interface{…}
    Accepts one of the following:
    type BetaInvalidRequestError struct{…}
    Message string
    Type InvalidRequestError
    type BetaAuthenticationError struct{…}
    Message string
    Type AuthenticationError
    type BetaBillingError struct{…}
    Message string
    Type BillingError
    type BetaPermissionError struct{…}
    Message string
    Type PermissionError
    type BetaNotFoundError struct{…}
    Message string
    Type NotFoundError
    type BetaRateLimitError struct{…}
    Message string
    Type RateLimitError
    type BetaGatewayTimeoutError struct{…}
    Message string
    Type TimeoutError
    type BetaAPIError struct{…}
    Message string
    Type APIError
    type BetaOverloadedError struct{…}
    Message string
    Type OverloadedError
    type BetaErrorResponse struct{…}
    Error BetaErrorUnion
    Accepts one of the following:
    type BetaInvalidRequestError struct{…}
    Message string
    Type InvalidRequestError
    type BetaAuthenticationError struct{…}
    Message string
    Type AuthenticationError
    type BetaBillingError struct{…}
    Message string
    Type BillingError
    type BetaPermissionError struct{…}
    Message string
    Type PermissionError
    type BetaNotFoundError struct{…}
    Message string
    Type NotFoundError
    type BetaRateLimitError struct{…}
    Message string
    Type RateLimitError
    type BetaGatewayTimeoutError struct{…}
    Message string
    Type TimeoutError
    type BetaAPIError struct{…}
    Message string
    Type APIError
    type BetaOverloadedError struct{…}
    Message string
    Type OverloadedError
    RequestID string
    Type Error
    type BetaGatewayTimeoutError struct{…}
    Message string
    Type TimeoutError
    type BetaInvalidRequestError struct{…}
    Message string
    Type InvalidRequestError
    type BetaNotFoundError struct{…}
    Message string
    Type NotFoundError
    type BetaOverloadedError struct{…}
    Message string
    Type OverloadedError
    type BetaPermissionError struct{…}
    Message string
    Type PermissionError
    type BetaRateLimitError struct{…}
    Message string
    Type RateLimitError

    BetaModels

    List Models
    client.Beta.Models.List(ctx, params) (*Page[BetaModelInfo], error)
    GET/v1/models
    Get a Model
    client.Beta.Models.Get(ctx, modelID, query) (*BetaModelInfo, error)
    GET/v1/models/{model_id}
    ModelsExpand Collapse
    type BetaModelInfo struct{…}
    ID string

    Unique model identifier.

    CreatedAt Time

    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.

    DisplayName string

    A human-readable name for the model.

    Type Model

    Object type.

    For Models, this is always "model".

    BetaMessages

    Create a Message
    client.Beta.Messages.New(ctx, params) (*BetaMessage, error)
    POST/v1/messages
    Count tokens in a Message
    client.Beta.Messages.CountTokens(ctx, params) (*BetaMessageTokensCount, error)
    POST/v1/messages/count_tokens
    ModelsExpand Collapse
    type BetaAllThinkingTurns struct{…}
    Type All
    type BetaBase64ImageSource struct{…}
    Data string
    MediaType BetaBase64ImageSourceMediaType
    Accepts one of the following:
    const BetaBase64ImageSourceMediaTypeImageJPEG BetaBase64ImageSourceMediaType = "image/jpeg"
    const BetaBase64ImageSourceMediaTypeImagePNG BetaBase64ImageSourceMediaType = "image/png"
    const BetaBase64ImageSourceMediaTypeImageGIF BetaBase64ImageSourceMediaType = "image/gif"
    const BetaBase64ImageSourceMediaTypeImageWebP BetaBase64ImageSourceMediaType = "image/webp"
    Type Base64
    type BetaBase64PDFSource struct{…}
    Data string
    MediaType ApplicationPDF
    Type Base64
    type BetaBashCodeExecutionOutputBlock struct{…}
    FileID string
    Type BashCodeExecutionOutput
    type BetaBashCodeExecutionOutputBlockParamResp struct{…}
    FileID string
    Type BashCodeExecutionOutput
    type BetaBashCodeExecutionResultBlock struct{…}
    Content []BetaBashCodeExecutionOutputBlock
    FileID string
    Type BashCodeExecutionOutput
    ReturnCode int64
    Stderr string
    Stdout string
    Type BashCodeExecutionResult
    type BetaBashCodeExecutionResultBlockParamResp struct{…}
    Content []BetaBashCodeExecutionOutputBlockParamResp
    FileID string
    Type BashCodeExecutionOutput
    ReturnCode int64
    Stderr string
    Stdout string
    Type BashCodeExecutionResult
    type BetaBashCodeExecutionToolResultBlock struct{…}
    Content BetaBashCodeExecutionToolResultBlockContentUnion
    Accepts one of the following:
    type BetaBashCodeExecutionToolResultError struct{…}
    ErrorCode BetaBashCodeExecutionToolResultErrorErrorCode
    Accepts one of the following:
    const BetaBashCodeExecutionToolResultErrorErrorCodeInvalidToolInput BetaBashCodeExecutionToolResultErrorErrorCode = "invalid_tool_input"
    const BetaBashCodeExecutionToolResultErrorErrorCodeUnavailable BetaBashCodeExecutionToolResultErrorErrorCode = "unavailable"
    const BetaBashCodeExecutionToolResultErrorErrorCodeTooManyRequests BetaBashCodeExecutionToolResultErrorErrorCode = "too_many_requests"
    const BetaBashCodeExecutionToolResultErrorErrorCodeExecutionTimeExceeded BetaBashCodeExecutionToolResultErrorErrorCode = "execution_time_exceeded"
    const BetaBashCodeExecutionToolResultErrorErrorCodeOutputFileTooLarge BetaBashCodeExecutionToolResultErrorErrorCode = "output_file_too_large"
    Type BashCodeExecutionToolResultError
    type BetaBashCodeExecutionResultBlock struct{…}
    Content []BetaBashCodeExecutionOutputBlock
    FileID string
    Type BashCodeExecutionOutput
    ReturnCode int64
    Stderr string
    Stdout string
    Type BashCodeExecutionResult
    ToolUseID string
    Type BashCodeExecutionToolResult
    type BetaBashCodeExecutionToolResultBlockParamResp struct{…}
    Content BetaBashCodeExecutionToolResultBlockParamContentUnionResp
    Accepts one of the following:
    type BetaBashCodeExecutionToolResultErrorParamResp struct{…}
    ErrorCode BetaBashCodeExecutionToolResultErrorParamErrorCode
    Accepts one of the following:
    const BetaBashCodeExecutionToolResultErrorParamErrorCodeInvalidToolInput BetaBashCodeExecutionToolResultErrorParamErrorCode = "invalid_tool_input"
    const BetaBashCodeExecutionToolResultErrorParamErrorCodeUnavailable BetaBashCodeExecutionToolResultErrorParamErrorCode = "unavailable"
    const BetaBashCodeExecutionToolResultErrorParamErrorCodeTooManyRequests BetaBashCodeExecutionToolResultErrorParamErrorCode = "too_many_requests"
    const BetaBashCodeExecutionToolResultErrorParamErrorCodeExecutionTimeExceeded BetaBashCodeExecutionToolResultErrorParamErrorCode = "execution_time_exceeded"
    const BetaBashCodeExecutionToolResultErrorParamErrorCodeOutputFileTooLarge BetaBashCodeExecutionToolResultErrorParamErrorCode = "output_file_too_large"
    Type BashCodeExecutionToolResultError
    type BetaBashCodeExecutionResultBlockParamResp struct{…}
    Content []BetaBashCodeExecutionOutputBlockParamResp
    FileID string
    Type BashCodeExecutionOutput
    ReturnCode int64
    Stderr string
    Stdout string
    Type BashCodeExecutionResult
    ToolUseID string
    Type BashCodeExecutionToolResult
    CacheControl BetaCacheControlEphemeraloptional

    Create a cache control breakpoint at this content block.

    Type Ephemeral
    TTL BetaCacheControlEphemeralTTLoptional

    The time-to-live for the cache control breakpoint.

    This may be one the following values:

    • 5m: 5 minutes
    • 1h: 1 hour

    Defaults to 5m.

    Accepts one of the following:
    const BetaCacheControlEphemeralTTLTTL5m BetaCacheControlEphemeralTTL = "5m"
    const BetaCacheControlEphemeralTTLTTL1h BetaCacheControlEphemeralTTL = "1h"
    type BetaBashCodeExecutionToolResultError struct{…}
    ErrorCode BetaBashCodeExecutionToolResultErrorErrorCode
    Accepts one of the following:
    const BetaBashCodeExecutionToolResultErrorErrorCodeInvalidToolInput BetaBashCodeExecutionToolResultErrorErrorCode = "invalid_tool_input"
    const BetaBashCodeExecutionToolResultErrorErrorCodeUnavailable BetaBashCodeExecutionToolResultErrorErrorCode = "unavailable"
    const BetaBashCodeExecutionToolResultErrorErrorCodeTooManyRequests BetaBashCodeExecutionToolResultErrorErrorCode = "too_many_requests"
    const BetaBashCodeExecutionToolResultErrorErrorCodeExecutionTimeExceeded BetaBashCodeExecutionToolResultErrorErrorCode = "execution_time_exceeded"
    const BetaBashCodeExecutionToolResultErrorErrorCodeOutputFileTooLarge BetaBashCodeExecutionToolResultErrorErrorCode = "output_file_too_large"
    Type BashCodeExecutionToolResultError
    type BetaBashCodeExecutionToolResultErrorParamResp struct{…}
    ErrorCode BetaBashCodeExecutionToolResultErrorParamErrorCode
    Accepts one of the following:
    const BetaBashCodeExecutionToolResultErrorParamErrorCodeInvalidToolInput BetaBashCodeExecutionToolResultErrorParamErrorCode = "invalid_tool_input"
    const BetaBashCodeExecutionToolResultErrorParamErrorCodeUnavailable BetaBashCodeExecutionToolResultErrorParamErrorCode = "unavailable"
    const BetaBashCodeExecutionToolResultErrorParamErrorCodeTooManyRequests BetaBashCodeExecutionToolResultErrorParamErrorCode = "too_many_requests"
    const BetaBashCodeExecutionToolResultErrorParamErrorCodeExecutionTimeExceeded BetaBashCodeExecutionToolResultErrorParamErrorCode = "execution_time_exceeded"
    const BetaBashCodeExecutionToolResultErrorParamErrorCodeOutputFileTooLarge BetaBashCodeExecutionToolResultErrorParamErrorCode = "output_file_too_large"
    Type BashCodeExecutionToolResultError
    type BetaCacheControlEphemeral struct{…}
    Type Ephemeral
    TTL BetaCacheControlEphemeralTTLoptional

    The time-to-live for the cache control breakpoint.

    This may be one the following values:

    • 5m: 5 minutes
    • 1h: 1 hour

    Defaults to 5m.

    Accepts one of the following:
    const BetaCacheControlEphemeralTTLTTL5m BetaCacheControlEphemeralTTL = "5m"
    const BetaCacheControlEphemeralTTLTTL1h BetaCacheControlEphemeralTTL = "1h"
    type BetaCacheCreation struct{…}
    Ephemeral1hInputTokens int64

    The number of input tokens used to create the 1 hour cache entry.

    Ephemeral5mInputTokens int64

    The number of input tokens used to create the 5 minute cache entry.

    type BetaCitationCharLocation struct{…}
    CitedText string
    DocumentIndex int64
    DocumentTitle string
    EndCharIndex int64
    FileID string
    StartCharIndex int64
    Type CharLocation
    type BetaCitationCharLocationParamResp struct{…}
    CitedText string
    DocumentIndex int64
    DocumentTitle string
    EndCharIndex int64
    StartCharIndex int64
    Type CharLocation
    type BetaCitationConfig struct{…}
    Enabled bool
    type BetaCitationContentBlockLocation struct{…}
    CitedText string
    DocumentIndex int64
    DocumentTitle string
    EndBlockIndex int64
    FileID string
    StartBlockIndex int64
    Type ContentBlockLocation
    type BetaCitationContentBlockLocationParamResp struct{…}
    CitedText string
    DocumentIndex int64
    DocumentTitle string
    EndBlockIndex int64
    StartBlockIndex int64
    Type ContentBlockLocation
    type BetaCitationPageLocation struct{…}
    CitedText string
    DocumentIndex int64
    DocumentTitle string
    EndPageNumber int64
    FileID string
    StartPageNumber int64
    Type PageLocation
    type BetaCitationPageLocationParamResp struct{…}
    CitedText string
    DocumentIndex int64
    DocumentTitle string
    EndPageNumber int64
    StartPageNumber int64
    Type PageLocation
    type BetaCitationSearchResultLocation struct{…}
    CitedText string
    EndBlockIndex int64
    SearchResultIndex int64
    Source string
    StartBlockIndex int64
    Title string
    Type SearchResultLocation
    type BetaCitationSearchResultLocationParamResp struct{…}
    CitedText string
    EndBlockIndex int64
    SearchResultIndex int64
    Source string
    StartBlockIndex int64
    Title string
    Type SearchResultLocation
    type BetaCitationWebSearchResultLocationParamResp struct{…}
    CitedText string
    EncryptedIndex string
    Title string
    Type WebSearchResultLocation
    URL string
    type BetaCitationsConfigParamResp struct{…}
    Enabled booloptional
    type BetaCitationsDelta struct{…}
    Citation BetaCitationsDeltaCitationUnion
    Accepts one of the following:
    type BetaCitationCharLocation struct{…}
    CitedText string
    DocumentIndex int64
    DocumentTitle string
    EndCharIndex int64
    FileID string
    StartCharIndex int64
    Type CharLocation
    type BetaCitationPageLocation struct{…}
    CitedText string
    DocumentIndex int64
    DocumentTitle string
    EndPageNumber int64
    FileID string
    StartPageNumber int64
    Type PageLocation
    type BetaCitationContentBlockLocation struct{…}
    CitedText string
    DocumentIndex int64
    DocumentTitle string
    EndBlockIndex int64
    FileID string
    StartBlockIndex int64
    Type ContentBlockLocation
    type BetaCitationsWebSearchResultLocation struct{…}
    CitedText string
    EncryptedIndex string
    Title string
    Type WebSearchResultLocation
    URL string
    type BetaCitationSearchResultLocation struct{…}
    CitedText string
    EndBlockIndex int64
    SearchResultIndex int64
    Source string
    StartBlockIndex int64
    Title string
    Type SearchResultLocation
    Type CitationsDelta
    type BetaCitationsWebSearchResultLocation struct{…}
    CitedText string
    EncryptedIndex string
    Title string
    Type WebSearchResultLocation
    URL string
    type BetaClearThinking20251015Edit struct{…}
    Type ClearThinking20251015
    Keep BetaClearThinking20251015EditKeepUnionoptional

    Number of most recent assistant turns to keep thinking blocks for. Older turns will have their thinking blocks removed.

    Accepts one of the following:
    type BetaThinkingTurns struct{…}
    Type ThinkingTurns
    Value int64
    type BetaAllThinkingTurns struct{…}
    Type All
    All
    type BetaClearThinking20251015EditResponse struct{…}
    ClearedInputTokens int64

    Number of input tokens cleared by this edit.

    ClearedThinkingTurns int64

    Number of thinking turns that were cleared.

    Type ClearThinking20251015

    The type of context management edit applied.

    type BetaClearToolUses20250919Edit struct{…}
    Type ClearToolUses20250919
    ClearAtLeast BetaInputTokensClearAtLeastoptional

    Minimum number of tokens that must be cleared when triggered. Context will only be modified if at least this many tokens can be removed.

    Type InputTokens
    Value int64
    ClearToolInputs BetaClearToolUses20250919EditClearToolInputsUnionoptional

    Whether to clear all tool inputs (bool) or specific tool inputs to clear (list)

    Accepts one of the following:
    bool
    []string
    ExcludeTools []stringoptional

    Tool names whose uses are preserved from clearing

    Keep BetaToolUsesKeepoptional

    Number of tool uses to retain in the conversation

    Type ToolUses
    Value int64
    Trigger BetaClearToolUses20250919EditTriggerUnionoptional

    Condition that triggers the context management strategy

    Accepts one of the following:
    type BetaInputTokensTrigger struct{…}
    Type InputTokens
    Value int64
    type BetaToolUsesTrigger struct{…}
    Type ToolUses
    Value int64
    type BetaClearToolUses20250919EditResponse struct{…}
    ClearedInputTokens int64

    Number of input tokens cleared by this edit.

    ClearedToolUses int64

    Number of tool uses that were cleared.

    Type ClearToolUses20250919

    The type of context management edit applied.

    type BetaCodeExecutionOutputBlock struct{…}
    FileID string
    Type CodeExecutionOutput
    type BetaCodeExecutionOutputBlockParamResp struct{…}
    FileID string
    Type CodeExecutionOutput
    type BetaCodeExecutionResultBlock struct{…}
    Content []BetaCodeExecutionOutputBlock
    FileID string
    Type CodeExecutionOutput
    ReturnCode int64
    Stderr string
    Stdout string
    Type CodeExecutionResult
    type BetaCodeExecutionResultBlockParamResp struct{…}
    Content []BetaCodeExecutionOutputBlockParamResp
    FileID string
    Type CodeExecutionOutput
    ReturnCode int64
    Stderr string
    Stdout string
    Type CodeExecutionResult
    type BetaCodeExecutionTool20250522 struct{…}
    Name CodeExecution

    Name of the tool.

    This is how the tool will be called by the model and in tool_use blocks.

    Type CodeExecution20250522
    AllowedCallers []stringoptional
    Accepts one of the following:
    const BetaCodeExecutionTool20250522AllowedCallerDirect BetaCodeExecutionTool20250522AllowedCaller = "direct"
    const BetaCodeExecutionTool20250522AllowedCallerCodeExecution20250825 BetaCodeExecutionTool20250522AllowedCaller = "code_execution_20250825"
    const BetaCodeExecutionTool20250522AllowedCallerCodeExecution20260120 BetaCodeExecutionTool20250522AllowedCaller = "code_execution_20260120"
    CacheControl BetaCacheControlEphemeraloptional

    Create a cache control breakpoint at this content block.

    Type Ephemeral
    TTL BetaCacheControlEphemeralTTLoptional

    The time-to-live for the cache control breakpoint.

    This may be one the following values:

    • 5m: 5 minutes
    • 1h: 1 hour

    Defaults to 5m.

    Accepts one of the following:
    const BetaCacheControlEphemeralTTLTTL5m BetaCacheControlEphemeralTTL = "5m"
    const BetaCacheControlEphemeralTTLTTL1h BetaCacheControlEphemeralTTL = "1h"
    DeferLoading booloptional

    If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.

    Strict booloptional

    When true, guarantees schema validation on tool names and inputs

    type BetaCodeExecutionTool20250825 struct{…}
    Name CodeExecution

    Name of the tool.

    This is how the tool will be called by the model and in tool_use blocks.

    Type CodeExecution20250825
    AllowedCallers []stringoptional
    Accepts one of the following:
    const BetaCodeExecutionTool20250825AllowedCallerDirect BetaCodeExecutionTool20250825AllowedCaller = "direct"
    const BetaCodeExecutionTool20250825AllowedCallerCodeExecution20250825 BetaCodeExecutionTool20250825AllowedCaller = "code_execution_20250825"
    const BetaCodeExecutionTool20250825AllowedCallerCodeExecution20260120 BetaCodeExecutionTool20250825AllowedCaller = "code_execution_20260120"
    CacheControl BetaCacheControlEphemeraloptional

    Create a cache control breakpoint at this content block.

    Type Ephemeral
    TTL BetaCacheControlEphemeralTTLoptional

    The time-to-live for the cache control breakpoint.

    This may be one the following values:

    • 5m: 5 minutes
    • 1h: 1 hour

    Defaults to 5m.

    Accepts one of the following:
    const BetaCacheControlEphemeralTTLTTL5m BetaCacheControlEphemeralTTL = "5m"
    const BetaCacheControlEphemeralTTLTTL1h BetaCacheControlEphemeralTTL = "1h"
    DeferLoading booloptional

    If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.

    Strict booloptional

    When true, guarantees schema validation on tool names and inputs

    type BetaCodeExecutionTool20260120 struct{…}

    Code execution tool with REPL state persistence (daemon mode + gVisor checkpoint).

    Name CodeExecution

    Name of the tool.

    This is how the tool will be called by the model and in tool_use blocks.

    Type CodeExecution20260120
    AllowedCallers []stringoptional
    Accepts one of the following:
    const BetaCodeExecutionTool20260120AllowedCallerDirect BetaCodeExecutionTool20260120AllowedCaller = "direct"
    const BetaCodeExecutionTool20260120AllowedCallerCodeExecution20250825 BetaCodeExecutionTool20260120AllowedCaller = "code_execution_20250825"
    const BetaCodeExecutionTool20260120AllowedCallerCodeExecution20260120 BetaCodeExecutionTool20260120AllowedCaller = "code_execution_20260120"
    CacheControl BetaCacheControlEphemeraloptional

    Create a cache control breakpoint at this content block.

    Type Ephemeral
    TTL BetaCacheControlEphemeralTTLoptional

    The time-to-live for the cache control breakpoint.

    This may be one the following values:

    • 5m: 5 minutes
    • 1h: 1 hour

    Defaults to 5m.

    Accepts one of the following:
    const BetaCacheControlEphemeralTTLTTL5m BetaCacheControlEphemeralTTL = "5m"
    const BetaCacheControlEphemeralTTLTTL1h BetaCacheControlEphemeralTTL = "1h"
    DeferLoading booloptional

    If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.

    Strict booloptional

    When true, guarantees schema validation on tool names and inputs

    type BetaCodeExecutionToolResultBlock struct{…}
    Content BetaCodeExecutionToolResultBlockContentUnion

    Code execution result with encrypted stdout for PFC + web_search results.

    Accepts one of the following:
    type BetaCodeExecutionToolResultError struct{…}
    ErrorCode BetaCodeExecutionToolResultErrorCode
    Accepts one of the following:
    const BetaCodeExecutionToolResultErrorCodeInvalidToolInput BetaCodeExecutionToolResultErrorCode = "invalid_tool_input"
    const BetaCodeExecutionToolResultErrorCodeUnavailable BetaCodeExecutionToolResultErrorCode = "unavailable"
    const BetaCodeExecutionToolResultErrorCodeTooManyRequests BetaCodeExecutionToolResultErrorCode = "too_many_requests"
    const BetaCodeExecutionToolResultErrorCodeExecutionTimeExceeded BetaCodeExecutionToolResultErrorCode = "execution_time_exceeded"
    Type CodeExecutionToolResultError
    type BetaCodeExecutionResultBlock struct{…}
    Content []BetaCodeExecutionOutputBlock
    FileID string
    Type CodeExecutionOutput
    ReturnCode int64
    Stderr string
    Stdout string
    Type CodeExecutionResult
    type BetaEncryptedCodeExecutionResultBlock struct{…}

    Code execution result with encrypted stdout for PFC + web_search results.

    Content []BetaCodeExecutionOutputBlock
    FileID string
    Type CodeExecutionOutput
    EncryptedStdout string
    ReturnCode int64
    Stderr string
    Type EncryptedCodeExecutionResult
    ToolUseID string
    Type CodeExecutionToolResult
    type BetaCodeExecutionToolResultBlockContentUnion interface{…}

    Code execution result with encrypted stdout for PFC + web_search results.

    Accepts one of the following:
    type BetaCodeExecutionToolResultError struct{…}
    ErrorCode BetaCodeExecutionToolResultErrorCode
    Accepts one of the following:
    const BetaCodeExecutionToolResultErrorCodeInvalidToolInput BetaCodeExecutionToolResultErrorCode = "invalid_tool_input"
    const BetaCodeExecutionToolResultErrorCodeUnavailable BetaCodeExecutionToolResultErrorCode = "unavailable"
    const BetaCodeExecutionToolResultErrorCodeTooManyRequests BetaCodeExecutionToolResultErrorCode = "too_many_requests"
    const BetaCodeExecutionToolResultErrorCodeExecutionTimeExceeded BetaCodeExecutionToolResultErrorCode = "execution_time_exceeded"
    Type CodeExecutionToolResultError
    type BetaCodeExecutionResultBlock struct{…}
    Content []BetaCodeExecutionOutputBlock
    FileID string
    Type CodeExecutionOutput
    ReturnCode int64
    Stderr string
    Stdout string
    Type CodeExecutionResult
    type BetaEncryptedCodeExecutionResultBlock struct{…}

    Code execution result with encrypted stdout for PFC + web_search results.

    Content []BetaCodeExecutionOutputBlock
    FileID string
    Type CodeExecutionOutput
    EncryptedStdout string
    ReturnCode int64
    Stderr string
    Type EncryptedCodeExecutionResult
    type BetaCodeExecutionToolResultBlockParamResp struct{…}
    Content BetaCodeExecutionToolResultBlockParamContentUnionResp

    Code execution result with encrypted stdout for PFC + web_search results.

    Accepts one of the following:
    type BetaCodeExecutionToolResultErrorParamResp struct{…}
    ErrorCode BetaCodeExecutionToolResultErrorCode
    Accepts one of the following:
    const BetaCodeExecutionToolResultErrorCodeInvalidToolInput BetaCodeExecutionToolResultErrorCode = "invalid_tool_input"
    const BetaCodeExecutionToolResultErrorCodeUnavailable BetaCodeExecutionToolResultErrorCode = "unavailable"
    const BetaCodeExecutionToolResultErrorCodeTooManyRequests BetaCodeExecutionToolResultErrorCode = "too_many_requests"
    const BetaCodeExecutionToolResultErrorCodeExecutionTimeExceeded BetaCodeExecutionToolResultErrorCode = "execution_time_exceeded"
    Type CodeExecutionToolResultError
    type BetaCodeExecutionResultBlockParamResp struct{…}
    Content []BetaCodeExecutionOutputBlockParamResp
    FileID string
    Type CodeExecutionOutput
    ReturnCode int64
    Stderr string
    Stdout string
    Type CodeExecutionResult
    type BetaEncryptedCodeExecutionResultBlockParamResp struct{…}

    Code execution result with encrypted stdout for PFC + web_search results.

    Content []BetaCodeExecutionOutputBlockParamResp
    FileID string
    Type CodeExecutionOutput
    EncryptedStdout string
    ReturnCode int64
    Stderr string
    Type EncryptedCodeExecutionResult
    ToolUseID string
    Type CodeExecutionToolResult
    CacheControl BetaCacheControlEphemeraloptional

    Create a cache control breakpoint at this content block.

    Type Ephemeral
    TTL BetaCacheControlEphemeralTTLoptional

    The time-to-live for the cache control breakpoint.

    This may be one the following values:

    • 5m: 5 minutes
    • 1h: 1 hour

    Defaults to 5m.

    Accepts one of the following:
    const BetaCacheControlEphemeralTTLTTL5m BetaCacheControlEphemeralTTL = "5m"
    const BetaCacheControlEphemeralTTLTTL1h BetaCacheControlEphemeralTTL = "1h"
    type BetaCodeExecutionToolResultBlockParamContentUnionResp interface{…}

    Code execution result with encrypted stdout for PFC + web_search results.

    Accepts one of the following:
    type BetaCodeExecutionToolResultErrorParamResp struct{…}
    ErrorCode BetaCodeExecutionToolResultErrorCode
    Accepts one of the following:
    const BetaCodeExecutionToolResultErrorCodeInvalidToolInput BetaCodeExecutionToolResultErrorCode = "invalid_tool_input"
    const BetaCodeExecutionToolResultErrorCodeUnavailable BetaCodeExecutionToolResultErrorCode = "unavailable"
    const BetaCodeExecutionToolResultErrorCodeTooManyRequests BetaCodeExecutionToolResultErrorCode = "too_many_requests"
    const BetaCodeExecutionToolResultErrorCodeExecutionTimeExceeded BetaCodeExecutionToolResultErrorCode = "execution_time_exceeded"
    Type CodeExecutionToolResultError
    type BetaCodeExecutionResultBlockParamResp struct{…}
    Content []BetaCodeExecutionOutputBlockParamResp
    FileID string
    Type CodeExecutionOutput
    ReturnCode int64
    Stderr string
    Stdout string
    Type CodeExecutionResult
    type BetaEncryptedCodeExecutionResultBlockParamResp struct{…}

    Code execution result with encrypted stdout for PFC + web_search results.

    Content []BetaCodeExecutionOutputBlockParamResp
    FileID string
    Type CodeExecutionOutput
    EncryptedStdout string
    ReturnCode int64
    Stderr string
    Type EncryptedCodeExecutionResult
    type BetaCodeExecutionToolResultError struct{…}
    ErrorCode BetaCodeExecutionToolResultErrorCode
    Accepts one of the following:
    const BetaCodeExecutionToolResultErrorCodeInvalidToolInput BetaCodeExecutionToolResultErrorCode = "invalid_tool_input"
    const BetaCodeExecutionToolResultErrorCodeUnavailable BetaCodeExecutionToolResultErrorCode = "unavailable"
    const BetaCodeExecutionToolResultErrorCodeTooManyRequests BetaCodeExecutionToolResultErrorCode = "too_many_requests"
    const BetaCodeExecutionToolResultErrorCodeExecutionTimeExceeded BetaCodeExecutionToolResultErrorCode = "execution_time_exceeded"
    Type CodeExecutionToolResultError
    type BetaCodeExecutionToolResultErrorCode string
    Accepts one of the following:
    const BetaCodeExecutionToolResultErrorCodeInvalidToolInput BetaCodeExecutionToolResultErrorCode = "invalid_tool_input"
    const BetaCodeExecutionToolResultErrorCodeUnavailable BetaCodeExecutionToolResultErrorCode = "unavailable"
    const BetaCodeExecutionToolResultErrorCodeTooManyRequests BetaCodeExecutionToolResultErrorCode = "too_many_requests"
    const BetaCodeExecutionToolResultErrorCodeExecutionTimeExceeded BetaCodeExecutionToolResultErrorCode = "execution_time_exceeded"
    type BetaCodeExecutionToolResultErrorParamResp struct{…}
    ErrorCode BetaCodeExecutionToolResultErrorCode
    Accepts one of the following:
    const BetaCodeExecutionToolResultErrorCodeInvalidToolInput BetaCodeExecutionToolResultErrorCode = "invalid_tool_input"
    const BetaCodeExecutionToolResultErrorCodeUnavailable BetaCodeExecutionToolResultErrorCode = "unavailable"
    const BetaCodeExecutionToolResultErrorCodeTooManyRequests BetaCodeExecutionToolResultErrorCode = "too_many_requests"
    const BetaCodeExecutionToolResultErrorCodeExecutionTimeExceeded BetaCodeExecutionToolResultErrorCode = "execution_time_exceeded"
    Type CodeExecutionToolResultError
    type BetaCompact20260112Edit struct{…}

    Automatically compact older context when reaching the configured trigger threshold.

    Type Compact20260112
    Instructions stringoptional

    Additional instructions for summarization.

    PauseAfterCompaction booloptional

    Whether to pause after compaction and return the compaction block to the user.

    Trigger BetaInputTokensTriggeroptional

    When to trigger compaction. Defaults to 150000 input tokens.

    Type InputTokens
    Value int64
    type BetaCompactionBlock struct{…}

    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.

    Content string

    Summary of compacted content, or null if compaction failed

    Type Compaction
    type BetaCompactionBlockParamResp struct{…}

    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.

    Content string

    Summary of previously compacted content, or null if compaction failed

    Type Compaction
    CacheControl BetaCacheControlEphemeraloptional

    Create a cache control breakpoint at this content block.

    Type Ephemeral
    TTL BetaCacheControlEphemeralTTLoptional

    The time-to-live for the cache control breakpoint.

    This may be one the following values:

    • 5m: 5 minutes
    • 1h: 1 hour

    Defaults to 5m.

    Accepts one of the following:
    const BetaCacheControlEphemeralTTLTTL5m BetaCacheControlEphemeralTTL = "5m"
    const BetaCacheControlEphemeralTTLTTL1h BetaCacheControlEphemeralTTL = "1h"
    type BetaCompactionContentBlockDelta struct{…}
    Content string
    Type CompactionDelta
    type BetaCompactionIterationUsage struct{…}

    Token usage for a compaction iteration.

    CacheCreation BetaCacheCreation

    Breakdown of cached tokens by TTL

    Ephemeral1hInputTokens int64

    The number of input tokens used to create the 1 hour cache entry.

    Ephemeral5mInputTokens int64

    The number of input tokens used to create the 5 minute cache entry.

    CacheCreationInputTokens int64

    The number of input tokens used to create the cache entry.

    CacheReadInputTokens int64

    The number of input tokens read from the cache.

    InputTokens int64

    The number of input tokens which were used.

    OutputTokens int64

    The number of output tokens which were used.

    Type Compaction

    Usage for a compaction iteration

    type BetaContainer struct{…}

    Information about the container used in the request (for the code execution tool)

    ID string

    Identifier for the container used in this request

    ExpiresAt Time

    The time at which the container will expire.

    Skills []BetaSkill

    Skills loaded in the container

    SkillID string

    Skill ID

    Type BetaSkillType

    Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined)

    Accepts one of the following:
    const BetaSkillTypeAnthropic BetaSkillType = "anthropic"
    const BetaSkillTypeCustom BetaSkillType = "custom"
    Version string

    Skill version or 'latest' for most recent version

    type BetaContainerParamsResp struct{…}

    Container parameters with skills to be loaded.

    ID stringoptional

    Container id

    Skills []BetaSkillParamsRespoptional

    List of skills to load in the container

    SkillID string

    Skill ID

    Type BetaSkillParamsType

    Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined)

    Accepts one of the following:
    const BetaSkillParamsTypeAnthropic BetaSkillParamsType = "anthropic"
    const BetaSkillParamsTypeCustom BetaSkillParamsType = "custom"
    Version stringoptional

    Skill version or 'latest' for most recent version

    type BetaContainerUploadBlock struct{…}

    Response model for a file uploaded to the container.

    FileID string
    Type ContainerUpload
    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.

    FileID string
    Type ContainerUpload
    CacheControl BetaCacheControlEphemeraloptional

    Create a cache control breakpoint at this content block.

    Type Ephemeral
    TTL BetaCacheControlEphemeralTTLoptional

    The time-to-live for the cache control breakpoint.

    This may be one the following values:

    • 5m: 5 minutes
    • 1h: 1 hour

    Defaults to 5m.

    Accepts one of the following:
    const BetaCacheControlEphemeralTTLTTL5m BetaCacheControlEphemeralTTL = "5m"
    const BetaCacheControlEphemeralTTLTTL1h BetaCacheControlEphemeralTTL = "1h"
    type BetaContentBlockUnion interface{…}

    Response model for a file uploaded to the container.

    Accepts one of the following:
    type BetaTextBlock struct{…}
    Citations []BetaTextCitationUnion

    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.

    Accepts one of the following:
    type BetaCitationCharLocation struct{…}
    CitedText string
    DocumentIndex int64
    DocumentTitle string
    EndCharIndex int64
    FileID string
    StartCharIndex int64
    Type CharLocation
    type BetaCitationPageLocation struct{…}
    CitedText string
    DocumentIndex int64
    DocumentTitle string
    EndPageNumber int64
    FileID string
    StartPageNumber int64
    Type PageLocation
    type BetaCitationContentBlockLocation struct{…}
    CitedText string
    DocumentIndex int64
    DocumentTitle string
    EndBlockIndex int64
    FileID string
    StartBlockIndex int64
    Type ContentBlockLocation
    type BetaCitationsWebSearchResultLocation struct{…}
    CitedText string
    EncryptedIndex string
    Title string
    Type WebSearchResultLocation
    URL string
    type BetaCitationSearchResultLocation struct{…}
    CitedText string
    EndBlockIndex int64
    SearchResultIndex int64
    Source string
    StartBlockIndex int64
    Title string
    Type SearchResultLocation
    Text string
    Type Text
    type BetaThinkingBlock struct{…}
    Signature string
    Thinking string
    Type Thinking
    type BetaRedactedThinkingBlock struct{…}
    Data string
    Type RedactedThinking
    type BetaToolUseBlock struct{…}
    ID string
    Input map[string, any]
    Name string
    Type ToolUse
    Caller BetaToolUseBlockCallerUnionoptional

    Tool invocation directly from the model.

    Accepts one of the following:
    type BetaDirectCaller struct{…}

    Tool invocation directly from the model.

    Type Direct
    type BetaServerToolCaller struct{…}

    Tool invocation generated by a server-side tool.

    ToolID string
    Type CodeExecution20250825
    type BetaServerToolCaller20260120 struct{…}
    ToolID string
    Type CodeExecution20260120
    type BetaServerToolUseBlock struct{…}
    ID string
    Input map[string, any]
    Name BetaServerToolUseBlockName
    Accepts one of the following:
    const BetaServerToolUseBlockNameWebSearch BetaServerToolUseBlockName = "web_search"
    const BetaServerToolUseBlockNameWebFetch BetaServerToolUseBlockName = "web_fetch"
    const BetaServerToolUseBlockNameCodeExecution BetaServerToolUseBlockName = "code_execution"
    const BetaServerToolUseBlockNameBashCodeExecution BetaServerToolUseBlockName = "bash_code_execution"
    const BetaServerToolUseBlockNameTextEditorCodeExecution BetaServerToolUseBlockName = "text_editor_code_execution"
    const BetaServerToolUseBlockNameToolSearchToolRegex BetaServerToolUseBlockName = "tool_search_tool_regex"
    const BetaServerToolUseBlockNameToolSearchToolBm25 BetaServerToolUseBlockName = "tool_search_tool_bm25"
    Type ServerToolUse
    Caller BetaServerToolUseBlockCallerUnionoptional

    Tool invocation directly from the model.

    Accepts one of the following:
    type BetaDirectCaller struct{…}

    Tool invocation directly from the model.

    Type Direct
    type BetaServerToolCaller struct{…}

    Tool invocation generated by a server-side tool.

    ToolID string
    Type CodeExecution20250825
    type BetaServerToolCaller20260120 struct{…}
    ToolID string
    Type CodeExecution20260120
    type BetaWebSearchToolResultBlock struct{…}
    Content BetaWebSearchToolResultBlockContentUnion
    Accepts one of the following:
    type BetaWebSearchToolResultError struct{…}
    ErrorCode BetaWebSearchToolResultErrorCode
    Accepts one of the following:
    const BetaWebSearchToolResultErrorCodeInvalidToolInput BetaWebSearchToolResultErrorCode = "invalid_tool_input"
    const BetaWebSearchToolResultErrorCodeUnavailable BetaWebSearchToolResultErrorCode = "unavailable"
    const BetaWebSearchToolResultErrorCodeMaxUsesExceeded BetaWebSearchToolResultErrorCode = "max_uses_exceeded"
    const BetaWebSearchToolResultErrorCodeTooManyRequests BetaWebSearchToolResultErrorCode = "too_many_requests"
    const BetaWebSearchToolResultErrorCodeQueryTooLong BetaWebSearchToolResultErrorCode = "query_too_long"
    const BetaWebSearchToolResultErrorCodeRequestTooLarge BetaWebSearchToolResultErrorCode = "request_too_large"
    Type WebSearchToolResultError
    type BetaWebSearchToolResultBlockContentArray []BetaWebSearchResultBlock
    EncryptedContent string
    PageAge string
    Title string
    Type WebSearchResult
    URL string
    ToolUseID string
    Type WebSearchToolResult
    Caller BetaWebSearchToolResultBlockCallerUnionoptional

    Tool invocation directly from the model.

    Accepts one of the following:
    type BetaDirectCaller struct{…}

    Tool invocation directly from the model.

    Type Direct
    type BetaServerToolCaller struct{…}

    Tool invocation generated by a server-side tool.

    ToolID string
    Type CodeExecution20250825
    type BetaServerToolCaller20260120 struct{…}
    ToolID string
    Type CodeExecution20260120
    type BetaWebFetchToolResultBlock struct{…}
    Content BetaWebFetchToolResultBlockContentUnion
    Accepts one of the following:
    type BetaWebFetchToolResultErrorBlock struct{…}
    ErrorCode BetaWebFetchToolResultErrorCode
    Accepts one of the following:
    const BetaWebFetchToolResultErrorCodeInvalidToolInput BetaWebFetchToolResultErrorCode = "invalid_tool_input"
    const BetaWebFetchToolResultErrorCodeURLTooLong BetaWebFetchToolResultErrorCode = "url_too_long"
    const BetaWebFetchToolResultErrorCodeURLNotAllowed BetaWebFetchToolResultErrorCode = "url_not_allowed"
    const BetaWebFetchToolResultErrorCodeURLNotAccessible BetaWebFetchToolResultErrorCode = "url_not_accessible"
    const BetaWebFetchToolResultErrorCodeUnsupportedContentType BetaWebFetchToolResultErrorCode = "unsupported_content_type"
    const BetaWebFetchToolResultErrorCodeTooManyRequests BetaWebFetchToolResultErrorCode = "too_many_requests"
    const BetaWebFetchToolResultErrorCodeMaxUsesExceeded BetaWebFetchToolResultErrorCode = "max_uses_exceeded"
    const BetaWebFetchToolResultErrorCodeUnavailable BetaWebFetchToolResultErrorCode = "unavailable"
    Type WebFetchToolResultError
    type BetaWebFetchBlock struct{…}
    Content BetaDocumentBlock
    Citations BetaCitationConfig

    Citation configuration for the document

    Enabled bool
    Source BetaDocumentBlockSourceUnion
    Accepts one of the following:
    type BetaBase64PDFSource struct{…}
    Data string
    MediaType ApplicationPDF
    Type Base64
    type BetaPlainTextSource struct{…}
    Data string
    MediaType TextPlain
    Type Text
    Title string

    The title of the document

    Type Document
    RetrievedAt string

    ISO 8601 timestamp when the content was retrieved

    Type WebFetchResult
    URL string

    Fetched content URL

    ToolUseID string
    Type WebFetchToolResult
    Caller BetaWebFetchToolResultBlockCallerUnionoptional

    Tool invocation directly from the model.

    Accepts one of the following:
    type BetaDirectCaller struct{…}

    Tool invocation directly from the model.

    Type Direct
    type BetaServerToolCaller struct{…}

    Tool invocation generated by a server-side tool.

    ToolID string
    Type CodeExecution20250825
    type BetaServerToolCaller20260120 struct{…}
    ToolID string
    Type CodeExecution20260120
    type BetaCodeExecutionToolResultBlock struct{…}
    Content BetaCodeExecutionToolResultBlockContentUnion

    Code execution result with encrypted stdout for PFC + web_search results.

    Accepts one of the following:
    type BetaCodeExecutionToolResultError struct{…}
    ErrorCode BetaCodeExecutionToolResultErrorCode
    Accepts one of the following:
    const BetaCodeExecutionToolResultErrorCodeInvalidToolInput BetaCodeExecutionToolResultErrorCode = "invalid_tool_input"
    const BetaCodeExecutionToolResultErrorCodeUnavailable BetaCodeExecutionToolResultErrorCode = "unavailable"
    const BetaCodeExecutionToolResultErrorCodeTooManyRequests BetaCodeExecutionToolResultErrorCode = "too_many_requests"
    const BetaCodeExecutionToolResultErrorCodeExecutionTimeExceeded BetaCodeExecutionToolResultErrorCode = "execution_time_exceeded"
    Type CodeExecutionToolResultError
    type BetaCodeExecutionResultBlock struct{…}
    Content []BetaCodeExecutionOutputBlock
    FileID string
    Type CodeExecutionOutput
    ReturnCode int64
    Stderr string
    Stdout string
    Type CodeExecutionResult
    type BetaEncryptedCodeExecutionResultBlock struct{…}

    Code execution result with encrypted stdout for PFC + web_search results.

    Content []BetaCodeExecutionOutputBlock
    FileID string
    Type CodeExecutionOutput
    EncryptedStdout string
    ReturnCode int64
    Stderr string
    Type EncryptedCodeExecutionResult
    ToolUseID string
    Type CodeExecutionToolResult
    type BetaBashCodeExecutionToolResultBlock struct{…}
    Content BetaBashCodeExecutionToolResultBlockContentUnion
    Accepts one of the following:
    type BetaBashCodeExecutionToolResultError struct{…}
    ErrorCode BetaBashCodeExecutionToolResultErrorErrorCode
    Accepts one of the following:
    const BetaBashCodeExecutionToolResultErrorErrorCodeInvalidToolInput BetaBashCodeExecutionToolResultErrorErrorCode = "invalid_tool_input"
    const BetaBashCodeExecutionToolResultErrorErrorCodeUnavailable BetaBashCodeExecutionToolResultErrorErrorCode = "unavailable"
    const BetaBashCodeExecutionToolResultErrorErrorCodeTooManyRequests BetaBashCodeExecutionToolResultErrorErrorCode = "too_many_requests"
    const BetaBashCodeExecutionToolResultErrorErrorCodeExecutionTimeExceeded BetaBashCodeExecutionToolResultErrorErrorCode = "execution_time_exceeded"
    const BetaBashCodeExecutionToolResultErrorErrorCodeOutputFileTooLarge BetaBashCodeExecutionToolResultErrorErrorCode = "output_file_too_large"
    Type BashCodeExecutionToolResultError
    type BetaBashCodeExecutionResultBlock struct{…}
    Content []BetaBashCodeExecutionOutputBlock
    FileID string
    Type BashCodeExecutionOutput
    ReturnCode int64
    Stderr string
    Stdout string
    Type BashCodeExecutionResult
    ToolUseID string
    Type BashCodeExecutionToolResult
    type BetaTextEditorCodeExecutionToolResultBlock struct{…}
    Content BetaTextEditorCodeExecutionToolResultBlockContentUnion
    Accepts one of the following:
    type BetaTextEditorCodeExecutionToolResultError struct{…}
    ErrorCode BetaTextEditorCodeExecutionToolResultErrorErrorCode
    Accepts one of the following:
    const BetaTextEditorCodeExecutionToolResultErrorErrorCodeInvalidToolInput BetaTextEditorCodeExecutionToolResultErrorErrorCode = "invalid_tool_input"
    const BetaTextEditorCodeExecutionToolResultErrorErrorCodeUnavailable BetaTextEditorCodeExecutionToolResultErrorErrorCode = "unavailable"
    const BetaTextEditorCodeExecutionToolResultErrorErrorCodeTooManyRequests BetaTextEditorCodeExecutionToolResultErrorErrorCode = "too_many_requests"
    const BetaTextEditorCodeExecutionToolResultErrorErrorCodeExecutionTimeExceeded BetaTextEditorCodeExecutionToolResultErrorErrorCode = "execution_time_exceeded"
    const BetaTextEditorCodeExecutionToolResultErrorErrorCodeFileNotFound BetaTextEditorCodeExecutionToolResultErrorErrorCode = "file_not_found"
    ErrorMessage string
    Type TextEditorCodeExecutionToolResultError
    type BetaTextEditorCodeExecutionViewResultBlock struct{…}
    Content string
    FileType BetaTextEditorCodeExecutionViewResultBlockFileType
    Accepts one of the following:
    const BetaTextEditorCodeExecutionViewResultBlockFileTypeText BetaTextEditorCodeExecutionViewResultBlockFileType = "text"
    const BetaTextEditorCodeExecutionViewResultBlockFileTypeImage BetaTextEditorCodeExecutionViewResultBlockFileType = "image"
    const BetaTextEditorCodeExecutionViewResultBlockFileTypePDF BetaTextEditorCodeExecutionViewResultBlockFileType = "pdf"
    NumLines int64
    StartLine int64
    TotalLines int64
    Type TextEditorCodeExecutionViewResult
    type BetaTextEditorCodeExecutionCreateResultBlock struct{…}
    IsFileUpdate bool
    Type TextEditorCodeExecutionCreateResult
    type BetaTextEditorCodeExecutionStrReplaceResultBlock struct{…}
    Lines []string
    NewLines int64
    NewStart int64
    OldLines int64
    OldStart int64
    Type TextEditorCodeExecutionStrReplaceResult
    ToolUseID string
    Type TextEditorCodeExecutionToolResult
    type BetaToolSearchToolResultBlock struct{…}
    Content BetaToolSearchToolResultBlockContentUnion
    Accepts one of the following:
    type BetaToolSearchToolResultError struct{…}
    ErrorCode BetaToolSearchToolResultErrorErrorCode
    Accepts one of the following:
    const BetaToolSearchToolResultErrorErrorCodeInvalidToolInput BetaToolSearchToolResultErrorErrorCode = "invalid_tool_input"
    const BetaToolSearchToolResultErrorErrorCodeUnavailable BetaToolSearchToolResultErrorErrorCode = "unavailable"
    const BetaToolSearchToolResultErrorErrorCodeTooManyRequests BetaToolSearchToolResultErrorErrorCode = "too_many_requests"
    const BetaToolSearchToolResultErrorErrorCodeExecutionTimeExceeded BetaToolSearchToolResultErrorErrorCode = "execution_time_exceeded"
    ErrorMessage string
    Type ToolSearchToolResultError
    type BetaToolSearchToolSearchResultBlock struct{…}
    ToolReferences []BetaToolReferenceBlock
    ToolName string
    Type ToolReference
    Type ToolSearchToolSearchResult
    ToolUseID string
    Type ToolSearchToolResult
    type BetaMCPToolUseBlock struct{…}
    ID string
    Input map[string, any]
    Name string

    The name of the MCP tool

    ServerName string

    The name of the MCP server

    Type MCPToolUse
    type BetaMCPToolResultBlock struct{…}
    Content BetaMCPToolResultBlockContentUnion
    Accepts one of the following:
    string
    type BetaMCPToolResultBlockContentBetaMCPToolResultBlockContent []BetaTextBlock
    Citations []BetaTextCitationUnion

    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.

    Accepts one of the following:
    type BetaCitationCharLocation struct{…}
    CitedText string
    DocumentIndex int64
    DocumentTitle string
    EndCharIndex int64
    FileID string
    StartCharIndex int64
    Type CharLocation
    type BetaCitationPageLocation struct{…}
    CitedText string
    DocumentIndex int64
    DocumentTitle string
    EndPageNumber int64
    FileID string
    StartPageNumber int64
    Type PageLocation
    type BetaCitationContentBlockLocation struct{…}
    CitedText string
    DocumentIndex int64
    DocumentTitle string
    EndBlockIndex int64
    FileID string
    StartBlockIndex int64
    Type ContentBlockLocation
    type BetaCitationsWebSearchResultLocation struct{…}
    CitedText string
    EncryptedIndex string
    Title string
    Type WebSearchResultLocation
    URL string
    type BetaCitationSearchResultLocation struct{…}
    CitedText string
    EndBlockIndex int64
    SearchResultIndex int64
    Source string
    StartBlockIndex int64
    Title string
    Type SearchResultLocation
    Text string
    Type Text
    IsError bool
    ToolUseID string
    Type MCPToolResult
    type BetaContainerUploadBlock struct{…}

    Response model for a file uploaded to the container.

    FileID string
    Type ContainerUpload
    type BetaCompactionBlock struct{…}

    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.

    Content string

    Summary of compacted content, or null if compaction failed

    Type Compaction
    type BetaContentBlockParamUnionResp interface{…}

    Regular text content.

    Accepts one of the following:
    type BetaTextBlockParamResp struct{…}
    Text string
    Type Text
    CacheControl BetaCacheControlEphemeraloptional

    Create a cache control breakpoint at this content block.

    Type Ephemeral
    TTL BetaCacheControlEphemeralTTLoptional

    The time-to-live for the cache control breakpoint.

    This may be one the following values:

    • 5m: 5 minutes
    • 1h: 1 hour

    Defaults to 5m.

    Accepts one of the following:
    const BetaCacheControlEphemeralTTLTTL5m BetaCacheControlEphemeralTTL = "5m"
    const BetaCacheControlEphemeralTTLTTL1h BetaCacheControlEphemeralTTL = "1h"
    Citations []BetaTextCitationParamUnionRespoptional
    Accepts one of the following:
    type BetaCitationCharLocationParamResp struct{…}
    CitedText string
    DocumentIndex int64
    DocumentTitle string
    EndCharIndex int64
    StartCharIndex int64
    Type CharLocation
    type BetaCitationPageLocationParamResp struct{…}
    CitedText string
    DocumentIndex int64
    DocumentTitle string
    EndPageNumber int64
    StartPageNumber int64
    Type PageLocation
    type BetaCitationContentBlockLocationParamResp struct{…}
    CitedText string
    DocumentIndex int64
    DocumentTitle string
    EndBlockIndex int64
    StartBlockIndex int64
    Type ContentBlockLocation
    type BetaCitationWebSearchResultLocationParamResp struct{…}
    CitedText string
    EncryptedIndex string
    Title string
    Type WebSearchResultLocation
    URL string
    type BetaCitationSearchResultLocationParamResp struct{…}
    CitedText string
    EndBlockIndex int64
    SearchResultIndex int64
    Source string
    StartBlockIndex int64
    Title string
    Type SearchResultLocation
    type BetaImageBlockParamResp struct{…}
    Source BetaImageBlockParamSourceUnionResp
    Accepts one of the following:
    type BetaBase64ImageSource struct{…}
    Data string
    MediaType BetaBase64ImageSourceMediaType
    Accepts one of the following:
    const BetaBase64ImageSourceMediaTypeImageJPEG BetaBase64ImageSourceMediaType = "image/jpeg"
    const BetaBase64ImageSourceMediaTypeImagePNG BetaBase64ImageSourceMediaType = "image/png"
    const BetaBase64ImageSourceMediaTypeImageGIF BetaBase64ImageSourceMediaType = "image/gif"
    const BetaBase64ImageSourceMediaTypeImageWebP BetaBase64ImageSourceMediaType = "image/webp"
    Type Base64
    type BetaURLImageSource struct{…}
    Type URL
    URL string
    type BetaFileImageSource struct{…}
    FileID string
    Type File
    Type Image
    CacheControl BetaCacheControlEphemeraloptional

    Create a cache control breakpoint at this content block.

    Type Ephemeral
    TTL BetaCacheControlEphemeralTTLoptional

    The time-to-live for the cache control breakpoint.

    This may be one the following values:

    • 5m: 5 minutes
    • 1h: 1 hour

    Defaults to 5m.

    Accepts one of the following:
    const BetaCacheControlEphemeralTTLTTL5m BetaCacheControlEphemeralTTL = "5m"
    const BetaCacheControlEphemeralTTLTTL1h BetaCacheControlEphemeralTTL = "1h"
    type BetaRequestDocumentBlock struct{…}
    Source BetaRequestDocumentBlockSourceUnion
    Accepts one of the following:
    type BetaBase64PDFSource struct{…}
    Data string
    MediaType ApplicationPDF
    Type Base64
    type BetaPlainTextSource struct{…}
    Data string
    MediaType TextPlain
    Type Text
    type BetaContentBlockSource struct{…}
    Content BetaContentBlockSourceContentUnion
    Accepts one of the following:
    string
    []BetaContentBlockSourceContentUnion
    Accepts one of the following:
    type BetaTextBlockParamResp struct{…}
    Text string
    Type Text
    CacheControl BetaCacheControlEphemeraloptional

    Create a cache control breakpoint at this content block.

    Type Ephemeral
    TTL BetaCacheControlEphemeralTTLoptional

    The time-to-live for the cache control breakpoint.

    This may be one the following values:

    • 5m: 5 minutes
    • 1h: 1 hour

    Defaults to 5m.

    Accepts one of the following:
    const BetaCacheControlEphemeralTTLTTL5m BetaCacheControlEphemeralTTL = "5m"
    const BetaCacheControlEphemeralTTLTTL1h BetaCacheControlEphemeralTTL = "1h"
    Citations []BetaTextCitationParamUnionRespoptional
    Accepts one of the following:
    type BetaCitationCharLocationParamResp struct{…}
    CitedText string
    DocumentIndex int64
    DocumentTitle string
    EndCharIndex int64
    StartCharIndex int64
    Type CharLocation
    type BetaCitationPageLocationParamResp struct{…}
    CitedText string
    DocumentIndex int64
    DocumentTitle string
    EndPageNumber int64
    StartPageNumber int64
    Type PageLocation
    type BetaCitationContentBlockLocationParamResp struct{…}
    CitedText string
    DocumentIndex int64
    DocumentTitle string
    EndBlockIndex int64
    StartBlockIndex int64
    Type ContentBlockLocation
    type BetaCitationWebSearchResultLocationParamResp struct{…}
    CitedText string
    EncryptedIndex string
    Title string
    Type WebSearchResultLocation
    URL string
    type BetaCitationSearchResultLocationParamResp struct{…}
    CitedText string
    EndBlockIndex int64
    SearchResultIndex int64
    Source string
    StartBlockIndex int64
    Title string
    Type SearchResultLocation
    type BetaImageBlockParamResp struct{…}
    Source BetaImageBlockParamSourceUnionResp
    Accepts one of the following:
    type BetaBase64ImageSource struct{…}
    Data string
    MediaType BetaBase64ImageSourceMediaType
    Accepts one of the following:
    const BetaBase64ImageSourceMediaTypeImageJPEG BetaBase64ImageSourceMediaType = "image/jpeg"
    const BetaBase64ImageSourceMediaTypeImagePNG BetaBase64ImageSourceMediaType = "image/png"
    const BetaBase64ImageSourceMediaTypeImageGIF BetaBase64ImageSourceMediaType = "image/gif"
    const BetaBase64ImageSourceMediaTypeImageWebP BetaBase64ImageSourceMediaType = "image/webp"
    Type Base64
    type BetaURLImageSource struct{…}
    Type URL
    URL string
    type BetaFileImageSource struct{…}
    FileID string
    Type File
    Type Image
    CacheControl BetaCacheControlEphemeraloptional

    Create a cache control breakpoint at this content block.

    Type Ephemeral
    TTL BetaCacheControlEphemeralTTLoptional

    The time-to-live for the cache control breakpoint.

    This may be one the following values:

    • 5m: 5 minutes
    • 1h: 1 hour

    Defaults to 5m.

    Accepts one of the following:
    const BetaCacheControlEphemeralTTLTTL5m BetaCacheControlEphemeralTTL = "5m"
    const BetaCacheControlEphemeralTTLTTL1h BetaCacheControlEphemeralTTL = "1h"
    Type Content
    type BetaURLPDFSource struct{…}
    Type URL
    URL string
    type BetaFileDocumentSource struct{…}
    FileID string
    Type File
    Type Document
    CacheControl BetaCacheControlEphemeraloptional

    Create a cache control breakpoint at this content block.

    Type Ephemeral
    TTL BetaCacheControlEphemeralTTLoptional

    The time-to-live for the cache control breakpoint.

    This may be one the following values:

    • 5m: 5 minutes
    • 1h: 1 hour

    Defaults to 5m.

    Accepts one of the following:
    const BetaCacheControlEphemeralTTLTTL5m BetaCacheControlEphemeralTTL = "5m"
    const BetaCacheControlEphemeralTTLTTL1h BetaCacheControlEphemeralTTL = "1h"
    Citations BetaCitationsConfigParamRespoptional
    Enabled booloptional
    Context stringoptional
    Title stringoptional
    type BetaSearchResultBlockParamResp struct{…}
    Content []BetaTextBlockParamResp
    Text string
    Type Text
    CacheControl BetaCacheControlEphemeraloptional

    Create a cache control breakpoint at this content block.

    Type Ephemeral
    TTL BetaCacheControlEphemeralTTLoptional

    The time-to-live for the cache control breakpoint.

    This may be one the following values:

    • 5m: 5 minutes
    • 1h: 1 hour

    Defaults to 5m.

    Accepts one of the following:
    const BetaCacheControlEphemeralTTLTTL5m BetaCacheControlEphemeralTTL = "5m"
    const BetaCacheControlEphemeralTTLTTL1h BetaCacheControlEphemeralTTL = "1h"
    Citations []BetaTextCitationParamUnionRespoptional
    Accepts one of the following:
    type BetaCitationCharLocationParamResp struct{…}
    CitedText string
    DocumentIndex int64
    DocumentTitle string
    EndCharIndex int64
    StartCharIndex int64
    Type CharLocation
    type BetaCitationPageLocationParamResp struct{…}
    CitedText string
    DocumentIndex int64
    DocumentTitle string
    EndPageNumber int64
    StartPageNumber int64
    Type PageLocation
    type BetaCitationContentBlockLocationParamResp struct{…}
    CitedText string
    DocumentIndex int64
    DocumentTitle string
    EndBlockIndex int64
    StartBlockIndex int64
    Type ContentBlockLocation
    type BetaCitationWebSearchResultLocationParamResp struct{…}
    CitedText string
    EncryptedIndex string
    Title string
    Type WebSearchResultLocation
    URL string
    type BetaCitationSearchResultLocationParamResp struct{…}
    CitedText string
    EndBlockIndex int64
    SearchResultIndex int64
    Source string
    StartBlockIndex int64
    Title string
    Type SearchResultLocation
    Source string
    Title string
    Type SearchResult
    CacheControl BetaCacheControlEphemeraloptional

    Create a cache control breakpoint at this content block.

    Type Ephemeral
    TTL BetaCacheControlEphemeralTTLoptional

    The time-to-live for the cache control breakpoint.

    This may be one the following values:

    • 5m: 5 minutes
    • 1h: 1 hour

    Defaults to 5m.

    Accepts one of the following:
    const BetaCacheControlEphemeralTTLTTL5m BetaCacheControlEphemeralTTL = "5m"
    const BetaCacheControlEphemeralTTLTTL1h BetaCacheControlEphemeralTTL = "1h"
    Citations BetaCitationsConfigParamRespoptional
    Enabled booloptional
    type BetaThinkingBlockParamResp struct{…}
    Signature string
    Thinking string
    Type Thinking
    type BetaRedactedThinkingBlockParamResp struct{…}
    Data string
    Type RedactedThinking
    type BetaToolUseBlockParamResp struct{…}
    ID string
    Input map[string, any]
    Name string
    Type ToolUse
    CacheControl BetaCacheControlEphemeraloptional

    Create a cache control breakpoint at this content block.

    Type Ephemeral
    TTL BetaCacheControlEphemeralTTLoptional

    The time-to-live for the cache control breakpoint.

    This may be one the following values:

    • 5m: 5 minutes
    • 1h: 1 hour

    Defaults to 5m.

    Accepts one of the following:
    const BetaCacheControlEphemeralTTLTTL5m BetaCacheControlEphemeralTTL = "5m"
    const BetaCacheControlEphemeralTTLTTL1h BetaCacheControlEphemeralTTL = "1h"
    Caller BetaToolUseBlockParamCallerUnionRespoptional

    Tool invocation directly from the model.

    Accepts one of the following:
    type BetaDirectCaller struct{…}

    Tool invocation directly from the model.

    Type Direct
    type BetaServerToolCaller struct{…}

    Tool invocation generated by a server-side tool.

    ToolID string
    Type CodeExecution20250825
    type BetaServerToolCaller20260120 struct{…}
    ToolID string
    Type CodeExecution20260120
    type BetaToolResultBlockParamResp struct{…}
    ToolUseID string
    Type ToolResult
    CacheControl BetaCacheControlEphemeraloptional

    Create a cache control breakpoint at this content block.

    Type Ephemeral
    TTL BetaCacheControlEphemeralTTLoptional

    The time-to-live for the cache control breakpoint.

    This may be one the following values:

    • 5m: 5 minutes
    • 1h: 1 hour

    Defaults to 5m.

    Accepts one of the following:
    const BetaCacheControlEphemeralTTLTTL5m BetaCacheControlEphemeralTTL = "5m"
    const BetaCacheControlEphemeralTTLTTL1h BetaCacheControlEphemeralTTL = "1h"
    Content []BetaToolResultBlockParamContentUnionRespoptional
    Accepts one of the following:
    []BetaToolResultBlockParamContentUnionResp
    Accepts one of the following:
    type BetaTextBlockParamResp struct{…}
    Text string
    Type Text
    CacheControl BetaCacheControlEphemeraloptional

    Create a cache control breakpoint at this content block.

    Type Ephemeral
    TTL BetaCacheControlEphemeralTTLoptional

    The time-to-live for the cache control breakpoint.

    This may be one the following values:

    • 5m: 5 minutes
    • 1h: 1 hour

    Defaults to 5m.

    Accepts one of the following:
    const BetaCacheControlEphemeralTTLTTL5m BetaCacheControlEphemeralTTL = "5m"
    const BetaCacheControlEphemeralTTLTTL1h BetaCacheControlEphemeralTTL = "1h"
    Citations []BetaTextCitationParamUnionRespoptional
    Accepts one of the following:
    type BetaCitationCharLocationParamResp struct{…}
    CitedText string
    DocumentIndex int64
    DocumentTitle string
    EndCharIndex int64
    StartCharIndex int64
    Type CharLocation
    type BetaCitationPageLocationParamResp struct{…}
    CitedText string
    DocumentIndex int64
    DocumentTitle string
    EndPageNumber int64
    StartPageNumber int64
    Type PageLocation
    type BetaCitationContentBlockLocationParamResp struct{…}
    CitedText string
    DocumentIndex int64
    DocumentTitle string
    EndBlockIndex int64
    StartBlockIndex int64
    Type ContentBlockLocation
    type BetaCitationWebSearchResultLocationParamResp struct{…}
    CitedText string
    EncryptedIndex string
    Title string
    Type WebSearchResultLocation
    URL string
    type BetaCitationSearchResultLocationParamResp struct{…}
    CitedText string
    EndBlockIndex int64
    SearchResultIndex int64
    Source string
    StartBlockIndex int64
    Title string
    Type SearchResultLocation
    type BetaImageBlockParamResp struct{…}
    Source BetaImageBlockParamSourceUnionResp
    Accepts one of the following:
    type BetaBase64ImageSource struct{…}
    Data string
    MediaType BetaBase64ImageSourceMediaType
    Accepts one of the following:
    const BetaBase64ImageSourceMediaTypeImageJPEG BetaBase64ImageSourceMediaType = "image/jpeg"
    const BetaBase64ImageSourceMediaTypeImagePNG BetaBase64ImageSourceMediaType = "image/png"
    const BetaBase64ImageSourceMediaTypeImageGIF BetaBase64ImageSourceMediaType = "image/gif"
    const BetaBase64ImageSourceMediaTypeImageWebP BetaBase64ImageSourceMediaType = "image/webp"
    Type Base64
    type BetaURLImageSource struct{…}
    Type URL
    URL string
    type BetaFileImageSource struct{…}
    FileID string
    Type File
    Type Image
    CacheControl BetaCacheControlEphemeraloptional

    Create a cache control breakpoint at this content block.

    Type Ephemeral
    TTL BetaCacheControlEphemeralTTLoptional

    The time-to-live for the cache control breakpoint.

    This may be one the following values:

    • 5m: 5 minutes
    • 1h: 1 hour

    Defaults to 5m.

    Accepts one of the following:
    const BetaCacheControlEphemeralTTLTTL5m BetaCacheControlEphemeralTTL = "5m"
    const BetaCacheControlEphemeralTTLTTL1h BetaCacheControlEphemeralTTL = "1h"
    type BetaSearchResultBlockParamResp struct{…}
    Content []BetaTextBlockParamResp
    Text string
    Type Text
    CacheControl BetaCacheControlEphemeraloptional

    Create a cache control breakpoint at this content block.

    Type Ephemeral
    TTL BetaCacheControlEphemeralTTLoptional

    The time-to-live for the cache control breakpoint.

    This may be one the following values:

    • 5m: 5 minutes
    • 1h: 1 hour

    Defaults to 5m.

    Accepts one of the following:
    const BetaCacheControlEphemeralTTLTTL5m BetaCacheControlEphemeralTTL = "5m"
    const BetaCacheControlEphemeralTTLTTL1h BetaCacheControlEphemeralTTL = "1h"
    Citations []BetaTextCitationParamUnionRespoptional
    Accepts one of the following:
    type BetaCitationCharLocationParamResp struct{…}
    CitedText string
    DocumentIndex int64
    DocumentTitle string
    EndCharIndex int64
    StartCharIndex int64
    Type CharLocation
    type BetaCitationPageLocationParamResp struct{…}
    CitedText string
    DocumentIndex int64
    DocumentTitle string
    EndPageNumber int64
    StartPageNumber int64
    Type PageLocation
    type BetaCitationContentBlockLocationParamResp struct{…}
    CitedText string
    DocumentIndex int64
    DocumentTitle string
    EndBlockIndex int64
    StartBlockIndex int64
    Type ContentBlockLocation
    type BetaCitationWebSearchResultLocationParamResp struct{…}
    CitedText string
    EncryptedIndex string
    Title string
    Type WebSearchResultLocation
    URL string
    type BetaCitationSearchResultLocationParamResp struct{…}
    CitedText string
    EndBlockIndex int64
    SearchResultIndex int64
    Source string
    StartBlockIndex int64
    Title string
    Type SearchResultLocation
    Source string
    Title string
    Type SearchResult
    CacheControl BetaCacheControlEphemeraloptional

    Create a cache control breakpoint at this content block.

    Type Ephemeral
    TTL BetaCacheControlEphemeralTTLoptional

    The time-to-live for the cache control breakpoint.

    This may be one the following values:

    • 5m: 5 minutes
    • 1h: 1 hour

    Defaults to 5m.

    Accepts one of the following:
    const BetaCacheControlEphemeralTTLTTL5m BetaCacheControlEphemeralTTL = "5m"
    const BetaCacheControlEphemeralTTLTTL1h BetaCacheControlEphemeralTTL = "1h"
    Citations BetaCitationsConfigParamRespoptional
    Enabled booloptional
    type BetaRequestDocumentBlock struct{…}
    Source BetaRequestDocumentBlockSourceUnion
    Accepts one of the following:
    type BetaBase64PDFSource struct{…}
    Data string
    MediaType ApplicationPDF
    Type Base64
    type BetaPlainTextSource struct{…}
    Data string
    MediaType TextPlain
    Type Text
    type BetaContentBlockSource struct{…}
    Content BetaContentBlockSourceContentUnion
    Accepts one of the following:
    string
    []BetaContentBlockSourceContentUnion
    Accepts one of the following:
    type BetaTextBlockParamResp struct{…}
    Text string
    Type Text
    CacheControl BetaCacheControlEphemeraloptional

    Create a cache control breakpoint at this content block.

    Type Ephemeral
    TTL BetaCacheControlEphemeralTTLoptional

    The time-to-live for the cache control breakpoint.

    This may be one the following values:

    • 5m: 5 minutes
    • 1h: 1 hour

    Defaults to 5m.

    Accepts one of the following:
    const BetaCacheControlEphemeralTTLTTL5m BetaCacheControlEphemeralTTL = "5m"
    const BetaCacheControlEphemeralTTLTTL1h BetaCacheControlEphemeralTTL = "1h"
    Citations []BetaTextCitationParamUnionRespoptional
    Accepts one of the following:
    type BetaCitationCharLocationParamResp struct{…}
    CitedText string
    DocumentIndex int64
    DocumentTitle string
    EndCharIndex int64
    StartCharIndex int64
    Type CharLocation
    type BetaCitationPageLocationParamResp struct{…}
    CitedText string
    DocumentIndex int64
    DocumentTitle string
    EndPageNumber int64
    StartPageNumber int64
    Type PageLocation
    type BetaCitationContentBlockLocationParamResp struct{…}
    CitedText string
    DocumentIndex int64
    DocumentTitle string
    EndBlockIndex int64
    StartBlockIndex int64
    Type ContentBlockLocation
    type BetaCitationWebSearchResultLocationParamResp struct{…}
    CitedText string
    EncryptedIndex string
    Title string
    Type WebSearchResultLocation
    URL string
    type BetaCitationSearchResultLocationParamResp struct{…}
    CitedText string
    EndBlockIndex int64
    SearchResultIndex int64
    Source string
    StartBlockIndex int64
    Title string
    Type SearchResultLocation
    type BetaImageBlockParamResp struct{…}
    Source BetaImageBlockParamSourceUnionResp
    Accepts one of the following:
    type BetaBase64ImageSource struct{…}
    Data string
    MediaType BetaBase64ImageSourceMediaType
    Accepts one of the following:
    const BetaBase64ImageSourceMediaTypeImageJPEG BetaBase64ImageSourceMediaType = "image/jpeg"
    const BetaBase64ImageSourceMediaTypeImagePNG BetaBase64ImageSourceMediaType = "image/png"
    const BetaBase64ImageSourceMediaTypeImageGIF BetaBase64ImageSourceMediaType = "image/gif"
    const BetaBase64ImageSourceMediaTypeImageWebP BetaBase64ImageSourceMediaType = "image/webp"
    Type Base64
    type BetaURLImageSource struct{…}
    Type URL
    URL string
    type BetaFileImageSource struct{…}
    FileID string
    Type File
    Type Image
    CacheControl BetaCacheControlEphemeraloptional

    Create a cache control breakpoint at this content block.

    Type Ephemeral
    TTL BetaCacheControlEphemeralTTLoptional

    The time-to-live for the cache control breakpoint.

    This may be one the following values:

    • 5m: 5 minutes
    • 1h: 1 hour

    Defaults to 5m.

    Accepts one of the following:
    const BetaCacheControlEphemeralTTLTTL5m BetaCacheControlEphemeralTTL = "5m"
    const BetaCacheControlEphemeralTTLTTL1h BetaCacheControlEphemeralTTL = "1h"
    Type Content
    type BetaURLPDFSource struct{…}
    Type URL
    URL string
    type BetaFileDocumentSource struct{…}
    FileID string
    Type File
    Type Document
    CacheControl BetaCacheControlEphemeraloptional

    Create a cache control breakpoint at this content block.

    Type Ephemeral
    TTL BetaCacheControlEphemeralTTLoptional

    The time-to-live for the cache control breakpoint.

    This may be one the following values:

    • 5m: 5 minutes
    • 1h: 1 hour

    Defaults to 5m.

    Accepts one of the following:
    const BetaCacheControlEphemeralTTLTTL5m BetaCacheControlEphemeralTTL = "5m"
    const BetaCacheControlEphemeralTTLTTL1h BetaCacheControlEphemeralTTL = "1h"
    Citations BetaCitationsConfigParamRespoptional
    Enabled booloptional
    Context stringoptional
    Title stringoptional
    type BetaToolReferenceBlockParamResp struct{…}

    Tool reference block that can be included in tool_result content.

    ToolName string
    Type ToolReference
    CacheControl BetaCacheControlEphemeraloptional

    Create a cache control breakpoint at this content block.

    Type Ephemeral
    TTL BetaCacheControlEphemeralTTLoptional

    The time-to-live for the cache control breakpoint.

    This may be one the following values:

    • 5m: 5 minutes
    • 1h: 1 hour

    Defaults to 5m.

    Accepts one of the following:
    const BetaCacheControlEphemeralTTLTTL5m BetaCacheControlEphemeralTTL = "5m"
    const BetaCacheControlEphemeralTTLTTL1h BetaCacheControlEphemeralTTL = "1h"
    IsError booloptional
    type BetaServerToolUseBlockParamResp struct{…}
    ID string
    Input map[string, any]
    Name BetaServerToolUseBlockParamName
    Accepts one of the following:
    const BetaServerToolUseBlockParamNameWebSearch BetaServerToolUseBlockParamName = "web_search"
    const BetaServerToolUseBlockParamNameWebFetch BetaServerToolUseBlockParamName = "web_fetch"
    const BetaServerToolUseBlockParamNameCodeExecution BetaServerToolUseBlockParamName = "code_execution"
    const BetaServerToolUseBlockParamNameBashCodeExecution BetaServerToolUseBlockParamName = "bash_code_execution"
    const BetaServerToolUseBlockParamNameTextEditorCodeExecution BetaServerToolUseBlockParamName = "text_editor_code_execution"
    const BetaServerToolUseBlockParamNameToolSearchToolRegex BetaServerToolUseBlockParamName = "tool_search_tool_regex"
    const BetaServerToolUseBlockParamNameToolSearchToolBm25 BetaServerToolUseBlockParamName = "tool_search_tool_bm25"
    Type ServerToolUse
    CacheControl BetaCacheControlEphemeraloptional

    Create a cache control breakpoint at this content block.

    Type Ephemeral
    TTL BetaCacheControlEphemeralTTLoptional

    The time-to-live for the cache control breakpoint.

    This may be one the following values:

    • 5m: 5 minutes
    • 1h: 1 hour

    Defaults to 5m.

    Accepts one of the following:
    const BetaCacheControlEphemeralTTLTTL5m BetaCacheControlEphemeralTTL = "5m"
    const BetaCacheControlEphemeralTTLTTL1h BetaCacheControlEphemeralTTL = "1h"
    Caller BetaServerToolUseBlockParamCallerUnionRespoptional

    Tool invocation directly from the model.

    Accepts one of the following:
    type BetaDirectCaller struct{…}

    Tool invocation directly from the model.

    Type Direct
    type BetaServerToolCaller struct{…}

    Tool invocation generated by a server-side tool.

    ToolID string
    Type CodeExecution20250825
    type BetaServerToolCaller20260120 struct{…}
    ToolID string
    Type CodeExecution20260120
    type BetaWebSearchToolResultBlockParamResp struct{…}
    Content BetaWebSearchToolResultBlockParamContentUnionResp
    Accepts one of the following:
    []BetaWebSearchResultBlockParamResp
    EncryptedContent string
    Title string
    Type WebSearchResult
    URL string
    PageAge stringoptional
    type BetaWebSearchToolRequestError struct{…}
    ErrorCode BetaWebSearchToolResultErrorCode
    Accepts one of the following:
    const BetaWebSearchToolResultErrorCodeInvalidToolInput BetaWebSearchToolResultErrorCode = "invalid_tool_input"
    const BetaWebSearchToolResultErrorCodeUnavailable BetaWebSearchToolResultErrorCode = "unavailable"
    const BetaWebSearchToolResultErrorCodeMaxUsesExceeded BetaWebSearchToolResultErrorCode = "max_uses_exceeded"
    const BetaWebSearchToolResultErrorCodeTooManyRequests BetaWebSearchToolResultErrorCode = "too_many_requests"
    const BetaWebSearchToolResultErrorCodeQueryTooLong BetaWebSearchToolResultErrorCode = "query_too_long"
    const BetaWebSearchToolResultErrorCodeRequestTooLarge BetaWebSearchToolResultErrorCode = "request_too_large"
    Type WebSearchToolResultError
    ToolUseID string
    Type WebSearchToolResult
    CacheControl BetaCacheControlEphemeraloptional

    Create a cache control breakpoint at this content block.

    Type Ephemeral
    TTL BetaCacheControlEphemeralTTLoptional

    The time-to-live for the cache control breakpoint.

    This may be one the following values:

    • 5m: 5 minutes
    • 1h: 1 hour

    Defaults to 5m.

    Accepts one of the following:
    const BetaCacheControlEphemeralTTLTTL5m BetaCacheControlEphemeralTTL = "5m"
    const BetaCacheControlEphemeralTTLTTL1h BetaCacheControlEphemeralTTL = "1h"
    Caller BetaWebSearchToolResultBlockParamCallerUnionRespoptional

    Tool invocation directly from the model.

    Accepts one of the following:
    type BetaDirectCaller struct{…}

    Tool invocation directly from the model.

    Type Direct
    type BetaServerToolCaller struct{…}

    Tool invocation generated by a server-side tool.

    ToolID string
    Type CodeExecution20250825
    type BetaServerToolCaller20260120 struct{…}
    ToolID string
    Type CodeExecution20260120
    type BetaWebFetchToolResultBlockParamResp struct{…}
    Content BetaWebFetchToolResultBlockParamContentUnionResp
    Accepts one of the following:
    type BetaWebFetchToolResultErrorBlockParamResp struct{…}
    ErrorCode BetaWebFetchToolResultErrorCode
    Accepts one of the following:
    const BetaWebFetchToolResultErrorCodeInvalidToolInput BetaWebFetchToolResultErrorCode = "invalid_tool_input"
    const BetaWebFetchToolResultErrorCodeURLTooLong BetaWebFetchToolResultErrorCode = "url_too_long"
    const BetaWebFetchToolResultErrorCodeURLNotAllowed BetaWebFetchToolResultErrorCode = "url_not_allowed"
    const BetaWebFetchToolResultErrorCodeURLNotAccessible BetaWebFetchToolResultErrorCode = "url_not_accessible"
    const BetaWebFetchToolResultErrorCodeUnsupportedContentType BetaWebFetchToolResultErrorCode = "unsupported_content_type"
    const BetaWebFetchToolResultErrorCodeTooManyRequests BetaWebFetchToolResultErrorCode = "too_many_requests"
    const BetaWebFetchToolResultErrorCodeMaxUsesExceeded BetaWebFetchToolResultErrorCode = "max_uses_exceeded"
    const BetaWebFetchToolResultErrorCodeUnavailable BetaWebFetchToolResultErrorCode = "unavailable"
    Type WebFetchToolResultError
    type BetaWebFetchBlockParamResp struct{…}
    Content BetaRequestDocumentBlock
    Source BetaRequestDocumentBlockSourceUnion
    Accepts one of the following:
    type BetaBase64PDFSource struct{…}
    Data string
    MediaType ApplicationPDF
    Type Base64
    type BetaPlainTextSource struct{…}
    Data string
    MediaType TextPlain
    Type Text
    type BetaContentBlockSource struct{…}
    Content BetaContentBlockSourceContentUnion
    Accepts one of the following:
    string
    []BetaContentBlockSourceContentUnion
    Accepts one of the following:
    type BetaTextBlockParamResp struct{…}
    Text string
    Type Text
    CacheControl BetaCacheControlEphemeraloptional

    Create a cache control breakpoint at this content block.

    Type Ephemeral
    TTL BetaCacheControlEphemeralTTLoptional

    The time-to-live for the cache control breakpoint.

    This may be one the following values:

    • 5m: 5 minutes
    • 1h: 1 hour

    Defaults to 5m.

    Accepts one of the following:
    const BetaCacheControlEphemeralTTLTTL5m BetaCacheControlEphemeralTTL = "5m"
    const BetaCacheControlEphemeralTTLTTL1h BetaCacheControlEphemeralTTL = "1h"
    Citations []BetaTextCitationParamUnionRespoptional
    Accepts one of the following:
    type BetaCitationCharLocationParamResp struct{…}
    CitedText string
    DocumentIndex int64
    DocumentTitle string
    EndCharIndex int64
    StartCharIndex int64
    Type CharLocation
    type BetaCitationPageLocationParamResp struct{…}
    CitedText string
    DocumentIndex int64
    DocumentTitle string
    EndPageNumber int64
    StartPageNumber int64
    Type PageLocation
    type BetaCitationContentBlockLocationParamResp struct{…}
    CitedText string
    DocumentIndex int64
    DocumentTitle string
    EndBlockIndex int64
    StartBlockIndex int64
    Type ContentBlockLocation
    type BetaCitationWebSearchResultLocationParamResp struct{…}
    CitedText string
    EncryptedIndex string
    Title string
    Type WebSearchResultLocation
    URL string
    type BetaCitationSearchResultLocationParamResp struct{…}
    CitedText string
    EndBlockIndex int64
    SearchResultIndex int64
    Source string
    StartBlockIndex int64
    Title string
    Type SearchResultLocation
    type BetaImageBlockParamResp struct{…}
    Source BetaImageBlockParamSourceUnionResp
    Accepts one of the following:
    type BetaBase64ImageSource struct{…}
    Data string
    MediaType BetaBase64ImageSourceMediaType
    Accepts one of the following:
    const BetaBase64ImageSourceMediaTypeImageJPEG BetaBase64ImageSourceMediaType = "image/jpeg"
    const BetaBase64ImageSourceMediaTypeImagePNG BetaBase64ImageSourceMediaType = "image/png"
    const BetaBase64ImageSourceMediaTypeImageGIF BetaBase64ImageSourceMediaType = "image/gif"
    const BetaBase64ImageSourceMediaTypeImageWebP BetaBase64ImageSourceMediaType = "image/webp"
    Type Base64
    type BetaURLImageSource struct{…}
    Type URL
    URL string
    type BetaFileImageSource struct{…}
    FileID string
    Type File
    Type Image
    CacheControl BetaCacheControlEphemeraloptional

    Create a cache control breakpoint at this content block.

    Type Ephemeral
    TTL BetaCacheControlEphemeralTTLoptional

    The time-to-live for the cache control breakpoint.

    This may be one the following values:

    • 5m: 5 minutes
    • 1h: 1 hour

    Defaults to 5m.

    Accepts one of the following:
    const BetaCacheControlEphemeralTTLTTL5m BetaCacheControlEphemeralTTL = "5m"
    const BetaCacheControlEphemeralTTLTTL1h BetaCacheControlEphemeralTTL = "1h"
    Type Content
    type BetaURLPDFSource struct{…}
    Type URL
    URL string
    type BetaFileDocumentSource struct{…}
    FileID string
    Type File
    Type Document
    CacheControl BetaCacheControlEphemeraloptional

    Create a cache control breakpoint at this content block.

    Type Ephemeral
    TTL BetaCacheControlEphemeralTTLoptional

    The time-to-live for the cache control breakpoint.

    This may be one the following values:

    • 5m: 5 minutes
    • 1h: 1 hour

    Defaults to 5m.

    Accepts one of the following:
    const BetaCacheControlEphemeralTTLTTL5m BetaCacheControlEphemeralTTL = "5m"
    const BetaCacheControlEphemeralTTLTTL1h BetaCacheControlEphemeralTTL = "1h"
    Citations BetaCitationsConfigParamRespoptional
    Enabled booloptional
    Context stringoptional
    Title stringoptional
    Type WebFetchResult
    URL string

    Fetched content URL

    RetrievedAt stringoptional

    ISO 8601 timestamp when the content was retrieved

    ToolUseID string
    Type WebFetchToolResult
    CacheControl BetaCacheControlEphemeraloptional

    Create a cache control breakpoint at this content block.

    Type Ephemeral
    TTL BetaCacheControlEphemeralTTLoptional

    The time-to-live for the cache control breakpoint.

    This may be one the following values:

    • 5m: 5 minutes
    • 1h: 1 hour

    Defaults to 5m.

    Accepts one of the following:
    const BetaCacheControlEphemeralTTLTTL5m BetaCacheControlEphemeralTTL = "5m"
    const BetaCacheControlEphemeralTTLTTL1h BetaCacheControlEphemeralTTL = "1h"
    Caller BetaWebFetchToolResultBlockParamCallerUnionRespoptional

    Tool invocation directly from the model.

    Accepts one of the following:
    type BetaDirectCaller struct{…}

    Tool invocation directly from the model.

    Type Direct
    type BetaServerToolCaller struct{…}

    Tool invocation generated by a server-side tool.

    ToolID string
    Type CodeExecution20250825
    type BetaServerToolCaller20260120 struct{…}
    ToolID string
    Type CodeExecution20260120
    type BetaCodeExecutionToolResultBlockParamResp struct{…}
    Content BetaCodeExecutionToolResultBlockParamContentUnionResp

    Code execution result with encrypted stdout for PFC + web_search results.

    Accepts one of the following:
    type BetaCodeExecutionToolResultErrorParamResp struct{…}
    ErrorCode BetaCodeExecutionToolResultErrorCode
    Accepts one of the following:
    const BetaCodeExecutionToolResultErrorCodeInvalidToolInput BetaCodeExecutionToolResultErrorCode = "invalid_tool_input"
    const BetaCodeExecutionToolResultErrorCodeUnavailable BetaCodeExecutionToolResultErrorCode = "unavailable"
    const BetaCodeExecutionToolResultErrorCodeTooManyRequests BetaCodeExecutionToolResultErrorCode = "too_many_requests"
    const BetaCodeExecutionToolResultErrorCodeExecutionTimeExceeded BetaCodeExecutionToolResultErrorCode = "execution_time_exceeded"
    Type CodeExecutionToolResultError
    type BetaCodeExecutionResultBlockParamResp struct{…}
    Content []BetaCodeExecutionOutputBlockParamResp
    FileID string
    Type CodeExecutionOutput
    ReturnCode int64
    Stderr string
    Stdout string
    Type CodeExecutionResult
    type BetaEncryptedCodeExecutionResultBlockParamResp struct{…}

    Code execution result with encrypted stdout for PFC + web_search results.

    Content []BetaCodeExecutionOutputBlockParamResp
    FileID string
    Type CodeExecutionOutput
    EncryptedStdout string
    ReturnCode int64
    Stderr string
    Type EncryptedCodeExecutionResult
    ToolUseID string
    Type CodeExecutionToolResult
    CacheControl BetaCacheControlEphemeraloptional

    Create a cache control breakpoint at this content block.

    Type Ephemeral
    TTL BetaCacheControlEphemeralTTLoptional

    The time-to-live for the cache control breakpoint.

    This may be one the following values:

    • 5m: 5 minutes
    • 1h: 1 hour

    Defaults to 5m.

    Accepts one of the following:
    const BetaCacheControlEphemeralTTLTTL5m BetaCacheControlEphemeralTTL = "5m"
    const BetaCacheControlEphemeralTTLTTL1h BetaCacheControlEphemeralTTL = "1h"
    type BetaBashCodeExecutionToolResultBlockParamResp struct{…}
    Content BetaBashCodeExecutionToolResultBlockParamContentUnionResp
    Accepts one of the following:
    type BetaBashCodeExecutionToolResultErrorParamResp struct{…}
    ErrorCode BetaBashCodeExecutionToolResultErrorParamErrorCode
    Accepts one of the following:
    const BetaBashCodeExecutionToolResultErrorParamErrorCodeInvalidToolInput BetaBashCodeExecutionToolResultErrorParamErrorCode = "invalid_tool_input"
    const BetaBashCodeExecutionToolResultErrorParamErrorCodeUnavailable BetaBashCodeExecutionToolResultErrorParamErrorCode = "unavailable"
    const BetaBashCodeExecutionToolResultErrorParamErrorCodeTooManyRequests BetaBashCodeExecutionToolResultErrorParamErrorCode = "too_many_requests"
    const BetaBashCodeExecutionToolResultErrorParamErrorCodeExecutionTimeExceeded BetaBashCodeExecutionToolResultErrorParamErrorCode = "execution_time_exceeded"
    const BetaBashCodeExecutionToolResultErrorParamErrorCodeOutputFileTooLarge BetaBashCodeExecutionToolResultErrorParamErrorCode = "output_file_too_large"
    Type BashCodeExecutionToolResultError
    type BetaBashCodeExecutionResultBlockParamResp struct{…}
    Content []BetaBashCodeExecutionOutputBlockParamResp
    FileID string
    Type BashCodeExecutionOutput
    ReturnCode int64
    Stderr string
    Stdout string
    Type BashCodeExecutionResult
    ToolUseID string
    Type BashCodeExecutionToolResult
    CacheControl BetaCacheControlEphemeraloptional

    Create a cache control breakpoint at this content block.

    Type Ephemeral
    TTL BetaCacheControlEphemeralTTLoptional

    The time-to-live for the cache control breakpoint.

    This may be one the following values:

    • 5m: 5 minutes
    • 1h: 1 hour

    Defaults to 5m.

    Accepts one of the following:
    const BetaCacheControlEphemeralTTLTTL5m BetaCacheControlEphemeralTTL = "5m"
    const BetaCacheControlEphemeralTTLTTL1h BetaCacheControlEphemeralTTL = "1h"
    type BetaTextEditorCodeExecutionToolResultBlockParamResp struct{…}
    Content BetaTextEditorCodeExecutionToolResultBlockParamContentUnionResp
    Accepts one of the following:
    type BetaTextEditorCodeExecutionToolResultErrorParamResp struct{…}
    ErrorCode BetaTextEditorCodeExecutionToolResultErrorParamErrorCode
    Accepts one of the following:
    const BetaTextEditorCodeExecutionToolResultErrorParamErrorCodeInvalidToolInput BetaTextEditorCodeExecutionToolResultErrorParamErrorCode = "invalid_tool_input"
    const BetaTextEditorCodeExecutionToolResultErrorParamErrorCodeUnavailable BetaTextEditorCodeExecutionToolResultErrorParamErrorCode = "unavailable"
    const BetaTextEditorCodeExecutionToolResultErrorParamErrorCodeTooManyRequests BetaTextEditorCodeExecutionToolResultErrorParamErrorCode = "too_many_requests"
    const BetaTextEditorCodeExecutionToolResultErrorParamErrorCodeExecutionTimeExceeded BetaTextEditorCodeExecutionToolResultErrorParamErrorCode = "execution_time_exceeded"
    const BetaTextEditorCodeExecutionToolResultErrorParamErrorCodeFileNotFound BetaTextEditorCodeExecutionToolResultErrorParamErrorCode = "file_not_found"
    Type TextEditorCodeExecutionToolResultError
    ErrorMessage stringoptional
    type BetaTextEditorCodeExecutionViewResultBlockParamResp struct{…}
    Content string
    FileType BetaTextEditorCodeExecutionViewResultBlockParamFileType
    Accepts one of the following:
    const BetaTextEditorCodeExecutionViewResultBlockParamFileTypeText BetaTextEditorCodeExecutionViewResultBlockParamFileType = "text"
    const BetaTextEditorCodeExecutionViewResultBlockParamFileTypeImage BetaTextEditorCodeExecutionViewResultBlockParamFileType = "image"
    const BetaTextEditorCodeExecutionViewResultBlockParamFileTypePDF BetaTextEditorCodeExecutionViewResultBlockParamFileType = "pdf"
    Type TextEditorCodeExecutionViewResult
    NumLines int64optional
    StartLine int64optional
    TotalLines int64optional
    type BetaTextEditorCodeExecutionCreateResultBlockParamResp struct{…}
    IsFileUpdate bool
    Type TextEditorCodeExecutionCreateResult
    type BetaTextEditorCodeExecutionStrReplaceResultBlockParamResp struct{…}
    Type TextEditorCodeExecutionStrReplaceResult
    Lines []stringoptional
    NewLines int64optional
    NewStart int64optional
    OldLines int64optional
    OldStart int64optional
    ToolUseID string
    Type TextEditorCodeExecutionToolResult
    CacheControl BetaCacheControlEphemeraloptional

    Create a cache control breakpoint at this content block.

    Type Ephemeral
    TTL BetaCacheControlEphemeralTTLoptional

    The time-to-live for the cache control breakpoint.

    This may be one the following values:

    • 5m: 5 minutes
    • 1h: 1 hour

    Defaults to 5m.

    Accepts one of the following:
    const BetaCacheControlEphemeralTTLTTL5m BetaCacheControlEphemeralTTL = "5m"
    const BetaCacheControlEphemeralTTLTTL1h BetaCacheControlEphemeralTTL = "1h"
    type BetaToolSearchToolResultBlockParamResp struct{…}
    Content BetaToolSearchToolResultBlockParamContentUnionResp