---
title: Messages
url: https://platform.claude.com/docs/en/api/csharp/messages
---

# Messages

## Create a Message

`Message Messages.Create(parameters, cancellationToken = default)`

**POST** `/v1/messages`

Send a structured list of input messages with text and/or image content, and the model will generate the next message in the conversation.

The Messages API can be used for either single queries or stateless multi-turn conversations.

Learn more about the Messages API in our [user guide](https://platform.claude.com/docs/en/get-started?sdk_languages=csharp)

### Parameters

- `MessageCreateParams parameters`

  - `required long maxTokens`

    The maximum number of tokens to generate before stopping.

    Note that our models may stop _before_ reaching this maximum. This parameter only specifies the absolute maximum number of tokens to generate.

    Set to `0` to populate the [prompt cache](https://platform.claude.com/docs/en/build-with-claude/prompt-caching?sdk_languages=csharp#pre-warming-the-cache) without generating a response.

    Different models have different maximum values for this parameter.  See [models](https://platform.claude.com/docs/en/about-claude/models/overview?sdk_languages=csharp) for details.

    minimum: 0

  - `required IReadOnlyList<MessageParam> messages`

    Input messages.

    Our models are trained to operate on alternating `user` and `assistant` conversational turns. When creating a new `Message`, you specify the prior conversational turns with the `messages` parameter, and the model then generates the next `Message` in the conversation. Consecutive `user` or `assistant` turns in your request will be combined into a single turn.

    Each input message must be an object with a `role` and `content`. You can specify a single `user`-role message, or you can include multiple `user` and `assistant` messages.

    If the final message uses the `assistant` role, the response content will continue immediately from the content in that message. This can be used to constrain part of the model's response. This is called prefill. On models that don't support prefill, creating a message that ends with a partial `assistant` response returns a 400 error. See [Prefill not supported](https://platform.claude.com/docs/en/api/errors?sdk_languages=csharp#prefill-not-supported).

    Example with a single `user` message:

    ```json
    [{"role": "user", "content": "Hello, Claude"}]
    ```

    Example with multiple conversational turns:

    ```json
    [
      {"role": "user", "content": "Hello there."},
      {"role": "assistant", "content": "Hi, I'm Claude. How can I help you?"},
      {"role": "user", "content": "Can you explain LLMs in plain English?"},
    ]
    ```

    Example with a partially-filled response from Claude, for models that support prefill:

    ```json
    [
      {"role": "user", "content": "What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun"},
      {"role": "assistant", "content": "The best answer is ("},
    ]
    ```

    Each input message `content` may be either a single `string` or an array of content blocks, where each block has a specific `type`. Using a `string` for `content` is shorthand for an array of one content block of type `"text"`. The following input messages are equivalent:

    ```json
    {"role": "user", "content": "Hello, Claude"}
    ```

    ```json
    {"role": "user", "content": [{"type": "text", "text": "Hello, Claude"}]}
    ```

    See [input examples](https://platform.claude.com/docs/en/build-with-claude/working-with-messages?sdk_languages=csharp).

    Note that if you want to include a [system prompt](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices?sdk_languages=csharp#give-claude-a-role), you can use the top-level `system` parameter.

    There is a limit of 100,000 messages in a single request.

    - `class UserMessageParam`

      - `required MessageContentParam Content`

        - `string`

        - `IReadOnlyList<ContentBlockParam>`

          - `class TextBlockParam`

            - `JsonElement Type = "text"`

            - `required string Text`

              minLength: 1

            - `CacheControlEphemeral? CacheControl`

              Create a cache control breakpoint at this content block.

              - `JsonElement Type = "ephemeral"`

              - `Ttl Ttl`

                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`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching?sdk_languages=csharp) for details.

                - `Ttl5m("5m")`

                - `Ttl1h("1h")`

            - `IReadOnlyList<TextCitationParam>? Citations`

              - `class CitationCharLocationParam`

                - `JsonElement Type = "char_location"`

                - `required string CitedText`

                - `required long DocumentIndex`

                  minimum: 0

                - `required string? DocumentTitle`

                  minLength: 1, maxLength: 500

                - `required long EndCharIndex`

                - `required long StartCharIndex`

                  minimum: 0

              - `class CitationPageLocationParam`

                - `JsonElement Type = "page_location"`

                - `required string CitedText`

                - `required long DocumentIndex`

                  minimum: 0

                - `required string? DocumentTitle`

                  minLength: 1, maxLength: 500

                - `required long EndPageNumber`

                - `required long StartPageNumber`

                  minimum: 1

              - `class CitationContentBlockLocationParam`

                - `JsonElement Type = "content_block_location"`

                - `required string CitedText`

                  The full text of the cited block range, concatenated.

                  Always equals the contents of `content[start_block_index:end_block_index]` joined together. The text block is the minimal citable unit; this field is never a substring of a single block. Not counted toward output tokens, and not counted toward input tokens when sent back in subsequent turns.

                - `required long DocumentIndex`

                  minimum: 0

                - `required string? DocumentTitle`

                  minLength: 1, maxLength: 500

                - `required long EndBlockIndex`

                  Exclusive 0-based end index of the cited block range in the source's `content` array.

                  Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`.

                - `required long StartBlockIndex`

                  0-based index of the first cited block in the source's `content` array.

                  minimum: 0

              - `class CitationWebSearchResultLocationParam`

                - `JsonElement Type = "web_search_result_location"`

                - `required string CitedText`

                - `required string EncryptedIndex`

                - `required string? Title`

                  minLength: 1, maxLength: 512

                - `required string Url`

                  minLength: 1

              - `class CitationSearchResultLocationParam`

                - `JsonElement Type = "search_result_location"`

                - `required string CitedText`

                  The full text of the cited block range, concatenated.

                  Always equals the contents of `content[start_block_index:end_block_index]` joined together. The text block is the minimal citable unit; this field is never a substring of a single block. Not counted toward output tokens, and not counted toward input tokens when sent back in subsequent turns.

                - `required long EndBlockIndex`

                  Exclusive 0-based end index of the cited block range in the source's `content` array.

                  Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`.

                - `required long SearchResultIndex`

                  0-based index of the cited search result among all `search_result` content blocks in the request, in the order they appear across messages and tool results.

                  Counted separately from `document_index`; server-side web search results are not included in this count.

                  minimum: 0

                - `required string Source`

                - `required long StartBlockIndex`

                  0-based index of the first cited block in the source's `content` array.

                  minimum: 0

                - `required string? Title`

          - `class ImageBlockParam`

            - `JsonElement Type = "image"`

            - `required Source Source`

              - `class Base64ImageSource`

                - `JsonElement Type = "base64"`

                - `required string Data`

                  format: byte

                - `required MediaType MediaType`

                  - `ImageJpeg("image/jpeg")`

                  - `ImagePng("image/png")`

                  - `ImageGif("image/gif")`

                  - `ImageWebP("image/webp")`

              - `class UrlImageSource`

                - `JsonElement Type = "url"`

                - `required string Url`

              - `class FileImageSource`

                - `JsonElement Type = "file"`

                - `required string FileID`

            - `CacheControlEphemeral? CacheControl`

              Create a cache control breakpoint at this content block.

            - `ImageTransformationsParam? Transformations`

              Configures the transformations the server applies to this image before the model observes it. Each key names a condition the server transforms images for; its value selects the transformation applied. Omitted keys keep their default behavior, and an empty object is equivalent to omitting the field.

              - `OversizedImage OversizedImage`

                What the server does when this image exceeds the model's maximum image size. `"downsize"` (the default) scales the image down to fit, which changes the dimensions the model observes without telling you. `"error"` instead rejects the request with a 400 error naming the image's dimensions and the largest dimensions that fit, so you can scale the image deliberately — your image is never silently scaled down.

                - `Downsize("downsize")`

                - `Error("error")`

          - `class DocumentBlockParam`

            - `JsonElement Type = "document"`

            - `required Source Source`

              - `class Base64PdfSource`

                - `JsonElement Type = "base64"`

                - `required string Data`

                  format: byte

                - `JsonElement MediaType = "application/pdf"`

              - `class PlainTextSource`

                - `JsonElement Type = "text"`

                - `required string Data`

                - `JsonElement MediaType = "text/plain"`

              - `class ContentBlockSource`

                - `JsonElement Type = "content"`

                - `required Content Content`

                  - `string`

                  - `IReadOnlyList<ContentBlockSourceContent>`

                    - `class TextBlockParam`

                    - `class ImageBlockParam`

              - `class UrlPdfSource`

                - `JsonElement Type = "url"`

                - `required string Url`

              - `class FileDocumentSource`

                - `JsonElement Type = "file"`

                - `required string FileID`

            - `CacheControlEphemeral? CacheControl`

              Create a cache control breakpoint at this content block.

            - `CitationsConfigParam? Citations`

              - `bool Enabled`

            - `string? Context`

              minLength: 1

            - `string? Title`

              minLength: 1, maxLength: 500

          - `class SearchResultBlockParam`

            - `JsonElement Type = "search_result"`

            - `required IReadOnlyList<TextBlockParam> Content`

              - `JsonElement Type = "text"`

              - `required string Text`

                minLength: 1

              - `CacheControlEphemeral? CacheControl`

                Create a cache control breakpoint at this content block.

              - `IReadOnlyList<TextCitationParam>? Citations`

            - `required string Source`

            - `required string Title`

            - `CacheControlEphemeral? CacheControl`

              Create a cache control breakpoint at this content block.

            - `CitationsConfigParam Citations`

          - `class ThinkingBlockParam`

            - `JsonElement Type = "thinking"`

            - `required string Signature`

              The `signature` value of this thinking block, exactly as returned by the API in a previous response. Used to verify that the block was generated by Claude.

              Thinking blocks must be passed back unmodified and in their original order; a modified block results in a 400 `invalid_request_error`.

            - `required string Thinking`

              The `thinking` text of this block as returned by the API.

          - `class RedactedThinkingBlockParam`

            - `JsonElement Type = "redacted_thinking"`

            - `required string Data`

              The `data` value of this redacted thinking block, exactly as returned by the API in a previous response. Opaque and encrypted; pass it back unchanged.

          - `class ToolUseBlockParam`

            - `JsonElement Type = "tool_use"`

            - `required string ID`

              pattern: ^[a-zA-Z0-9_-]+$

            - `required IReadOnlyDictionary<string, JsonElement> Input`

            - `required string Name`

              minLength: 1, maxLength: 200

            - `CacheControlEphemeral? CacheControl`

              Create a cache control breakpoint at this content block.

            - `Caller Caller`

              - `class DirectCaller`

                Tool invocation directly from the model.

                - `JsonElement Type = "direct"`

              - `class ServerToolCaller`

                Tool invocation generated by a server-side tool.

                - `JsonElement Type = "code_execution_20250825"`

                - `required string ToolID`

                  pattern: ^srvtoolu_[a-zA-Z0-9_]+$

              - `class ServerToolCaller20260120`

                - `JsonElement Type = "code_execution_20260120"`

                - `required string ToolID`

                  pattern: ^srvtoolu_[a-zA-Z0-9_]+$

            - `string? ToolsetName`

              For a toolset member tool_use, the toolset family this member belongs to.

              minLength: 1, maxLength: 64, pattern: ^[a-zA-Z0-9_-]+$

          - `class ToolResultBlockParam`

            - `JsonElement Type = "tool_result"`

            - `required string ToolUseID`

              pattern: ^[a-zA-Z0-9_-]+$

            - `CacheControlEphemeral? CacheControl`

              Create a cache control breakpoint at this content block.

            - `Content Content`

              - `string`

              - `IReadOnlyList<Block>`

                - `class TextBlockParam`

                - `class ImageBlockParam`

                - `class SearchResultBlockParam`

                - `class DocumentBlockParam`

                - `class ToolReferenceBlockParam`

                  Tool reference block that can be included in tool_result content.

                  - `JsonElement Type = "tool_reference"`

                  - `required string ToolName`

                    minLength: 1, maxLength: 256, pattern: ^[a-zA-Z0-9_-]{1,256}$

                  - `CacheControlEphemeral? CacheControl`

                    Create a cache control breakpoint at this content block.

                - `class BrowserStateBlockParam`

                  The caller's browser state after a browser toolset member call —
                  the full inventory of open tabs, which tab is active, and any side
                  effects (tabs opened, download state changes) the call produced.

                  At most one per `tool_result`, only on a non-error result answering a
                  browser toolset member `tool_use`. The server renders the
                  model-visible text from it; the model never sees the raw fields.

                  - `JsonElement Type = "browser_state"`

                  - `required IReadOnlyList<BrowserStateTabEntry> Tabs`

                    All tabs open in the browser after this call — the full inventory, not a delta. May be empty. Whenever non-empty, exactly one entry carries `active: true`.

                    maxItems: 100

                    - `required string TabID`

                      The caller-assigned identifier for this tab, unique within the inventory.

                      minLength: 1, maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

                    - `required string Title`

                      The title of the page the tab is showing. May be empty.

                      maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

                    - `required string Url`

                      The URL of the page the tab is showing. May be empty.

                      maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

                    - `bool Active`

                      Whether this tab is the active tab after this call. Whenever `tabs` is non-empty, exactly one entry is marked `active: true`.

                  - `CacheControlEphemeral? CacheControl`

                    Create a cache control breakpoint at this content block.

                  - `IReadOnlyList<BrowserStateChange>? StateChanges`

                    Tabs opened and download state changes during this call. "Nothing to report" is expressed by omitting the field, never by an empty list.

                    minItems: 1, maxItems: 200

                    - `class BrowserStateChangeTabOpened`

                      A tab this call's execution opened that remains open at its end —
                      the creation delta of the `tabs` inventory, not an event log.

                      Carries only the `tab_id`; the tab's `title` and `url` live on its
                      `tabs` entry, which must include the same `tab_id`. A tab opened
                      during a failed call gets no deferred `tab_opened`; it simply appears
                      in the next result's `tabs` inventory.

                      - `JsonElement Type = "tab_opened"`

                      - `required string TabID`

                        The `tab_id` of the opened tab, present in `tabs`.

                        minLength: 1, maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

                    - `class BrowserStateChangeDownloadStarted`

                      A file download that started during this call.

                      - `JsonElement Type = "download_started"`

                      - `required string DownloadID`

                        The caller-assigned identifier for this download, stable across the state changes reporting it.

                        minLength: 1, maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

                      - `required string Url`

                        The final post-redirect URL the download was served from.

                        maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

                    - `class BrowserStateChangeDownloadCompleted`

                      A file download that finished during this call, reported with the
                      same `download_id` as its `download_started` — or without a prior
                      `download_started`, when the download finished during the call that
                      started it (at most one state change per `download_id` per result).

                      - `JsonElement Type = "download_completed"`

                      - `required string DownloadID`

                        The caller-assigned identifier for this download, stable across the state changes reporting it.

                        minLength: 1, maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

                      - `required string Url`

                        The final post-redirect URL the download was served from.

                        maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

                      - `string? Path`

                        Where the executor saved the file, on the executor's filesystem. Only included when another tool in the same environment can read the file at that path.

                        maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

                      - `long? SizeBytes`

                        The completed download's size.

                        minimum: 0

                    - `class BrowserStateChangeDownloadFailed`

                      A file download that failed — or was cancelled — during this call.

                      - `JsonElement Type = "download_failed"`

                      - `required string DownloadID`

                        The caller-assigned identifier for this download, stable across the state changes reporting it.

                        minLength: 1, maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

                      - `required string Url`

                        The final post-redirect URL the download was served from.

                        maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

                      - `string? Error`

                        The failure or cancellation detail, when known.

                        maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

            - `bool IsError`

            - `string? ToolsetName`

              For a toolset member tool_result, the toolset family of the paired tool_use.

              minLength: 1, maxLength: 64, pattern: ^[a-zA-Z0-9_-]+$

          - `class ServerToolUseBlockParam`

            - `JsonElement Type = "server_tool_use"`

            - `required string ID`

              pattern: ^srvtoolu_[a-zA-Z0-9_]+$

            - `required IReadOnlyDictionary<string, JsonElement> Input`

            - `required Name Name`

              - `WebSearch("web_search")`

              - `WebFetch("web_fetch")`

              - `CodeExecution("code_execution")`

              - `BashCodeExecution("bash_code_execution")`

              - `TextEditorCodeExecution("text_editor_code_execution")`

              - `ToolSearchToolRegex("tool_search_tool_regex")`

              - `ToolSearchToolBm25("tool_search_tool_bm25")`

            - `CacheControlEphemeral? CacheControl`

              Create a cache control breakpoint at this content block.

            - `Caller Caller`

              - `class DirectCaller`

                Tool invocation directly from the model.

              - `class ServerToolCaller`

                Tool invocation generated by a server-side tool.

              - `class ServerToolCaller20260120`

          - `class WebSearchToolResultBlockParam`

            - `JsonElement Type = "web_search_tool_result"`

            - `required WebSearchToolResultBlockParamContent Content`

              - `IReadOnlyList<WebSearchResultBlockParam>`

                - `JsonElement Type = "web_search_result"`

                - `required string EncryptedContent`

                - `required string Title`

                - `required string Url`

                - `string? PageAge`

              - `class WebSearchToolRequestError`

                - `JsonElement Type = "web_search_tool_result_error"`

                - `required WebSearchToolResultErrorCode ErrorCode`

                  - `InvalidToolInput("invalid_tool_input")`

                  - `Unavailable("unavailable")`

                  - `MaxUsesExceeded("max_uses_exceeded")`

                  - `TooManyRequests("too_many_requests")`

                  - `QueryTooLong("query_too_long")`

                  - `RequestTooLarge("request_too_large")`

            - `required string ToolUseID`

              pattern: ^srvtoolu_[a-zA-Z0-9_]+$

            - `CacheControlEphemeral? CacheControl`

              Create a cache control breakpoint at this content block.

            - `Caller Caller`

              - `class DirectCaller`

                Tool invocation directly from the model.

              - `class ServerToolCaller`

                Tool invocation generated by a server-side tool.

              - `class ServerToolCaller20260120`

          - `class WebFetchToolResultBlockParam`

            - `JsonElement Type = "web_fetch_tool_result"`

            - `required Content Content`

              - `class WebFetchToolResultErrorBlockParam`

                - `JsonElement Type = "web_fetch_tool_result_error"`

                - `required WebFetchToolResultErrorCode ErrorCode`

                  - `InvalidToolInput("invalid_tool_input")`

                  - `UrlTooLong("url_too_long")`

                  - `UrlNotAllowed("url_not_allowed")`

                  - `UrlNotInPriorContext("url_not_in_prior_context")`

                  - `UrlNotAccessible("url_not_accessible")`

                  - `UnsupportedContentType("unsupported_content_type")`

                  - `TooManyRequests("too_many_requests")`

                  - `MaxUsesExceeded("max_uses_exceeded")`

                  - `Unavailable("unavailable")`

                  - `ContentTooLarge("content_too_large")`

              - `class WebFetchBlockParam`

                - `JsonElement Type = "web_fetch_result"`

                - `required DocumentBlockParam Content`

                - `required string Url`

                  Fetched content URL

                - `string? RetrievedAt`

                  ISO 8601 timestamp when the content was retrieved

            - `required string ToolUseID`

              pattern: ^srvtoolu_[a-zA-Z0-9_]+$

            - `CacheControlEphemeral? CacheControl`

              Create a cache control breakpoint at this content block.

            - `Caller Caller`

              - `class DirectCaller`

                Tool invocation directly from the model.

              - `class ServerToolCaller`

                Tool invocation generated by a server-side tool.

              - `class ServerToolCaller20260120`

          - `class CodeExecutionToolResultBlockParam`

            - `JsonElement Type = "code_execution_tool_result"`

            - `required CodeExecutionToolResultBlockParamContent Content`

              - `class CodeExecutionToolResultErrorParam`

                - `JsonElement Type = "code_execution_tool_result_error"`

                - `required CodeExecutionToolResultErrorCode ErrorCode`

                  - `InvalidToolInput("invalid_tool_input")`

                  - `Unavailable("unavailable")`

                  - `TooManyRequests("too_many_requests")`

                  - `ExecutionTimeExceeded("execution_time_exceeded")`

              - `class CodeExecutionResultBlockParam`

                - `JsonElement Type = "code_execution_result"`

                - `required IReadOnlyList<CodeExecutionOutputBlockParam> Content`

                  - `JsonElement Type = "code_execution_output"`

                  - `required string FileID`

                - `required long ReturnCode`

                - `required string Stderr`

                - `required string Stdout`

              - `class EncryptedCodeExecutionResultBlockParam`

                The output and exit code of Python code that Claude ran with the code execution tool, with standard output in encrypted form, sent back in a later request.

                - `JsonElement Type = "encrypted_code_execution_result"`

                - `required IReadOnlyList<CodeExecutionOutputBlockParam> Content`

                  - `JsonElement Type = "code_execution_output"`

                  - `required string FileID`

                - `required string EncryptedStdout`

                - `required long ReturnCode`

                - `required string Stderr`

            - `required string ToolUseID`

              pattern: ^srvtoolu_[a-zA-Z0-9_]+$

            - `CacheControlEphemeral? CacheControl`

              Create a cache control breakpoint at this content block.

          - `class BashCodeExecutionToolResultBlockParam`

            - `JsonElement Type = "bash_code_execution_tool_result"`

            - `required Content Content`

              - `class BashCodeExecutionToolResultErrorParam`

                - `JsonElement Type = "bash_code_execution_tool_result_error"`

                - `required BashCodeExecutionToolResultErrorCode ErrorCode`

                  - `InvalidToolInput("invalid_tool_input")`

                  - `Unavailable("unavailable")`

                  - `TooManyRequests("too_many_requests")`

                  - `ExecutionTimeExceeded("execution_time_exceeded")`

                  - `OutputFileTooLarge("output_file_too_large")`

              - `class BashCodeExecutionResultBlockParam`

                - `JsonElement Type = "bash_code_execution_result"`

                - `required IReadOnlyList<BashCodeExecutionOutputBlockParam> Content`

                  - `JsonElement Type = "bash_code_execution_output"`

                  - `required string FileID`

                - `required long ReturnCode`

                - `required string Stderr`

                - `required string Stdout`

            - `required string ToolUseID`

              pattern: ^srvtoolu_[a-zA-Z0-9_]+$

            - `CacheControlEphemeral? CacheControl`

              Create a cache control breakpoint at this content block.

          - `class TextEditorCodeExecutionToolResultBlockParam`

            - `JsonElement Type = "text_editor_code_execution_tool_result"`

            - `required Content Content`

              - `class TextEditorCodeExecutionToolResultErrorParam`

                - `JsonElement Type = "text_editor_code_execution_tool_result_error"`

                - `required TextEditorCodeExecutionToolResultErrorCode ErrorCode`

                  - `InvalidToolInput("invalid_tool_input")`

                  - `Unavailable("unavailable")`

                  - `TooManyRequests("too_many_requests")`

                  - `ExecutionTimeExceeded("execution_time_exceeded")`

                  - `FileNotFound("file_not_found")`

                - `string? ErrorMessage`

              - `class TextEditorCodeExecutionViewResultBlockParam`

                - `JsonElement Type = "text_editor_code_execution_view_result"`

                - `required string Content`

                - `required FileType FileType`

                  - `Text("text")`

                  - `Image("image")`

                  - `Pdf("pdf")`

                - `long? NumLines`

                - `long? StartLine`

                - `long? TotalLines`

              - `class TextEditorCodeExecutionCreateResultBlockParam`

                - `JsonElement Type = "text_editor_code_execution_create_result"`

                - `required bool IsFileUpdate`

              - `class TextEditorCodeExecutionStrReplaceResultBlockParam`

                - `JsonElement Type = "text_editor_code_execution_str_replace_result"`

                - `IReadOnlyList<string>? Lines`

                - `long? NewLines`

                - `long? NewStart`

                - `long? OldLines`

                - `long? OldStart`

            - `required string ToolUseID`

              pattern: ^srvtoolu_[a-zA-Z0-9_]+$

            - `CacheControlEphemeral? CacheControl`

              Create a cache control breakpoint at this content block.

          - `class ToolSearchToolResultBlockParam`

            - `JsonElement Type = "tool_search_tool_result"`

            - `required Content Content`

              - `class ToolSearchToolResultErrorParam`

                - `JsonElement Type = "tool_search_tool_result_error"`

                - `required ToolSearchToolResultErrorCode ErrorCode`

                  - `InvalidToolInput("invalid_tool_input")`

                  - `Unavailable("unavailable")`

                  - `TooManyRequests("too_many_requests")`

                  - `ExecutionTimeExceeded("execution_time_exceeded")`

                - `string? ErrorMessage`

              - `class ToolSearchToolSearchResultBlockParam`

                - `JsonElement Type = "tool_search_tool_search_result"`

                - `required IReadOnlyList<ToolReferenceBlockParam> ToolReferences`

                  - `JsonElement Type = "tool_reference"`

                  - `required string ToolName`

                    minLength: 1, maxLength: 256, pattern: ^[a-zA-Z0-9_-]{1,256}$

                  - `CacheControlEphemeral? CacheControl`

                    Create a cache control breakpoint at this content block.

            - `required string ToolUseID`

              pattern: ^srvtoolu_[a-zA-Z0-9_]+$

            - `CacheControlEphemeral? CacheControl`

              Create a cache control breakpoint at this content block.

          - `class ContainerUploadBlockParam`

            A content block that represents a file to be uploaded to the container
            Files uploaded via this block will be available in the container's input directory.

            - `JsonElement Type = "container_upload"`

            - `required string FileID`

            - `CacheControlEphemeral? CacheControl`

              Create a cache control breakpoint at this content block.

      - `JsonElement Role = "user"`

    - `class AssistantMessageParam`

      - `required MessageContentParam Content`

      - `JsonElement Role = "assistant"`

    - `class SystemMessageParam`

      - `required Content Content`

        - `string`

        - `IReadOnlyList<TextBlockParam>`

          - `JsonElement Type = "text"`

          - `required string Text`

            minLength: 1

          - `CacheControlEphemeral? CacheControl`

            Create a cache control breakpoint at this content block.

          - `IReadOnlyList<TextCitationParam>? Citations`

      - `JsonElement Role = "system"`

  - `required Model model`

    The model that will complete your prompt.

    See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options.

  - `CacheControlEphemeral? cacheControl`

    Top-level cache control automatically applies a cache_control marker to the last cacheable block in the request.

  - `MessageCreateParamsContainer? container`

    Container identifier for reuse across requests.

  - `DiagnosticsParam? diagnostics`

    Request-level diagnostics. Supply `previous_message_id` to have the response include `diagnostics.cache_miss_reason` explaining any prompt-cache divergence from that prior request.

  - `string? inferenceGeo`

    Specifies the geographic region for inference processing. If not specified, the workspace's `default_inference_geo` is used.

  - `Metadata metadata`

    An object describing metadata about the request.

  - `OutputConfig outputConfig`

    Configuration options for the model's output, such as the output format.

  - `ServiceTier serviceTier`

    Determines whether to use priority capacity (if available) or standard capacity for this request.

    Anthropic offers different levels of service for your API requests. See [service-tiers](https://platform.claude.com/docs/en/api/service-tiers?sdk_languages=csharp) for details.

    - `Auto("auto")`

    - `StandardOnly("standard_only")`

  - `Speed? speed`

    The inference speed mode for this request. `"fast"` enables high output-tokens-per-second inference.

    Some models require the `fast-mode-2026-02-01` beta header for any `speed` value. See [fast mode](https://platform.claude.com/docs/en/build-with-claude/fast-mode?sdk_languages=csharp) for which models.

    - `Standard("standard")`

    - `Fast("fast")`

  - `IReadOnlyList<string> stopSequences`

    Custom text sequences that will cause the model to stop generating.

    Our models will normally stop when they have naturally completed their turn, which will result in a response `stop_reason` of `"end_turn"`.

    If you want the model to stop generating when it encounters custom strings of text, you can use the `stop_sequences` parameter. If the model encounters one of the custom sequences, the response `stop_reason` value will be `"stop_sequence"` and the response `stop_sequence` value will contain the matched stop sequence.

  - `System system`

    System prompt.

    A system prompt is a way of providing context and instructions to Claude, such as specifying a particular goal or role. See our [guide to system prompts](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices?sdk_languages=csharp#give-claude-a-role).

    - `string`

    - `IReadOnlyList<TextBlockParam>`

      - `JsonElement Type = "text"`

      - `required string Text`

        minLength: 1

      - `CacheControlEphemeral? CacheControl`

        Create a cache control breakpoint at this content block.

      - `IReadOnlyList<TextCitationParam>? Citations`

  - `ThinkingConfigParam thinking`

    Configuration for Claude's thinking.

    With `{"type": "adaptive"}`, Claude decides when and how much to think. With `{"type": "enabled"}` (manual extended thinking), you set a `budget_tokens` of at least 1,024. Thinking tokens count toward your `max_tokens` limit.

    Which `type` values are accepted, and what happens when you omit `thinking`, depend on the model. See [thinking](https://platform.claude.com/docs/en/build-with-claude/thinking?sdk_languages=csharp#configuring-thinking) for each model's behavior.

  - `ToolChoice toolChoice`

    How the model should use the provided tools. The model can use a specific tool, any available tool, decide by itself, or not use tools at all.

  - `IReadOnlyList<ToolUnion> tools`

    Definitions of tools that the model may use.

    If you include `tools` in your API request, the model may return `tool_use` content blocks that represent the model's use of those tools. You can then run those tools using the tool input generated by the model and then optionally return results back to the model using `tool_result` content blocks.

    There are two types of tools: **client tools** and **server tools**. The behavior described below applies to client tools. For [server tools](https://platform.claude.com/docs/en/agents-and-tools/tool-use/server-tools?sdk_languages=csharp), see their individual documentation as each has its own behavior (e.g., the [web search tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-search-tool?sdk_languages=csharp)).

    Each tool definition includes:

    * `name`: Name of the tool.
    * `description`: Optional, but strongly-recommended description of the tool.
    * `input_schema`: [JSON schema](https://json-schema.org/draft/2020-12) for the tool `input` shape that the model will produce in `tool_use` output content blocks.

    For example, if you defined `tools` as:

    ```json
    [
      {
        "name": "get_stock_price",
        "description": "Get the current stock price for a given ticker symbol.",
        "input_schema": {
          "type": "object",
          "properties": {
            "ticker": {
              "type": "string",
              "description": "The stock ticker symbol, e.g. AAPL for Apple Inc."
            }
          },
          "required": ["ticker"]
        }
      }
    ]
    ```

    And then asked the model "What's the S&P 500 at today?", the model might produce `tool_use` content blocks in the response like this:

    ```json
    [
      {
        "type": "tool_use",
        "id": "toolu_01D7FLrfh4GYq7yT1ULFeyMV",
        "name": "get_stock_price",
        "input": { "ticker": "^GSPC" }
      }
    ]
    ```

    You might then run your `get_stock_price` tool with `{"ticker": "^GSPC"}` as an input, and return the following back to the model in a subsequent `user` message:

    ```json
    [
      {
        "type": "tool_result",
        "tool_use_id": "toolu_01D7FLrfh4GYq7yT1ULFeyMV",
        "content": "259.75 USD"
      }
    ]
    ```

    Tools can be used for workflows that include running client-side tools and functions, or more generally whenever you want the model to produce a particular JSON structure of output.

    See our [guide](https://platform.claude.com/docs/en/agents-and-tools/tool-use/overview?sdk_languages=csharp) for more details.

    - `class Tool`

      - `Type? Type`

      - `required InputSchema InputSchema`

        [JSON schema](https://json-schema.org/draft/2020-12) for this tool's input.

        This defines the shape of the `input` that your tool accepts and that the model will produce.

        - `JsonElement Type = "object"`

        - `IReadOnlyDictionary<string, JsonElement>? Properties`

        - `IReadOnlyList<string>? Required`

      - `required string Name`

        Name of the tool.

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

        minLength: 1, maxLength: 128, pattern: ^[a-zA-Z0-9_-]{1,128}$

      - `IReadOnlyList<AllowedCaller> AllowedCallers`

        - `Direct("direct")`

        - `CodeExecution20250825("code_execution_20250825")`

        - `CodeExecution20260120("code_execution_20260120")`

        - `CodeExecution20260521("code_execution_20260521")`

      - `CacheControlEphemeral? CacheControl`

        Create a cache control breakpoint at this content block.

      - `bool DeferLoading`

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

      - `string Description`

        Description of what this tool does.

        Tool descriptions should be as detailed as possible. The more information that the model has about what the tool is and how to use it, the better it will perform. You can use natural language descriptions to reinforce important aspects of the tool input JSON schema.

      - `bool? EagerInputStreaming`

        Enable eager input streaming for this tool. When true, tool input parameters will be streamed incrementally as they are generated, and types will be inferred on-the-fly rather than buffering the full JSON output. When false, streaming is disabled for this tool even if the fine-grained-tool-streaming beta is active. When null (default), uses the default behavior based on beta headers.

      - `IReadOnlyList<IReadOnlyDictionary<string, JsonElement>> InputExamples`

      - `bool Strict`

        When true, guarantees schema validation on tool names and inputs

    - `class ToolBash20250124`

      - `JsonElement Type = "bash_20250124"`

      - `JsonElement Name = "bash"`

        Name of the tool.

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

      - `IReadOnlyList<AllowedCaller> AllowedCallers`

        - `Direct("direct")`

        - `CodeExecution20250825("code_execution_20250825")`

        - `CodeExecution20260120("code_execution_20260120")`

        - `CodeExecution20260521("code_execution_20260521")`

      - `CacheControlEphemeral? CacheControl`

        Create a cache control breakpoint at this content block.

      - `bool DeferLoading`

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

      - `IReadOnlyList<IReadOnlyDictionary<string, JsonElement>> InputExamples`

      - `bool Strict`

        When true, guarantees schema validation on tool names and inputs

    - `class CodeExecutionTool20250522`

      - `JsonElement Type = "code_execution_20250522"`

      - `JsonElement Name = "code_execution"`

        Name of the tool.

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

      - `IReadOnlyList<AllowedCaller> AllowedCallers`

        - `Direct("direct")`

        - `CodeExecution20250825("code_execution_20250825")`

        - `CodeExecution20260120("code_execution_20260120")`

        - `CodeExecution20260521("code_execution_20260521")`

      - `CacheControlEphemeral? CacheControl`

        Create a cache control breakpoint at this content block.

      - `bool DeferLoading`

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

      - `bool Strict`

        When true, guarantees schema validation on tool names and inputs

    - `class CodeExecutionTool20250825`

      - `JsonElement Type = "code_execution_20250825"`

      - `JsonElement Name = "code_execution"`

        Name of the tool.

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

      - `IReadOnlyList<AllowedCaller> AllowedCallers`

        - `Direct("direct")`

        - `CodeExecution20250825("code_execution_20250825")`

        - `CodeExecution20260120("code_execution_20260120")`

        - `CodeExecution20260521("code_execution_20260521")`

      - `CacheControlEphemeral? CacheControl`

        Create a cache control breakpoint at this content block.

      - `bool DeferLoading`

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

      - `bool Strict`

        When true, guarantees schema validation on tool names and inputs

    - `class CodeExecutionTool20260120`

      A `tools` entry for the code execution tool, version `code_execution_20260120`. It adds REPL state persistence to version `code_execution_20250825`.

      REPL state persistence applies with programmatic tool calling. With it, the Python interpreter state, such as variable bindings, persists across requests that reuse the container.

      See the [code execution tool guide](https://platform.claude.com/docs/en/agents-and-tools/tool-use/code-execution-tool?sdk_languages=csharp#tool-versions) to learn what each tool version adds.

      - `JsonElement Type = "code_execution_20260120"`

      - `JsonElement Name = "code_execution"`

        Name of the tool.

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

      - `IReadOnlyList<AllowedCaller> AllowedCallers`

        - `Direct("direct")`

        - `CodeExecution20250825("code_execution_20250825")`

        - `CodeExecution20260120("code_execution_20260120")`

        - `CodeExecution20260521("code_execution_20260521")`

      - `CacheControlEphemeral? CacheControl`

        Create a cache control breakpoint at this content block.

      - `bool DeferLoading`

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

      - `bool Strict`

        When true, guarantees schema validation on tool names and inputs

    - `class CodeExecutionTool20260521`

      Code execution tool with REPL state persistence.

      - `JsonElement Type = "code_execution_20260521"`

      - `JsonElement Name = "code_execution"`

        Name of the tool.

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

      - `IReadOnlyList<AllowedCaller> AllowedCallers`

        - `Direct("direct")`

        - `CodeExecution20250825("code_execution_20250825")`

        - `CodeExecution20260120("code_execution_20260120")`

        - `CodeExecution20260521("code_execution_20260521")`

      - `CacheControlEphemeral? CacheControl`

        Create a cache control breakpoint at this content block.

      - `bool DeferLoading`

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

      - `bool Strict`

        When true, guarantees schema validation on tool names and inputs

    - `class BrowserToolset20260801`

      The browser toolset: a single `tools[]` entry (carrying no
      `name`) that declares the browser tool family. The model is served
      the family's tool with any members disabled via `configs` removed
      from its schema.

      - `JsonElement Type = "browser_toolset_20260801"`

      - `CacheControlEphemeral? CacheControl`

        Create a cache control breakpoint at this content block.

      - `BrowserToolsetConfigs? Configs`

        Sparse per-member overrides, keyed by member name. Absent, null, and {} are equivalent; a member's defaults apply wherever its key is absent.

        - `BrowserTypeConfig? Type`

          `type`'s config overrides.

          - `bool? DeferLoading`

            Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

          - `bool? Enabled`

            Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

        - `BrowserCloseTabConfig? CloseTab`

          `close_tab`'s config overrides.

          - `bool? DeferLoading`

            Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

          - `bool? Enabled`

            Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

        - `BrowserDoubleClickConfig? DoubleClick`

          `double_click`'s config overrides.

          - `bool? DeferLoading`

            Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

          - `bool? Enabled`

            Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

        - `BrowserFileUploadConfig? FileUpload`

          `file_upload`'s config overrides.

          - `bool? DeferLoading`

            Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

          - `bool? Enabled`

            Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

        - `BrowserFindConfig? Find`

          `find`'s config overrides.

          - `bool? DeferLoading`

            Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

          - `bool? Enabled`

            Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

        - `BrowserFormInputConfig? FormInput`

          `form_input`'s config overrides.

          - `bool? DeferLoading`

            Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

          - `bool? Enabled`

            Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

        - `BrowserGetPageTextConfig? GetPageText`

          `get_page_text`'s config overrides.

          - `bool? DeferLoading`

            Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

          - `bool? Enabled`

            Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

        - `BrowserHoldKeyConfig? HoldKey`

          `hold_key`'s config overrides.

          - `bool? DeferLoading`

            Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

          - `bool? Enabled`

            Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

        - `BrowserHoverConfig? Hover`

          `hover`'s config overrides.

          - `bool? DeferLoading`

            Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

          - `bool? Enabled`

            Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

        - `BrowserJavascriptExecConfig? JavascriptExec`

          `javascript_exec`'s config overrides.

          - `bool? DeferLoading`

            Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

          - `bool? Enabled`

            Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

        - `BrowserKeyConfig? Key`

          `key`'s config overrides.

          - `bool? DeferLoading`

            Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

          - `bool? Enabled`

            Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

        - `BrowserLeftClickConfig? LeftClick`

          `left_click`'s config overrides.

          - `bool? DeferLoading`

            Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

          - `bool? Enabled`

            Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

        - `BrowserLeftClickDragConfig? LeftClickDrag`

          `left_click_drag`'s config overrides.

          - `bool? DeferLoading`

            Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

          - `bool? Enabled`

            Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

        - `BrowserLeftMouseDownConfig? LeftMouseDown`

          `left_mouse_down`'s config overrides.

          - `bool? DeferLoading`

            Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

          - `bool? Enabled`

            Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

        - `BrowserLeftMouseUpConfig? LeftMouseUp`

          `left_mouse_up`'s config overrides.

          - `bool? DeferLoading`

            Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

          - `bool? Enabled`

            Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

        - `BrowserListTabsConfig? ListTabs`

          `list_tabs`'s config overrides.

          - `bool? DeferLoading`

            Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

          - `bool? Enabled`

            Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

        - `BrowserMiddleClickConfig? MiddleClick`

          `middle_click`'s config overrides.

          - `bool? DeferLoading`

            Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

          - `bool? Enabled`

            Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

        - `BrowserMouseMoveConfig? MouseMove`

          `mouse_move`'s config overrides.

          - `bool? DeferLoading`

            Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

          - `bool? Enabled`

            Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

        - `BrowserNavigateConfig? Navigate`

          `navigate`'s config overrides.

          - `bool? DeferLoading`

            Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

          - `bool? Enabled`

            Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

        - `BrowserNewTabConfig? NewTab`

          `new_tab`'s config overrides.

          - `bool? DeferLoading`

            Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

          - `bool? Enabled`

            Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

        - `BrowserReadConsoleConfig? ReadConsole`

          `read_console`'s config overrides.

          - `bool? DeferLoading`

            Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

          - `bool? Enabled`

            Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

        - `BrowserReadNetworkConfig? ReadNetwork`

          `read_network`'s config overrides.

          - `bool? DeferLoading`

            Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

          - `bool? Enabled`

            Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

        - `BrowserReadPageConfig? ReadPage`

          `read_page`'s config overrides.

          - `bool? DeferLoading`

            Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

          - `bool? Enabled`

            Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

        - `BrowserRightClickConfig? RightClick`

          `right_click`'s config overrides.

          - `bool? DeferLoading`

            Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

          - `bool? Enabled`

            Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

        - `BrowserScreenshotConfig? Screenshot`

          `screenshot`'s config overrides.

          - `bool? DeferLoading`

            Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

          - `bool? Enabled`

            Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

        - `BrowserScrollConfig? Scroll`

          `scroll`'s config overrides.

          - `bool? DeferLoading`

            Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

          - `bool? Enabled`

            Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

        - `BrowserScrollToConfig? ScrollTo`

          `scroll_to`'s config overrides.

          - `bool? DeferLoading`

            Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

          - `bool? Enabled`

            Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

        - `BrowserSwitchTabConfig? SwitchTab`

          `switch_tab`'s config overrides.

          - `bool? DeferLoading`

            Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

          - `bool? Enabled`

            Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

        - `BrowserTripleClickConfig? TripleClick`

          `triple_click`'s config overrides.

          - `bool? DeferLoading`

            Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

          - `bool? Enabled`

            Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

        - `BrowserWaitConfig? Wait`

          `wait`'s config overrides.

          - `bool? DeferLoading`

            Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

          - `bool? Enabled`

            Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

        - `BrowserZoomConfig? Zoom`

          `zoom`'s config overrides.

          - `bool? DeferLoading`

            Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

          - `bool? Enabled`

            Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

    - `class MemoryTool20250818`

      - `JsonElement Type = "memory_20250818"`

      - `JsonElement Name = "memory"`

        Name of the tool.

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

      - `IReadOnlyList<AllowedCaller> AllowedCallers`

        - `Direct("direct")`

        - `CodeExecution20250825("code_execution_20250825")`

        - `CodeExecution20260120("code_execution_20260120")`

        - `CodeExecution20260521("code_execution_20260521")`

      - `CacheControlEphemeral? CacheControl`

        Create a cache control breakpoint at this content block.

      - `bool DeferLoading`

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

      - `IReadOnlyList<IReadOnlyDictionary<string, JsonElement>> InputExamples`

      - `bool Strict`

        When true, guarantees schema validation on tool names and inputs

    - `class ComputerToolset20260801`

      The computer toolset: a single `tools[]` entry (carrying no
      `name`) that declares the computer tool family. The model is
      served the family's tool with any members disabled via `configs`
      removed from its schema. Every member is enabled by default, zoom
      included. The single-tool options `display_number` and
      `enable_zoom` are not fields of a toolset entry — it carries only
      `type`, `configs`, and `cache_control`; zoom is controlled
      via `configs.zoom.enabled`.

      - `JsonElement Type = "computer_toolset_20260801"`

      - `CacheControlEphemeral? CacheControl`

        Create a cache control breakpoint at this content block.

      - `ComputerToolsetConfigs? Configs`

        Sparse per-member overrides, keyed by member name. Absent, null, and {} are equivalent; a member's defaults apply wherever its key is absent.

        - `ComputerTypeConfig? Type`

          `type`'s config overrides.

          - `bool? DeferLoading`

            Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

          - `bool? Enabled`

            Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

        - `ComputerCursorPositionConfig? CursorPosition`

          `cursor_position`'s config overrides.

          - `bool? DeferLoading`

            Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

          - `bool? Enabled`

            Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

        - `ComputerDoubleClickConfig? DoubleClick`

          `double_click`'s config overrides.

          - `bool? DeferLoading`

            Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

          - `bool? Enabled`

            Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

        - `ComputerHoldKeyConfig? HoldKey`

          `hold_key`'s config overrides.

          - `bool? DeferLoading`

            Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

          - `bool? Enabled`

            Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

        - `ComputerKeyConfig? Key`

          `key`'s config overrides.

          - `bool? DeferLoading`

            Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

          - `bool? Enabled`

            Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

        - `ComputerLeftClickConfig? LeftClick`

          `left_click`'s config overrides.

          - `bool? DeferLoading`

            Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

          - `bool? Enabled`

            Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

        - `ComputerLeftClickDragConfig? LeftClickDrag`

          `left_click_drag`'s config overrides.

          - `bool? DeferLoading`

            Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

          - `bool? Enabled`

            Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

        - `ComputerLeftMouseDownConfig? LeftMouseDown`

          `left_mouse_down`'s config overrides.

          - `bool? DeferLoading`

            Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

          - `bool? Enabled`

            Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

        - `ComputerLeftMouseUpConfig? LeftMouseUp`

          `left_mouse_up`'s config overrides.

          - `bool? DeferLoading`

            Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

          - `bool? Enabled`

            Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

        - `ComputerMiddleClickConfig? MiddleClick`

          `middle_click`'s config overrides.

          - `bool? DeferLoading`

            Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

          - `bool? Enabled`

            Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

        - `ComputerMouseMoveConfig? MouseMove`

          `mouse_move`'s config overrides.

          - `bool? DeferLoading`

            Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

          - `bool? Enabled`

            Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

        - `ComputerRightClickConfig? RightClick`

          `right_click`'s config overrides.

          - `bool? DeferLoading`

            Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

          - `bool? Enabled`

            Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

        - `ComputerScreenshotConfig? Screenshot`

          `screenshot`'s config overrides.

          - `bool? DeferLoading`

            Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

          - `bool? Enabled`

            Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

        - `ComputerScrollConfig? Scroll`

          `scroll`'s config overrides.

          - `bool? DeferLoading`

            Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

          - `bool? Enabled`

            Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

        - `ComputerTripleClickConfig? TripleClick`

          `triple_click`'s config overrides.

          - `bool? DeferLoading`

            Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

          - `bool? Enabled`

            Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

        - `ComputerWaitConfig? Wait`

          `wait`'s config overrides.

          - `bool? DeferLoading`

            Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

          - `bool? Enabled`

            Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

        - `ComputerZoomConfig? Zoom`

          `zoom`'s config overrides.

          - `bool? DeferLoading`

            Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

          - `bool? Enabled`

            Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

    - `class ToolTextEditor20250124`

      - `JsonElement Type = "text_editor_20250124"`

      - `JsonElement Name = "str_replace_editor"`

        Name of the tool.

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

      - `IReadOnlyList<AllowedCaller> AllowedCallers`

        - `Direct("direct")`

        - `CodeExecution20250825("code_execution_20250825")`

        - `CodeExecution20260120("code_execution_20260120")`

        - `CodeExecution20260521("code_execution_20260521")`

      - `CacheControlEphemeral? CacheControl`

        Create a cache control breakpoint at this content block.

      - `bool DeferLoading`

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

      - `IReadOnlyList<IReadOnlyDictionary<string, JsonElement>> InputExamples`

      - `bool Strict`

        When true, guarantees schema validation on tool names and inputs

    - `class ToolTextEditor20250429`

      - `JsonElement Type = "text_editor_20250429"`

      - `JsonElement Name = "str_replace_based_edit_tool"`

        Name of the tool.

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

      - `IReadOnlyList<AllowedCaller> AllowedCallers`

        - `Direct("direct")`

        - `CodeExecution20250825("code_execution_20250825")`

        - `CodeExecution20260120("code_execution_20260120")`

        - `CodeExecution20260521("code_execution_20260521")`

      - `CacheControlEphemeral? CacheControl`

        Create a cache control breakpoint at this content block.

      - `bool DeferLoading`

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

      - `IReadOnlyList<IReadOnlyDictionary<string, JsonElement>> InputExamples`

      - `bool Strict`

        When true, guarantees schema validation on tool names and inputs

    - `class ToolTextEditor20250728`

      - `JsonElement Type = "text_editor_20250728"`

      - `JsonElement Name = "str_replace_based_edit_tool"`

        Name of the tool.

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

      - `IReadOnlyList<AllowedCaller> AllowedCallers`

        - `Direct("direct")`

        - `CodeExecution20250825("code_execution_20250825")`

        - `CodeExecution20260120("code_execution_20260120")`

        - `CodeExecution20260521("code_execution_20260521")`

      - `CacheControlEphemeral? CacheControl`

        Create a cache control breakpoint at this content block.

      - `bool DeferLoading`

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

      - `IReadOnlyList<IReadOnlyDictionary<string, JsonElement>> InputExamples`

      - `long? MaxCharacters`

        Maximum number of characters to display when viewing a file. If not specified, defaults to displaying the full file.

        minimum: 1

      - `bool Strict`

        When true, guarantees schema validation on tool names and inputs

    - `class WebSearchTool20250305`

      - `JsonElement Type = "web_search_20250305"`

      - `JsonElement Name = "web_search"`

        Name of the tool.

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

      - `IReadOnlyList<AllowedCaller> AllowedCallers`

        - `Direct("direct")`

        - `CodeExecution20250825("code_execution_20250825")`

        - `CodeExecution20260120("code_execution_20260120")`

        - `CodeExecution20260521("code_execution_20260521")`

      - `IReadOnlyList<string>? AllowedDomains`

        If provided, only these domains will be included in results. Cannot be used alongside `blocked_domains`.

      - `IReadOnlyList<string>? BlockedDomains`

        If provided, these domains will never appear in results. Cannot be used alongside `allowed_domains`.

      - `CacheControlEphemeral? CacheControl`

        Create a cache control breakpoint at this content block.

      - `bool DeferLoading`

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

      - `long? MaxUses`

        Maximum number of times the tool can be used in the API request.

        minimum: 1

      - `bool Strict`

        When true, guarantees schema validation on tool names and inputs

      - `UserLocation? UserLocation`

        Parameters for the user's location. Used to provide more relevant search results.

        - `JsonElement Type = "approximate"`

        - `string? City`

          The city of the user.

          minLength: 1, maxLength: 255

        - `string? Country`

          The two letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the user.

          minLength: 2, maxLength: 2

        - `string? Region`

          The region of the user.

          minLength: 1, maxLength: 255

        - `string? Timezone`

          The [IANA timezone](https://nodatime.org/TimeZones) of the user.

          minLength: 1, maxLength: 255

    - `class WebFetchTool20250910`

      - `JsonElement Type = "web_fetch_20250910"`

      - `JsonElement Name = "web_fetch"`

        Name of the tool.

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

      - `IReadOnlyList<AllowedCaller> AllowedCallers`

        - `Direct("direct")`

        - `CodeExecution20250825("code_execution_20250825")`

        - `CodeExecution20260120("code_execution_20260120")`

        - `CodeExecution20260521("code_execution_20260521")`

      - `IReadOnlyList<string>? AllowedDomains`

        List of domains to allow fetching from

      - `IReadOnlyList<string>? BlockedDomains`

        List of domains to block fetching from

      - `CacheControlEphemeral? CacheControl`

        Create a cache control breakpoint at this content block.

      - `CitationsConfigParam? Citations`

        Citations configuration for fetched documents. Citations are disabled by default.

      - `bool DeferLoading`

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

      - `long? MaxContentTokens`

        Maximum number of tokens used by including web page text content in the context. The limit is approximate and does not apply to binary content such as PDFs.

        minimum: 1

      - `long? MaxUses`

        Maximum number of times the tool can be used in the API request.

        minimum: 1

      - `bool Strict`

        When true, guarantees schema validation on tool names and inputs

      - `WebFetchUrlSources? UrlSources`

        Which sources contribute to the set of URLs the tool may fetch. Omitted means every source.

        - `ClientToolResults ClientToolResults`

          Which client tools' results contribute fetchable URLs: "all", "none", or an only or except list of client tool names from tools[].

          - `class WebFetchUrlSourceAll`

            The `url_sources` variant under which a source contributes in
            full: every result of the tool filter's source, or all user input.

            - `JsonElement Type = "all"`

          - `class WebFetchUrlSourceNone`

            The `url_sources` variant under which a source contributes nothing:
            no result of the tool filter's source, or no user input.

            - `JsonElement Type = "none"`

          - `class WebFetchUrlSourceOnly`

            The tool filter variant under which only the named tools' results
            contribute.

            - `JsonElement Type = "only"`

            - `required IReadOnlyList<WebFetchUrlSourceToolReference> Tools`

              - `JsonElement Type = "tool_reference"`

              - `required string Name`

          - `class WebFetchUrlSourceExcept`

            The tool filter variant under which every result but the named
            tools' contributes.

            - `JsonElement Type = "except"`

            - `required IReadOnlyList<WebFetchUrlSourceToolReference> Tools`

              - `JsonElement Type = "tool_reference"`

              - `required string Name`

        - `ServerToolResults ServerToolResults`

          Which server tools' results contribute fetchable URLs: "all", "none", or an only or except list of server tool names from tools[]; only web_search and web_fetch results ever contribute.

          - `class WebFetchUrlSourceAll`

            The `url_sources` variant under which a source contributes in
            full: every result of the tool filter's source, or all user input.

          - `class WebFetchUrlSourceNone`

            The `url_sources` variant under which a source contributes nothing:
            no result of the tool filter's source, or no user input.

          - `class WebFetchUrlSourceOnly`

            The tool filter variant under which only the named tools' results
            contribute.

          - `class WebFetchUrlSourceExcept`

            The tool filter variant under which every result but the named
            tools' contributes.

        - `UserInput UserInput`

          Whether URLs in user messages are fetchable: "all" or "none".

          - `class WebFetchUrlSourceAll`

            The `url_sources` variant under which a source contributes in
            full: every result of the tool filter's source, or all user input.

          - `class WebFetchUrlSourceNone`

            The `url_sources` variant under which a source contributes nothing:
            no result of the tool filter's source, or no user input.

    - `class WebSearchTool20260209`

      - `JsonElement Type = "web_search_20260209"`

      - `JsonElement Name = "web_search"`

        Name of the tool.

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

      - `IReadOnlyList<AllowedCaller> AllowedCallers`

        - `Direct("direct")`

        - `CodeExecution20250825("code_execution_20250825")`

        - `CodeExecution20260120("code_execution_20260120")`

        - `CodeExecution20260521("code_execution_20260521")`

      - `IReadOnlyList<string>? AllowedDomains`

        If provided, only these domains will be included in results. Cannot be used alongside `blocked_domains`.

      - `IReadOnlyList<string>? BlockedDomains`

        If provided, these domains will never appear in results. Cannot be used alongside `allowed_domains`.

      - `CacheControlEphemeral? CacheControl`

        Create a cache control breakpoint at this content block.

      - `bool DeferLoading`

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

      - `long? MaxUses`

        Maximum number of times the tool can be used in the API request.

        minimum: 1

      - `bool Strict`

        When true, guarantees schema validation on tool names and inputs

      - `UserLocation? UserLocation`

        Parameters for the user's location. Used to provide more relevant search results.

    - `class WebFetchTool20260209`

      - `JsonElement Type = "web_fetch_20260209"`

      - `JsonElement Name = "web_fetch"`

        Name of the tool.

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

      - `IReadOnlyList<AllowedCaller> AllowedCallers`

        - `Direct("direct")`

        - `CodeExecution20250825("code_execution_20250825")`

        - `CodeExecution20260120("code_execution_20260120")`

        - `CodeExecution20260521("code_execution_20260521")`

      - `IReadOnlyList<string>? AllowedDomains`

        List of domains to allow fetching from

      - `IReadOnlyList<string>? BlockedDomains`

        List of domains to block fetching from

      - `CacheControlEphemeral? CacheControl`

        Create a cache control breakpoint at this content block.

      - `CitationsConfigParam? Citations`

        Citations configuration for fetched documents. Citations are disabled by default.

      - `bool DeferLoading`

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

      - `long? MaxContentTokens`

        Maximum number of tokens used by including web page text content in the context. The limit is approximate and does not apply to binary content such as PDFs.

        minimum: 1

      - `long? MaxUses`

        Maximum number of times the tool can be used in the API request.

        minimum: 1

      - `bool Strict`

        When true, guarantees schema validation on tool names and inputs

      - `WebFetchUrlSources? UrlSources`

        Which sources contribute to the set of URLs the tool may fetch. Omitted means every source.

    - `class WebFetchTool20260309`

      Web fetch tool with use_cache parameter for bypassing cached content.

      - `JsonElement Type = "web_fetch_20260309"`

      - `JsonElement Name = "web_fetch"`

        Name of the tool.

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

      - `IReadOnlyList<AllowedCaller> AllowedCallers`

        - `Direct("direct")`

        - `CodeExecution20250825("code_execution_20250825")`

        - `CodeExecution20260120("code_execution_20260120")`

        - `CodeExecution20260521("code_execution_20260521")`

      - `IReadOnlyList<string>? AllowedDomains`

        List of domains to allow fetching from

      - `IReadOnlyList<string>? BlockedDomains`

        List of domains to block fetching from

      - `CacheControlEphemeral? CacheControl`

        Create a cache control breakpoint at this content block.

      - `CitationsConfigParam? Citations`

        Citations configuration for fetched documents. Citations are disabled by default.

      - `bool DeferLoading`

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

      - `long? MaxContentTokens`

        Maximum number of tokens used by including web page text content in the context. The limit is approximate and does not apply to binary content such as PDFs.

        minimum: 1

      - `long? MaxUses`

        Maximum number of times the tool can be used in the API request.

        minimum: 1

      - `bool Strict`

        When true, guarantees schema validation on tool names and inputs

      - `WebFetchUrlSources? UrlSources`

        Which sources contribute to the set of URLs the tool may fetch. Omitted means every source.

      - `bool UseCache`

        Whether to use cached content. Set to false to bypass the cache and fetch fresh content. Only set to false when the user explicitly requests fresh content or when fetching rapidly-changing sources.

    - `class WebSearchTool20260318`

      - `JsonElement Type = "web_search_20260318"`

      - `JsonElement Name = "web_search"`

        Name of the tool.

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

      - `IReadOnlyList<AllowedCaller> AllowedCallers`

        - `Direct("direct")`

        - `CodeExecution20250825("code_execution_20250825")`

        - `CodeExecution20260120("code_execution_20260120")`

        - `CodeExecution20260521("code_execution_20260521")`

      - `IReadOnlyList<string>? AllowedDomains`

        If provided, only these domains will be included in results. Cannot be used alongside `blocked_domains`.

      - `IReadOnlyList<string>? BlockedDomains`

        If provided, these domains will never appear in results. Cannot be used alongside `allowed_domains`.

      - `CacheControlEphemeral? CacheControl`

        Create a cache control breakpoint at this content block.

      - `bool DeferLoading`

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

      - `long? MaxUses`

        Maximum number of times the tool can be used in the API request.

        minimum: 1

      - `ResponseInclusion ResponseInclusion`

        How this tool's result blocks appear in the API response when the result was consumed by a completed code_execution call in the same turn. 'full' returns the complete content (default). 'excluded' drops the nested server_tool_use and result block pair entirely. Results from direct calls, or from code_execution calls that paused before completing, are always returned in full so they can be sent back on the next turn.

        - `Full("full")`

        - `Excluded("excluded")`

      - `bool Strict`

        When true, guarantees schema validation on tool names and inputs

      - `UserLocation? UserLocation`

        Parameters for the user's location. Used to provide more relevant search results.

    - `class WebFetchTool20260318`

      - `JsonElement Type = "web_fetch_20260318"`

      - `JsonElement Name = "web_fetch"`

        Name of the tool.

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

      - `IReadOnlyList<AllowedCaller> AllowedCallers`

        - `Direct("direct")`

        - `CodeExecution20250825("code_execution_20250825")`

        - `CodeExecution20260120("code_execution_20260120")`

        - `CodeExecution20260521("code_execution_20260521")`

      - `IReadOnlyList<string>? AllowedDomains`

        List of domains to allow fetching from

      - `IReadOnlyList<string>? BlockedDomains`

        List of domains to block fetching from

      - `CacheControlEphemeral? CacheControl`

        Create a cache control breakpoint at this content block.

      - `CitationsConfigParam? Citations`

        Citations configuration for fetched documents. Citations are disabled by default.

      - `bool DeferLoading`

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

      - `long? MaxContentTokens`

        Maximum number of tokens used by including web page text content in the context. The limit is approximate and does not apply to binary content such as PDFs.

        minimum: 1

      - `long? MaxUses`

        Maximum number of times the tool can be used in the API request.

        minimum: 1

      - `ResponseInclusion ResponseInclusion`

        How this tool's result blocks appear in the API response when the result was consumed by a completed code_execution call in the same turn. 'full' returns the complete content (default). 'excluded' drops the nested server_tool_use and result block pair entirely. Results from direct calls, or from code_execution calls that paused before completing, are always returned in full so they can be sent back on the next turn.

        - `Full("full")`

        - `Excluded("excluded")`

      - `bool Strict`

        When true, guarantees schema validation on tool names and inputs

      - `WebFetchUrlSources? UrlSources`

        Which sources contribute to the set of URLs the tool may fetch. Omitted means every source.

      - `bool UseCache`

        Whether to use cached content. Set to false to bypass the cache and fetch fresh content. Only set to false when the user explicitly requests fresh content or when fetching rapidly-changing sources.

    - `class ToolSearchToolBm25_20251119`

      - `required Type Type`

        - `ToolSearchToolBm25_20251119("tool_search_tool_bm25_20251119")`

        - `ToolSearchToolBm25("tool_search_tool_bm25")`

      - `JsonElement Name = "tool_search_tool_bm25"`

        Name of the tool.

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

      - `IReadOnlyList<AllowedCaller> AllowedCallers`

        - `Direct("direct")`

        - `CodeExecution20250825("code_execution_20250825")`

        - `CodeExecution20260120("code_execution_20260120")`

        - `CodeExecution20260521("code_execution_20260521")`

      - `CacheControlEphemeral? CacheControl`

        Create a cache control breakpoint at this content block.

      - `bool DeferLoading`

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

      - `bool Strict`

        When true, guarantees schema validation on tool names and inputs

    - `class ToolSearchToolRegex20251119`

      - `required Type Type`

        - `ToolSearchToolRegex20251119("tool_search_tool_regex_20251119")`

        - `ToolSearchToolRegex("tool_search_tool_regex")`

      - `JsonElement Name = "tool_search_tool_regex"`

        Name of the tool.

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

      - `IReadOnlyList<AllowedCaller> AllowedCallers`

        - `Direct("direct")`

        - `CodeExecution20250825("code_execution_20250825")`

        - `CodeExecution20260120("code_execution_20260120")`

        - `CodeExecution20260521("code_execution_20260521")`

      - `CacheControlEphemeral? CacheControl`

        Create a cache control breakpoint at this content block.

      - `bool DeferLoading`

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

      - `bool Strict`

        When true, guarantees schema validation on tool names and inputs

  - `string userProfileID` (header parameter)

    The user profile ID to attribute this request to. Use when acting on behalf of a party other than your organization.

  - `string workspaceID` (header parameter)

    Optional header to select the Workspace for this request. The value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).

    Only needed for credentials that can act on more than one Workspace. A credential that belongs to a specific Workspace may omit it; if sent, it must match that Workspace.

### Returns

- `class Message`

  - `JsonElement Type = "message"`

    Object type.

    For Messages, this is always `"message"`.

  - `required string ID`

    Unique object identifier.

    The format and length of IDs may change over time.

  - `required Container? Container`

    Information about the container used in this request.

    This will be non-null if a container tool (e.g. code execution) was used.

    - `required string ID`

      Identifier for the container used in this request

    - `required DateTimeOffset ExpiresAt`

      The time at which the container will expire.

      format: date-time

    - `required IReadOnlyList<ContainerSkill>? Skills`

      Skills loaded in the container

      - `required ContainerSkillType Type`

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

        - `Anthropic("anthropic")`

        - `Custom("custom")`

      - `required string SkillID`

        Skill ID

        minLength: 1, maxLength: 64

      - `required string Version`

        The resolved version: a skill version ID for custom skills.

        minLength: 1, maxLength: 64

  - `required IReadOnlyList<ContentBlock> Content`

    Content generated by the model.

    This is an array of content blocks, each of which has a `type` that determines its shape.

    Example:

    ```json
    [{"type": "text", "text": "Hi, I'm Claude."}]
    ```

    If the request input `messages` ended with an `assistant` turn, then the response `content` will continue directly from that last turn. You can use this to constrain the model's output.

    For example, if the input `messages` were:

    ```json
    [
      {"role": "user", "content": "What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun"},
      {"role": "assistant", "content": "The best answer is ("}
    ]
    ```

    Then the response `content` might be:

    ```json
    [{"type": "text", "text": "B)"}]
    ```

    - `class TextBlock`

      - `JsonElement Type = "text"`

      - `required IReadOnlyList<TextCitation>? Citations`

        Citations supporting the text block.

        The type of citation returned will depend on the type of document being cited. Citing a PDF results in `page_location`, plain text results in `char_location`, and content document results in `content_block_location`.

        - `class CitationCharLocation`

          - `JsonElement Type = "char_location"`

          - `required string CitedText`

          - `required long DocumentIndex`

            minimum: 0

          - `required string? DocumentTitle`

          - `required long EndCharIndex`

          - `required string? FileID`

          - `required long StartCharIndex`

            minimum: 0

        - `class CitationPageLocation`

          - `JsonElement Type = "page_location"`

          - `required string CitedText`

          - `required long DocumentIndex`

            minimum: 0

          - `required string? DocumentTitle`

          - `required long EndPageNumber`

          - `required string? FileID`

          - `required long StartPageNumber`

            minimum: 1

        - `class CitationContentBlockLocation`

          - `JsonElement Type = "content_block_location"`

          - `required string CitedText`

            The full text of the cited block range, concatenated.

            Always equals the contents of `content[start_block_index:end_block_index]` joined together. The text block is the minimal citable unit; this field is never a substring of a single block. Not counted toward output tokens, and not counted toward input tokens when sent back in subsequent turns.

          - `required long DocumentIndex`

            minimum: 0

          - `required string? DocumentTitle`

          - `required long EndBlockIndex`

            Exclusive 0-based end index of the cited block range in the source's `content` array.

            Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`.

          - `required string? FileID`

          - `required long StartBlockIndex`

            0-based index of the first cited block in the source's `content` array.

            minimum: 0

        - `class CitationsWebSearchResultLocation`

          - `JsonElement Type = "web_search_result_location"`

          - `required string CitedText`

          - `required string EncryptedIndex`

          - `required string? Title`

            maxLength: 512

          - `required string Url`

        - `class CitationsSearchResultLocation`

          - `JsonElement Type = "search_result_location"`

          - `required string CitedText`

            The full text of the cited block range, concatenated.

            Always equals the contents of `content[start_block_index:end_block_index]` joined together. The text block is the minimal citable unit; this field is never a substring of a single block. Not counted toward output tokens, and not counted toward input tokens when sent back in subsequent turns.

          - `required long EndBlockIndex`

            Exclusive 0-based end index of the cited block range in the source's `content` array.

            Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`.

          - `required long SearchResultIndex`

            0-based index of the cited search result among all `search_result` content blocks in the request, in the order they appear across messages and tool results.

            Counted separately from `document_index`; server-side web search results are not included in this count.

            minimum: 0

          - `required string Source`

          - `required long StartBlockIndex`

            0-based index of the first cited block in the source's `content` array.

            minimum: 0

          - `required string? Title`

      - `required string Text`

    - `class ThinkingBlock`

      - `JsonElement Type = "thinking"`

      - `required string Signature`

        A value used to verify that this thinking block was generated by Claude when it is passed back to the API.

        This is an opaque field and should not be interpreted or parsed. When passing thinking blocks back to the API (required when using tools with extended thinking), pass them back exactly as received, with this field intact.

        See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking?sdk_languages=csharp) for details.

      - `required string Thinking`

        The text of Claude's thinking process for this block.

    - `class RedactedThinkingBlock`

      - `JsonElement Type = "redacted_thinking"`

      - `required string Data`

        The contents of this redacted thinking block, returned when portions of the model's thinking were safety-redacted. This field is opaque and encrypted, with no readable content.

        Pass `redacted_thinking` blocks back to the API unchanged when continuing a multi-turn conversation.

        See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking?sdk_languages=csharp#redacted-thinking-blocks) for details.

    - `class ToolUseBlock`

      - `JsonElement Type = "tool_use"`

      - `required string ID`

        pattern: ^[a-zA-Z0-9_-]+$

      - `required Caller Caller`

        - `class DirectCaller`

          Tool invocation directly from the model.

          - `JsonElement Type = "direct"`

        - `class ServerToolCaller`

          Tool invocation generated by a server-side tool.

          - `JsonElement Type = "code_execution_20250825"`

          - `required string ToolID`

            pattern: ^srvtoolu_[a-zA-Z0-9_]+$

        - `class ServerToolCaller20260120`

          - `JsonElement Type = "code_execution_20260120"`

          - `required string ToolID`

            pattern: ^srvtoolu_[a-zA-Z0-9_]+$

      - `required IReadOnlyDictionary<string, JsonElement> Input`

      - `required string Name`

        minLength: 1

      - `string? ToolsetName`

        For a toolset member tool_use, the toolset family.

        minLength: 1, maxLength: 64, pattern: ^[a-zA-Z0-9_-]+$

    - `class ServerToolUseBlock`

      - `JsonElement Type = "server_tool_use"`

      - `required string ID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

      - `required Caller Caller`

        - `class DirectCaller`

          Tool invocation directly from the model.

        - `class ServerToolCaller`

          Tool invocation generated by a server-side tool.

        - `class ServerToolCaller20260120`

      - `required IReadOnlyDictionary<string, JsonElement> Input`

      - `required Name Name`

        - `WebSearch("web_search")`

        - `WebFetch("web_fetch")`

        - `CodeExecution("code_execution")`

        - `BashCodeExecution("bash_code_execution")`

        - `TextEditorCodeExecution("text_editor_code_execution")`

        - `ToolSearchToolRegex("tool_search_tool_regex")`

        - `ToolSearchToolBm25("tool_search_tool_bm25")`

    - `class WebSearchToolResultBlock`

      - `JsonElement Type = "web_search_tool_result"`

      - `required Caller Caller`

        - `class DirectCaller`

          Tool invocation directly from the model.

        - `class ServerToolCaller`

          Tool invocation generated by a server-side tool.

        - `class ServerToolCaller20260120`

      - `required WebSearchToolResultBlockContent Content`

        - `class WebSearchToolResultError`

          - `JsonElement Type = "web_search_tool_result_error"`

          - `required WebSearchToolResultErrorCode ErrorCode`

            - `InvalidToolInput("invalid_tool_input")`

            - `Unavailable("unavailable")`

            - `MaxUsesExceeded("max_uses_exceeded")`

            - `TooManyRequests("too_many_requests")`

            - `QueryTooLong("query_too_long")`

            - `RequestTooLarge("request_too_large")`

        - `IReadOnlyList<WebSearchResultBlock>`

          - `JsonElement Type = "web_search_result"`

          - `required string EncryptedContent`

          - `required string? PageAge`

          - `required string Title`

          - `required string Url`

      - `required string ToolUseID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

    - `class WebFetchToolResultBlock`

      - `JsonElement Type = "web_fetch_tool_result"`

      - `required Caller Caller`

        - `class DirectCaller`

          Tool invocation directly from the model.

        - `class ServerToolCaller`

          Tool invocation generated by a server-side tool.

        - `class ServerToolCaller20260120`

      - `required Content Content`

        - `class WebFetchToolResultErrorBlock`

          - `JsonElement Type = "web_fetch_tool_result_error"`

          - `required WebFetchToolResultErrorCode ErrorCode`

            - `InvalidToolInput("invalid_tool_input")`

            - `UrlTooLong("url_too_long")`

            - `UrlNotAllowed("url_not_allowed")`

            - `UrlNotInPriorContext("url_not_in_prior_context")`

            - `UrlNotAccessible("url_not_accessible")`

            - `UnsupportedContentType("unsupported_content_type")`

            - `TooManyRequests("too_many_requests")`

            - `MaxUsesExceeded("max_uses_exceeded")`

            - `Unavailable("unavailable")`

            - `ContentTooLarge("content_too_large")`

        - `class WebFetchBlock`

          - `JsonElement Type = "web_fetch_result"`

          - `required DocumentBlock Content`

            - `JsonElement Type = "document"`

            - `required CitationsConfig? Citations`

              Citation configuration for the document

              - `required bool Enabled`

            - `required Source Source`

              - `class Base64PdfSource`

                - `JsonElement Type = "base64"`

                - `required string Data`

                  format: byte

                - `JsonElement MediaType = "application/pdf"`

              - `class PlainTextSource`

                - `JsonElement Type = "text"`

                - `required string Data`

                - `JsonElement MediaType = "text/plain"`

            - `required string? Title`

              The title of the document

          - `required string? RetrievedAt`

            ISO 8601 timestamp when the content was retrieved

          - `required string Url`

            Fetched content URL

      - `required string ToolUseID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

    - `class CodeExecutionToolResultBlock`

      - `JsonElement Type = "code_execution_tool_result"`

      - `required CodeExecutionToolResultBlockContent Content`

        - `class CodeExecutionToolResultError`

          - `JsonElement Type = "code_execution_tool_result_error"`

          - `required CodeExecutionToolResultErrorCode ErrorCode`

            - `InvalidToolInput("invalid_tool_input")`

            - `Unavailable("unavailable")`

            - `TooManyRequests("too_many_requests")`

            - `ExecutionTimeExceeded("execution_time_exceeded")`

        - `class CodeExecutionResultBlock`

          - `JsonElement Type = "code_execution_result"`

          - `required IReadOnlyList<CodeExecutionOutputBlock> Content`

            - `JsonElement Type = "code_execution_output"`

            - `required string FileID`

          - `required long ReturnCode`

          - `required string Stderr`

          - `required string Stdout`

        - `class EncryptedCodeExecutionResultBlock`

          The output and exit code of Python code that Claude ran with the code execution tool, with standard output in encrypted form.

          The API returns this block in place of `code_execution_result` when the code called the web search tool.

          See the [programmatic tool calling guide](https://platform.claude.com/docs/en/agents-and-tools/tool-use/programmatic-tool-calling?sdk_languages=csharp) to learn more about programmatic tool calling.

          - `JsonElement Type = "encrypted_code_execution_result"`

          - `required IReadOnlyList<CodeExecutionOutputBlock> Content`

            - `JsonElement Type = "code_execution_output"`

            - `required string FileID`

          - `required string EncryptedStdout`

          - `required long ReturnCode`

          - `required string Stderr`

      - `required string ToolUseID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

    - `class BashCodeExecutionToolResultBlock`

      - `JsonElement Type = "bash_code_execution_tool_result"`

      - `required Content Content`

        - `class BashCodeExecutionToolResultError`

          - `JsonElement Type = "bash_code_execution_tool_result_error"`

          - `required BashCodeExecutionToolResultErrorCode ErrorCode`

            - `InvalidToolInput("invalid_tool_input")`

            - `Unavailable("unavailable")`

            - `TooManyRequests("too_many_requests")`

            - `ExecutionTimeExceeded("execution_time_exceeded")`

            - `OutputFileTooLarge("output_file_too_large")`

        - `class BashCodeExecutionResultBlock`

          - `JsonElement Type = "bash_code_execution_result"`

          - `required IReadOnlyList<BashCodeExecutionOutputBlock> Content`

            - `JsonElement Type = "bash_code_execution_output"`

            - `required string FileID`

          - `required long ReturnCode`

          - `required string Stderr`

          - `required string Stdout`

      - `required string ToolUseID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

    - `class TextEditorCodeExecutionToolResultBlock`

      - `JsonElement Type = "text_editor_code_execution_tool_result"`

      - `required Content Content`

        - `class TextEditorCodeExecutionToolResultError`

          - `JsonElement Type = "text_editor_code_execution_tool_result_error"`

          - `required TextEditorCodeExecutionToolResultErrorCode ErrorCode`

            - `InvalidToolInput("invalid_tool_input")`

            - `Unavailable("unavailable")`

            - `TooManyRequests("too_many_requests")`

            - `ExecutionTimeExceeded("execution_time_exceeded")`

            - `FileNotFound("file_not_found")`

          - `required string? ErrorMessage`

        - `class TextEditorCodeExecutionViewResultBlock`

          - `JsonElement Type = "text_editor_code_execution_view_result"`

          - `required string Content`

          - `required FileType FileType`

            - `Text("text")`

            - `Image("image")`

            - `Pdf("pdf")`

          - `required long? NumLines`

          - `required long? StartLine`

          - `required long? TotalLines`

        - `class TextEditorCodeExecutionCreateResultBlock`

          - `JsonElement Type = "text_editor_code_execution_create_result"`

          - `required bool IsFileUpdate`

        - `class TextEditorCodeExecutionStrReplaceResultBlock`

          - `JsonElement Type = "text_editor_code_execution_str_replace_result"`

          - `required IReadOnlyList<string>? Lines`

          - `required long? NewLines`

          - `required long? NewStart`

          - `required long? OldLines`

          - `required long? OldStart`

      - `required string ToolUseID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

    - `class ToolSearchToolResultBlock`

      - `JsonElement Type = "tool_search_tool_result"`

      - `required Content Content`

        - `class ToolSearchToolResultError`

          - `JsonElement Type = "tool_search_tool_result_error"`

          - `required ToolSearchToolResultErrorCode ErrorCode`

            - `InvalidToolInput("invalid_tool_input")`

            - `Unavailable("unavailable")`

            - `TooManyRequests("too_many_requests")`

            - `ExecutionTimeExceeded("execution_time_exceeded")`

          - `required string? ErrorMessage`

        - `class ToolSearchToolSearchResultBlock`

          - `JsonElement Type = "tool_search_tool_search_result"`

          - `required IReadOnlyList<ToolReferenceBlock> ToolReferences`

            - `JsonElement Type = "tool_reference"`

            - `required string ToolName`

              minLength: 1, maxLength: 256, pattern: ^[a-zA-Z0-9_-]{1,256}$

      - `required string ToolUseID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

    - `class ContainerUploadBlock`

      Response model for a file uploaded to the container.

      - `JsonElement Type = "container_upload"`

      - `required string FileID`

  - `required Diagnostics? Diagnostics`

    Request-level diagnostics. `null` when the request did not supply `diagnostics`, or when it did and no prompt-cache divergence was detected.

    - `required CacheMissReason? CacheMissReason`

      Explains why the prompt cache could not fully reuse the prefix from the request identified by `diagnostics.previous_message_id`. `null` means diagnosis is still pending — the response was serialized before the background comparison completed.

      - `class CacheMissModelChanged`

        A `cache_miss_reason` for a request whose `model` or `speed` differs from the previous request's.

        See the [cache diagnostics guide](https://platform.claude.com/docs/en/build-with-claude/cache-diagnostics?sdk_languages=csharp#cache-miss-reason-types) to learn what to change for each reason.

        - `JsonElement Type = "model_changed"`

        - `required long CacheMissedInputTokens`

          Approximate number of input tokens that would have been read from cache had the prefix matched the previous request.

      - `class CacheMissSystemChanged`

        A `cache_miss_reason` for a request whose `system` differs from the previous request's.

        See the [cache diagnostics guide](https://platform.claude.com/docs/en/build-with-claude/cache-diagnostics?sdk_languages=csharp#cache-miss-reason-types) to learn what to change for each reason.

        - `JsonElement Type = "system_changed"`

        - `required long CacheMissedInputTokens`

          Approximate number of input tokens that would have been read from cache had the prefix matched the previous request.

      - `class CacheMissToolsChanged`

        A `cache_miss_reason` for a request whose `tools` differ from the previous request's, for example because tools were added, removed, or reordered.

        See the [cache diagnostics guide](https://platform.claude.com/docs/en/build-with-claude/cache-diagnostics?sdk_languages=csharp#cache-miss-reason-types) to learn what to change for each reason.

        - `JsonElement Type = "tools_changed"`

        - `required long CacheMissedInputTokens`

          Approximate number of input tokens that would have been read from cache had the prefix matched the previous request.

      - `class CacheMissMessagesChanged`

        A `cache_miss_reason` for a request whose `messages` differ from the previous request's in an earlier entry, instead of only having entries appended. The `model`, `system`, and `tools` match.

        See the [cache diagnostics guide](https://platform.claude.com/docs/en/build-with-claude/cache-diagnostics?sdk_languages=csharp#cache-miss-reason-types) to learn what to change for each reason.

        - `JsonElement Type = "messages_changed"`

        - `required long CacheMissedInputTokens`

          Approximate number of input tokens that would have been read from cache had the prefix matched the previous request.

      - `class CacheMissPreviousMessageNotFound`

        A `cache_miss_reason` for when the API doesn't have a stored record of the request that `diagnostics.previous_message_id` references.

        This doesn't mean that this request changed.

        See the [cache diagnostics guide](https://platform.claude.com/docs/en/build-with-claude/cache-diagnostics?sdk_languages=csharp#cache-miss-reason-types) to learn what to change for each reason.

        - `JsonElement Type = "previous_message_not_found"`

      - `class CacheMissUnavailable`

        A `cache_miss_reason` for when the API can't give a diagnosis. The request itself was processed normally.

        This includes a request whose `model`, `system`, and `tools` match the previous request's but whose other prompt-affecting parameters, such as `thinking` or `tool_choice`, differ.

        See the [cache diagnostics guide](https://platform.claude.com/docs/en/build-with-claude/cache-diagnostics?sdk_languages=csharp#cache-miss-reason-types) to learn what to change for each reason.

        - `JsonElement Type = "unavailable"`

  - `required Model Model`

    The model that will complete your prompt.

    See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options.

    - `ClaudeHaiku5_5("claude-haiku-5-5")`

      Fastest model for high-volume, real-time tasks

    - `ClaudeSonnet5_5("claude-sonnet-5-5")`

      Efficient model for coding and agents

    - `ClaudeFable5_1("claude-fable-5-1")`

      Frontier intelligence for ambitious tasks across coding, scientific discovery, and enterprise workflows

    - `ClaudeOpus5_5("claude-opus-5-5")`

      Powerful intelligence for coding, knowledge work, and long-running agents

    - `ClaudeMythos5_1("claude-mythos-5-1")`

      Our most capable model for cybersecurity and biology research, available through trusted access programs

    - `ClaudeSonnet5("claude-sonnet-5")`

      Efficient model for coding and agents

    - `ClaudeFable5("claude-fable-5")`

      Next generation of intelligence for the hardest knowledge work and coding problems

    - `ClaudeMythos5("claude-mythos-5")`

      Most capable model for cybersecurity and biology research

    - `ClaudeOpus5("claude-opus-5")`

      Powerful intelligence for long-running agents and coding

    - `ClaudeOpus4_8("claude-opus-4-8")`

      Powerful intelligence for long-running agents and coding

    - `ClaudeOpus4_7("claude-opus-4-7")`

      Powerful intelligence for long-running agents and coding

    - `ClaudeOpus4_6("claude-opus-4-6")`

      Powerful intelligence for long-running agents and coding

    - `ClaudeSonnet4_6("claude-sonnet-4-6")`

      Best combination of speed and intelligence

    - `ClaudeHaiku4_5("claude-haiku-4-5")`

    - `ClaudeHaiku4_5_20251001("claude-haiku-4-5-20251001")`

    - `ClaudeOpus4_5("claude-opus-4-5")`

      Powerful intelligence for long-running agents and coding

    - `ClaudeOpus4_5_20251101("claude-opus-4-5-20251101")`

      Powerful intelligence for long-running agents and coding

    - `ClaudeMythosPreview("claude-mythos-preview")`

      **Deprecated**: Will reach end-of-life on June 30, 2026. Please migrate to claude-mythos-5. Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for more information.

      New class of intelligence, strongest in coding and cybersecurity

    - `ClaudeSonnet4_5("claude-sonnet-4-5")`

      **Deprecated**: Will reach end-of-life on November 30, 2026. Please migrate to claude-sonnet-5-5. Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for more information.

      High-performance model for agents and coding

    - `ClaudeSonnet4_5_20250929("claude-sonnet-4-5-20250929")`

      **Deprecated**: Will reach end-of-life on November 30, 2026. Please migrate to claude-sonnet-5-5. Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for more information.

      High-performance model for agents and coding

  - `JsonElement Role = "assistant"`

    Conversational role of the generated message.

    This will always be `"assistant"`.

  - `required RefusalStopDetails? StopDetails`

    Structured information about why model output stopped.

    This is `null` when the `stop_reason` has no additional detail to report.

    - `JsonElement Type = "refusal"`

    - `required Category? Category`

      The policy category that triggered the refusal.

      `null` when the refusal doesn't map to a named category.

      - `Cyber("cyber")`

        The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category.

      - `Bio("bio")`

        The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category.

      - `FrontierLlm("frontier_llm")`

        The request could assist the development of competing AI models, which is restricted under [Anthropic's commercial terms](https://www.anthropic.com/legal/commercial-terms). Benign machine learning work can also trigger this category.

      - `ReasoningExtraction("reasoning_extraction")`

        The request asks the model to reproduce its internal reasoning in the response text. To get reasoning in a structured form instead, use [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking?sdk_languages=csharp).

      - `GeneralHarms("general_harms")`

        The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category.

    - `required string? Explanation`

      Human-readable explanation of the refusal.

      This text is not guaranteed to be stable. `null` when no explanation is available for the category.

  - `required StopReason? StopReason`

    The reason that we stopped.

    This may be one the following values:

    * `"end_turn"`: the model reached a natural stopping point
    * `"max_tokens"`: we exceeded the requested `max_tokens` or the model's maximum
    * `"stop_sequence"`: one of your provided custom `stop_sequences` was generated
    * `"tool_use"`: the model invoked one or more tools
    * `"pause_turn"`: we paused a long-running turn. You may provide the response back as-is in a subsequent request to let the model continue.
    * `"refusal"`: when streaming classifiers intervene to handle potential policy violations
    * `"model_context_window_exceeded"`: we exceeded the model's context window

    In non-streaming mode this value is always non-null. In streaming mode, it is null in the `message_start` event and non-null otherwise.

    - `EndTurn("end_turn")`

    - `MaxTokens("max_tokens")`

    - `StopSequence("stop_sequence")`

    - `ToolUse("tool_use")`

    - `PauseTurn("pause_turn")`

    - `Refusal("refusal")`

    - `ModelContextWindowExceeded("model_context_window_exceeded")`

  - `required string? StopSequence`

    Which custom stop sequence was generated, if any.

    This value will be a non-null string if one of your custom stop sequences was generated.

  - `required Usage Usage`

    Billing and rate-limit usage.

    Anthropic's API bills and rate-limits by token counts, as tokens represent the underlying cost to our systems.

    Under the hood, the API transforms requests into a format suitable for the model. The model's output then goes through a parsing stage before becoming an API response. As a result, the token counts in `usage` will not match one-to-one with the exact visible content of an API request or response.

    For example, `output_tokens` will be non-zero, even for an empty string response from Claude.

    Total input tokens in a request is the summation of `input_tokens`, `cache_creation_input_tokens`, and `cache_read_input_tokens`.

    - `required CacheCreation? CacheCreation`

      Breakdown of cached tokens by TTL

      - `required long Ephemeral1hInputTokens`

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

        minimum: 0

      - `required long Ephemeral5mInputTokens`

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

        minimum: 0

    - `required long? CacheCreationInputTokens`

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

      minimum: 0

    - `required long? CacheReadInputTokens`

      The number of input tokens read from the cache.

      minimum: 0

    - `required string? InferenceGeo`

      The geographic region where inference was performed for this request.

    - `required long InputTokens`

      The number of input tokens which were used.

      minimum: 0

    - `required long OutputTokens`

      The number of output tokens which were used.

      minimum: 0

    - `required OutputTokensDetails? OutputTokensDetails`

      Breakdown of output tokens by category.

      `output_tokens` remains the inclusive, authoritative total used for billing.
      This object provides a read-only decomposition for observability — for example,
      how many of the billed output tokens were spent on internal reasoning that may
      have been summarized before being returned to you.

      - `required long ThinkingTokens`

        Number of output tokens the model generated as internal reasoning, including
        the thinking-block delimiter tokens.

        Reflects the raw reasoning the model produced, not the (possibly shorter)
        summarized thinking text returned in the response body. Computed by
        re-tokenizing the raw reasoning text, so it may differ from the model's exact
        generation count by a small number of tokens. Always ≤ `output_tokens`;
        `output_tokens - thinking_tokens` approximates the non-reasoning output.

        minimum: 0

    - `required ServerToolUsage? ServerToolUse`

      The number of server tool requests.

      - `required long WebFetchRequests`

        The number of web fetch tool requests.

        minimum: 0

      - `required long WebSearchRequests`

        The number of web search tool requests.

        minimum: 0

    - `required ServiceTier? ServiceTier`

      If the request used the priority, standard, or batch tier.

      - `Standard("standard")`

      - `Priority("priority")`

      - `Batch("batch")`

    - `required Speed? Speed`

      The inference speed mode used for this request.

      - `Standard("standard")`

      - `Fast("fast")`

- `class RawMessageStreamEvent: union`

  - `class RawMessageStartEvent`

    - `JsonElement Type = "message_start"`

    - `required Message Message`

  - `class RawMessageDeltaEvent`

    - `JsonElement Type = "message_delta"`

    - `required Delta Delta`

      - `required Container? Container`

        Information about the container used in this request.

        This will be non-null if a container tool (e.g. code execution) was used.

      - `required RefusalStopDetails? StopDetails`

        Structured information about why model output stopped.

        This is `null` when the `stop_reason` has no additional detail to report.

      - `required StopReason? StopReason`

      - `required string? StopSequence`

    - `required MessageDeltaUsage Usage`

      Billing and rate-limit usage.

      Anthropic's API bills and rate-limits by token counts, as tokens represent the underlying cost to our systems.

      Under the hood, the API transforms requests into a format suitable for the model. The model's output then goes through a parsing stage before becoming an API response. As a result, the token counts in `usage` will not match one-to-one with the exact visible content of an API request or response.

      For example, `output_tokens` will be non-zero, even for an empty string response from Claude.

      Total input tokens in a request is the summation of `input_tokens`, `cache_creation_input_tokens`, and `cache_read_input_tokens`.

      - `required long? CacheCreationInputTokens`

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

        minimum: 0

      - `required long? CacheReadInputTokens`

        The cumulative number of input tokens read from the cache.

        minimum: 0

      - `required long? InputTokens`

        The cumulative number of input tokens which were used.

        minimum: 0

      - `required long OutputTokens`

        The cumulative number of output tokens which were used.

      - `required OutputTokensDetails? OutputTokensDetails`

        Breakdown of output tokens by category.

        `output_tokens` remains the inclusive, authoritative total used for billing.
        This object provides a read-only decomposition for observability — for example,
        how many of the billed output tokens were spent on internal reasoning that may
        have been summarized before being returned to you.

      - `required ServerToolUsage? ServerToolUse`

        The number of server tool requests.

  - `class RawMessageStopEvent`

    - `JsonElement Type = "message_stop"`

  - `class RawContentBlockStartEvent`

    - `JsonElement Type = "content_block_start"`

    - `required ContentBlock ContentBlock`

      - `class TextBlock`

      - `class ThinkingBlock`

      - `class RedactedThinkingBlock`

      - `class ToolUseBlock`

      - `class ServerToolUseBlock`

      - `class WebSearchToolResultBlock`

      - `class WebFetchToolResultBlock`

      - `class CodeExecutionToolResultBlock`

      - `class BashCodeExecutionToolResultBlock`

      - `class TextEditorCodeExecutionToolResultBlock`

      - `class ToolSearchToolResultBlock`

      - `class ContainerUploadBlock`

        Response model for a file uploaded to the container.

    - `required long Index`

  - `class RawContentBlockDeltaEvent`

    - `JsonElement Type = "content_block_delta"`

    - `required RawContentBlockDelta Delta`

      - `class TextDelta`

        - `JsonElement Type = "text_delta"`

        - `required string Text`

      - `class InputJsonDelta`

        - `JsonElement Type = "input_json_delta"`

        - `required string PartialJson`

      - `class CitationsDelta`

        - `JsonElement Type = "citations_delta"`

        - `required Citation Citation`

          - `class CitationCharLocation`

          - `class CitationPageLocation`

          - `class CitationContentBlockLocation`

          - `class CitationsWebSearchResultLocation`

          - `class CitationsSearchResultLocation`

      - `class ThinkingDelta`

        - `JsonElement Type = "thinking_delta"`

        - `required string Thinking`

          The incremental `thinking` text for this content block. Concatenate the `thinking` values of successive `thinking_delta` events to assemble the block's full `thinking` value.

      - `class SignatureDelta`

        - `JsonElement Type = "signature_delta"`

        - `required string Signature`

          The `signature` for this thinking block: an opaque value used to verify that the block was generated by Claude when it is passed back to the API. Delivered in a `signature_delta` event just before the block's `content_block_stop` event.

    - `required long Index`

  - `class RawContentBlockStopEvent`

    - `JsonElement Type = "content_block_stop"`

    - `required long Index`

### Example

```csharp
using System;
using Anthropic.Models.Messages;

MessageCreateParams parameters = new()
{
    MaxTokens = 1024,
    Messages =
    [
        new UserMessageParam("Hello, world")
    ],
    Model = Model.ClaudeOpus5_5,
};

var message = await client.Messages.Create(parameters);

Console.WriteLine(message);
```

#### Response (200)

```json
{
  "id": "msg_013Zva2CMHLNnXjNJJKqJ2EF",
  "container": {
    "id": "container_011CpZohnwH4vuy7gazohgSP",
    "expires_at": "2019-12-27T18:11:19.117Z",
    "skills": [
      {
        "skill_id": "pdf",
        "type": "anthropic",
        "version": "latest"
      }
    ]
  },
  "content": [
    {
      "citations": [
        {
          "cited_text": "The grass is green. The sky is blue.",
          "document_index": 0,
          "document_title": "My Document",
          "end_char_index": 0,
          "file_id": "file_011CNha8iCJcU1wXNR6q4V8w",
          "start_char_index": 0,
          "type": "char_location"
        }
      ],
      "text": "Hi! My name is Claude.",
      "type": "text"
    }
  ],
  "diagnostics": {
    "cache_miss_reason": {
      "cache_missed_input_tokens": 0,
      "type": "model_changed"
    }
  },
  "model": "claude-opus-5-5",
  "role": "assistant",
  "stop_details": {
    "category": "cyber",
    "explanation": "This request was declined because it conflicts with Anthropic's Usage Policy.",
    "type": "refusal"
  },
  "stop_reason": "end_turn",
  "stop_sequence": null,
  "type": "message",
  "usage": {
    "cache_creation": {
      "ephemeral_1h_input_tokens": 0,
      "ephemeral_5m_input_tokens": 0
    },
    "cache_creation_input_tokens": 2051,
    "cache_read_input_tokens": 2051,
    "inference_geo": "global",
    "input_tokens": 2095,
    "output_tokens": 503,
    "output_tokens_details": {
      "thinking_tokens": 0
    },
    "server_tool_use": {
      "web_fetch_requests": 2,
      "web_search_requests": 0
    },
    "service_tier": "standard",
    "speed": "standard"
  }
}
```

## Count tokens in a Message

`MessageTokensCount Messages.CountTokens(parameters, cancellationToken = default)`

**POST** `/v1/messages/count_tokens`

Count the number of tokens in a Message.

The Token Count API can be used to count the number of tokens in a Message, including tools, images, and documents, without creating it.

Learn more about token counting in our [user guide](https://platform.claude.com/docs/en/build-with-claude/token-counting?sdk_languages=csharp)

### Parameters

- `MessageCountTokensParams parameters`

  - `required IReadOnlyList<MessageParam> messages`

    Input messages.

    Our models are trained to operate on alternating `user` and `assistant` conversational turns. When creating a new `Message`, you specify the prior conversational turns with the `messages` parameter, and the model then generates the next `Message` in the conversation. Consecutive `user` or `assistant` turns in your request will be combined into a single turn.

    Each input message must be an object with a `role` and `content`. You can specify a single `user`-role message, or you can include multiple `user` and `assistant` messages.

    If the final message uses the `assistant` role, the response content will continue immediately from the content in that message. This can be used to constrain part of the model's response. This is called prefill. On models that don't support prefill, creating a message that ends with a partial `assistant` response returns a 400 error. See [Prefill not supported](https://platform.claude.com/docs/en/api/errors?sdk_languages=csharp#prefill-not-supported).

    Example with a single `user` message:

    ```json
    [{"role": "user", "content": "Hello, Claude"}]
    ```

    Example with multiple conversational turns:

    ```json
    [
      {"role": "user", "content": "Hello there."},
      {"role": "assistant", "content": "Hi, I'm Claude. How can I help you?"},
      {"role": "user", "content": "Can you explain LLMs in plain English?"},
    ]
    ```

    Example with a partially-filled response from Claude, for models that support prefill:

    ```json
    [
      {"role": "user", "content": "What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun"},
      {"role": "assistant", "content": "The best answer is ("},
    ]
    ```

    Each input message `content` may be either a single `string` or an array of content blocks, where each block has a specific `type`. Using a `string` for `content` is shorthand for an array of one content block of type `"text"`. The following input messages are equivalent:

    ```json
    {"role": "user", "content": "Hello, Claude"}
    ```

    ```json
    {"role": "user", "content": [{"type": "text", "text": "Hello, Claude"}]}
    ```

    See [input examples](https://platform.claude.com/docs/en/build-with-claude/working-with-messages?sdk_languages=csharp).

    Note that if you want to include a [system prompt](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices?sdk_languages=csharp#give-claude-a-role), you can use the top-level `system` parameter.

    There is a limit of 100,000 messages in a single request.

    - `class UserMessageParam`

      - `required MessageContentParam Content`

        - `string`

        - `IReadOnlyList<ContentBlockParam>`

          - `class TextBlockParam`

            - `JsonElement Type = "text"`

            - `required string Text`

              minLength: 1

            - `CacheControlEphemeral? CacheControl`

              Create a cache control breakpoint at this content block.

              - `JsonElement Type = "ephemeral"`

              - `Ttl Ttl`

                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`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching?sdk_languages=csharp) for details.

                - `Ttl5m("5m")`

                - `Ttl1h("1h")`

            - `IReadOnlyList<TextCitationParam>? Citations`

              - `class CitationCharLocationParam`

                - `JsonElement Type = "char_location"`

                - `required string CitedText`

                - `required long DocumentIndex`

                  minimum: 0

                - `required string? DocumentTitle`

                  minLength: 1, maxLength: 500

                - `required long EndCharIndex`

                - `required long StartCharIndex`

                  minimum: 0

              - `class CitationPageLocationParam`

                - `JsonElement Type = "page_location"`

                - `required string CitedText`

                - `required long DocumentIndex`

                  minimum: 0

                - `required string? DocumentTitle`

                  minLength: 1, maxLength: 500

                - `required long EndPageNumber`

                - `required long StartPageNumber`

                  minimum: 1

              - `class CitationContentBlockLocationParam`

                - `JsonElement Type = "content_block_location"`

                - `required string CitedText`

                  The full text of the cited block range, concatenated.

                  Always equals the contents of `content[start_block_index:end_block_index]` joined together. The text block is the minimal citable unit; this field is never a substring of a single block. Not counted toward output tokens, and not counted toward input tokens when sent back in subsequent turns.

                - `required long DocumentIndex`

                  minimum: 0

                - `required string? DocumentTitle`

                  minLength: 1, maxLength: 500

                - `required long EndBlockIndex`

                  Exclusive 0-based end index of the cited block range in the source's `content` array.

                  Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`.

                - `required long StartBlockIndex`

                  0-based index of the first cited block in the source's `content` array.

                  minimum: 0

              - `class CitationWebSearchResultLocationParam`

                - `JsonElement Type = "web_search_result_location"`

                - `required string CitedText`

                - `required string EncryptedIndex`

                - `required string? Title`

                  minLength: 1, maxLength: 512

                - `required string Url`

                  minLength: 1

              - `class CitationSearchResultLocationParam`

                - `JsonElement Type = "search_result_location"`

                - `required string CitedText`

                  The full text of the cited block range, concatenated.

                  Always equals the contents of `content[start_block_index:end_block_index]` joined together. The text block is the minimal citable unit; this field is never a substring of a single block. Not counted toward output tokens, and not counted toward input tokens when sent back in subsequent turns.

                - `required long EndBlockIndex`

                  Exclusive 0-based end index of the cited block range in the source's `content` array.

                  Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`.

                - `required long SearchResultIndex`

                  0-based index of the cited search result among all `search_result` content blocks in the request, in the order they appear across messages and tool results.

                  Counted separately from `document_index`; server-side web search results are not included in this count.

                  minimum: 0

                - `required string Source`

                - `required long StartBlockIndex`

                  0-based index of the first cited block in the source's `content` array.

                  minimum: 0

                - `required string? Title`

          - `class ImageBlockParam`

            - `JsonElement Type = "image"`

            - `required Source Source`

              - `class Base64ImageSource`

                - `JsonElement Type = "base64"`

                - `required string Data`

                  format: byte

                - `required MediaType MediaType`

                  - `ImageJpeg("image/jpeg")`

                  - `ImagePng("image/png")`

                  - `ImageGif("image/gif")`

                  - `ImageWebP("image/webp")`

              - `class UrlImageSource`

                - `JsonElement Type = "url"`

                - `required string Url`

              - `class FileImageSource`

                - `JsonElement Type = "file"`

                - `required string FileID`

            - `CacheControlEphemeral? CacheControl`

              Create a cache control breakpoint at this content block.

            - `ImageTransformationsParam? Transformations`

              Configures the transformations the server applies to this image before the model observes it. Each key names a condition the server transforms images for; its value selects the transformation applied. Omitted keys keep their default behavior, and an empty object is equivalent to omitting the field.

              - `OversizedImage OversizedImage`

                What the server does when this image exceeds the model's maximum image size. `"downsize"` (the default) scales the image down to fit, which changes the dimensions the model observes without telling you. `"error"` instead rejects the request with a 400 error naming the image's dimensions and the largest dimensions that fit, so you can scale the image deliberately — your image is never silently scaled down.

                - `Downsize("downsize")`

                - `Error("error")`

          - `class DocumentBlockParam`

            - `JsonElement Type = "document"`

            - `required Source Source`

              - `class Base64PdfSource`

                - `JsonElement Type = "base64"`

                - `required string Data`

                  format: byte

                - `JsonElement MediaType = "application/pdf"`

              - `class PlainTextSource`

                - `JsonElement Type = "text"`

                - `required string Data`

                - `JsonElement MediaType = "text/plain"`

              - `class ContentBlockSource`

                - `JsonElement Type = "content"`

                - `required Content Content`

                  - `string`

                  - `IReadOnlyList<ContentBlockSourceContent>`

                    - `class TextBlockParam`

                    - `class ImageBlockParam`

              - `class UrlPdfSource`

                - `JsonElement Type = "url"`

                - `required string Url`

              - `class FileDocumentSource`

                - `JsonElement Type = "file"`

                - `required string FileID`

            - `CacheControlEphemeral? CacheControl`

              Create a cache control breakpoint at this content block.

            - `CitationsConfigParam? Citations`

              - `bool Enabled`

            - `string? Context`

              minLength: 1

            - `string? Title`

              minLength: 1, maxLength: 500

          - `class SearchResultBlockParam`

            - `JsonElement Type = "search_result"`

            - `required IReadOnlyList<TextBlockParam> Content`

              - `JsonElement Type = "text"`

              - `required string Text`

                minLength: 1

              - `CacheControlEphemeral? CacheControl`

                Create a cache control breakpoint at this content block.

              - `IReadOnlyList<TextCitationParam>? Citations`

            - `required string Source`

            - `required string Title`

            - `CacheControlEphemeral? CacheControl`

              Create a cache control breakpoint at this content block.

            - `CitationsConfigParam Citations`

          - `class ThinkingBlockParam`

            - `JsonElement Type = "thinking"`

            - `required string Signature`

              The `signature` value of this thinking block, exactly as returned by the API in a previous response. Used to verify that the block was generated by Claude.

              Thinking blocks must be passed back unmodified and in their original order; a modified block results in a 400 `invalid_request_error`.

            - `required string Thinking`

              The `thinking` text of this block as returned by the API.

          - `class RedactedThinkingBlockParam`

            - `JsonElement Type = "redacted_thinking"`

            - `required string Data`

              The `data` value of this redacted thinking block, exactly as returned by the API in a previous response. Opaque and encrypted; pass it back unchanged.

          - `class ToolUseBlockParam`

            - `JsonElement Type = "tool_use"`

            - `required string ID`

              pattern: ^[a-zA-Z0-9_-]+$

            - `required IReadOnlyDictionary<string, JsonElement> Input`

            - `required string Name`

              minLength: 1, maxLength: 200

            - `CacheControlEphemeral? CacheControl`

              Create a cache control breakpoint at this content block.

            - `Caller Caller`

              - `class DirectCaller`

                Tool invocation directly from the model.

                - `JsonElement Type = "direct"`

              - `class ServerToolCaller`

                Tool invocation generated by a server-side tool.

                - `JsonElement Type = "code_execution_20250825"`

                - `required string ToolID`

                  pattern: ^srvtoolu_[a-zA-Z0-9_]+$

              - `class ServerToolCaller20260120`

                - `JsonElement Type = "code_execution_20260120"`

                - `required string ToolID`

                  pattern: ^srvtoolu_[a-zA-Z0-9_]+$

            - `string? ToolsetName`

              For a toolset member tool_use, the toolset family this member belongs to.

              minLength: 1, maxLength: 64, pattern: ^[a-zA-Z0-9_-]+$

          - `class ToolResultBlockParam`

            - `JsonElement Type = "tool_result"`

            - `required string ToolUseID`

              pattern: ^[a-zA-Z0-9_-]+$

            - `CacheControlEphemeral? CacheControl`

              Create a cache control breakpoint at this content block.

            - `Content Content`

              - `string`

              - `IReadOnlyList<Block>`

                - `class TextBlockParam`

                - `class ImageBlockParam`

                - `class SearchResultBlockParam`

                - `class DocumentBlockParam`

                - `class ToolReferenceBlockParam`

                  Tool reference block that can be included in tool_result content.

                  - `JsonElement Type = "tool_reference"`

                  - `required string ToolName`

                    minLength: 1, maxLength: 256, pattern: ^[a-zA-Z0-9_-]{1,256}$

                  - `CacheControlEphemeral? CacheControl`

                    Create a cache control breakpoint at this content block.

                - `class BrowserStateBlockParam`

                  The caller's browser state after a browser toolset member call —
                  the full inventory of open tabs, which tab is active, and any side
                  effects (tabs opened, download state changes) the call produced.

                  At most one per `tool_result`, only on a non-error result answering a
                  browser toolset member `tool_use`. The server renders the
                  model-visible text from it; the model never sees the raw fields.

                  - `JsonElement Type = "browser_state"`

                  - `required IReadOnlyList<BrowserStateTabEntry> Tabs`

                    All tabs open in the browser after this call — the full inventory, not a delta. May be empty. Whenever non-empty, exactly one entry carries `active: true`.

                    maxItems: 100

                    - `required string TabID`

                      The caller-assigned identifier for this tab, unique within the inventory.

                      minLength: 1, maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

                    - `required string Title`

                      The title of the page the tab is showing. May be empty.

                      maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

                    - `required string Url`

                      The URL of the page the tab is showing. May be empty.

                      maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

                    - `bool Active`

                      Whether this tab is the active tab after this call. Whenever `tabs` is non-empty, exactly one entry is marked `active: true`.

                  - `CacheControlEphemeral? CacheControl`

                    Create a cache control breakpoint at this content block.

                  - `IReadOnlyList<BrowserStateChange>? StateChanges`

                    Tabs opened and download state changes during this call. "Nothing to report" is expressed by omitting the field, never by an empty list.

                    minItems: 1, maxItems: 200

                    - `class BrowserStateChangeTabOpened`

                      A tab this call's execution opened that remains open at its end —
                      the creation delta of the `tabs` inventory, not an event log.

                      Carries only the `tab_id`; the tab's `title` and `url` live on its
                      `tabs` entry, which must include the same `tab_id`. A tab opened
                      during a failed call gets no deferred `tab_opened`; it simply appears
                      in the next result's `tabs` inventory.

                      - `JsonElement Type = "tab_opened"`

                      - `required string TabID`

                        The `tab_id` of the opened tab, present in `tabs`.

                        minLength: 1, maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

                    - `class BrowserStateChangeDownloadStarted`

                      A file download that started during this call.

                      - `JsonElement Type = "download_started"`

                      - `required string DownloadID`

                        The caller-assigned identifier for this download, stable across the state changes reporting it.

                        minLength: 1, maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

                      - `required string Url`

                        The final post-redirect URL the download was served from.

                        maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

                    - `class BrowserStateChangeDownloadCompleted`

                      A file download that finished during this call, reported with the
                      same `download_id` as its `download_started` — or without a prior
                      `download_started`, when the download finished during the call that
                      started it (at most one state change per `download_id` per result).

                      - `JsonElement Type = "download_completed"`

                      - `required string DownloadID`

                        The caller-assigned identifier for this download, stable across the state changes reporting it.

                        minLength: 1, maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

                      - `required string Url`

                        The final post-redirect URL the download was served from.

                        maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

                      - `string? Path`

                        Where the executor saved the file, on the executor's filesystem. Only included when another tool in the same environment can read the file at that path.

                        maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

                      - `long? SizeBytes`

                        The completed download's size.

                        minimum: 0

                    - `class BrowserStateChangeDownloadFailed`

                      A file download that failed — or was cancelled — during this call.

                      - `JsonElement Type = "download_failed"`

                      - `required string DownloadID`

                        The caller-assigned identifier for this download, stable across the state changes reporting it.

                        minLength: 1, maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

                      - `required string Url`

                        The final post-redirect URL the download was served from.

                        maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

                      - `string? Error`

                        The failure or cancellation detail, when known.

                        maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

            - `bool IsError`

            - `string? ToolsetName`

              For a toolset member tool_result, the toolset family of the paired tool_use.

              minLength: 1, maxLength: 64, pattern: ^[a-zA-Z0-9_-]+$

          - `class ServerToolUseBlockParam`

            - `JsonElement Type = "server_tool_use"`

            - `required string ID`

              pattern: ^srvtoolu_[a-zA-Z0-9_]+$

            - `required IReadOnlyDictionary<string, JsonElement> Input`

            - `required Name Name`

              - `WebSearch("web_search")`

              - `WebFetch("web_fetch")`

              - `CodeExecution("code_execution")`

              - `BashCodeExecution("bash_code_execution")`

              - `TextEditorCodeExecution("text_editor_code_execution")`

              - `ToolSearchToolRegex("tool_search_tool_regex")`

              - `ToolSearchToolBm25("tool_search_tool_bm25")`

            - `CacheControlEphemeral? CacheControl`

              Create a cache control breakpoint at this content block.

            - `Caller Caller`

              - `class DirectCaller`

                Tool invocation directly from the model.

              - `class ServerToolCaller`

                Tool invocation generated by a server-side tool.

              - `class ServerToolCaller20260120`

          - `class WebSearchToolResultBlockParam`

            - `JsonElement Type = "web_search_tool_result"`

            - `required WebSearchToolResultBlockParamContent Content`

              - `IReadOnlyList<WebSearchResultBlockParam>`

                - `JsonElement Type = "web_search_result"`

                - `required string EncryptedContent`

                - `required string Title`

                - `required string Url`

                - `string? PageAge`

              - `class WebSearchToolRequestError`

                - `JsonElement Type = "web_search_tool_result_error"`

                - `required WebSearchToolResultErrorCode ErrorCode`

                  - `InvalidToolInput("invalid_tool_input")`

                  - `Unavailable("unavailable")`

                  - `MaxUsesExceeded("max_uses_exceeded")`

                  - `TooManyRequests("too_many_requests")`

                  - `QueryTooLong("query_too_long")`

                  - `RequestTooLarge("request_too_large")`

            - `required string ToolUseID`

              pattern: ^srvtoolu_[a-zA-Z0-9_]+$

            - `CacheControlEphemeral? CacheControl`

              Create a cache control breakpoint at this content block.

            - `Caller Caller`

              - `class DirectCaller`

                Tool invocation directly from the model.

              - `class ServerToolCaller`

                Tool invocation generated by a server-side tool.

              - `class ServerToolCaller20260120`

          - `class WebFetchToolResultBlockParam`

            - `JsonElement Type = "web_fetch_tool_result"`

            - `required Content Content`

              - `class WebFetchToolResultErrorBlockParam`

                - `JsonElement Type = "web_fetch_tool_result_error"`

                - `required WebFetchToolResultErrorCode ErrorCode`

                  - `InvalidToolInput("invalid_tool_input")`

                  - `UrlTooLong("url_too_long")`

                  - `UrlNotAllowed("url_not_allowed")`

                  - `UrlNotInPriorContext("url_not_in_prior_context")`

                  - `UrlNotAccessible("url_not_accessible")`

                  - `UnsupportedContentType("unsupported_content_type")`

                  - `TooManyRequests("too_many_requests")`

                  - `MaxUsesExceeded("max_uses_exceeded")`

                  - `Unavailable("unavailable")`

                  - `ContentTooLarge("content_too_large")`

              - `class WebFetchBlockParam`

                - `JsonElement Type = "web_fetch_result"`

                - `required DocumentBlockParam Content`

                - `required string Url`

                  Fetched content URL

                - `string? RetrievedAt`

                  ISO 8601 timestamp when the content was retrieved

            - `required string ToolUseID`

              pattern: ^srvtoolu_[a-zA-Z0-9_]+$

            - `CacheControlEphemeral? CacheControl`

              Create a cache control breakpoint at this content block.

            - `Caller Caller`

              - `class DirectCaller`

                Tool invocation directly from the model.

              - `class ServerToolCaller`

                Tool invocation generated by a server-side tool.

              - `class ServerToolCaller20260120`

          - `class CodeExecutionToolResultBlockParam`

            - `JsonElement Type = "code_execution_tool_result"`

            - `required CodeExecutionToolResultBlockParamContent Content`

              - `class CodeExecutionToolResultErrorParam`

                - `JsonElement Type = "code_execution_tool_result_error"`

                - `required CodeExecutionToolResultErrorCode ErrorCode`

                  - `InvalidToolInput("invalid_tool_input")`

                  - `Unavailable("unavailable")`

                  - `TooManyRequests("too_many_requests")`

                  - `ExecutionTimeExceeded("execution_time_exceeded")`

              - `class CodeExecutionResultBlockParam`

                - `JsonElement Type = "code_execution_result"`

                - `required IReadOnlyList<CodeExecutionOutputBlockParam> Content`

                  - `JsonElement Type = "code_execution_output"`

                  - `required string FileID`

                - `required long ReturnCode`

                - `required string Stderr`

                - `required string Stdout`

              - `class EncryptedCodeExecutionResultBlockParam`

                The output and exit code of Python code that Claude ran with the code execution tool, with standard output in encrypted form, sent back in a later request.

                - `JsonElement Type = "encrypted_code_execution_result"`

                - `required IReadOnlyList<CodeExecutionOutputBlockParam> Content`

                  - `JsonElement Type = "code_execution_output"`

                  - `required string FileID`

                - `required string EncryptedStdout`

                - `required long ReturnCode`

                - `required string Stderr`

            - `required string ToolUseID`

              pattern: ^srvtoolu_[a-zA-Z0-9_]+$

            - `CacheControlEphemeral? CacheControl`

              Create a cache control breakpoint at this content block.

          - `class BashCodeExecutionToolResultBlockParam`

            - `JsonElement Type = "bash_code_execution_tool_result"`

            - `required Content Content`

              - `class BashCodeExecutionToolResultErrorParam`

                - `JsonElement Type = "bash_code_execution_tool_result_error"`

                - `required BashCodeExecutionToolResultErrorCode ErrorCode`

                  - `InvalidToolInput("invalid_tool_input")`

                  - `Unavailable("unavailable")`

                  - `TooManyRequests("too_many_requests")`

                  - `ExecutionTimeExceeded("execution_time_exceeded")`

                  - `OutputFileTooLarge("output_file_too_large")`

              - `class BashCodeExecutionResultBlockParam`

                - `JsonElement Type = "bash_code_execution_result"`

                - `required IReadOnlyList<BashCodeExecutionOutputBlockParam> Content`

                  - `JsonElement Type = "bash_code_execution_output"`

                  - `required string FileID`

                - `required long ReturnCode`

                - `required string Stderr`

                - `required string Stdout`

            - `required string ToolUseID`

              pattern: ^srvtoolu_[a-zA-Z0-9_]+$

            - `CacheControlEphemeral? CacheControl`

              Create a cache control breakpoint at this content block.

          - `class TextEditorCodeExecutionToolResultBlockParam`

            - `JsonElement Type = "text_editor_code_execution_tool_result"`

            - `required Content Content`

              - `class TextEditorCodeExecutionToolResultErrorParam`

                - `JsonElement Type = "text_editor_code_execution_tool_result_error"`

                - `required TextEditorCodeExecutionToolResultErrorCode ErrorCode`

                  - `InvalidToolInput("invalid_tool_input")`

                  - `Unavailable("unavailable")`

                  - `TooManyRequests("too_many_requests")`

                  - `ExecutionTimeExceeded("execution_time_exceeded")`

                  - `FileNotFound("file_not_found")`

                - `string? ErrorMessage`

              - `class TextEditorCodeExecutionViewResultBlockParam`

                - `JsonElement Type = "text_editor_code_execution_view_result"`

                - `required string Content`

                - `required FileType FileType`

                  - `Text("text")`

                  - `Image("image")`

                  - `Pdf("pdf")`

                - `long? NumLines`

                - `long? StartLine`

                - `long? TotalLines`

              - `class TextEditorCodeExecutionCreateResultBlockParam`

                - `JsonElement Type = "text_editor_code_execution_create_result"`

                - `required bool IsFileUpdate`

              - `class TextEditorCodeExecutionStrReplaceResultBlockParam`

                - `JsonElement Type = "text_editor_code_execution_str_replace_result"`

                - `IReadOnlyList<string>? Lines`

                - `long? NewLines`

                - `long? NewStart`

                - `long? OldLines`

                - `long? OldStart`

            - `required string ToolUseID`

              pattern: ^srvtoolu_[a-zA-Z0-9_]+$

            - `CacheControlEphemeral? CacheControl`

              Create a cache control breakpoint at this content block.

          - `class ToolSearchToolResultBlockParam`

            - `JsonElement Type = "tool_search_tool_result"`

            - `required Content Content`

              - `class ToolSearchToolResultErrorParam`

                - `JsonElement Type = "tool_search_tool_result_error"`

                - `required ToolSearchToolResultErrorCode ErrorCode`

                  - `InvalidToolInput("invalid_tool_input")`

                  - `Unavailable("unavailable")`

                  - `TooManyRequests("too_many_requests")`

                  - `ExecutionTimeExceeded("execution_time_exceeded")`

                - `string? ErrorMessage`

              - `class ToolSearchToolSearchResultBlockParam`

                - `JsonElement Type = "tool_search_tool_search_result"`

                - `required IReadOnlyList<ToolReferenceBlockParam> ToolReferences`

                  - `JsonElement Type = "tool_reference"`

                  - `required string ToolName`

                    minLength: 1, maxLength: 256, pattern: ^[a-zA-Z0-9_-]{1,256}$

                  - `CacheControlEphemeral? CacheControl`

                    Create a cache control breakpoint at this content block.

            - `required string ToolUseID`

              pattern: ^srvtoolu_[a-zA-Z0-9_]+$

            - `CacheControlEphemeral? CacheControl`

              Create a cache control breakpoint at this content block.

          - `class ContainerUploadBlockParam`

            A content block that represents a file to be uploaded to the container
            Files uploaded via this block will be available in the container's input directory.

            - `JsonElement Type = "container_upload"`

            - `required string FileID`

            - `CacheControlEphemeral? CacheControl`

              Create a cache control breakpoint at this content block.

      - `JsonElement Role = "user"`

    - `class AssistantMessageParam`

      - `required MessageContentParam Content`

      - `JsonElement Role = "assistant"`

    - `class SystemMessageParam`

      - `required Content Content`

        - `string`

        - `IReadOnlyList<TextBlockParam>`

          - `JsonElement Type = "text"`

          - `required string Text`

            minLength: 1

          - `CacheControlEphemeral? CacheControl`

            Create a cache control breakpoint at this content block.

          - `IReadOnlyList<TextCitationParam>? Citations`

      - `JsonElement Role = "system"`

  - `required Model model`

    The model that will complete your prompt.

    See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options.

  - `CacheControlEphemeral? cacheControl`

    Top-level cache control automatically applies a cache_control marker to the last cacheable block in the request.

  - `OutputConfig outputConfig`

    Configuration options for the model's output, such as the output format.

  - `Speed? speed`

    The inference speed mode for this request. `"fast"` enables high output-tokens-per-second inference.

    Some models require the `fast-mode-2026-02-01` beta header for any `speed` value. See [fast mode](https://platform.claude.com/docs/en/build-with-claude/fast-mode?sdk_languages=csharp) for which models.

    - `Standard("standard")`

    - `Fast("fast")`

  - `System system`

    System prompt.

    A system prompt is a way of providing context and instructions to Claude, such as specifying a particular goal or role. See our [guide to system prompts](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices?sdk_languages=csharp#give-claude-a-role).

    - `string`

    - `IReadOnlyList<TextBlockParam>`

      - `JsonElement Type = "text"`

      - `required string Text`

        minLength: 1

      - `CacheControlEphemeral? CacheControl`

        Create a cache control breakpoint at this content block.

      - `IReadOnlyList<TextCitationParam>? Citations`

  - `ThinkingConfigParam thinking`

    Configuration for Claude's thinking.

    With `{"type": "adaptive"}`, Claude decides when and how much to think. With `{"type": "enabled"}` (manual extended thinking), you set a `budget_tokens` of at least 1,024. Thinking tokens count toward your `max_tokens` limit.

    Which `type` values are accepted, and what happens when you omit `thinking`, depend on the model. See [thinking](https://platform.claude.com/docs/en/build-with-claude/thinking?sdk_languages=csharp#configuring-thinking) for each model's behavior.

  - `ToolChoice toolChoice`

    How the model should use the provided tools. The model can use a specific tool, any available tool, decide by itself, or not use tools at all.

  - `IReadOnlyList<MessageCountTokensTool> tools`

    Definitions of tools that the model may use.

    If you include `tools` in your API request, the model may return `tool_use` content blocks that represent the model's use of those tools. You can then run those tools using the tool input generated by the model and then optionally return results back to the model using `tool_result` content blocks.

    There are two types of tools: **client tools** and **server tools**. The behavior described below applies to client tools. For [server tools](https://platform.claude.com/docs/en/agents-and-tools/tool-use/server-tools?sdk_languages=csharp), see their individual documentation as each has its own behavior (e.g., the [web search tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-search-tool?sdk_languages=csharp)).

    Each tool definition includes:

    * `name`: Name of the tool.
    * `description`: Optional, but strongly-recommended description of the tool.
    * `input_schema`: [JSON schema](https://json-schema.org/draft/2020-12) for the tool `input` shape that the model will produce in `tool_use` output content blocks.

    For example, if you defined `tools` as:

    ```json
    [
      {
        "name": "get_stock_price",
        "description": "Get the current stock price for a given ticker symbol.",
        "input_schema": {
          "type": "object",
          "properties": {
            "ticker": {
              "type": "string",
              "description": "The stock ticker symbol, e.g. AAPL for Apple Inc."
            }
          },
          "required": ["ticker"]
        }
      }
    ]
    ```

    And then asked the model "What's the S&P 500 at today?", the model might produce `tool_use` content blocks in the response like this:

    ```json
    [
      {
        "type": "tool_use",
        "id": "toolu_01D7FLrfh4GYq7yT1ULFeyMV",
        "name": "get_stock_price",
        "input": { "ticker": "^GSPC" }
      }
    ]
    ```

    You might then run your `get_stock_price` tool with `{"ticker": "^GSPC"}` as an input, and return the following back to the model in a subsequent `user` message:

    ```json
    [
      {
        "type": "tool_result",
        "tool_use_id": "toolu_01D7FLrfh4GYq7yT1ULFeyMV",
        "content": "259.75 USD"
      }
    ]
    ```

    Tools can be used for workflows that include running client-side tools and functions, or more generally whenever you want the model to produce a particular JSON structure of output.

    See our [guide](https://platform.claude.com/docs/en/agents-and-tools/tool-use/overview?sdk_languages=csharp) for more details.

    - `class Tool`

      - `Type? Type`

      - `required InputSchema InputSchema`

        [JSON schema](https://json-schema.org/draft/2020-12) for this tool's input.

        This defines the shape of the `input` that your tool accepts and that the model will produce.

        - `JsonElement Type = "object"`

        - `IReadOnlyDictionary<string, JsonElement>? Properties`

        - `IReadOnlyList<string>? Required`

      - `required string Name`

        Name of the tool.

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

        minLength: 1, maxLength: 128, pattern: ^[a-zA-Z0-9_-]{1,128}$

      - `IReadOnlyList<AllowedCaller> AllowedCallers`

        - `Direct("direct")`

        - `CodeExecution20250825("code_execution_20250825")`

        - `CodeExecution20260120("code_execution_20260120")`

        - `CodeExecution20260521("code_execution_20260521")`

      - `CacheControlEphemeral? CacheControl`

        Create a cache control breakpoint at this content block.

      - `bool DeferLoading`

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

      - `string Description`

        Description of what this tool does.

        Tool descriptions should be as detailed as possible. The more information that the model has about what the tool is and how to use it, the better it will perform. You can use natural language descriptions to reinforce important aspects of the tool input JSON schema.

      - `bool? EagerInputStreaming`

        Enable eager input streaming for this tool. When true, tool input parameters will be streamed incrementally as they are generated, and types will be inferred on-the-fly rather than buffering the full JSON output. When false, streaming is disabled for this tool even if the fine-grained-tool-streaming beta is active. When null (default), uses the default behavior based on beta headers.

      - `IReadOnlyList<IReadOnlyDictionary<string, JsonElement>> InputExamples`

      - `bool Strict`

        When true, guarantees schema validation on tool names and inputs

    - `class ToolBash20250124`

      - `JsonElement Type = "bash_20250124"`

      - `JsonElement Name = "bash"`

        Name of the tool.

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

      - `IReadOnlyList<AllowedCaller> AllowedCallers`

        - `Direct("direct")`

        - `CodeExecution20250825("code_execution_20250825")`

        - `CodeExecution20260120("code_execution_20260120")`

        - `CodeExecution20260521("code_execution_20260521")`

      - `CacheControlEphemeral? CacheControl`

        Create a cache control breakpoint at this content block.

      - `bool DeferLoading`

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

      - `IReadOnlyList<IReadOnlyDictionary<string, JsonElement>> InputExamples`

      - `bool Strict`

        When true, guarantees schema validation on tool names and inputs

    - `class CodeExecutionTool20250522`

      - `JsonElement Type = "code_execution_20250522"`

      - `JsonElement Name = "code_execution"`

        Name of the tool.

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

      - `IReadOnlyList<AllowedCaller> AllowedCallers`

        - `Direct("direct")`

        - `CodeExecution20250825("code_execution_20250825")`

        - `CodeExecution20260120("code_execution_20260120")`

        - `CodeExecution20260521("code_execution_20260521")`

      - `CacheControlEphemeral? CacheControl`

        Create a cache control breakpoint at this content block.

      - `bool DeferLoading`

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

      - `bool Strict`

        When true, guarantees schema validation on tool names and inputs

    - `class CodeExecutionTool20250825`

      - `JsonElement Type = "code_execution_20250825"`

      - `JsonElement Name = "code_execution"`

        Name of the tool.

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

      - `IReadOnlyList<AllowedCaller> AllowedCallers`

        - `Direct("direct")`

        - `CodeExecution20250825("code_execution_20250825")`

        - `CodeExecution20260120("code_execution_20260120")`

        - `CodeExecution20260521("code_execution_20260521")`

      - `CacheControlEphemeral? CacheControl`

        Create a cache control breakpoint at this content block.

      - `bool DeferLoading`

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

      - `bool Strict`

        When true, guarantees schema validation on tool names and inputs

    - `class CodeExecutionTool20260120`

      A `tools` entry for the code execution tool, version `code_execution_20260120`. It adds REPL state persistence to version `code_execution_20250825`.

      REPL state persistence applies with programmatic tool calling. With it, the Python interpreter state, such as variable bindings, persists across requests that reuse the container.

      See the [code execution tool guide](https://platform.claude.com/docs/en/agents-and-tools/tool-use/code-execution-tool?sdk_languages=csharp#tool-versions) to learn what each tool version adds.

      - `JsonElement Type = "code_execution_20260120"`

      - `JsonElement Name = "code_execution"`

        Name of the tool.

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

      - `IReadOnlyList<AllowedCaller> AllowedCallers`

        - `Direct("direct")`

        - `CodeExecution20250825("code_execution_20250825")`

        - `CodeExecution20260120("code_execution_20260120")`

        - `CodeExecution20260521("code_execution_20260521")`

      - `CacheControlEphemeral? CacheControl`

        Create a cache control breakpoint at this content block.

      - `bool DeferLoading`

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

      - `bool Strict`

        When true, guarantees schema validation on tool names and inputs

    - `class CodeExecutionTool20260521`

      Code execution tool with REPL state persistence.

      - `JsonElement Type = "code_execution_20260521"`

      - `JsonElement Name = "code_execution"`

        Name of the tool.

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

      - `IReadOnlyList<AllowedCaller> AllowedCallers`

        - `Direct("direct")`

        - `CodeExecution20250825("code_execution_20250825")`

        - `CodeExecution20260120("code_execution_20260120")`

        - `CodeExecution20260521("code_execution_20260521")`

      - `CacheControlEphemeral? CacheControl`

        Create a cache control breakpoint at this content block.

      - `bool DeferLoading`

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

      - `bool Strict`

        When true, guarantees schema validation on tool names and inputs

    - `class BrowserToolset20260801`

      The browser toolset: a single `tools[]` entry (carrying no
      `name`) that declares the browser tool family. The model is served
      the family's tool with any members disabled via `configs` removed
      from its schema.

      - `JsonElement Type = "browser_toolset_20260801"`

      - `CacheControlEphemeral? CacheControl`

        Create a cache control breakpoint at this content block.

      - `BrowserToolsetConfigs? Configs`

        Sparse per-member overrides, keyed by member name. Absent, null, and {} are equivalent; a member's defaults apply wherever its key is absent.

        - `BrowserTypeConfig? Type`

          `type`'s config overrides.

          - `bool? DeferLoading`

            Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

          - `bool? Enabled`

            Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

        - `BrowserCloseTabConfig? CloseTab`

          `close_tab`'s config overrides.

          - `bool? DeferLoading`

            Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

          - `bool? Enabled`

            Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

        - `BrowserDoubleClickConfig? DoubleClick`

          `double_click`'s config overrides.

          - `bool? DeferLoading`

            Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

          - `bool? Enabled`

            Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

        - `BrowserFileUploadConfig? FileUpload`

          `file_upload`'s config overrides.

          - `bool? DeferLoading`

            Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

          - `bool? Enabled`

            Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

        - `BrowserFindConfig? Find`

          `find`'s config overrides.

          - `bool? DeferLoading`

            Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

          - `bool? Enabled`

            Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

        - `BrowserFormInputConfig? FormInput`

          `form_input`'s config overrides.

          - `bool? DeferLoading`

            Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

          - `bool? Enabled`

            Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

        - `BrowserGetPageTextConfig? GetPageText`

          `get_page_text`'s config overrides.

          - `bool? DeferLoading`

            Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

          - `bool? Enabled`

            Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

        - `BrowserHoldKeyConfig? HoldKey`

          `hold_key`'s config overrides.

          - `bool? DeferLoading`

            Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

          - `bool? Enabled`

            Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

        - `BrowserHoverConfig? Hover`

          `hover`'s config overrides.

          - `bool? DeferLoading`

            Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

          - `bool? Enabled`

            Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

        - `BrowserJavascriptExecConfig? JavascriptExec`

          `javascript_exec`'s config overrides.

          - `bool? DeferLoading`

            Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

          - `bool? Enabled`

            Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

        - `BrowserKeyConfig? Key`

          `key`'s config overrides.

          - `bool? DeferLoading`

            Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

          - `bool? Enabled`

            Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

        - `BrowserLeftClickConfig? LeftClick`

          `left_click`'s config overrides.

          - `bool? DeferLoading`

            Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

          - `bool? Enabled`

            Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

        - `BrowserLeftClickDragConfig? LeftClickDrag`

          `left_click_drag`'s config overrides.

          - `bool? DeferLoading`

            Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

          - `bool? Enabled`

            Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

        - `BrowserLeftMouseDownConfig? LeftMouseDown`

          `left_mouse_down`'s config overrides.

          - `bool? DeferLoading`

            Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

          - `bool? Enabled`

            Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

        - `BrowserLeftMouseUpConfig? LeftMouseUp`

          `left_mouse_up`'s config overrides.

          - `bool? DeferLoading`

            Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

          - `bool? Enabled`

            Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

        - `BrowserListTabsConfig? ListTabs`

          `list_tabs`'s config overrides.

          - `bool? DeferLoading`

            Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

          - `bool? Enabled`

            Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

        - `BrowserMiddleClickConfig? MiddleClick`

          `middle_click`'s config overrides.

          - `bool? DeferLoading`

            Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

          - `bool? Enabled`

            Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

        - `BrowserMouseMoveConfig? MouseMove`

          `mouse_move`'s config overrides.

          - `bool? DeferLoading`

            Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

          - `bool? Enabled`

            Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

        - `BrowserNavigateConfig? Navigate`

          `navigate`'s config overrides.

          - `bool? DeferLoading`

            Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

          - `bool? Enabled`

            Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

        - `BrowserNewTabConfig? NewTab`

          `new_tab`'s config overrides.

          - `bool? DeferLoading`

            Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

          - `bool? Enabled`

            Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

        - `BrowserReadConsoleConfig? ReadConsole`

          `read_console`'s config overrides.

          - `bool? DeferLoading`

            Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

          - `bool? Enabled`

            Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

        - `BrowserReadNetworkConfig? ReadNetwork`

          `read_network`'s config overrides.

          - `bool? DeferLoading`

            Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

          - `bool? Enabled`

            Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

        - `BrowserReadPageConfig? ReadPage`

          `read_page`'s config overrides.

          - `bool? DeferLoading`

            Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

          - `bool? Enabled`

            Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

        - `BrowserRightClickConfig? RightClick`

          `right_click`'s config overrides.

          - `bool? DeferLoading`

            Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

          - `bool? Enabled`

            Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

        - `BrowserScreenshotConfig? Screenshot`

          `screenshot`'s config overrides.

          - `bool? DeferLoading`

            Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

          - `bool? Enabled`

            Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

        - `BrowserScrollConfig? Scroll`

          `scroll`'s config overrides.

          - `bool? DeferLoading`

            Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

          - `bool? Enabled`

            Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

        - `BrowserScrollToConfig? ScrollTo`

          `scroll_to`'s config overrides.

          - `bool? DeferLoading`

            Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

          - `bool? Enabled`

            Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

        - `BrowserSwitchTabConfig? SwitchTab`

          `switch_tab`'s config overrides.

          - `bool? DeferLoading`

            Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

          - `bool? Enabled`

            Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

        - `BrowserTripleClickConfig? TripleClick`

          `triple_click`'s config overrides.

          - `bool? DeferLoading`

            Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

          - `bool? Enabled`

            Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

        - `BrowserWaitConfig? Wait`

          `wait`'s config overrides.

          - `bool? DeferLoading`

            Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

          - `bool? Enabled`

            Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

        - `BrowserZoomConfig? Zoom`

          `zoom`'s config overrides.

          - `bool? DeferLoading`

            Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

          - `bool? Enabled`

            Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

    - `class MemoryTool20250818`

      - `JsonElement Type = "memory_20250818"`

      - `JsonElement Name = "memory"`

        Name of the tool.

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

      - `IReadOnlyList<AllowedCaller> AllowedCallers`

        - `Direct("direct")`

        - `CodeExecution20250825("code_execution_20250825")`

        - `CodeExecution20260120("code_execution_20260120")`

        - `CodeExecution20260521("code_execution_20260521")`

      - `CacheControlEphemeral? CacheControl`

        Create a cache control breakpoint at this content block.

      - `bool DeferLoading`

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

      - `IReadOnlyList<IReadOnlyDictionary<string, JsonElement>> InputExamples`

      - `bool Strict`

        When true, guarantees schema validation on tool names and inputs

    - `class ComputerToolset20260801`

      The computer toolset: a single `tools[]` entry (carrying no
      `name`) that declares the computer tool family. The model is
      served the family's tool with any members disabled via `configs`
      removed from its schema. Every member is enabled by default, zoom
      included. The single-tool options `display_number` and
      `enable_zoom` are not fields of a toolset entry — it carries only
      `type`, `configs`, and `cache_control`; zoom is controlled
      via `configs.zoom.enabled`.

      - `JsonElement Type = "computer_toolset_20260801"`

      - `CacheControlEphemeral? CacheControl`

        Create a cache control breakpoint at this content block.

      - `ComputerToolsetConfigs? Configs`

        Sparse per-member overrides, keyed by member name. Absent, null, and {} are equivalent; a member's defaults apply wherever its key is absent.

        - `ComputerTypeConfig? Type`

          `type`'s config overrides.

          - `bool? DeferLoading`

            Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

          - `bool? Enabled`

            Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

        - `ComputerCursorPositionConfig? CursorPosition`

          `cursor_position`'s config overrides.

          - `bool? DeferLoading`

            Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

          - `bool? Enabled`

            Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

        - `ComputerDoubleClickConfig? DoubleClick`

          `double_click`'s config overrides.

          - `bool? DeferLoading`

            Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

          - `bool? Enabled`

            Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

        - `ComputerHoldKeyConfig? HoldKey`

          `hold_key`'s config overrides.

          - `bool? DeferLoading`

            Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

          - `bool? Enabled`

            Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

        - `ComputerKeyConfig? Key`

          `key`'s config overrides.

          - `bool? DeferLoading`

            Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

          - `bool? Enabled`

            Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

        - `ComputerLeftClickConfig? LeftClick`

          `left_click`'s config overrides.

          - `bool? DeferLoading`

            Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

          - `bool? Enabled`

            Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

        - `ComputerLeftClickDragConfig? LeftClickDrag`

          `left_click_drag`'s config overrides.

          - `bool? DeferLoading`

            Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

          - `bool? Enabled`

            Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

        - `ComputerLeftMouseDownConfig? LeftMouseDown`

          `left_mouse_down`'s config overrides.

          - `bool? DeferLoading`

            Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

          - `bool? Enabled`

            Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

        - `ComputerLeftMouseUpConfig? LeftMouseUp`

          `left_mouse_up`'s config overrides.

          - `bool? DeferLoading`

            Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

          - `bool? Enabled`

            Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

        - `ComputerMiddleClickConfig? MiddleClick`

          `middle_click`'s config overrides.

          - `bool? DeferLoading`

            Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

          - `bool? Enabled`

            Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

        - `ComputerMouseMoveConfig? MouseMove`

          `mouse_move`'s config overrides.

          - `bool? DeferLoading`

            Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

          - `bool? Enabled`

            Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

        - `ComputerRightClickConfig? RightClick`

          `right_click`'s config overrides.

          - `bool? DeferLoading`

            Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

          - `bool? Enabled`

            Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

        - `ComputerScreenshotConfig? Screenshot`

          `screenshot`'s config overrides.

          - `bool? DeferLoading`

            Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

          - `bool? Enabled`

            Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

        - `ComputerScrollConfig? Scroll`

          `scroll`'s config overrides.

          - `bool? DeferLoading`

            Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

          - `bool? Enabled`

            Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

        - `ComputerTripleClickConfig? TripleClick`

          `triple_click`'s config overrides.

          - `bool? DeferLoading`

            Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

          - `bool? Enabled`

            Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

        - `ComputerWaitConfig? Wait`

          `wait`'s config overrides.

          - `bool? DeferLoading`

            Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

          - `bool? Enabled`

            Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

        - `ComputerZoomConfig? Zoom`

          `zoom`'s config overrides.

          - `bool? DeferLoading`

            Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

          - `bool? Enabled`

            Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

    - `class ToolTextEditor20250124`

      - `JsonElement Type = "text_editor_20250124"`

      - `JsonElement Name = "str_replace_editor"`

        Name of the tool.

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

      - `IReadOnlyList<AllowedCaller> AllowedCallers`

        - `Direct("direct")`

        - `CodeExecution20250825("code_execution_20250825")`

        - `CodeExecution20260120("code_execution_20260120")`

        - `CodeExecution20260521("code_execution_20260521")`

      - `CacheControlEphemeral? CacheControl`

        Create a cache control breakpoint at this content block.

      - `bool DeferLoading`

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

      - `IReadOnlyList<IReadOnlyDictionary<string, JsonElement>> InputExamples`

      - `bool Strict`

        When true, guarantees schema validation on tool names and inputs

    - `class ToolTextEditor20250429`

      - `JsonElement Type = "text_editor_20250429"`

      - `JsonElement Name = "str_replace_based_edit_tool"`

        Name of the tool.

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

      - `IReadOnlyList<AllowedCaller> AllowedCallers`

        - `Direct("direct")`

        - `CodeExecution20250825("code_execution_20250825")`

        - `CodeExecution20260120("code_execution_20260120")`

        - `CodeExecution20260521("code_execution_20260521")`

      - `CacheControlEphemeral? CacheControl`

        Create a cache control breakpoint at this content block.

      - `bool DeferLoading`

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

      - `IReadOnlyList<IReadOnlyDictionary<string, JsonElement>> InputExamples`

      - `bool Strict`

        When true, guarantees schema validation on tool names and inputs

    - `class ToolTextEditor20250728`

      - `JsonElement Type = "text_editor_20250728"`

      - `JsonElement Name = "str_replace_based_edit_tool"`

        Name of the tool.

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

      - `IReadOnlyList<AllowedCaller> AllowedCallers`

        - `Direct("direct")`

        - `CodeExecution20250825("code_execution_20250825")`

        - `CodeExecution20260120("code_execution_20260120")`

        - `CodeExecution20260521("code_execution_20260521")`

      - `CacheControlEphemeral? CacheControl`

        Create a cache control breakpoint at this content block.

      - `bool DeferLoading`

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

      - `IReadOnlyList<IReadOnlyDictionary<string, JsonElement>> InputExamples`

      - `long? MaxCharacters`

        Maximum number of characters to display when viewing a file. If not specified, defaults to displaying the full file.

        minimum: 1

      - `bool Strict`

        When true, guarantees schema validation on tool names and inputs

    - `class WebSearchTool20250305`

      - `JsonElement Type = "web_search_20250305"`

      - `JsonElement Name = "web_search"`

        Name of the tool.

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

      - `IReadOnlyList<AllowedCaller> AllowedCallers`

        - `Direct("direct")`

        - `CodeExecution20250825("code_execution_20250825")`

        - `CodeExecution20260120("code_execution_20260120")`

        - `CodeExecution20260521("code_execution_20260521")`

      - `IReadOnlyList<string>? AllowedDomains`

        If provided, only these domains will be included in results. Cannot be used alongside `blocked_domains`.

      - `IReadOnlyList<string>? BlockedDomains`

        If provided, these domains will never appear in results. Cannot be used alongside `allowed_domains`.

      - `CacheControlEphemeral? CacheControl`

        Create a cache control breakpoint at this content block.

      - `bool DeferLoading`

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

      - `long? MaxUses`

        Maximum number of times the tool can be used in the API request.

        minimum: 1

      - `bool Strict`

        When true, guarantees schema validation on tool names and inputs

      - `UserLocation? UserLocation`

        Parameters for the user's location. Used to provide more relevant search results.

        - `JsonElement Type = "approximate"`

        - `string? City`

          The city of the user.

          minLength: 1, maxLength: 255

        - `string? Country`

          The two letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the user.

          minLength: 2, maxLength: 2

        - `string? Region`

          The region of the user.

          minLength: 1, maxLength: 255

        - `string? Timezone`

          The [IANA timezone](https://nodatime.org/TimeZones) of the user.

          minLength: 1, maxLength: 255

    - `class WebFetchTool20250910`

      - `JsonElement Type = "web_fetch_20250910"`

      - `JsonElement Name = "web_fetch"`

        Name of the tool.

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

      - `IReadOnlyList<AllowedCaller> AllowedCallers`

        - `Direct("direct")`

        - `CodeExecution20250825("code_execution_20250825")`

        - `CodeExecution20260120("code_execution_20260120")`

        - `CodeExecution20260521("code_execution_20260521")`

      - `IReadOnlyList<string>? AllowedDomains`

        List of domains to allow fetching from

      - `IReadOnlyList<string>? BlockedDomains`

        List of domains to block fetching from

      - `CacheControlEphemeral? CacheControl`

        Create a cache control breakpoint at this content block.

      - `CitationsConfigParam? Citations`

        Citations configuration for fetched documents. Citations are disabled by default.

      - `bool DeferLoading`

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

      - `long? MaxContentTokens`

        Maximum number of tokens used by including web page text content in the context. The limit is approximate and does not apply to binary content such as PDFs.

        minimum: 1

      - `long? MaxUses`

        Maximum number of times the tool can be used in the API request.

        minimum: 1

      - `bool Strict`

        When true, guarantees schema validation on tool names and inputs

      - `WebFetchUrlSources? UrlSources`

        Which sources contribute to the set of URLs the tool may fetch. Omitted means every source.

        - `ClientToolResults ClientToolResults`

          Which client tools' results contribute fetchable URLs: "all", "none", or an only or except list of client tool names from tools[].

          - `class WebFetchUrlSourceAll`

            The `url_sources` variant under which a source contributes in
            full: every result of the tool filter's source, or all user input.

            - `JsonElement Type = "all"`

          - `class WebFetchUrlSourceNone`

            The `url_sources` variant under which a source contributes nothing:
            no result of the tool filter's source, or no user input.

            - `JsonElement Type = "none"`

          - `class WebFetchUrlSourceOnly`

            The tool filter variant under which only the named tools' results
            contribute.

            - `JsonElement Type = "only"`

            - `required IReadOnlyList<WebFetchUrlSourceToolReference> Tools`

              - `JsonElement Type = "tool_reference"`

              - `required string Name`

          - `class WebFetchUrlSourceExcept`

            The tool filter variant under which every result but the named
            tools' contributes.

            - `JsonElement Type = "except"`

            - `required IReadOnlyList<WebFetchUrlSourceToolReference> Tools`

              - `JsonElement Type = "tool_reference"`

              - `required string Name`

        - `ServerToolResults ServerToolResults`

          Which server tools' results contribute fetchable URLs: "all", "none", or an only or except list of server tool names from tools[]; only web_search and web_fetch results ever contribute.

          - `class WebFetchUrlSourceAll`

            The `url_sources` variant under which a source contributes in
            full: every result of the tool filter's source, or all user input.

          - `class WebFetchUrlSourceNone`

            The `url_sources` variant under which a source contributes nothing:
            no result of the tool filter's source, or no user input.

          - `class WebFetchUrlSourceOnly`

            The tool filter variant under which only the named tools' results
            contribute.

          - `class WebFetchUrlSourceExcept`

            The tool filter variant under which every result but the named
            tools' contributes.

        - `UserInput UserInput`

          Whether URLs in user messages are fetchable: "all" or "none".

          - `class WebFetchUrlSourceAll`

            The `url_sources` variant under which a source contributes in
            full: every result of the tool filter's source, or all user input.

          - `class WebFetchUrlSourceNone`

            The `url_sources` variant under which a source contributes nothing:
            no result of the tool filter's source, or no user input.

    - `class WebSearchTool20260209`

      - `JsonElement Type = "web_search_20260209"`

      - `JsonElement Name = "web_search"`

        Name of the tool.

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

      - `IReadOnlyList<AllowedCaller> AllowedCallers`

        - `Direct("direct")`

        - `CodeExecution20250825("code_execution_20250825")`

        - `CodeExecution20260120("code_execution_20260120")`

        - `CodeExecution20260521("code_execution_20260521")`

      - `IReadOnlyList<string>? AllowedDomains`

        If provided, only these domains will be included in results. Cannot be used alongside `blocked_domains`.

      - `IReadOnlyList<string>? BlockedDomains`

        If provided, these domains will never appear in results. Cannot be used alongside `allowed_domains`.

      - `CacheControlEphemeral? CacheControl`

        Create a cache control breakpoint at this content block.

      - `bool DeferLoading`

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

      - `long? MaxUses`

        Maximum number of times the tool can be used in the API request.

        minimum: 1

      - `bool Strict`

        When true, guarantees schema validation on tool names and inputs

      - `UserLocation? UserLocation`

        Parameters for the user's location. Used to provide more relevant search results.

    - `class WebFetchTool20260209`

      - `JsonElement Type = "web_fetch_20260209"`

      - `JsonElement Name = "web_fetch"`

        Name of the tool.

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

      - `IReadOnlyList<AllowedCaller> AllowedCallers`

        - `Direct("direct")`

        - `CodeExecution20250825("code_execution_20250825")`

        - `CodeExecution20260120("code_execution_20260120")`

        - `CodeExecution20260521("code_execution_20260521")`

      - `IReadOnlyList<string>? AllowedDomains`

        List of domains to allow fetching from

      - `IReadOnlyList<string>? BlockedDomains`

        List of domains to block fetching from

      - `CacheControlEphemeral? CacheControl`

        Create a cache control breakpoint at this content block.

      - `CitationsConfigParam? Citations`

        Citations configuration for fetched documents. Citations are disabled by default.

      - `bool DeferLoading`

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

      - `long? MaxContentTokens`

        Maximum number of tokens used by including web page text content in the context. The limit is approximate and does not apply to binary content such as PDFs.

        minimum: 1

      - `long? MaxUses`

        Maximum number of times the tool can be used in the API request.

        minimum: 1

      - `bool Strict`

        When true, guarantees schema validation on tool names and inputs

      - `WebFetchUrlSources? UrlSources`

        Which sources contribute to the set of URLs the tool may fetch. Omitted means every source.

    - `class WebFetchTool20260309`

      Web fetch tool with use_cache parameter for bypassing cached content.

      - `JsonElement Type = "web_fetch_20260309"`

      - `JsonElement Name = "web_fetch"`

        Name of the tool.

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

      - `IReadOnlyList<AllowedCaller> AllowedCallers`

        - `Direct("direct")`

        - `CodeExecution20250825("code_execution_20250825")`

        - `CodeExecution20260120("code_execution_20260120")`

        - `CodeExecution20260521("code_execution_20260521")`

      - `IReadOnlyList<string>? AllowedDomains`

        List of domains to allow fetching from

      - `IReadOnlyList<string>? BlockedDomains`

        List of domains to block fetching from

      - `CacheControlEphemeral? CacheControl`

        Create a cache control breakpoint at this content block.

      - `CitationsConfigParam? Citations`

        Citations configuration for fetched documents. Citations are disabled by default.

      - `bool DeferLoading`

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

      - `long? MaxContentTokens`

        Maximum number of tokens used by including web page text content in the context. The limit is approximate and does not apply to binary content such as PDFs.

        minimum: 1

      - `long? MaxUses`

        Maximum number of times the tool can be used in the API request.

        minimum: 1

      - `bool Strict`

        When true, guarantees schema validation on tool names and inputs

      - `WebFetchUrlSources? UrlSources`

        Which sources contribute to the set of URLs the tool may fetch. Omitted means every source.

      - `bool UseCache`

        Whether to use cached content. Set to false to bypass the cache and fetch fresh content. Only set to false when the user explicitly requests fresh content or when fetching rapidly-changing sources.

    - `class WebSearchTool20260318`

      - `JsonElement Type = "web_search_20260318"`

      - `JsonElement Name = "web_search"`

        Name of the tool.

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

      - `IReadOnlyList<AllowedCaller> AllowedCallers`

        - `Direct("direct")`

        - `CodeExecution20250825("code_execution_20250825")`

        - `CodeExecution20260120("code_execution_20260120")`

        - `CodeExecution20260521("code_execution_20260521")`

      - `IReadOnlyList<string>? AllowedDomains`

        If provided, only these domains will be included in results. Cannot be used alongside `blocked_domains`.

      - `IReadOnlyList<string>? BlockedDomains`

        If provided, these domains will never appear in results. Cannot be used alongside `allowed_domains`.

      - `CacheControlEphemeral? CacheControl`

        Create a cache control breakpoint at this content block.

      - `bool DeferLoading`

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

      - `long? MaxUses`

        Maximum number of times the tool can be used in the API request.

        minimum: 1

      - `ResponseInclusion ResponseInclusion`

        How this tool's result blocks appear in the API response when the result was consumed by a completed code_execution call in the same turn. 'full' returns the complete content (default). 'excluded' drops the nested server_tool_use and result block pair entirely. Results from direct calls, or from code_execution calls that paused before completing, are always returned in full so they can be sent back on the next turn.

        - `Full("full")`

        - `Excluded("excluded")`

      - `bool Strict`

        When true, guarantees schema validation on tool names and inputs

      - `UserLocation? UserLocation`

        Parameters for the user's location. Used to provide more relevant search results.

    - `class WebFetchTool20260318`

      - `JsonElement Type = "web_fetch_20260318"`

      - `JsonElement Name = "web_fetch"`

        Name of the tool.

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

      - `IReadOnlyList<AllowedCaller> AllowedCallers`

        - `Direct("direct")`

        - `CodeExecution20250825("code_execution_20250825")`

        - `CodeExecution20260120("code_execution_20260120")`

        - `CodeExecution20260521("code_execution_20260521")`

      - `IReadOnlyList<string>? AllowedDomains`

        List of domains to allow fetching from

      - `IReadOnlyList<string>? BlockedDomains`

        List of domains to block fetching from

      - `CacheControlEphemeral? CacheControl`

        Create a cache control breakpoint at this content block.

      - `CitationsConfigParam? Citations`

        Citations configuration for fetched documents. Citations are disabled by default.

      - `bool DeferLoading`

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

      - `long? MaxContentTokens`

        Maximum number of tokens used by including web page text content in the context. The limit is approximate and does not apply to binary content such as PDFs.

        minimum: 1

      - `long? MaxUses`

        Maximum number of times the tool can be used in the API request.

        minimum: 1

      - `ResponseInclusion ResponseInclusion`

        How this tool's result blocks appear in the API response when the result was consumed by a completed code_execution call in the same turn. 'full' returns the complete content (default). 'excluded' drops the nested server_tool_use and result block pair entirely. Results from direct calls, or from code_execution calls that paused before completing, are always returned in full so they can be sent back on the next turn.

        - `Full("full")`

        - `Excluded("excluded")`

      - `bool Strict`

        When true, guarantees schema validation on tool names and inputs

      - `WebFetchUrlSources? UrlSources`

        Which sources contribute to the set of URLs the tool may fetch. Omitted means every source.

      - `bool UseCache`

        Whether to use cached content. Set to false to bypass the cache and fetch fresh content. Only set to false when the user explicitly requests fresh content or when fetching rapidly-changing sources.

    - `class ToolSearchToolBm25_20251119`

      - `required Type Type`

        - `ToolSearchToolBm25_20251119("tool_search_tool_bm25_20251119")`

        - `ToolSearchToolBm25("tool_search_tool_bm25")`

      - `JsonElement Name = "tool_search_tool_bm25"`

        Name of the tool.

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

      - `IReadOnlyList<AllowedCaller> AllowedCallers`

        - `Direct("direct")`

        - `CodeExecution20250825("code_execution_20250825")`

        - `CodeExecution20260120("code_execution_20260120")`

        - `CodeExecution20260521("code_execution_20260521")`

      - `CacheControlEphemeral? CacheControl`

        Create a cache control breakpoint at this content block.

      - `bool DeferLoading`

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

      - `bool Strict`

        When true, guarantees schema validation on tool names and inputs

    - `class ToolSearchToolRegex20251119`

      - `required Type Type`

        - `ToolSearchToolRegex20251119("tool_search_tool_regex_20251119")`

        - `ToolSearchToolRegex("tool_search_tool_regex")`

      - `JsonElement Name = "tool_search_tool_regex"`

        Name of the tool.

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

      - `IReadOnlyList<AllowedCaller> AllowedCallers`

        - `Direct("direct")`

        - `CodeExecution20250825("code_execution_20250825")`

        - `CodeExecution20260120("code_execution_20260120")`

        - `CodeExecution20260521("code_execution_20260521")`

      - `CacheControlEphemeral? CacheControl`

        Create a cache control breakpoint at this content block.

      - `bool DeferLoading`

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

      - `bool Strict`

        When true, guarantees schema validation on tool names and inputs

  - `string userProfileID` (header parameter)

    The user profile ID to attribute this request to. Use when acting on behalf of a party other than your organization.

  - `string workspaceID` (header parameter)

    Optional header to select the Workspace for this request. The value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).

    Only needed for credentials that can act on more than one Workspace. A credential that belongs to a specific Workspace may omit it; if sent, it must match that Workspace.

### Returns

- `class MessageTokensCount`

  - `required long InputTokens`

    The total number of tokens across the provided list of messages, system prompt, and tools.

### Example

```csharp
using System;
using Anthropic.Models.Messages;

MessageCountTokensParams parameters = new()
{
    Messages =
    [
        new UserMessageParam("Hello, world")
    ],
    Model = Model.ClaudeOpus5_5,
};

var messageTokensCount = await client.Messages.CountTokens(parameters);

Console.WriteLine(messageTokensCount);
```

#### Response (200)

```json
{
  "input_tokens": 2095
}
```

## Domain types

### Assistant Message Param

- `class AssistantMessageParam`

  - `required MessageContentParam Content`

    - `string`

    - `IReadOnlyList<ContentBlockParam>`

      - `class TextBlockParam`

        - `JsonElement Type = "text"`

        - `required string Text`

          minLength: 1

        - `CacheControlEphemeral? CacheControl`

          Create a cache control breakpoint at this content block.

          - `JsonElement Type = "ephemeral"`

          - `Ttl Ttl`

            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`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching?sdk_languages=csharp) for details.

            - `Ttl5m("5m")`

            - `Ttl1h("1h")`

        - `IReadOnlyList<TextCitationParam>? Citations`

          - `class CitationCharLocationParam`

            - `JsonElement Type = "char_location"`

            - `required string CitedText`

            - `required long DocumentIndex`

              minimum: 0

            - `required string? DocumentTitle`

              minLength: 1, maxLength: 500

            - `required long EndCharIndex`

            - `required long StartCharIndex`

              minimum: 0

          - `class CitationPageLocationParam`

            - `JsonElement Type = "page_location"`

            - `required string CitedText`

            - `required long DocumentIndex`

              minimum: 0

            - `required string? DocumentTitle`

              minLength: 1, maxLength: 500

            - `required long EndPageNumber`

            - `required long StartPageNumber`

              minimum: 1

          - `class CitationContentBlockLocationParam`

            - `JsonElement Type = "content_block_location"`

            - `required string CitedText`

              The full text of the cited block range, concatenated.

              Always equals the contents of `content[start_block_index:end_block_index]` joined together. The text block is the minimal citable unit; this field is never a substring of a single block. Not counted toward output tokens, and not counted toward input tokens when sent back in subsequent turns.

            - `required long DocumentIndex`

              minimum: 0

            - `required string? DocumentTitle`

              minLength: 1, maxLength: 500

            - `required long EndBlockIndex`

              Exclusive 0-based end index of the cited block range in the source's `content` array.

              Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`.

            - `required long StartBlockIndex`

              0-based index of the first cited block in the source's `content` array.

              minimum: 0

          - `class CitationWebSearchResultLocationParam`

            - `JsonElement Type = "web_search_result_location"`

            - `required string CitedText`

            - `required string EncryptedIndex`

            - `required string? Title`

              minLength: 1, maxLength: 512

            - `required string Url`

              minLength: 1

          - `class CitationSearchResultLocationParam`

            - `JsonElement Type = "search_result_location"`

            - `required string CitedText`

              The full text of the cited block range, concatenated.

              Always equals the contents of `content[start_block_index:end_block_index]` joined together. The text block is the minimal citable unit; this field is never a substring of a single block. Not counted toward output tokens, and not counted toward input tokens when sent back in subsequent turns.

            - `required long EndBlockIndex`

              Exclusive 0-based end index of the cited block range in the source's `content` array.

              Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`.

            - `required long SearchResultIndex`

              0-based index of the cited search result among all `search_result` content blocks in the request, in the order they appear across messages and tool results.

              Counted separately from `document_index`; server-side web search results are not included in this count.

              minimum: 0

            - `required string Source`

            - `required long StartBlockIndex`

              0-based index of the first cited block in the source's `content` array.

              minimum: 0

            - `required string? Title`

      - `class ImageBlockParam`

        - `JsonElement Type = "image"`

        - `required Source Source`

          - `class Base64ImageSource`

            - `JsonElement Type = "base64"`

            - `required string Data`

              format: byte

            - `required MediaType MediaType`

              - `ImageJpeg("image/jpeg")`

              - `ImagePng("image/png")`

              - `ImageGif("image/gif")`

              - `ImageWebP("image/webp")`

          - `class UrlImageSource`

            - `JsonElement Type = "url"`

            - `required string Url`

          - `class FileImageSource`

            - `JsonElement Type = "file"`

            - `required string FileID`

        - `CacheControlEphemeral? CacheControl`

          Create a cache control breakpoint at this content block.

        - `ImageTransformationsParam? Transformations`

          Configures the transformations the server applies to this image before the model observes it. Each key names a condition the server transforms images for; its value selects the transformation applied. Omitted keys keep their default behavior, and an empty object is equivalent to omitting the field.

          - `OversizedImage OversizedImage`

            What the server does when this image exceeds the model's maximum image size. `"downsize"` (the default) scales the image down to fit, which changes the dimensions the model observes without telling you. `"error"` instead rejects the request with a 400 error naming the image's dimensions and the largest dimensions that fit, so you can scale the image deliberately — your image is never silently scaled down.

            - `Downsize("downsize")`

            - `Error("error")`

      - `class DocumentBlockParam`

        - `JsonElement Type = "document"`

        - `required Source Source`

          - `class Base64PdfSource`

            - `JsonElement Type = "base64"`

            - `required string Data`

              format: byte

            - `JsonElement MediaType = "application/pdf"`

          - `class PlainTextSource`

            - `JsonElement Type = "text"`

            - `required string Data`

            - `JsonElement MediaType = "text/plain"`

          - `class ContentBlockSource`

            - `JsonElement Type = "content"`

            - `required Content Content`

              - `string`

              - `IReadOnlyList<ContentBlockSourceContent>`

                - `class TextBlockParam`

                - `class ImageBlockParam`

          - `class UrlPdfSource`

            - `JsonElement Type = "url"`

            - `required string Url`

          - `class FileDocumentSource`

            - `JsonElement Type = "file"`

            - `required string FileID`

        - `CacheControlEphemeral? CacheControl`

          Create a cache control breakpoint at this content block.

        - `CitationsConfigParam? Citations`

          - `bool Enabled`

        - `string? Context`

          minLength: 1

        - `string? Title`

          minLength: 1, maxLength: 500

      - `class SearchResultBlockParam`

        - `JsonElement Type = "search_result"`

        - `required IReadOnlyList<TextBlockParam> Content`

          - `JsonElement Type = "text"`

          - `required string Text`

            minLength: 1

          - `CacheControlEphemeral? CacheControl`

            Create a cache control breakpoint at this content block.

          - `IReadOnlyList<TextCitationParam>? Citations`

        - `required string Source`

        - `required string Title`

        - `CacheControlEphemeral? CacheControl`

          Create a cache control breakpoint at this content block.

        - `CitationsConfigParam Citations`

      - `class ThinkingBlockParam`

        - `JsonElement Type = "thinking"`

        - `required string Signature`

          The `signature` value of this thinking block, exactly as returned by the API in a previous response. Used to verify that the block was generated by Claude.

          Thinking blocks must be passed back unmodified and in their original order; a modified block results in a 400 `invalid_request_error`.

        - `required string Thinking`

          The `thinking` text of this block as returned by the API.

      - `class RedactedThinkingBlockParam`

        - `JsonElement Type = "redacted_thinking"`

        - `required string Data`

          The `data` value of this redacted thinking block, exactly as returned by the API in a previous response. Opaque and encrypted; pass it back unchanged.

      - `class ToolUseBlockParam`

        - `JsonElement Type = "tool_use"`

        - `required string ID`

          pattern: ^[a-zA-Z0-9_-]+$

        - `required IReadOnlyDictionary<string, JsonElement> Input`

        - `required string Name`

          minLength: 1, maxLength: 200

        - `CacheControlEphemeral? CacheControl`

          Create a cache control breakpoint at this content block.

        - `Caller Caller`

          - `class DirectCaller`

            Tool invocation directly from the model.

            - `JsonElement Type = "direct"`

          - `class ServerToolCaller`

            Tool invocation generated by a server-side tool.

            - `JsonElement Type = "code_execution_20250825"`

            - `required string ToolID`

              pattern: ^srvtoolu_[a-zA-Z0-9_]+$

          - `class ServerToolCaller20260120`

            - `JsonElement Type = "code_execution_20260120"`

            - `required string ToolID`

              pattern: ^srvtoolu_[a-zA-Z0-9_]+$

        - `string? ToolsetName`

          For a toolset member tool_use, the toolset family this member belongs to.

          minLength: 1, maxLength: 64, pattern: ^[a-zA-Z0-9_-]+$

      - `class ToolResultBlockParam`

        - `JsonElement Type = "tool_result"`

        - `required string ToolUseID`

          pattern: ^[a-zA-Z0-9_-]+$

        - `CacheControlEphemeral? CacheControl`

          Create a cache control breakpoint at this content block.

        - `Content Content`

          - `string`

          - `IReadOnlyList<Block>`

            - `class TextBlockParam`

            - `class ImageBlockParam`

            - `class SearchResultBlockParam`

            - `class DocumentBlockParam`

            - `class ToolReferenceBlockParam`

              Tool reference block that can be included in tool_result content.

              - `JsonElement Type = "tool_reference"`

              - `required string ToolName`

                minLength: 1, maxLength: 256, pattern: ^[a-zA-Z0-9_-]{1,256}$

              - `CacheControlEphemeral? CacheControl`

                Create a cache control breakpoint at this content block.

            - `class BrowserStateBlockParam`

              The caller's browser state after a browser toolset member call —
              the full inventory of open tabs, which tab is active, and any side
              effects (tabs opened, download state changes) the call produced.

              At most one per `tool_result`, only on a non-error result answering a
              browser toolset member `tool_use`. The server renders the
              model-visible text from it; the model never sees the raw fields.

              - `JsonElement Type = "browser_state"`

              - `required IReadOnlyList<BrowserStateTabEntry> Tabs`

                All tabs open in the browser after this call — the full inventory, not a delta. May be empty. Whenever non-empty, exactly one entry carries `active: true`.

                maxItems: 100

                - `required string TabID`

                  The caller-assigned identifier for this tab, unique within the inventory.

                  minLength: 1, maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

                - `required string Title`

                  The title of the page the tab is showing. May be empty.

                  maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

                - `required string Url`

                  The URL of the page the tab is showing. May be empty.

                  maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

                - `bool Active`

                  Whether this tab is the active tab after this call. Whenever `tabs` is non-empty, exactly one entry is marked `active: true`.

              - `CacheControlEphemeral? CacheControl`

                Create a cache control breakpoint at this content block.

              - `IReadOnlyList<BrowserStateChange>? StateChanges`

                Tabs opened and download state changes during this call. "Nothing to report" is expressed by omitting the field, never by an empty list.

                minItems: 1, maxItems: 200

                - `class BrowserStateChangeTabOpened`

                  A tab this call's execution opened that remains open at its end —
                  the creation delta of the `tabs` inventory, not an event log.

                  Carries only the `tab_id`; the tab's `title` and `url` live on its
                  `tabs` entry, which must include the same `tab_id`. A tab opened
                  during a failed call gets no deferred `tab_opened`; it simply appears
                  in the next result's `tabs` inventory.

                  - `JsonElement Type = "tab_opened"`

                  - `required string TabID`

                    The `tab_id` of the opened tab, present in `tabs`.

                    minLength: 1, maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

                - `class BrowserStateChangeDownloadStarted`

                  A file download that started during this call.

                  - `JsonElement Type = "download_started"`

                  - `required string DownloadID`

                    The caller-assigned identifier for this download, stable across the state changes reporting it.

                    minLength: 1, maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

                  - `required string Url`

                    The final post-redirect URL the download was served from.

                    maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

                - `class BrowserStateChangeDownloadCompleted`

                  A file download that finished during this call, reported with the
                  same `download_id` as its `download_started` — or without a prior
                  `download_started`, when the download finished during the call that
                  started it (at most one state change per `download_id` per result).

                  - `JsonElement Type = "download_completed"`

                  - `required string DownloadID`

                    The caller-assigned identifier for this download, stable across the state changes reporting it.

                    minLength: 1, maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

                  - `required string Url`

                    The final post-redirect URL the download was served from.

                    maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

                  - `string? Path`

                    Where the executor saved the file, on the executor's filesystem. Only included when another tool in the same environment can read the file at that path.

                    maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

                  - `long? SizeBytes`

                    The completed download's size.

                    minimum: 0

                - `class BrowserStateChangeDownloadFailed`

                  A file download that failed — or was cancelled — during this call.

                  - `JsonElement Type = "download_failed"`

                  - `required string DownloadID`

                    The caller-assigned identifier for this download, stable across the state changes reporting it.

                    minLength: 1, maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

                  - `required string Url`

                    The final post-redirect URL the download was served from.

                    maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

                  - `string? Error`

                    The failure or cancellation detail, when known.

                    maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

        - `bool IsError`

        - `string? ToolsetName`

          For a toolset member tool_result, the toolset family of the paired tool_use.

          minLength: 1, maxLength: 64, pattern: ^[a-zA-Z0-9_-]+$

      - `class ServerToolUseBlockParam`

        - `JsonElement Type = "server_tool_use"`

        - `required string ID`

          pattern: ^srvtoolu_[a-zA-Z0-9_]+$

        - `required IReadOnlyDictionary<string, JsonElement> Input`

        - `required Name Name`

          - `WebSearch("web_search")`

          - `WebFetch("web_fetch")`

          - `CodeExecution("code_execution")`

          - `BashCodeExecution("bash_code_execution")`

          - `TextEditorCodeExecution("text_editor_code_execution")`

          - `ToolSearchToolRegex("tool_search_tool_regex")`

          - `ToolSearchToolBm25("tool_search_tool_bm25")`

        - `CacheControlEphemeral? CacheControl`

          Create a cache control breakpoint at this content block.

        - `Caller Caller`

          - `class DirectCaller`

            Tool invocation directly from the model.

          - `class ServerToolCaller`

            Tool invocation generated by a server-side tool.

          - `class ServerToolCaller20260120`

      - `class WebSearchToolResultBlockParam`

        - `JsonElement Type = "web_search_tool_result"`

        - `required WebSearchToolResultBlockParamContent Content`

          - `IReadOnlyList<WebSearchResultBlockParam>`

            - `JsonElement Type = "web_search_result"`

            - `required string EncryptedContent`

            - `required string Title`

            - `required string Url`

            - `string? PageAge`

          - `class WebSearchToolRequestError`

            - `JsonElement Type = "web_search_tool_result_error"`

            - `required WebSearchToolResultErrorCode ErrorCode`

              - `InvalidToolInput("invalid_tool_input")`

              - `Unavailable("unavailable")`

              - `MaxUsesExceeded("max_uses_exceeded")`

              - `TooManyRequests("too_many_requests")`

              - `QueryTooLong("query_too_long")`

              - `RequestTooLarge("request_too_large")`

        - `required string ToolUseID`

          pattern: ^srvtoolu_[a-zA-Z0-9_]+$

        - `CacheControlEphemeral? CacheControl`

          Create a cache control breakpoint at this content block.

        - `Caller Caller`

          - `class DirectCaller`

            Tool invocation directly from the model.

          - `class ServerToolCaller`

            Tool invocation generated by a server-side tool.

          - `class ServerToolCaller20260120`

      - `class WebFetchToolResultBlockParam`

        - `JsonElement Type = "web_fetch_tool_result"`

        - `required Content Content`

          - `class WebFetchToolResultErrorBlockParam`

            - `JsonElement Type = "web_fetch_tool_result_error"`

            - `required WebFetchToolResultErrorCode ErrorCode`

              - `InvalidToolInput("invalid_tool_input")`

              - `UrlTooLong("url_too_long")`

              - `UrlNotAllowed("url_not_allowed")`

              - `UrlNotInPriorContext("url_not_in_prior_context")`

              - `UrlNotAccessible("url_not_accessible")`

              - `UnsupportedContentType("unsupported_content_type")`

              - `TooManyRequests("too_many_requests")`

              - `MaxUsesExceeded("max_uses_exceeded")`

              - `Unavailable("unavailable")`

              - `ContentTooLarge("content_too_large")`

          - `class WebFetchBlockParam`

            - `JsonElement Type = "web_fetch_result"`

            - `required DocumentBlockParam Content`

            - `required string Url`

              Fetched content URL

            - `string? RetrievedAt`

              ISO 8601 timestamp when the content was retrieved

        - `required string ToolUseID`

          pattern: ^srvtoolu_[a-zA-Z0-9_]+$

        - `CacheControlEphemeral? CacheControl`

          Create a cache control breakpoint at this content block.

        - `Caller Caller`

          - `class DirectCaller`

            Tool invocation directly from the model.

          - `class ServerToolCaller`

            Tool invocation generated by a server-side tool.

          - `class ServerToolCaller20260120`

      - `class CodeExecutionToolResultBlockParam`

        - `JsonElement Type = "code_execution_tool_result"`

        - `required CodeExecutionToolResultBlockParamContent Content`

          - `class CodeExecutionToolResultErrorParam`

            - `JsonElement Type = "code_execution_tool_result_error"`

            - `required CodeExecutionToolResultErrorCode ErrorCode`

              - `InvalidToolInput("invalid_tool_input")`

              - `Unavailable("unavailable")`

              - `TooManyRequests("too_many_requests")`

              - `ExecutionTimeExceeded("execution_time_exceeded")`

          - `class CodeExecutionResultBlockParam`

            - `JsonElement Type = "code_execution_result"`

            - `required IReadOnlyList<CodeExecutionOutputBlockParam> Content`

              - `JsonElement Type = "code_execution_output"`

              - `required string FileID`

            - `required long ReturnCode`

            - `required string Stderr`

            - `required string Stdout`

          - `class EncryptedCodeExecutionResultBlockParam`

            The output and exit code of Python code that Claude ran with the code execution tool, with standard output in encrypted form, sent back in a later request.

            - `JsonElement Type = "encrypted_code_execution_result"`

            - `required IReadOnlyList<CodeExecutionOutputBlockParam> Content`

              - `JsonElement Type = "code_execution_output"`

              - `required string FileID`

            - `required string EncryptedStdout`

            - `required long ReturnCode`

            - `required string Stderr`

        - `required string ToolUseID`

          pattern: ^srvtoolu_[a-zA-Z0-9_]+$

        - `CacheControlEphemeral? CacheControl`

          Create a cache control breakpoint at this content block.

      - `class BashCodeExecutionToolResultBlockParam`

        - `JsonElement Type = "bash_code_execution_tool_result"`

        - `required Content Content`

          - `class BashCodeExecutionToolResultErrorParam`

            - `JsonElement Type = "bash_code_execution_tool_result_error"`

            - `required BashCodeExecutionToolResultErrorCode ErrorCode`

              - `InvalidToolInput("invalid_tool_input")`

              - `Unavailable("unavailable")`

              - `TooManyRequests("too_many_requests")`

              - `ExecutionTimeExceeded("execution_time_exceeded")`

              - `OutputFileTooLarge("output_file_too_large")`

          - `class BashCodeExecutionResultBlockParam`

            - `JsonElement Type = "bash_code_execution_result"`

            - `required IReadOnlyList<BashCodeExecutionOutputBlockParam> Content`

              - `JsonElement Type = "bash_code_execution_output"`

              - `required string FileID`

            - `required long ReturnCode`

            - `required string Stderr`

            - `required string Stdout`

        - `required string ToolUseID`

          pattern: ^srvtoolu_[a-zA-Z0-9_]+$

        - `CacheControlEphemeral? CacheControl`

          Create a cache control breakpoint at this content block.

      - `class TextEditorCodeExecutionToolResultBlockParam`

        - `JsonElement Type = "text_editor_code_execution_tool_result"`

        - `required Content Content`

          - `class TextEditorCodeExecutionToolResultErrorParam`

            - `JsonElement Type = "text_editor_code_execution_tool_result_error"`

            - `required TextEditorCodeExecutionToolResultErrorCode ErrorCode`

              - `InvalidToolInput("invalid_tool_input")`

              - `Unavailable("unavailable")`

              - `TooManyRequests("too_many_requests")`

              - `ExecutionTimeExceeded("execution_time_exceeded")`

              - `FileNotFound("file_not_found")`

            - `string? ErrorMessage`

          - `class TextEditorCodeExecutionViewResultBlockParam`

            - `JsonElement Type = "text_editor_code_execution_view_result"`

            - `required string Content`

            - `required FileType FileType`

              - `Text("text")`

              - `Image("image")`

              - `Pdf("pdf")`

            - `long? NumLines`

            - `long? StartLine`

            - `long? TotalLines`

          - `class TextEditorCodeExecutionCreateResultBlockParam`

            - `JsonElement Type = "text_editor_code_execution_create_result"`

            - `required bool IsFileUpdate`

          - `class TextEditorCodeExecutionStrReplaceResultBlockParam`

            - `JsonElement Type = "text_editor_code_execution_str_replace_result"`

            - `IReadOnlyList<string>? Lines`

            - `long? NewLines`

            - `long? NewStart`

            - `long? OldLines`

            - `long? OldStart`

        - `required string ToolUseID`

          pattern: ^srvtoolu_[a-zA-Z0-9_]+$

        - `CacheControlEphemeral? CacheControl`

          Create a cache control breakpoint at this content block.

      - `class ToolSearchToolResultBlockParam`

        - `JsonElement Type = "tool_search_tool_result"`

        - `required Content Content`

          - `class ToolSearchToolResultErrorParam`

            - `JsonElement Type = "tool_search_tool_result_error"`

            - `required ToolSearchToolResultErrorCode ErrorCode`

              - `InvalidToolInput("invalid_tool_input")`

              - `Unavailable("unavailable")`

              - `TooManyRequests("too_many_requests")`

              - `ExecutionTimeExceeded("execution_time_exceeded")`

            - `string? ErrorMessage`

          - `class ToolSearchToolSearchResultBlockParam`

            - `JsonElement Type = "tool_search_tool_search_result"`

            - `required IReadOnlyList<ToolReferenceBlockParam> ToolReferences`

              - `JsonElement Type = "tool_reference"`

              - `required string ToolName`

                minLength: 1, maxLength: 256, pattern: ^[a-zA-Z0-9_-]{1,256}$

              - `CacheControlEphemeral? CacheControl`

                Create a cache control breakpoint at this content block.

        - `required string ToolUseID`

          pattern: ^srvtoolu_[a-zA-Z0-9_]+$

        - `CacheControlEphemeral? CacheControl`

          Create a cache control breakpoint at this content block.

      - `class ContainerUploadBlockParam`

        A content block that represents a file to be uploaded to the container
        Files uploaded via this block will be available in the container's input directory.

        - `JsonElement Type = "container_upload"`

        - `required string FileID`

        - `CacheControlEphemeral? CacheControl`

          Create a cache control breakpoint at this content block.

  - `JsonElement Role = "assistant"`

### Base64 Image Source

- `class Base64ImageSource`

  - `JsonElement Type = "base64"`

  - `required string Data`

    format: byte

  - `required MediaType MediaType`

    - `ImageJpeg("image/jpeg")`

    - `ImagePng("image/png")`

    - `ImageGif("image/gif")`

    - `ImageWebP("image/webp")`

### Base64 PDF Source

- `class Base64PdfSource`

  - `JsonElement Type = "base64"`

  - `required string Data`

    format: byte

  - `JsonElement MediaType = "application/pdf"`

### Bash Code Execution Output Block

- `class BashCodeExecutionOutputBlock`

  - `JsonElement Type = "bash_code_execution_output"`

  - `required string FileID`

### Bash Code Execution Output Block Param

- `class BashCodeExecutionOutputBlockParam`

  - `JsonElement Type = "bash_code_execution_output"`

  - `required string FileID`

### Bash Code Execution Result Block

- `class BashCodeExecutionResultBlock`

  - `JsonElement Type = "bash_code_execution_result"`

  - `required IReadOnlyList<BashCodeExecutionOutputBlock> Content`

    - `JsonElement Type = "bash_code_execution_output"`

    - `required string FileID`

  - `required long ReturnCode`

  - `required string Stderr`

  - `required string Stdout`

### Bash Code Execution Result Block Param

- `class BashCodeExecutionResultBlockParam`

  - `JsonElement Type = "bash_code_execution_result"`

  - `required IReadOnlyList<BashCodeExecutionOutputBlockParam> Content`

    - `JsonElement Type = "bash_code_execution_output"`

    - `required string FileID`

  - `required long ReturnCode`

  - `required string Stderr`

  - `required string Stdout`

### Bash Code Execution Tool Result Block

- `class BashCodeExecutionToolResultBlock`

  - `JsonElement Type = "bash_code_execution_tool_result"`

  - `required Content Content`

    - `class BashCodeExecutionToolResultError`

      - `JsonElement Type = "bash_code_execution_tool_result_error"`

      - `required BashCodeExecutionToolResultErrorCode ErrorCode`

        - `InvalidToolInput("invalid_tool_input")`

        - `Unavailable("unavailable")`

        - `TooManyRequests("too_many_requests")`

        - `ExecutionTimeExceeded("execution_time_exceeded")`

        - `OutputFileTooLarge("output_file_too_large")`

    - `class BashCodeExecutionResultBlock`

      - `JsonElement Type = "bash_code_execution_result"`

      - `required IReadOnlyList<BashCodeExecutionOutputBlock> Content`

        - `JsonElement Type = "bash_code_execution_output"`

        - `required string FileID`

      - `required long ReturnCode`

      - `required string Stderr`

      - `required string Stdout`

  - `required string ToolUseID`

    pattern: ^srvtoolu_[a-zA-Z0-9_]+$

### Bash Code Execution Tool Result Block Param

- `class BashCodeExecutionToolResultBlockParam`

  - `JsonElement Type = "bash_code_execution_tool_result"`

  - `required Content Content`

    - `class BashCodeExecutionToolResultErrorParam`

      - `JsonElement Type = "bash_code_execution_tool_result_error"`

      - `required BashCodeExecutionToolResultErrorCode ErrorCode`

        - `InvalidToolInput("invalid_tool_input")`

        - `Unavailable("unavailable")`

        - `TooManyRequests("too_many_requests")`

        - `ExecutionTimeExceeded("execution_time_exceeded")`

        - `OutputFileTooLarge("output_file_too_large")`

    - `class BashCodeExecutionResultBlockParam`

      - `JsonElement Type = "bash_code_execution_result"`

      - `required IReadOnlyList<BashCodeExecutionOutputBlockParam> Content`

        - `JsonElement Type = "bash_code_execution_output"`

        - `required string FileID`

      - `required long ReturnCode`

      - `required string Stderr`

      - `required string Stdout`

  - `required string ToolUseID`

    pattern: ^srvtoolu_[a-zA-Z0-9_]+$

  - `CacheControlEphemeral? CacheControl`

    Create a cache control breakpoint at this content block.

    - `JsonElement Type = "ephemeral"`

    - `Ttl Ttl`

      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`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching?sdk_languages=csharp) for details.

      - `Ttl5m("5m")`

      - `Ttl1h("1h")`

### Bash Code Execution Tool Result Error

- `class BashCodeExecutionToolResultError`

  - `JsonElement Type = "bash_code_execution_tool_result_error"`

  - `required BashCodeExecutionToolResultErrorCode ErrorCode`

    - `InvalidToolInput("invalid_tool_input")`

    - `Unavailable("unavailable")`

    - `TooManyRequests("too_many_requests")`

    - `ExecutionTimeExceeded("execution_time_exceeded")`

    - `OutputFileTooLarge("output_file_too_large")`

### Bash Code Execution Tool Result Error Code

- `enum BashCodeExecutionToolResultErrorCode`

  - `InvalidToolInput("invalid_tool_input")`

  - `Unavailable("unavailable")`

  - `TooManyRequests("too_many_requests")`

  - `ExecutionTimeExceeded("execution_time_exceeded")`

  - `OutputFileTooLarge("output_file_too_large")`

### Bash Code Execution Tool Result Error Param

- `class BashCodeExecutionToolResultErrorParam`

  - `JsonElement Type = "bash_code_execution_tool_result_error"`

  - `required BashCodeExecutionToolResultErrorCode ErrorCode`

    - `InvalidToolInput("invalid_tool_input")`

    - `Unavailable("unavailable")`

    - `TooManyRequests("too_many_requests")`

    - `ExecutionTimeExceeded("execution_time_exceeded")`

    - `OutputFileTooLarge("output_file_too_large")`

### Browser Click Target

- `class BrowserClickTarget: union`

  Where to act: either a viewport coordinate or an element reference.

  - `class BrowserCoordinateTarget`

    A point in the browser viewport, in viewport pixels (the same frame as a
    full-viewport screenshot).

    - `JsonElement Type = "coordinate"`

    - `required long X`

      Pixels from the left edge of the viewport.

      minimum: 0

    - `required long Y`

      Pixels from the top edge of the viewport.

      minimum: 0

  - `class BrowserRefTarget`

    An element on the page, identified by a reference from a prior `read_page` or
    `find` result. References are scoped to the tab that produced them and become
    stale after navigation or a major re-render.

    - `JsonElement Type = "ref"`

    - `required string Ref`

      An element reference (e.g. "ref_7") returned by a prior `read_page` or `find` result.

### Browser Close Tab Config

- `class BrowserCloseTabConfig`

  `close_tab`'s config overrides.

  - `bool? DeferLoading`

    Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

  - `bool? Enabled`

    Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

### Browser Close Tab Input

- `class BrowserCloseTabInput`

  Close the tab with the given tab_id.

  - `required string TabID`

    The tab to close.

### Browser Close Tab Tool Use Block

- `class BrowserCloseTabToolUseBlock`

  - `JsonElement Type = "tool_use"`

  - `required string ID`

    pattern: ^[a-zA-Z0-9_-]+$

  - `required ToolUseCaller Caller`

    Which party invoked the tool call: the model directly, or a server tool on its behalf.

    - `class DirectCaller`

      Tool invocation directly from the model.

      - `JsonElement Type = "direct"`

    - `class ServerToolCaller`

      Tool invocation generated by a server-side tool.

      - `JsonElement Type = "code_execution_20250825"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

    - `class ServerToolCaller20260120`

      - `JsonElement Type = "code_execution_20260120"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

  - `required BrowserCloseTabInput Input`

    Close the tab with the given tab_id.

    - `required string TabID`

      The tab to close.

  - `JsonElement Name = "close_tab"`

  - `JsonElement ToolsetName = "browser"`

### Browser Coordinate Target

- `class BrowserCoordinateTarget`

  A point in the browser viewport, in viewport pixels (the same frame as a
  full-viewport screenshot).

  - `JsonElement Type = "coordinate"`

  - `required long X`

    Pixels from the left edge of the viewport.

    minimum: 0

  - `required long Y`

    Pixels from the top edge of the viewport.

    minimum: 0

### Browser Double Click Config

- `class BrowserDoubleClickConfig`

  `double_click`'s config overrides.

  - `bool? DeferLoading`

    Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

  - `bool? Enabled`

    Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

### Browser Double Click Input

- `class BrowserDoubleClickInput`

  Double left-click at a viewport coordinate or on an element by reference.

  - `required BrowserClickTarget Target`

    Where to act: either a viewport coordinate or an element reference.

    - `class BrowserCoordinateTarget`

      A point in the browser viewport, in viewport pixels (the same frame as a
      full-viewport screenshot).

      - `JsonElement Type = "coordinate"`

      - `required long X`

        Pixels from the left edge of the viewport.

        minimum: 0

      - `required long Y`

        Pixels from the top edge of the viewport.

        minimum: 0

    - `class BrowserRefTarget`

      An element on the page, identified by a reference from a prior `read_page` or
      `find` result. References are scoped to the tab that produced them and become
      stale after navigation or a major re-render.

      - `JsonElement Type = "ref"`

      - `required string Ref`

        An element reference (e.g. "ref_7") returned by a prior `read_page` or `find` result.

  - `string? Modifiers`

    Optional modifier key chord to hold for the duration of this action (e.g. "shift", "ctrl+shift", "cmd+alt").

  - `string? TabID`

    Tab to act on. Defaults to the active tab when omitted.

### Browser Double Click Tool Use Block

- `class BrowserDoubleClickToolUseBlock`

  - `JsonElement Type = "tool_use"`

  - `required string ID`

    pattern: ^[a-zA-Z0-9_-]+$

  - `required ToolUseCaller Caller`

    Which party invoked the tool call: the model directly, or a server tool on its behalf.

    - `class DirectCaller`

      Tool invocation directly from the model.

      - `JsonElement Type = "direct"`

    - `class ServerToolCaller`

      Tool invocation generated by a server-side tool.

      - `JsonElement Type = "code_execution_20250825"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

    - `class ServerToolCaller20260120`

      - `JsonElement Type = "code_execution_20260120"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

  - `required BrowserDoubleClickInput Input`

    Double left-click at a viewport coordinate or on an element by reference.

    - `required BrowserClickTarget Target`

      Where to act: either a viewport coordinate or an element reference.

      - `class BrowserCoordinateTarget`

        A point in the browser viewport, in viewport pixels (the same frame as a
        full-viewport screenshot).

        - `JsonElement Type = "coordinate"`

        - `required long X`

          Pixels from the left edge of the viewport.

          minimum: 0

        - `required long Y`

          Pixels from the top edge of the viewport.

          minimum: 0

      - `class BrowserRefTarget`

        An element on the page, identified by a reference from a prior `read_page` or
        `find` result. References are scoped to the tab that produced them and become
        stale after navigation or a major re-render.

        - `JsonElement Type = "ref"`

        - `required string Ref`

          An element reference (e.g. "ref_7") returned by a prior `read_page` or `find` result.

    - `string? Modifiers`

      Optional modifier key chord to hold for the duration of this action (e.g. "shift", "ctrl+shift", "cmd+alt").

    - `string? TabID`

      Tab to act on. Defaults to the active tab when omitted.

  - `JsonElement Name = "double_click"`

  - `JsonElement ToolsetName = "browser"`

### Browser File Upload Config

- `class BrowserFileUploadConfig`

  `file_upload`'s config overrides.

  - `bool? DeferLoading`

    Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

  - `bool? Enabled`

    Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

### Browser File Upload Input

- `class BrowserFileUploadInput`

  Set the value of a file-input element to one or more files. The target must be an
  element reference; at least one of paths or document_ids is required.

  - `required BrowserRefTarget Target`

    An element on the page, identified by a reference from a prior `read_page` or
    `find` result. References are scoped to the tab that produced them and become
    stale after navigation or a major re-render.

    - `JsonElement Type = "ref"`

    - `required string Ref`

      An element reference (e.g. "ref_7") returned by a prior `read_page` or `find` result.

  - `IReadOnlyList<string>? DocumentIds`

    References to files the harness has staged, for deployments where the browser executor cannot read the caller's filesystem.

    minItems: 1

  - `IReadOnlyList<string>? Paths`

    File paths on the browser executor's filesystem.

    minItems: 1

  - `string? TabID`

    Tab to act on. Defaults to the active tab when omitted.

### Browser File Upload Tool Use Block

- `class BrowserFileUploadToolUseBlock`

  - `JsonElement Type = "tool_use"`

  - `required string ID`

    pattern: ^[a-zA-Z0-9_-]+$

  - `required ToolUseCaller Caller`

    Which party invoked the tool call: the model directly, or a server tool on its behalf.

    - `class DirectCaller`

      Tool invocation directly from the model.

      - `JsonElement Type = "direct"`

    - `class ServerToolCaller`

      Tool invocation generated by a server-side tool.

      - `JsonElement Type = "code_execution_20250825"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

    - `class ServerToolCaller20260120`

      - `JsonElement Type = "code_execution_20260120"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

  - `required BrowserFileUploadInput Input`

    Set the value of a file-input element to one or more files. The target must be an
    element reference; at least one of paths or document_ids is required.

    - `required BrowserRefTarget Target`

      An element on the page, identified by a reference from a prior `read_page` or
      `find` result. References are scoped to the tab that produced them and become
      stale after navigation or a major re-render.

      - `JsonElement Type = "ref"`

      - `required string Ref`

        An element reference (e.g. "ref_7") returned by a prior `read_page` or `find` result.

    - `IReadOnlyList<string>? DocumentIds`

      References to files the harness has staged, for deployments where the browser executor cannot read the caller's filesystem.

      minItems: 1

    - `IReadOnlyList<string>? Paths`

      File paths on the browser executor's filesystem.

      minItems: 1

    - `string? TabID`

      Tab to act on. Defaults to the active tab when omitted.

  - `JsonElement Name = "file_upload"`

  - `JsonElement ToolsetName = "browser"`

### Browser Find Config

- `class BrowserFindConfig`

  `find`'s config overrides.

  - `bool? DeferLoading`

    Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

  - `bool? Enabled`

    Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

### Browser Find Input

- `class BrowserFindInput`

  Find elements matching a natural-language description (e.g. "search bar", "add to
  cart button") and return up to 20 matches with element references.

  - `required string Query`

    Natural-language description of the element(s) to find.

  - `string? TabID`

    Tab to act on. Defaults to the active tab when omitted.

### Browser Find Tool Use Block

- `class BrowserFindToolUseBlock`

  - `JsonElement Type = "tool_use"`

  - `required string ID`

    pattern: ^[a-zA-Z0-9_-]+$

  - `required ToolUseCaller Caller`

    Which party invoked the tool call: the model directly, or a server tool on its behalf.

    - `class DirectCaller`

      Tool invocation directly from the model.

      - `JsonElement Type = "direct"`

    - `class ServerToolCaller`

      Tool invocation generated by a server-side tool.

      - `JsonElement Type = "code_execution_20250825"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

    - `class ServerToolCaller20260120`

      - `JsonElement Type = "code_execution_20260120"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

  - `required BrowserFindInput Input`

    Find elements matching a natural-language description (e.g. "search bar", "add to
    cart button") and return up to 20 matches with element references.

    - `required string Query`

      Natural-language description of the element(s) to find.

    - `string? TabID`

      Tab to act on. Defaults to the active tab when omitted.

  - `JsonElement Name = "find"`

  - `JsonElement ToolsetName = "browser"`

### Browser Form Input Config

- `class BrowserFormInputConfig`

  `form_input`'s config overrides.

  - `bool? DeferLoading`

    Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

  - `bool? Enabled`

    Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

### Browser Form Input Input

- `class BrowserFormInputInput`

  Set the value of a form element (input, textarea, select, checkbox). Use a
  boolean for checkboxes, an option value or text for selects.

  - `required BrowserRefTarget Target`

    An element on the page, identified by a reference from a prior `read_page` or
    `find` result. References are scoped to the tab that produced them and become
    stale after navigation or a major re-render.

    - `JsonElement Type = "ref"`

    - `required string Ref`

      An element reference (e.g. "ref_7") returned by a prior `read_page` or `find` result.

  - `required BrowserFormInputValue Value`

    The value to set.

    - `string`

    - `double`

    - `bool`

  - `string? TabID`

    Tab to act on. Defaults to the active tab when omitted.

### Browser Form Input Tool Use Block

- `class BrowserFormInputToolUseBlock`

  - `JsonElement Type = "tool_use"`

  - `required string ID`

    pattern: ^[a-zA-Z0-9_-]+$

  - `required ToolUseCaller Caller`

    Which party invoked the tool call: the model directly, or a server tool on its behalf.

    - `class DirectCaller`

      Tool invocation directly from the model.

      - `JsonElement Type = "direct"`

    - `class ServerToolCaller`

      Tool invocation generated by a server-side tool.

      - `JsonElement Type = "code_execution_20250825"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

    - `class ServerToolCaller20260120`

      - `JsonElement Type = "code_execution_20260120"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

  - `required BrowserFormInputInput Input`

    Set the value of a form element (input, textarea, select, checkbox). Use a
    boolean for checkboxes, an option value or text for selects.

    - `required BrowserRefTarget Target`

      An element on the page, identified by a reference from a prior `read_page` or
      `find` result. References are scoped to the tab that produced them and become
      stale after navigation or a major re-render.

      - `JsonElement Type = "ref"`

      - `required string Ref`

        An element reference (e.g. "ref_7") returned by a prior `read_page` or `find` result.

    - `required BrowserFormInputValue Value`

      The value to set.

      - `string`

      - `double`

      - `bool`

    - `string? TabID`

      Tab to act on. Defaults to the active tab when omitted.

  - `JsonElement Name = "form_input"`

  - `JsonElement ToolsetName = "browser"`

### Browser Form Input Value

- `class BrowserFormInputValue: union`

  - `string`

  - `double`

  - `bool`

### Browser Get Page Text Config

- `class BrowserGetPageTextConfig`

  `get_page_text`'s config overrides.

  - `bool? DeferLoading`

    Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

  - `bool? Enabled`

    Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

### Browser Get Page Text Input

- `class BrowserGetPageTextInput`

  Return the page's visible text content as plain text, prioritizing article
  content. Suited to articles, documentation, and other text-heavy pages.

  - `string? TabID`

    Tab to act on. Defaults to the active tab when omitted.

### Browser Get Page Text Tool Use Block

- `class BrowserGetPageTextToolUseBlock`

  - `JsonElement Type = "tool_use"`

  - `required string ID`

    pattern: ^[a-zA-Z0-9_-]+$

  - `required ToolUseCaller Caller`

    Which party invoked the tool call: the model directly, or a server tool on its behalf.

    - `class DirectCaller`

      Tool invocation directly from the model.

      - `JsonElement Type = "direct"`

    - `class ServerToolCaller`

      Tool invocation generated by a server-side tool.

      - `JsonElement Type = "code_execution_20250825"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

    - `class ServerToolCaller20260120`

      - `JsonElement Type = "code_execution_20260120"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

  - `required BrowserGetPageTextInput Input`

    Return the page's visible text content as plain text, prioritizing article
    content. Suited to articles, documentation, and other text-heavy pages.

    - `string? TabID`

      Tab to act on. Defaults to the active tab when omitted.

  - `JsonElement Name = "get_page_text"`

  - `JsonElement ToolsetName = "browser"`

### Browser Hold Key Config

- `class BrowserHoldKeyConfig`

  `hold_key`'s config overrides.

  - `bool? DeferLoading`

    Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

  - `bool? Enabled`

    Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

### Browser Hold Key Input

- `class BrowserHoldKeyInput`

  Hold a key or key chord down for a duration, then release it. Uses the same key
  names and "+" chord syntax as the key action.

  - `required double Duration`

    Seconds to hold the key down (maximum 30).

    minimum: 0, maximum: 30

  - `required string Text`

    The key or chord to hold.

  - `string? TabID`

    Tab to act on. Defaults to the active tab when omitted.

### Browser Hold Key Tool Use Block

- `class BrowserHoldKeyToolUseBlock`

  - `JsonElement Type = "tool_use"`

  - `required string ID`

    pattern: ^[a-zA-Z0-9_-]+$

  - `required ToolUseCaller Caller`

    Which party invoked the tool call: the model directly, or a server tool on its behalf.

    - `class DirectCaller`

      Tool invocation directly from the model.

      - `JsonElement Type = "direct"`

    - `class ServerToolCaller`

      Tool invocation generated by a server-side tool.

      - `JsonElement Type = "code_execution_20250825"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

    - `class ServerToolCaller20260120`

      - `JsonElement Type = "code_execution_20260120"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

  - `required BrowserHoldKeyInput Input`

    Hold a key or key chord down for a duration, then release it. Uses the same key
    names and "+" chord syntax as the key action.

    - `required double Duration`

      Seconds to hold the key down (maximum 30).

      minimum: 0, maximum: 30

    - `required string Text`

      The key or chord to hold.

    - `string? TabID`

      Tab to act on. Defaults to the active tab when omitted.

  - `JsonElement Name = "hold_key"`

  - `JsonElement ToolsetName = "browser"`

### Browser Hover Config

- `class BrowserHoverConfig`

  `hover`'s config overrides.

  - `bool? DeferLoading`

    Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

  - `bool? Enabled`

    Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

### Browser Hover Input

- `class BrowserHoverInput`

  Move the cursor to a coordinate or element without clicking.

  - `required BrowserClickTarget Target`

    Where to act: either a viewport coordinate or an element reference.

    - `class BrowserCoordinateTarget`

      A point in the browser viewport, in viewport pixels (the same frame as a
      full-viewport screenshot).

      - `JsonElement Type = "coordinate"`

      - `required long X`

        Pixels from the left edge of the viewport.

        minimum: 0

      - `required long Y`

        Pixels from the top edge of the viewport.

        minimum: 0

    - `class BrowserRefTarget`

      An element on the page, identified by a reference from a prior `read_page` or
      `find` result. References are scoped to the tab that produced them and become
      stale after navigation or a major re-render.

      - `JsonElement Type = "ref"`

      - `required string Ref`

        An element reference (e.g. "ref_7") returned by a prior `read_page` or `find` result.

  - `string? TabID`

    Tab to act on. Defaults to the active tab when omitted.

### Browser Hover Tool Use Block

- `class BrowserHoverToolUseBlock`

  - `JsonElement Type = "tool_use"`

  - `required string ID`

    pattern: ^[a-zA-Z0-9_-]+$

  - `required ToolUseCaller Caller`

    Which party invoked the tool call: the model directly, or a server tool on its behalf.

    - `class DirectCaller`

      Tool invocation directly from the model.

      - `JsonElement Type = "direct"`

    - `class ServerToolCaller`

      Tool invocation generated by a server-side tool.

      - `JsonElement Type = "code_execution_20250825"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

    - `class ServerToolCaller20260120`

      - `JsonElement Type = "code_execution_20260120"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

  - `required BrowserHoverInput Input`

    Move the cursor to a coordinate or element without clicking.

    - `required BrowserClickTarget Target`

      Where to act: either a viewport coordinate or an element reference.

      - `class BrowserCoordinateTarget`

        A point in the browser viewport, in viewport pixels (the same frame as a
        full-viewport screenshot).

        - `JsonElement Type = "coordinate"`

        - `required long X`

          Pixels from the left edge of the viewport.

          minimum: 0

        - `required long Y`

          Pixels from the top edge of the viewport.

          minimum: 0

      - `class BrowserRefTarget`

        An element on the page, identified by a reference from a prior `read_page` or
        `find` result. References are scoped to the tab that produced them and become
        stale after navigation or a major re-render.

        - `JsonElement Type = "ref"`

        - `required string Ref`

          An element reference (e.g. "ref_7") returned by a prior `read_page` or `find` result.

    - `string? TabID`

      Tab to act on. Defaults to the active tab when omitted.

  - `JsonElement Name = "hover"`

  - `JsonElement ToolsetName = "browser"`

### Browser Javascript Exec Config

- `class BrowserJavascriptExecConfig`

  `javascript_exec`'s config overrides.

  - `bool? DeferLoading`

    Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

  - `bool? Enabled`

    Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

### Browser Javascript Exec Input

- `class BrowserJavascriptExecInput`

  Execute JavaScript in the page context and return the value of the last
  expression. The code runs with access to the DOM, `window`, and page variables.
  Write the expression you want evaluated — do NOT use `return`.

  - `required string Text`

    JavaScript to execute in the page context.

  - `string? TabID`

    Tab to act on. Defaults to the active tab when omitted.

### Browser Javascript Exec Tool Use Block

- `class BrowserJavascriptExecToolUseBlock`

  - `JsonElement Type = "tool_use"`

  - `required string ID`

    pattern: ^[a-zA-Z0-9_-]+$

  - `required ToolUseCaller Caller`

    Which party invoked the tool call: the model directly, or a server tool on its behalf.

    - `class DirectCaller`

      Tool invocation directly from the model.

      - `JsonElement Type = "direct"`

    - `class ServerToolCaller`

      Tool invocation generated by a server-side tool.

      - `JsonElement Type = "code_execution_20250825"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

    - `class ServerToolCaller20260120`

      - `JsonElement Type = "code_execution_20260120"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

  - `required BrowserJavascriptExecInput Input`

    Execute JavaScript in the page context and return the value of the last
    expression. The code runs with access to the DOM, `window`, and page variables.
    Write the expression you want evaluated — do NOT use `return`.

    - `required string Text`

      JavaScript to execute in the page context.

    - `string? TabID`

      Tab to act on. Defaults to the active tab when omitted.

  - `JsonElement Name = "javascript_exec"`

  - `JsonElement ToolsetName = "browser"`

### Browser Key Config

- `class BrowserKeyConfig`

  `key`'s config overrides.

  - `bool? DeferLoading`

    Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

  - `bool? Enabled`

    Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

### Browser Key Input

- `class BrowserKeyInput`

  Press a key or key chord. Use "+" to combine modifiers with a key (e.g. "ctrl+a",
  "cmd+shift+p") and space to sequence presses (e.g. "Backspace Backspace Delete").
  Common names like "Return", "Tab", "Escape", "BackSpace" are supported.

  - `required string Text`

    The key, chord, or space-separated sequence to press.

  - `long? Repeat`

    Number of times to repeat. Default 1.

    minimum: 1, maximum: 100

  - `string? TabID`

    Tab to act on. Defaults to the active tab when omitted.

### Browser Key Tool Use Block

- `class BrowserKeyToolUseBlock`

  - `JsonElement Type = "tool_use"`

  - `required string ID`

    pattern: ^[a-zA-Z0-9_-]+$

  - `required ToolUseCaller Caller`

    Which party invoked the tool call: the model directly, or a server tool on its behalf.

    - `class DirectCaller`

      Tool invocation directly from the model.

      - `JsonElement Type = "direct"`

    - `class ServerToolCaller`

      Tool invocation generated by a server-side tool.

      - `JsonElement Type = "code_execution_20250825"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

    - `class ServerToolCaller20260120`

      - `JsonElement Type = "code_execution_20260120"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

  - `required BrowserKeyInput Input`

    Press a key or key chord. Use "+" to combine modifiers with a key (e.g. "ctrl+a",
    "cmd+shift+p") and space to sequence presses (e.g. "Backspace Backspace Delete").
    Common names like "Return", "Tab", "Escape", "BackSpace" are supported.

    - `required string Text`

      The key, chord, or space-separated sequence to press.

    - `long? Repeat`

      Number of times to repeat. Default 1.

      minimum: 1, maximum: 100

    - `string? TabID`

      Tab to act on. Defaults to the active tab when omitted.

  - `JsonElement Name = "key"`

  - `JsonElement ToolsetName = "browser"`

### Browser Left Click Config

- `class BrowserLeftClickConfig`

  `left_click`'s config overrides.

  - `bool? DeferLoading`

    Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

  - `bool? Enabled`

    Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

### Browser Left Click Drag Config

- `class BrowserLeftClickDragConfig`

  `left_click_drag`'s config overrides.

  - `bool? DeferLoading`

    Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

  - `bool? Enabled`

    Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

### Browser Left Click Drag Input

- `class BrowserLeftClickDragInput`

  Press at `from`, drag to `target`, release. Both must be coordinate targets.

  - `required BrowserCoordinateTarget From`

    A point in the browser viewport, in viewport pixels (the same frame as a
    full-viewport screenshot).

    - `JsonElement Type = "coordinate"`

    - `required long X`

      Pixels from the left edge of the viewport.

      minimum: 0

    - `required long Y`

      Pixels from the top edge of the viewport.

      minimum: 0

  - `required BrowserCoordinateTarget Target`

    A point in the browser viewport, in viewport pixels (the same frame as a
    full-viewport screenshot).

  - `string? TabID`

    Tab to act on. Defaults to the active tab when omitted.

### Browser Left Click Drag Tool Use Block

- `class BrowserLeftClickDragToolUseBlock`

  - `JsonElement Type = "tool_use"`

  - `required string ID`

    pattern: ^[a-zA-Z0-9_-]+$

  - `required ToolUseCaller Caller`

    Which party invoked the tool call: the model directly, or a server tool on its behalf.

    - `class DirectCaller`

      Tool invocation directly from the model.

      - `JsonElement Type = "direct"`

    - `class ServerToolCaller`

      Tool invocation generated by a server-side tool.

      - `JsonElement Type = "code_execution_20250825"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

    - `class ServerToolCaller20260120`

      - `JsonElement Type = "code_execution_20260120"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

  - `required BrowserLeftClickDragInput Input`

    Press at `from`, drag to `target`, release. Both must be coordinate targets.

    - `required BrowserCoordinateTarget From`

      A point in the browser viewport, in viewport pixels (the same frame as a
      full-viewport screenshot).

      - `JsonElement Type = "coordinate"`

      - `required long X`

        Pixels from the left edge of the viewport.

        minimum: 0

      - `required long Y`

        Pixels from the top edge of the viewport.

        minimum: 0

    - `required BrowserCoordinateTarget Target`

      A point in the browser viewport, in viewport pixels (the same frame as a
      full-viewport screenshot).

    - `string? TabID`

      Tab to act on. Defaults to the active tab when omitted.

  - `JsonElement Name = "left_click_drag"`

  - `JsonElement ToolsetName = "browser"`

### Browser Left Click Input

- `class BrowserLeftClickInput`

  Left-click at a viewport coordinate or on an element by reference.

  - `required BrowserClickTarget Target`

    Where to act: either a viewport coordinate or an element reference.

    - `class BrowserCoordinateTarget`

      A point in the browser viewport, in viewport pixels (the same frame as a
      full-viewport screenshot).

      - `JsonElement Type = "coordinate"`

      - `required long X`

        Pixels from the left edge of the viewport.

        minimum: 0

      - `required long Y`

        Pixels from the top edge of the viewport.

        minimum: 0

    - `class BrowserRefTarget`

      An element on the page, identified by a reference from a prior `read_page` or
      `find` result. References are scoped to the tab that produced them and become
      stale after navigation or a major re-render.

      - `JsonElement Type = "ref"`

      - `required string Ref`

        An element reference (e.g. "ref_7") returned by a prior `read_page` or `find` result.

  - `string? Modifiers`

    Optional modifier key chord to hold for the duration of this action (e.g. "shift", "ctrl+shift", "cmd+alt").

  - `string? TabID`

    Tab to act on. Defaults to the active tab when omitted.

### Browser Left Click Tool Use Block

- `class BrowserLeftClickToolUseBlock`

  - `JsonElement Type = "tool_use"`

  - `required string ID`

    pattern: ^[a-zA-Z0-9_-]+$

  - `required ToolUseCaller Caller`

    Which party invoked the tool call: the model directly, or a server tool on its behalf.

    - `class DirectCaller`

      Tool invocation directly from the model.

      - `JsonElement Type = "direct"`

    - `class ServerToolCaller`

      Tool invocation generated by a server-side tool.

      - `JsonElement Type = "code_execution_20250825"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

    - `class ServerToolCaller20260120`

      - `JsonElement Type = "code_execution_20260120"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

  - `required BrowserLeftClickInput Input`

    Left-click at a viewport coordinate or on an element by reference.

    - `required BrowserClickTarget Target`

      Where to act: either a viewport coordinate or an element reference.

      - `class BrowserCoordinateTarget`

        A point in the browser viewport, in viewport pixels (the same frame as a
        full-viewport screenshot).

        - `JsonElement Type = "coordinate"`

        - `required long X`

          Pixels from the left edge of the viewport.

          minimum: 0

        - `required long Y`

          Pixels from the top edge of the viewport.

          minimum: 0

      - `class BrowserRefTarget`

        An element on the page, identified by a reference from a prior `read_page` or
        `find` result. References are scoped to the tab that produced them and become
        stale after navigation or a major re-render.

        - `JsonElement Type = "ref"`

        - `required string Ref`

          An element reference (e.g. "ref_7") returned by a prior `read_page` or `find` result.

    - `string? Modifiers`

      Optional modifier key chord to hold for the duration of this action (e.g. "shift", "ctrl+shift", "cmd+alt").

    - `string? TabID`

      Tab to act on. Defaults to the active tab when omitted.

  - `JsonElement Name = "left_click"`

  - `JsonElement ToolsetName = "browser"`

### Browser Left Mouse Down Config

- `class BrowserLeftMouseDownConfig`

  `left_mouse_down`'s config overrides.

  - `bool? DeferLoading`

    Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

  - `bool? Enabled`

    Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

### Browser Left Mouse Down Input

- `class BrowserLeftMouseDownInput`

  Press and hold the left mouse button at a viewport coordinate. Pair with
  left_mouse_up to perform a custom drag.

  - `required BrowserCoordinateTarget Target`

    A point in the browser viewport, in viewport pixels (the same frame as a
    full-viewport screenshot).

    - `JsonElement Type = "coordinate"`

    - `required long X`

      Pixels from the left edge of the viewport.

      minimum: 0

    - `required long Y`

      Pixels from the top edge of the viewport.

      minimum: 0

  - `string? TabID`

    Tab to act on. Defaults to the active tab when omitted.

### Browser Left Mouse Down Tool Use Block

- `class BrowserLeftMouseDownToolUseBlock`

  - `JsonElement Type = "tool_use"`

  - `required string ID`

    pattern: ^[a-zA-Z0-9_-]+$

  - `required ToolUseCaller Caller`

    Which party invoked the tool call: the model directly, or a server tool on its behalf.

    - `class DirectCaller`

      Tool invocation directly from the model.

      - `JsonElement Type = "direct"`

    - `class ServerToolCaller`

      Tool invocation generated by a server-side tool.

      - `JsonElement Type = "code_execution_20250825"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

    - `class ServerToolCaller20260120`

      - `JsonElement Type = "code_execution_20260120"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

  - `required BrowserLeftMouseDownInput Input`

    Press and hold the left mouse button at a viewport coordinate. Pair with
    left_mouse_up to perform a custom drag.

    - `required BrowserCoordinateTarget Target`

      A point in the browser viewport, in viewport pixels (the same frame as a
      full-viewport screenshot).

      - `JsonElement Type = "coordinate"`

      - `required long X`

        Pixels from the left edge of the viewport.

        minimum: 0

      - `required long Y`

        Pixels from the top edge of the viewport.

        minimum: 0

    - `string? TabID`

      Tab to act on. Defaults to the active tab when omitted.

  - `JsonElement Name = "left_mouse_down"`

  - `JsonElement ToolsetName = "browser"`

### Browser Left Mouse Up Config

- `class BrowserLeftMouseUpConfig`

  `left_mouse_up`'s config overrides.

  - `bool? DeferLoading`

    Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

  - `bool? Enabled`

    Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

### Browser Left Mouse Up Input

- `class BrowserLeftMouseUpInput`

  Release the left mouse button at a viewport coordinate.

  - `required BrowserCoordinateTarget Target`

    A point in the browser viewport, in viewport pixels (the same frame as a
    full-viewport screenshot).

    - `JsonElement Type = "coordinate"`

    - `required long X`

      Pixels from the left edge of the viewport.

      minimum: 0

    - `required long Y`

      Pixels from the top edge of the viewport.

      minimum: 0

  - `string? TabID`

    Tab to act on. Defaults to the active tab when omitted.

### Browser Left Mouse Up Tool Use Block

- `class BrowserLeftMouseUpToolUseBlock`

  - `JsonElement Type = "tool_use"`

  - `required string ID`

    pattern: ^[a-zA-Z0-9_-]+$

  - `required ToolUseCaller Caller`

    Which party invoked the tool call: the model directly, or a server tool on its behalf.

    - `class DirectCaller`

      Tool invocation directly from the model.

      - `JsonElement Type = "direct"`

    - `class ServerToolCaller`

      Tool invocation generated by a server-side tool.

      - `JsonElement Type = "code_execution_20250825"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

    - `class ServerToolCaller20260120`

      - `JsonElement Type = "code_execution_20260120"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

  - `required BrowserLeftMouseUpInput Input`

    Release the left mouse button at a viewport coordinate.

    - `required BrowserCoordinateTarget Target`

      A point in the browser viewport, in viewport pixels (the same frame as a
      full-viewport screenshot).

      - `JsonElement Type = "coordinate"`

      - `required long X`

        Pixels from the left edge of the viewport.

        minimum: 0

      - `required long Y`

        Pixels from the top edge of the viewport.

        minimum: 0

    - `string? TabID`

      Tab to act on. Defaults to the active tab when omitted.

  - `JsonElement Name = "left_mouse_up"`

  - `JsonElement ToolsetName = "browser"`

### Browser List Tabs Config

- `class BrowserListTabsConfig`

  `list_tabs`'s config overrides.

  - `bool? DeferLoading`

    Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

  - `bool? Enabled`

    Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

### Browser List Tabs Input

- `class BrowserListTabsInput:`

  List all open tabs with each tab's tab_id, title, and URL.

### Browser List Tabs Tool Use Block

- `class BrowserListTabsToolUseBlock`

  - `JsonElement Type = "tool_use"`

  - `required string ID`

    pattern: ^[a-zA-Z0-9_-]+$

  - `required ToolUseCaller Caller`

    Which party invoked the tool call: the model directly, or a server tool on its behalf.

    - `class DirectCaller`

      Tool invocation directly from the model.

      - `JsonElement Type = "direct"`

    - `class ServerToolCaller`

      Tool invocation generated by a server-side tool.

      - `JsonElement Type = "code_execution_20250825"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

    - `class ServerToolCaller20260120`

      - `JsonElement Type = "code_execution_20260120"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

  - `required BrowserListTabsInput Input`

    List all open tabs with each tab's tab_id, title, and URL.

  - `JsonElement Name = "list_tabs"`

  - `JsonElement ToolsetName = "browser"`

### Browser Middle Click Config

- `class BrowserMiddleClickConfig`

  `middle_click`'s config overrides.

  - `bool? DeferLoading`

    Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

  - `bool? Enabled`

    Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

### Browser Middle Click Input

- `class BrowserMiddleClickInput`

  Middle-click at a viewport coordinate or on an element by reference.

  - `required BrowserClickTarget Target`

    Where to act: either a viewport coordinate or an element reference.

    - `class BrowserCoordinateTarget`

      A point in the browser viewport, in viewport pixels (the same frame as a
      full-viewport screenshot).

      - `JsonElement Type = "coordinate"`

      - `required long X`

        Pixels from the left edge of the viewport.

        minimum: 0

      - `required long Y`

        Pixels from the top edge of the viewport.

        minimum: 0

    - `class BrowserRefTarget`

      An element on the page, identified by a reference from a prior `read_page` or
      `find` result. References are scoped to the tab that produced them and become
      stale after navigation or a major re-render.

      - `JsonElement Type = "ref"`

      - `required string Ref`

        An element reference (e.g. "ref_7") returned by a prior `read_page` or `find` result.

  - `string? Modifiers`

    Optional modifier key chord to hold for the duration of this action (e.g. "shift", "ctrl+shift", "cmd+alt").

  - `string? TabID`

    Tab to act on. Defaults to the active tab when omitted.

### Browser Middle Click Tool Use Block

- `class BrowserMiddleClickToolUseBlock`

  - `JsonElement Type = "tool_use"`

  - `required string ID`

    pattern: ^[a-zA-Z0-9_-]+$

  - `required ToolUseCaller Caller`

    Which party invoked the tool call: the model directly, or a server tool on its behalf.

    - `class DirectCaller`

      Tool invocation directly from the model.

      - `JsonElement Type = "direct"`

    - `class ServerToolCaller`

      Tool invocation generated by a server-side tool.

      - `JsonElement Type = "code_execution_20250825"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

    - `class ServerToolCaller20260120`

      - `JsonElement Type = "code_execution_20260120"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

  - `required BrowserMiddleClickInput Input`

    Middle-click at a viewport coordinate or on an element by reference.

    - `required BrowserClickTarget Target`

      Where to act: either a viewport coordinate or an element reference.

      - `class BrowserCoordinateTarget`

        A point in the browser viewport, in viewport pixels (the same frame as a
        full-viewport screenshot).

        - `JsonElement Type = "coordinate"`

        - `required long X`

          Pixels from the left edge of the viewport.

          minimum: 0

        - `required long Y`

          Pixels from the top edge of the viewport.

          minimum: 0

      - `class BrowserRefTarget`

        An element on the page, identified by a reference from a prior `read_page` or
        `find` result. References are scoped to the tab that produced them and become
        stale after navigation or a major re-render.

        - `JsonElement Type = "ref"`

        - `required string Ref`

          An element reference (e.g. "ref_7") returned by a prior `read_page` or `find` result.

    - `string? Modifiers`

      Optional modifier key chord to hold for the duration of this action (e.g. "shift", "ctrl+shift", "cmd+alt").

    - `string? TabID`

      Tab to act on. Defaults to the active tab when omitted.

  - `JsonElement Name = "middle_click"`

  - `JsonElement ToolsetName = "browser"`

### Browser Mouse Move Config

- `class BrowserMouseMoveConfig`

  `mouse_move`'s config overrides.

  - `bool? DeferLoading`

    Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

  - `bool? Enabled`

    Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

### Browser Mouse Move Input

- `class BrowserMouseMoveInput`

  Move the pointer to a viewport coordinate without clicking.

  - `required BrowserCoordinateTarget Target`

    A point in the browser viewport, in viewport pixels (the same frame as a
    full-viewport screenshot).

    - `JsonElement Type = "coordinate"`

    - `required long X`

      Pixels from the left edge of the viewport.

      minimum: 0

    - `required long Y`

      Pixels from the top edge of the viewport.

      minimum: 0

  - `string? TabID`

    Tab to act on. Defaults to the active tab when omitted.

### Browser Mouse Move Tool Use Block

- `class BrowserMouseMoveToolUseBlock`

  - `JsonElement Type = "tool_use"`

  - `required string ID`

    pattern: ^[a-zA-Z0-9_-]+$

  - `required ToolUseCaller Caller`

    Which party invoked the tool call: the model directly, or a server tool on its behalf.

    - `class DirectCaller`

      Tool invocation directly from the model.

      - `JsonElement Type = "direct"`

    - `class ServerToolCaller`

      Tool invocation generated by a server-side tool.

      - `JsonElement Type = "code_execution_20250825"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

    - `class ServerToolCaller20260120`

      - `JsonElement Type = "code_execution_20260120"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

  - `required BrowserMouseMoveInput Input`

    Move the pointer to a viewport coordinate without clicking.

    - `required BrowserCoordinateTarget Target`

      A point in the browser viewport, in viewport pixels (the same frame as a
      full-viewport screenshot).

      - `JsonElement Type = "coordinate"`

      - `required long X`

        Pixels from the left edge of the viewport.

        minimum: 0

      - `required long Y`

        Pixels from the top edge of the viewport.

        minimum: 0

    - `string? TabID`

      Tab to act on. Defaults to the active tab when omitted.

  - `JsonElement Name = "mouse_move"`

  - `JsonElement ToolsetName = "browser"`

### Browser Navigate Config

- `class BrowserNavigateConfig`

  `navigate`'s config overrides.

  - `bool? DeferLoading`

    Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

  - `bool? Enabled`

    Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

### Browser Navigate Input

- `class BrowserNavigateInput`

  Navigate to a URL, or go back/forward/reload in history. The protocol may be
  omitted (defaults to https://).

  - `required string Url`

    The URL to navigate to, or "back" / "forward" / "reload" for history navigation.

  - `string? TabID`

    Tab to act on. Defaults to the active tab when omitted.

### Browser Navigate Tool Use Block

- `class BrowserNavigateToolUseBlock`

  - `JsonElement Type = "tool_use"`

  - `required string ID`

    pattern: ^[a-zA-Z0-9_-]+$

  - `required ToolUseCaller Caller`

    Which party invoked the tool call: the model directly, or a server tool on its behalf.

    - `class DirectCaller`

      Tool invocation directly from the model.

      - `JsonElement Type = "direct"`

    - `class ServerToolCaller`

      Tool invocation generated by a server-side tool.

      - `JsonElement Type = "code_execution_20250825"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

    - `class ServerToolCaller20260120`

      - `JsonElement Type = "code_execution_20260120"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

  - `required BrowserNavigateInput Input`

    Navigate to a URL, or go back/forward/reload in history. The protocol may be
    omitted (defaults to https://).

    - `required string Url`

      The URL to navigate to, or "back" / "forward" / "reload" for history navigation.

    - `string? TabID`

      Tab to act on. Defaults to the active tab when omitted.

  - `JsonElement Name = "navigate"`

  - `JsonElement ToolsetName = "browser"`

### Browser New Tab Config

- `class BrowserNewTabConfig`

  `new_tab`'s config overrides.

  - `bool? DeferLoading`

    Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

  - `bool? Enabled`

    Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

### Browser New Tab Input

- `class BrowserNewTabInput:`

  Open a new empty tab and return its tab_id.

### Browser New Tab Tool Use Block

- `class BrowserNewTabToolUseBlock`

  - `JsonElement Type = "tool_use"`

  - `required string ID`

    pattern: ^[a-zA-Z0-9_-]+$

  - `required ToolUseCaller Caller`

    Which party invoked the tool call: the model directly, or a server tool on its behalf.

    - `class DirectCaller`

      Tool invocation directly from the model.

      - `JsonElement Type = "direct"`

    - `class ServerToolCaller`

      Tool invocation generated by a server-side tool.

      - `JsonElement Type = "code_execution_20250825"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

    - `class ServerToolCaller20260120`

      - `JsonElement Type = "code_execution_20260120"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

  - `required BrowserNewTabInput Input`

    Open a new empty tab and return its tab_id.

  - `JsonElement Name = "new_tab"`

  - `JsonElement ToolsetName = "browser"`

### Browser Read Console Config

- `class BrowserReadConsoleConfig`

  `read_console`'s config overrides.

  - `bool? DeferLoading`

    Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

  - `bool? Enabled`

    Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

### Browser Read Console Input

- `class BrowserReadConsoleInput`

  Return console output (log entries, errors, warnings) accumulated since the
  driver attached to the tab and since the last read, one line per entry. An empty
  result does not mean no traffic for a tab that predates attach.

  - `string? TabID`

    Tab to act on. Defaults to the active tab when omitted.

### Browser Read Console Tool Use Block

- `class BrowserReadConsoleToolUseBlock`

  - `JsonElement Type = "tool_use"`

  - `required string ID`

    pattern: ^[a-zA-Z0-9_-]+$

  - `required ToolUseCaller Caller`

    Which party invoked the tool call: the model directly, or a server tool on its behalf.

    - `class DirectCaller`

      Tool invocation directly from the model.

      - `JsonElement Type = "direct"`

    - `class ServerToolCaller`

      Tool invocation generated by a server-side tool.

      - `JsonElement Type = "code_execution_20250825"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

    - `class ServerToolCaller20260120`

      - `JsonElement Type = "code_execution_20260120"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

  - `required BrowserReadConsoleInput Input`

    Return console output (log entries, errors, warnings) accumulated since the
    driver attached to the tab and since the last read, one line per entry. An empty
    result does not mean no traffic for a tab that predates attach.

    - `string? TabID`

      Tab to act on. Defaults to the active tab when omitted.

  - `JsonElement Name = "read_console"`

  - `JsonElement ToolsetName = "browser"`

### Browser Read Network Config

- `class BrowserReadNetworkConfig`

  `read_network`'s config overrides.

  - `bool? DeferLoading`

    Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

  - `bool? Enabled`

    Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

### Browser Read Network Input

- `class BrowserReadNetworkInput`

  Return the network requests (method, URL, status, MIME type, timing) recorded
  since the driver attached to the tab and since the last read, one line per entry.
  An empty result does not mean no traffic for a tab that predates attach.

  - `string? TabID`

    Tab to act on. Defaults to the active tab when omitted.

### Browser Read Network Tool Use Block

- `class BrowserReadNetworkToolUseBlock`

  - `JsonElement Type = "tool_use"`

  - `required string ID`

    pattern: ^[a-zA-Z0-9_-]+$

  - `required ToolUseCaller Caller`

    Which party invoked the tool call: the model directly, or a server tool on its behalf.

    - `class DirectCaller`

      Tool invocation directly from the model.

      - `JsonElement Type = "direct"`

    - `class ServerToolCaller`

      Tool invocation generated by a server-side tool.

      - `JsonElement Type = "code_execution_20250825"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

    - `class ServerToolCaller20260120`

      - `JsonElement Type = "code_execution_20260120"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

  - `required BrowserReadNetworkInput Input`

    Return the network requests (method, URL, status, MIME type, timing) recorded
    since the driver attached to the tab and since the last read, one line per entry.
    An empty result does not mean no traffic for a tab that predates attach.

    - `string? TabID`

      Tab to act on. Defaults to the active tab when omitted.

  - `JsonElement Name = "read_network"`

  - `JsonElement ToolsetName = "browser"`

### Browser Read Page Config

- `class BrowserReadPageConfig`

  `read_page`'s config overrides.

  - `bool? DeferLoading`

    Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

  - `bool? Enabled`

    Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

### Browser Read Page Filter

- `enum BrowserReadPageFilter`

  - `All("all")`

  - `Interactive("interactive")`

### Browser Read Page Input

- `class BrowserReadPageInput`

  Return a structured accessibility tree of the page (or the subtree rooted at
  `ref`), with element references like [ref_7] that can be used as targets on later
  actions. Output is capped at 50,000 characters — narrow with `ref` or a smaller
  `depth` when exceeded.

  - `long? Depth`

    Maximum tree depth. Default 15.

    minimum: 1

  - `BrowserReadPageFilter? Filter`

    Which elements to include. Omitted: every visible element. "interactive": interactive elements only. "all": additionally includes off-viewport elements.

    - `All("all")`

    - `Interactive("interactive")`

  - `string? Ref`

    Element reference to read a subtree from. Omit to read from the page root.

  - `string? TabID`

    Tab to act on. Defaults to the active tab when omitted.

### Browser Read Page Tool Use Block

- `class BrowserReadPageToolUseBlock`

  - `JsonElement Type = "tool_use"`

  - `required string ID`

    pattern: ^[a-zA-Z0-9_-]+$

  - `required ToolUseCaller Caller`

    Which party invoked the tool call: the model directly, or a server tool on its behalf.

    - `class DirectCaller`

      Tool invocation directly from the model.

      - `JsonElement Type = "direct"`

    - `class ServerToolCaller`

      Tool invocation generated by a server-side tool.

      - `JsonElement Type = "code_execution_20250825"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

    - `class ServerToolCaller20260120`

      - `JsonElement Type = "code_execution_20260120"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

  - `required BrowserReadPageInput Input`

    Return a structured accessibility tree of the page (or the subtree rooted at
    `ref`), with element references like [ref_7] that can be used as targets on later
    actions. Output is capped at 50,000 characters — narrow with `ref` or a smaller
    `depth` when exceeded.

    - `long? Depth`

      Maximum tree depth. Default 15.

      minimum: 1

    - `BrowserReadPageFilter? Filter`

      Which elements to include. Omitted: every visible element. "interactive": interactive elements only. "all": additionally includes off-viewport elements.

      - `All("all")`

      - `Interactive("interactive")`

    - `string? Ref`

      Element reference to read a subtree from. Omit to read from the page root.

    - `string? TabID`

      Tab to act on. Defaults to the active tab when omitted.

  - `JsonElement Name = "read_page"`

  - `JsonElement ToolsetName = "browser"`

### Browser Ref Target

- `class BrowserRefTarget`

  An element on the page, identified by a reference from a prior `read_page` or
  `find` result. References are scoped to the tab that produced them and become
  stale after navigation or a major re-render.

  - `JsonElement Type = "ref"`

  - `required string Ref`

    An element reference (e.g. "ref_7") returned by a prior `read_page` or `find` result.

### Browser Right Click Config

- `class BrowserRightClickConfig`

  `right_click`'s config overrides.

  - `bool? DeferLoading`

    Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

  - `bool? Enabled`

    Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

### Browser Right Click Input

- `class BrowserRightClickInput`

  Right-click at a viewport coordinate or on an element by reference.

  - `required BrowserClickTarget Target`

    Where to act: either a viewport coordinate or an element reference.

    - `class BrowserCoordinateTarget`

      A point in the browser viewport, in viewport pixels (the same frame as a
      full-viewport screenshot).

      - `JsonElement Type = "coordinate"`

      - `required long X`

        Pixels from the left edge of the viewport.

        minimum: 0

      - `required long Y`

        Pixels from the top edge of the viewport.

        minimum: 0

    - `class BrowserRefTarget`

      An element on the page, identified by a reference from a prior `read_page` or
      `find` result. References are scoped to the tab that produced them and become
      stale after navigation or a major re-render.

      - `JsonElement Type = "ref"`

      - `required string Ref`

        An element reference (e.g. "ref_7") returned by a prior `read_page` or `find` result.

  - `string? Modifiers`

    Optional modifier key chord to hold for the duration of this action (e.g. "shift", "ctrl+shift", "cmd+alt").

  - `string? TabID`

    Tab to act on. Defaults to the active tab when omitted.

### Browser Right Click Tool Use Block

- `class BrowserRightClickToolUseBlock`

  - `JsonElement Type = "tool_use"`

  - `required string ID`

    pattern: ^[a-zA-Z0-9_-]+$

  - `required ToolUseCaller Caller`

    Which party invoked the tool call: the model directly, or a server tool on its behalf.

    - `class DirectCaller`

      Tool invocation directly from the model.

      - `JsonElement Type = "direct"`

    - `class ServerToolCaller`

      Tool invocation generated by a server-side tool.

      - `JsonElement Type = "code_execution_20250825"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

    - `class ServerToolCaller20260120`

      - `JsonElement Type = "code_execution_20260120"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

  - `required BrowserRightClickInput Input`

    Right-click at a viewport coordinate or on an element by reference.

    - `required BrowserClickTarget Target`

      Where to act: either a viewport coordinate or an element reference.

      - `class BrowserCoordinateTarget`

        A point in the browser viewport, in viewport pixels (the same frame as a
        full-viewport screenshot).

        - `JsonElement Type = "coordinate"`

        - `required long X`

          Pixels from the left edge of the viewport.

          minimum: 0

        - `required long Y`

          Pixels from the top edge of the viewport.

          minimum: 0

      - `class BrowserRefTarget`

        An element on the page, identified by a reference from a prior `read_page` or
        `find` result. References are scoped to the tab that produced them and become
        stale after navigation or a major re-render.

        - `JsonElement Type = "ref"`

        - `required string Ref`

          An element reference (e.g. "ref_7") returned by a prior `read_page` or `find` result.

    - `string? Modifiers`

      Optional modifier key chord to hold for the duration of this action (e.g. "shift", "ctrl+shift", "cmd+alt").

    - `string? TabID`

      Tab to act on. Defaults to the active tab when omitted.

  - `JsonElement Name = "right_click"`

  - `JsonElement ToolsetName = "browser"`

### Browser Screenshot Config

- `class BrowserScreenshotConfig`

  `screenshot`'s config overrides.

  - `bool? DeferLoading`

    Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

  - `bool? Enabled`

    Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

### Browser Screenshot Input

- `class BrowserScreenshotInput`

  Capture the current browser viewport.

  - `string? TabID`

    Tab to act on. Defaults to the active tab when omitted.

### Browser Screenshot Tool Use Block

- `class BrowserScreenshotToolUseBlock`

  - `JsonElement Type = "tool_use"`

  - `required string ID`

    pattern: ^[a-zA-Z0-9_-]+$

  - `required ToolUseCaller Caller`

    Which party invoked the tool call: the model directly, or a server tool on its behalf.

    - `class DirectCaller`

      Tool invocation directly from the model.

      - `JsonElement Type = "direct"`

    - `class ServerToolCaller`

      Tool invocation generated by a server-side tool.

      - `JsonElement Type = "code_execution_20250825"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

    - `class ServerToolCaller20260120`

      - `JsonElement Type = "code_execution_20260120"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

  - `required BrowserScreenshotInput Input`

    Capture the current browser viewport.

    - `string? TabID`

      Tab to act on. Defaults to the active tab when omitted.

  - `JsonElement Name = "screenshot"`

  - `JsonElement ToolsetName = "browser"`

### Browser Scroll Config

- `class BrowserScrollConfig`

  `scroll`'s config overrides.

  - `bool? DeferLoading`

    Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

  - `bool? Enabled`

    Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

### Browser Scroll Direction

- `enum BrowserScrollDirection`

  - `Up("up")`

  - `Down("down")`

  - `Left("left")`

  - `Right("right")`

### Browser Scroll Input

- `class BrowserScrollInput`

  Scroll at a viewport position. `target` must be a coordinate target.

  - `required BrowserScrollDirection ScrollDirection`

    - `Up("up")`

    - `Down("down")`

    - `Left("left")`

    - `Right("right")`

  - `required BrowserCoordinateTarget Target`

    A point in the browser viewport, in viewport pixels (the same frame as a
    full-viewport screenshot).

    - `JsonElement Type = "coordinate"`

    - `required long X`

      Pixels from the left edge of the viewport.

      minimum: 0

    - `required long Y`

      Pixels from the top edge of the viewport.

      minimum: 0

  - `long? ScrollAmount`

    Scroll-wheel notches (1–10). Default 3.

    minimum: 1, maximum: 10

  - `string? TabID`

    Tab to act on. Defaults to the active tab when omitted.

### Browser Scroll To Config

- `class BrowserScrollToConfig`

  `scroll_to`'s config overrides.

  - `bool? DeferLoading`

    Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

  - `bool? Enabled`

    Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

### Browser Scroll To Input

- `class BrowserScrollToInput`

  Scroll an element into view.

  - `required BrowserRefTarget Target`

    An element on the page, identified by a reference from a prior `read_page` or
    `find` result. References are scoped to the tab that produced them and become
    stale after navigation or a major re-render.

    - `JsonElement Type = "ref"`

    - `required string Ref`

      An element reference (e.g. "ref_7") returned by a prior `read_page` or `find` result.

  - `string? TabID`

    Tab to act on. Defaults to the active tab when omitted.

### Browser Scroll To Tool Use Block

- `class BrowserScrollToToolUseBlock`

  - `JsonElement Type = "tool_use"`

  - `required string ID`

    pattern: ^[a-zA-Z0-9_-]+$

  - `required ToolUseCaller Caller`

    Which party invoked the tool call: the model directly, or a server tool on its behalf.

    - `class DirectCaller`

      Tool invocation directly from the model.

      - `JsonElement Type = "direct"`

    - `class ServerToolCaller`

      Tool invocation generated by a server-side tool.

      - `JsonElement Type = "code_execution_20250825"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

    - `class ServerToolCaller20260120`

      - `JsonElement Type = "code_execution_20260120"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

  - `required BrowserScrollToInput Input`

    Scroll an element into view.

    - `required BrowserRefTarget Target`

      An element on the page, identified by a reference from a prior `read_page` or
      `find` result. References are scoped to the tab that produced them and become
      stale after navigation or a major re-render.

      - `JsonElement Type = "ref"`

      - `required string Ref`

        An element reference (e.g. "ref_7") returned by a prior `read_page` or `find` result.

    - `string? TabID`

      Tab to act on. Defaults to the active tab when omitted.

  - `JsonElement Name = "scroll_to"`

  - `JsonElement ToolsetName = "browser"`

### Browser Scroll Tool Use Block

- `class BrowserScrollToolUseBlock`

  - `JsonElement Type = "tool_use"`

  - `required string ID`

    pattern: ^[a-zA-Z0-9_-]+$

  - `required ToolUseCaller Caller`

    Which party invoked the tool call: the model directly, or a server tool on its behalf.

    - `class DirectCaller`

      Tool invocation directly from the model.

      - `JsonElement Type = "direct"`

    - `class ServerToolCaller`

      Tool invocation generated by a server-side tool.

      - `JsonElement Type = "code_execution_20250825"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

    - `class ServerToolCaller20260120`

      - `JsonElement Type = "code_execution_20260120"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

  - `required BrowserScrollInput Input`

    Scroll at a viewport position. `target` must be a coordinate target.

    - `required BrowserScrollDirection ScrollDirection`

      - `Up("up")`

      - `Down("down")`

      - `Left("left")`

      - `Right("right")`

    - `required BrowserCoordinateTarget Target`

      A point in the browser viewport, in viewport pixels (the same frame as a
      full-viewport screenshot).

      - `JsonElement Type = "coordinate"`

      - `required long X`

        Pixels from the left edge of the viewport.

        minimum: 0

      - `required long Y`

        Pixels from the top edge of the viewport.

        minimum: 0

    - `long? ScrollAmount`

      Scroll-wheel notches (1–10). Default 3.

      minimum: 1, maximum: 10

    - `string? TabID`

      Tab to act on. Defaults to the active tab when omitted.

  - `JsonElement Name = "scroll"`

  - `JsonElement ToolsetName = "browser"`

### Browser State Block Param

- `class BrowserStateBlockParam`

  The caller's browser state after a browser toolset member call —
  the full inventory of open tabs, which tab is active, and any side
  effects (tabs opened, download state changes) the call produced.

  At most one per `tool_result`, only on a non-error result answering a
  browser toolset member `tool_use`. The server renders the
  model-visible text from it; the model never sees the raw fields.

  - `JsonElement Type = "browser_state"`

  - `required IReadOnlyList<BrowserStateTabEntry> Tabs`

    All tabs open in the browser after this call — the full inventory, not a delta. May be empty. Whenever non-empty, exactly one entry carries `active: true`.

    maxItems: 100

    - `required string TabID`

      The caller-assigned identifier for this tab, unique within the inventory.

      minLength: 1, maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

    - `required string Title`

      The title of the page the tab is showing. May be empty.

      maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

    - `required string Url`

      The URL of the page the tab is showing. May be empty.

      maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

    - `bool Active`

      Whether this tab is the active tab after this call. Whenever `tabs` is non-empty, exactly one entry is marked `active: true`.

  - `CacheControlEphemeral? CacheControl`

    Create a cache control breakpoint at this content block.

    - `JsonElement Type = "ephemeral"`

    - `Ttl Ttl`

      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`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching?sdk_languages=csharp) for details.

      - `Ttl5m("5m")`

      - `Ttl1h("1h")`

  - `IReadOnlyList<BrowserStateChange>? StateChanges`

    Tabs opened and download state changes during this call. "Nothing to report" is expressed by omitting the field, never by an empty list.

    minItems: 1, maxItems: 200

    - `class BrowserStateChangeTabOpened`

      A tab this call's execution opened that remains open at its end —
      the creation delta of the `tabs` inventory, not an event log.

      Carries only the `tab_id`; the tab's `title` and `url` live on its
      `tabs` entry, which must include the same `tab_id`. A tab opened
      during a failed call gets no deferred `tab_opened`; it simply appears
      in the next result's `tabs` inventory.

      - `JsonElement Type = "tab_opened"`

      - `required string TabID`

        The `tab_id` of the opened tab, present in `tabs`.

        minLength: 1, maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

    - `class BrowserStateChangeDownloadStarted`

      A file download that started during this call.

      - `JsonElement Type = "download_started"`

      - `required string DownloadID`

        The caller-assigned identifier for this download, stable across the state changes reporting it.

        minLength: 1, maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

      - `required string Url`

        The final post-redirect URL the download was served from.

        maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

    - `class BrowserStateChangeDownloadCompleted`

      A file download that finished during this call, reported with the
      same `download_id` as its `download_started` — or without a prior
      `download_started`, when the download finished during the call that
      started it (at most one state change per `download_id` per result).

      - `JsonElement Type = "download_completed"`

      - `required string DownloadID`

        The caller-assigned identifier for this download, stable across the state changes reporting it.

        minLength: 1, maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

      - `required string Url`

        The final post-redirect URL the download was served from.

        maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

      - `string? Path`

        Where the executor saved the file, on the executor's filesystem. Only included when another tool in the same environment can read the file at that path.

        maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

      - `long? SizeBytes`

        The completed download's size.

        minimum: 0

    - `class BrowserStateChangeDownloadFailed`

      A file download that failed — or was cancelled — during this call.

      - `JsonElement Type = "download_failed"`

      - `required string DownloadID`

        The caller-assigned identifier for this download, stable across the state changes reporting it.

        minLength: 1, maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

      - `required string Url`

        The final post-redirect URL the download was served from.

        maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

      - `string? Error`

        The failure or cancellation detail, when known.

        maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

### Browser State Change

- `class BrowserStateChange: union`

  - `class BrowserStateChangeTabOpened`

    A tab this call's execution opened that remains open at its end —
    the creation delta of the `tabs` inventory, not an event log.

    Carries only the `tab_id`; the tab's `title` and `url` live on its
    `tabs` entry, which must include the same `tab_id`. A tab opened
    during a failed call gets no deferred `tab_opened`; it simply appears
    in the next result's `tabs` inventory.

    - `JsonElement Type = "tab_opened"`

    - `required string TabID`

      The `tab_id` of the opened tab, present in `tabs`.

      minLength: 1, maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

  - `class BrowserStateChangeDownloadStarted`

    A file download that started during this call.

    - `JsonElement Type = "download_started"`

    - `required string DownloadID`

      The caller-assigned identifier for this download, stable across the state changes reporting it.

      minLength: 1, maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

    - `required string Url`

      The final post-redirect URL the download was served from.

      maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

  - `class BrowserStateChangeDownloadCompleted`

    A file download that finished during this call, reported with the
    same `download_id` as its `download_started` — or without a prior
    `download_started`, when the download finished during the call that
    started it (at most one state change per `download_id` per result).

    - `JsonElement Type = "download_completed"`

    - `required string DownloadID`

      The caller-assigned identifier for this download, stable across the state changes reporting it.

      minLength: 1, maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

    - `required string Url`

      The final post-redirect URL the download was served from.

      maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

    - `string? Path`

      Where the executor saved the file, on the executor's filesystem. Only included when another tool in the same environment can read the file at that path.

      maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

    - `long? SizeBytes`

      The completed download's size.

      minimum: 0

  - `class BrowserStateChangeDownloadFailed`

    A file download that failed — or was cancelled — during this call.

    - `JsonElement Type = "download_failed"`

    - `required string DownloadID`

      The caller-assigned identifier for this download, stable across the state changes reporting it.

      minLength: 1, maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

    - `required string Url`

      The final post-redirect URL the download was served from.

      maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

    - `string? Error`

      The failure or cancellation detail, when known.

      maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

### Browser State Change Download Completed

- `class BrowserStateChangeDownloadCompleted`

  A file download that finished during this call, reported with the
  same `download_id` as its `download_started` — or without a prior
  `download_started`, when the download finished during the call that
  started it (at most one state change per `download_id` per result).

  - `JsonElement Type = "download_completed"`

  - `required string DownloadID`

    The caller-assigned identifier for this download, stable across the state changes reporting it.

    minLength: 1, maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

  - `required string Url`

    The final post-redirect URL the download was served from.

    maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

  - `string? Path`

    Where the executor saved the file, on the executor's filesystem. Only included when another tool in the same environment can read the file at that path.

    maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

  - `long? SizeBytes`

    The completed download's size.

    minimum: 0

### Browser State Change Download Failed

- `class BrowserStateChangeDownloadFailed`

  A file download that failed — or was cancelled — during this call.

  - `JsonElement Type = "download_failed"`

  - `required string DownloadID`

    The caller-assigned identifier for this download, stable across the state changes reporting it.

    minLength: 1, maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

  - `required string Url`

    The final post-redirect URL the download was served from.

    maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

  - `string? Error`

    The failure or cancellation detail, when known.

    maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

### Browser State Change Download Started

- `class BrowserStateChangeDownloadStarted`

  A file download that started during this call.

  - `JsonElement Type = "download_started"`

  - `required string DownloadID`

    The caller-assigned identifier for this download, stable across the state changes reporting it.

    minLength: 1, maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

  - `required string Url`

    The final post-redirect URL the download was served from.

    maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

### Browser State Change Tab Opened

- `class BrowserStateChangeTabOpened`

  A tab this call's execution opened that remains open at its end —
  the creation delta of the `tabs` inventory, not an event log.

  Carries only the `tab_id`; the tab's `title` and `url` live on its
  `tabs` entry, which must include the same `tab_id`. A tab opened
  during a failed call gets no deferred `tab_opened`; it simply appears
  in the next result's `tabs` inventory.

  - `JsonElement Type = "tab_opened"`

  - `required string TabID`

    The `tab_id` of the opened tab, present in `tabs`.

    minLength: 1, maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

### Browser State Tab Entry

- `class BrowserStateTabEntry`

  One open browser tab reported in a `browser_state` block's `tabs`
  inventory.

  `tab_id` is the caller-assigned identifier for the tab; `title` and
  `url` describe the page the tab is currently showing and may be empty
  strings (a blank tab legitimately has both empty). `active` marks the
  tab that is active after this call; whenever `tabs` is non-empty,
  exactly one entry is marked.

  - `required string TabID`

    The caller-assigned identifier for this tab, unique within the inventory.

    minLength: 1, maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

  - `required string Title`

    The title of the page the tab is showing. May be empty.

    maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

  - `required string Url`

    The URL of the page the tab is showing. May be empty.

    maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

  - `bool Active`

    Whether this tab is the active tab after this call. Whenever `tabs` is non-empty, exactly one entry is marked `active: true`.

### Browser Switch Tab Config

- `class BrowserSwitchTabConfig`

  `switch_tab`'s config overrides.

  - `bool? DeferLoading`

    Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

  - `bool? Enabled`

    Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

### Browser Switch Tab Input

- `class BrowserSwitchTabInput`

  Make the tab with the given tab_id the active tab — the tab that actions without
  a tab_id apply to.

  - `required string TabID`

    The tab to switch to.

### Browser Switch Tab Tool Use Block

- `class BrowserSwitchTabToolUseBlock`

  - `JsonElement Type = "tool_use"`

  - `required string ID`

    pattern: ^[a-zA-Z0-9_-]+$

  - `required ToolUseCaller Caller`

    Which party invoked the tool call: the model directly, or a server tool on its behalf.

    - `class DirectCaller`

      Tool invocation directly from the model.

      - `JsonElement Type = "direct"`

    - `class ServerToolCaller`

      Tool invocation generated by a server-side tool.

      - `JsonElement Type = "code_execution_20250825"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

    - `class ServerToolCaller20260120`

      - `JsonElement Type = "code_execution_20260120"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

  - `required BrowserSwitchTabInput Input`

    Make the tab with the given tab_id the active tab — the tab that actions without
    a tab_id apply to.

    - `required string TabID`

      The tab to switch to.

  - `JsonElement Name = "switch_tab"`

  - `JsonElement ToolsetName = "browser"`

### Browser Tool Use Block

- `class BrowserToolUseBlock: union`

  - `class BrowserNavigateToolUseBlock`

    - `JsonElement Type = "tool_use"`

    - `required string ID`

      pattern: ^[a-zA-Z0-9_-]+$

    - `required ToolUseCaller Caller`

      Which party invoked the tool call: the model directly, or a server tool on its behalf.

      - `class DirectCaller`

        Tool invocation directly from the model.

        - `JsonElement Type = "direct"`

      - `class ServerToolCaller`

        Tool invocation generated by a server-side tool.

        - `JsonElement Type = "code_execution_20250825"`

        - `required string ToolID`

          pattern: ^srvtoolu_[a-zA-Z0-9_]+$

      - `class ServerToolCaller20260120`

        - `JsonElement Type = "code_execution_20260120"`

        - `required string ToolID`

          pattern: ^srvtoolu_[a-zA-Z0-9_]+$

    - `required BrowserNavigateInput Input`

      Navigate to a URL, or go back/forward/reload in history. The protocol may be
      omitted (defaults to https://).

      - `required string Url`

        The URL to navigate to, or "back" / "forward" / "reload" for history navigation.

      - `string? TabID`

        Tab to act on. Defaults to the active tab when omitted.

    - `JsonElement Name = "navigate"`

    - `JsonElement ToolsetName = "browser"`

  - `class BrowserListTabsToolUseBlock`

    - `JsonElement Type = "tool_use"`

    - `required string ID`

      pattern: ^[a-zA-Z0-9_-]+$

    - `required ToolUseCaller Caller`

      Which party invoked the tool call: the model directly, or a server tool on its behalf.

    - `required BrowserListTabsInput Input`

      List all open tabs with each tab's tab_id, title, and URL.

    - `JsonElement Name = "list_tabs"`

    - `JsonElement ToolsetName = "browser"`

  - `class BrowserNewTabToolUseBlock`

    - `JsonElement Type = "tool_use"`

    - `required string ID`

      pattern: ^[a-zA-Z0-9_-]+$

    - `required ToolUseCaller Caller`

      Which party invoked the tool call: the model directly, or a server tool on its behalf.

    - `required BrowserNewTabInput Input`

      Open a new empty tab and return its tab_id.

    - `JsonElement Name = "new_tab"`

    - `JsonElement ToolsetName = "browser"`

  - `class BrowserSwitchTabToolUseBlock`

    - `JsonElement Type = "tool_use"`

    - `required string ID`

      pattern: ^[a-zA-Z0-9_-]+$

    - `required ToolUseCaller Caller`

      Which party invoked the tool call: the model directly, or a server tool on its behalf.

    - `required BrowserSwitchTabInput Input`

      Make the tab with the given tab_id the active tab — the tab that actions without
      a tab_id apply to.

      - `required string TabID`

        The tab to switch to.

    - `JsonElement Name = "switch_tab"`

    - `JsonElement ToolsetName = "browser"`

  - `class BrowserCloseTabToolUseBlock`

    - `JsonElement Type = "tool_use"`

    - `required string ID`

      pattern: ^[a-zA-Z0-9_-]+$

    - `required ToolUseCaller Caller`

      Which party invoked the tool call: the model directly, or a server tool on its behalf.

    - `required BrowserCloseTabInput Input`

      Close the tab with the given tab_id.

      - `required string TabID`

        The tab to close.

    - `JsonElement Name = "close_tab"`

    - `JsonElement ToolsetName = "browser"`

  - `class BrowserReadPageToolUseBlock`

    - `JsonElement Type = "tool_use"`

    - `required string ID`

      pattern: ^[a-zA-Z0-9_-]+$

    - `required ToolUseCaller Caller`

      Which party invoked the tool call: the model directly, or a server tool on its behalf.

    - `required BrowserReadPageInput Input`

      Return a structured accessibility tree of the page (or the subtree rooted at
      `ref`), with element references like [ref_7] that can be used as targets on later
      actions. Output is capped at 50,000 characters — narrow with `ref` or a smaller
      `depth` when exceeded.

      - `long? Depth`

        Maximum tree depth. Default 15.

        minimum: 1

      - `BrowserReadPageFilter? Filter`

        Which elements to include. Omitted: every visible element. "interactive": interactive elements only. "all": additionally includes off-viewport elements.

        - `All("all")`

        - `Interactive("interactive")`

      - `string? Ref`

        Element reference to read a subtree from. Omit to read from the page root.

      - `string? TabID`

        Tab to act on. Defaults to the active tab when omitted.

    - `JsonElement Name = "read_page"`

    - `JsonElement ToolsetName = "browser"`

  - `class BrowserGetPageTextToolUseBlock`

    - `JsonElement Type = "tool_use"`

    - `required string ID`

      pattern: ^[a-zA-Z0-9_-]+$

    - `required ToolUseCaller Caller`

      Which party invoked the tool call: the model directly, or a server tool on its behalf.

    - `required BrowserGetPageTextInput Input`

      Return the page's visible text content as plain text, prioritizing article
      content. Suited to articles, documentation, and other text-heavy pages.

      - `string? TabID`

        Tab to act on. Defaults to the active tab when omitted.

    - `JsonElement Name = "get_page_text"`

    - `JsonElement ToolsetName = "browser"`

  - `class BrowserReadConsoleToolUseBlock`

    - `JsonElement Type = "tool_use"`

    - `required string ID`

      pattern: ^[a-zA-Z0-9_-]+$

    - `required ToolUseCaller Caller`

      Which party invoked the tool call: the model directly, or a server tool on its behalf.

    - `required BrowserReadConsoleInput Input`

      Return console output (log entries, errors, warnings) accumulated since the
      driver attached to the tab and since the last read, one line per entry. An empty
      result does not mean no traffic for a tab that predates attach.

      - `string? TabID`

        Tab to act on. Defaults to the active tab when omitted.

    - `JsonElement Name = "read_console"`

    - `JsonElement ToolsetName = "browser"`

  - `class BrowserReadNetworkToolUseBlock`

    - `JsonElement Type = "tool_use"`

    - `required string ID`

      pattern: ^[a-zA-Z0-9_-]+$

    - `required ToolUseCaller Caller`

      Which party invoked the tool call: the model directly, or a server tool on its behalf.

    - `required BrowserReadNetworkInput Input`

      Return the network requests (method, URL, status, MIME type, timing) recorded
      since the driver attached to the tab and since the last read, one line per entry.
      An empty result does not mean no traffic for a tab that predates attach.

      - `string? TabID`

        Tab to act on. Defaults to the active tab when omitted.

    - `JsonElement Name = "read_network"`

    - `JsonElement ToolsetName = "browser"`

  - `class BrowserFindToolUseBlock`

    - `JsonElement Type = "tool_use"`

    - `required string ID`

      pattern: ^[a-zA-Z0-9_-]+$

    - `required ToolUseCaller Caller`

      Which party invoked the tool call: the model directly, or a server tool on its behalf.

    - `required BrowserFindInput Input`

      Find elements matching a natural-language description (e.g. "search bar", "add to
      cart button") and return up to 20 matches with element references.

      - `required string Query`

        Natural-language description of the element(s) to find.

      - `string? TabID`

        Tab to act on. Defaults to the active tab when omitted.

    - `JsonElement Name = "find"`

    - `JsonElement ToolsetName = "browser"`

  - `class BrowserFormInputToolUseBlock`

    - `JsonElement Type = "tool_use"`

    - `required string ID`

      pattern: ^[a-zA-Z0-9_-]+$

    - `required ToolUseCaller Caller`

      Which party invoked the tool call: the model directly, or a server tool on its behalf.

    - `required BrowserFormInputInput Input`

      Set the value of a form element (input, textarea, select, checkbox). Use a
      boolean for checkboxes, an option value or text for selects.

      - `required BrowserRefTarget Target`

        An element on the page, identified by a reference from a prior `read_page` or
        `find` result. References are scoped to the tab that produced them and become
        stale after navigation or a major re-render.

        - `JsonElement Type = "ref"`

        - `required string Ref`

          An element reference (e.g. "ref_7") returned by a prior `read_page` or `find` result.

      - `required BrowserFormInputValue Value`

        The value to set.

        - `string`

        - `double`

        - `bool`

      - `string? TabID`

        Tab to act on. Defaults to the active tab when omitted.

    - `JsonElement Name = "form_input"`

    - `JsonElement ToolsetName = "browser"`

  - `class BrowserFileUploadToolUseBlock`

    - `JsonElement Type = "tool_use"`

    - `required string ID`

      pattern: ^[a-zA-Z0-9_-]+$

    - `required ToolUseCaller Caller`

      Which party invoked the tool call: the model directly, or a server tool on its behalf.

    - `required BrowserFileUploadInput Input`

      Set the value of a file-input element to one or more files. The target must be an
      element reference; at least one of paths or document_ids is required.

      - `required BrowserRefTarget Target`

        An element on the page, identified by a reference from a prior `read_page` or
        `find` result. References are scoped to the tab that produced them and become
        stale after navigation or a major re-render.

      - `IReadOnlyList<string>? DocumentIds`

        References to files the harness has staged, for deployments where the browser executor cannot read the caller's filesystem.

        minItems: 1

      - `IReadOnlyList<string>? Paths`

        File paths on the browser executor's filesystem.

        minItems: 1

      - `string? TabID`

        Tab to act on. Defaults to the active tab when omitted.

    - `JsonElement Name = "file_upload"`

    - `JsonElement ToolsetName = "browser"`

  - `class BrowserScrollToToolUseBlock`

    - `JsonElement Type = "tool_use"`

    - `required string ID`

      pattern: ^[a-zA-Z0-9_-]+$

    - `required ToolUseCaller Caller`

      Which party invoked the tool call: the model directly, or a server tool on its behalf.

    - `required BrowserScrollToInput Input`

      Scroll an element into view.

      - `required BrowserRefTarget Target`

        An element on the page, identified by a reference from a prior `read_page` or
        `find` result. References are scoped to the tab that produced them and become
        stale after navigation or a major re-render.

      - `string? TabID`

        Tab to act on. Defaults to the active tab when omitted.

    - `JsonElement Name = "scroll_to"`

    - `JsonElement ToolsetName = "browser"`

  - `class BrowserScreenshotToolUseBlock`

    - `JsonElement Type = "tool_use"`

    - `required string ID`

      pattern: ^[a-zA-Z0-9_-]+$

    - `required ToolUseCaller Caller`

      Which party invoked the tool call: the model directly, or a server tool on its behalf.

    - `required BrowserScreenshotInput Input`

      Capture the current browser viewport.

      - `string? TabID`

        Tab to act on. Defaults to the active tab when omitted.

    - `JsonElement Name = "screenshot"`

    - `JsonElement ToolsetName = "browser"`

  - `class BrowserZoomToolUseBlock`

    - `JsonElement Type = "tool_use"`

    - `required string ID`

      pattern: ^[a-zA-Z0-9_-]+$

    - `required ToolUseCaller Caller`

      Which party invoked the tool call: the model directly, or a server tool on its behalf.

    - `required BrowserZoomInput Input`

      Return a cropped screenshot of the given viewport region, scaled up for closer
      inspection — useful for small icons, buttons, or text. Coordinates are in the
      same viewport-pixel space as a full screenshot.

      - `required IReadOnlyList<long> Region`

        [x0, y0, x1, y1] in viewport pixels.

        minItems: 4, maxItems: 4

      - `string? TabID`

        Tab to act on. Defaults to the active tab when omitted.

    - `JsonElement Name = "zoom"`

    - `JsonElement ToolsetName = "browser"`

  - `class BrowserLeftClickToolUseBlock`

    - `JsonElement Type = "tool_use"`

    - `required string ID`

      pattern: ^[a-zA-Z0-9_-]+$

    - `required ToolUseCaller Caller`

      Which party invoked the tool call: the model directly, or a server tool on its behalf.

    - `required BrowserLeftClickInput Input`

      Left-click at a viewport coordinate or on an element by reference.

      - `required BrowserClickTarget Target`

        Where to act: either a viewport coordinate or an element reference.

        - `class BrowserCoordinateTarget`

          A point in the browser viewport, in viewport pixels (the same frame as a
          full-viewport screenshot).

          - `JsonElement Type = "coordinate"`

          - `required long X`

            Pixels from the left edge of the viewport.

            minimum: 0

          - `required long Y`

            Pixels from the top edge of the viewport.

            minimum: 0

        - `class BrowserRefTarget`

          An element on the page, identified by a reference from a prior `read_page` or
          `find` result. References are scoped to the tab that produced them and become
          stale after navigation or a major re-render.

      - `string? Modifiers`

        Optional modifier key chord to hold for the duration of this action (e.g. "shift", "ctrl+shift", "cmd+alt").

      - `string? TabID`

        Tab to act on. Defaults to the active tab when omitted.

    - `JsonElement Name = "left_click"`

    - `JsonElement ToolsetName = "browser"`

  - `class BrowserRightClickToolUseBlock`

    - `JsonElement Type = "tool_use"`

    - `required string ID`

      pattern: ^[a-zA-Z0-9_-]+$

    - `required ToolUseCaller Caller`

      Which party invoked the tool call: the model directly, or a server tool on its behalf.

    - `required BrowserRightClickInput Input`

      Right-click at a viewport coordinate or on an element by reference.

      - `required BrowserClickTarget Target`

        Where to act: either a viewport coordinate or an element reference.

      - `string? Modifiers`

        Optional modifier key chord to hold for the duration of this action (e.g. "shift", "ctrl+shift", "cmd+alt").

      - `string? TabID`

        Tab to act on. Defaults to the active tab when omitted.

    - `JsonElement Name = "right_click"`

    - `JsonElement ToolsetName = "browser"`

  - `class BrowserMiddleClickToolUseBlock`

    - `JsonElement Type = "tool_use"`

    - `required string ID`

      pattern: ^[a-zA-Z0-9_-]+$

    - `required ToolUseCaller Caller`

      Which party invoked the tool call: the model directly, or a server tool on its behalf.

    - `required BrowserMiddleClickInput Input`

      Middle-click at a viewport coordinate or on an element by reference.

      - `required BrowserClickTarget Target`

        Where to act: either a viewport coordinate or an element reference.

      - `string? Modifiers`

        Optional modifier key chord to hold for the duration of this action (e.g. "shift", "ctrl+shift", "cmd+alt").

      - `string? TabID`

        Tab to act on. Defaults to the active tab when omitted.

    - `JsonElement Name = "middle_click"`

    - `JsonElement ToolsetName = "browser"`

  - `class BrowserDoubleClickToolUseBlock`

    - `JsonElement Type = "tool_use"`

    - `required string ID`

      pattern: ^[a-zA-Z0-9_-]+$

    - `required ToolUseCaller Caller`

      Which party invoked the tool call: the model directly, or a server tool on its behalf.

    - `required BrowserDoubleClickInput Input`

      Double left-click at a viewport coordinate or on an element by reference.

      - `required BrowserClickTarget Target`

        Where to act: either a viewport coordinate or an element reference.

      - `string? Modifiers`

        Optional modifier key chord to hold for the duration of this action (e.g. "shift", "ctrl+shift", "cmd+alt").

      - `string? TabID`

        Tab to act on. Defaults to the active tab when omitted.

    - `JsonElement Name = "double_click"`

    - `JsonElement ToolsetName = "browser"`

  - `class BrowserTripleClickToolUseBlock`

    - `JsonElement Type = "tool_use"`

    - `required string ID`

      pattern: ^[a-zA-Z0-9_-]+$

    - `required ToolUseCaller Caller`

      Which party invoked the tool call: the model directly, or a server tool on its behalf.

    - `required BrowserTripleClickInput Input`

      Triple left-click at a viewport coordinate or on an element by reference
      (typically selects a line or paragraph).

      - `required BrowserClickTarget Target`

        Where to act: either a viewport coordinate or an element reference.

      - `string? Modifiers`

        Optional modifier key chord to hold for the duration of this action (e.g. "shift", "ctrl+shift", "cmd+alt").

      - `string? TabID`

        Tab to act on. Defaults to the active tab when omitted.

    - `JsonElement Name = "triple_click"`

    - `JsonElement ToolsetName = "browser"`

  - `class BrowserHoverToolUseBlock`

    - `JsonElement Type = "tool_use"`

    - `required string ID`

      pattern: ^[a-zA-Z0-9_-]+$

    - `required ToolUseCaller Caller`

      Which party invoked the tool call: the model directly, or a server tool on its behalf.

    - `required BrowserHoverInput Input`

      Move the cursor to a coordinate or element without clicking.

      - `required BrowserClickTarget Target`

        Where to act: either a viewport coordinate or an element reference.

      - `string? TabID`

        Tab to act on. Defaults to the active tab when omitted.

    - `JsonElement Name = "hover"`

    - `JsonElement ToolsetName = "browser"`

  - `class BrowserLeftClickDragToolUseBlock`

    - `JsonElement Type = "tool_use"`

    - `required string ID`

      pattern: ^[a-zA-Z0-9_-]+$

    - `required ToolUseCaller Caller`

      Which party invoked the tool call: the model directly, or a server tool on its behalf.

    - `required BrowserLeftClickDragInput Input`

      Press at `from`, drag to `target`, release. Both must be coordinate targets.

      - `required BrowserCoordinateTarget From`

        A point in the browser viewport, in viewport pixels (the same frame as a
        full-viewport screenshot).

      - `required BrowserCoordinateTarget Target`

        A point in the browser viewport, in viewport pixels (the same frame as a
        full-viewport screenshot).

      - `string? TabID`

        Tab to act on. Defaults to the active tab when omitted.

    - `JsonElement Name = "left_click_drag"`

    - `JsonElement ToolsetName = "browser"`

  - `class BrowserLeftMouseDownToolUseBlock`

    - `JsonElement Type = "tool_use"`

    - `required string ID`

      pattern: ^[a-zA-Z0-9_-]+$

    - `required ToolUseCaller Caller`

      Which party invoked the tool call: the model directly, or a server tool on its behalf.

    - `required BrowserLeftMouseDownInput Input`

      Press and hold the left mouse button at a viewport coordinate. Pair with
      left_mouse_up to perform a custom drag.

      - `required BrowserCoordinateTarget Target`

        A point in the browser viewport, in viewport pixels (the same frame as a
        full-viewport screenshot).

      - `string? TabID`

        Tab to act on. Defaults to the active tab when omitted.

    - `JsonElement Name = "left_mouse_down"`

    - `JsonElement ToolsetName = "browser"`

  - `class BrowserLeftMouseUpToolUseBlock`

    - `JsonElement Type = "tool_use"`

    - `required string ID`

      pattern: ^[a-zA-Z0-9_-]+$

    - `required ToolUseCaller Caller`

      Which party invoked the tool call: the model directly, or a server tool on its behalf.

    - `required BrowserLeftMouseUpInput Input`

      Release the left mouse button at a viewport coordinate.

      - `required BrowserCoordinateTarget Target`

        A point in the browser viewport, in viewport pixels (the same frame as a
        full-viewport screenshot).

      - `string? TabID`

        Tab to act on. Defaults to the active tab when omitted.

    - `JsonElement Name = "left_mouse_up"`

    - `JsonElement ToolsetName = "browser"`

  - `class BrowserMouseMoveToolUseBlock`

    - `JsonElement Type = "tool_use"`

    - `required string ID`

      pattern: ^[a-zA-Z0-9_-]+$

    - `required ToolUseCaller Caller`

      Which party invoked the tool call: the model directly, or a server tool on its behalf.

    - `required BrowserMouseMoveInput Input`

      Move the pointer to a viewport coordinate without clicking.

      - `required BrowserCoordinateTarget Target`

        A point in the browser viewport, in viewport pixels (the same frame as a
        full-viewport screenshot).

      - `string? TabID`

        Tab to act on. Defaults to the active tab when omitted.

    - `JsonElement Name = "mouse_move"`

    - `JsonElement ToolsetName = "browser"`

  - `class BrowserScrollToolUseBlock`

    - `JsonElement Type = "tool_use"`

    - `required string ID`

      pattern: ^[a-zA-Z0-9_-]+$

    - `required ToolUseCaller Caller`

      Which party invoked the tool call: the model directly, or a server tool on its behalf.

    - `required BrowserScrollInput Input`

      Scroll at a viewport position. `target` must be a coordinate target.

      - `required BrowserScrollDirection ScrollDirection`

        - `Up("up")`

        - `Down("down")`

        - `Left("left")`

        - `Right("right")`

      - `required BrowserCoordinateTarget Target`

        A point in the browser viewport, in viewport pixels (the same frame as a
        full-viewport screenshot).

      - `long? ScrollAmount`

        Scroll-wheel notches (1–10). Default 3.

        minimum: 1, maximum: 10

      - `string? TabID`

        Tab to act on. Defaults to the active tab when omitted.

    - `JsonElement Name = "scroll"`

    - `JsonElement ToolsetName = "browser"`

  - `class BrowserTypeToolUseBlock`

    - `JsonElement Type = "tool_use"`

    - `required string ID`

      pattern: ^[a-zA-Z0-9_-]+$

    - `required ToolUseCaller Caller`

      Which party invoked the tool call: the model directly, or a server tool on its behalf.

    - `required BrowserTypeInput Input`

      Type a literal string at the current focus.

      - `required string Text`

        The text to type.

      - `string? TabID`

        Tab to act on. Defaults to the active tab when omitted.

    - `JsonElement Name = "type"`

    - `JsonElement ToolsetName = "browser"`

  - `class BrowserKeyToolUseBlock`

    - `JsonElement Type = "tool_use"`

    - `required string ID`

      pattern: ^[a-zA-Z0-9_-]+$

    - `required ToolUseCaller Caller`

      Which party invoked the tool call: the model directly, or a server tool on its behalf.

    - `required BrowserKeyInput Input`

      Press a key or key chord. Use "+" to combine modifiers with a key (e.g. "ctrl+a",
      "cmd+shift+p") and space to sequence presses (e.g. "Backspace Backspace Delete").
      Common names like "Return", "Tab", "Escape", "BackSpace" are supported.

      - `required string Text`

        The key, chord, or space-separated sequence to press.

      - `long? Repeat`

        Number of times to repeat. Default 1.

        minimum: 1, maximum: 100

      - `string? TabID`

        Tab to act on. Defaults to the active tab when omitted.

    - `JsonElement Name = "key"`

    - `JsonElement ToolsetName = "browser"`

  - `class BrowserHoldKeyToolUseBlock`

    - `JsonElement Type = "tool_use"`

    - `required string ID`

      pattern: ^[a-zA-Z0-9_-]+$

    - `required ToolUseCaller Caller`

      Which party invoked the tool call: the model directly, or a server tool on its behalf.

    - `required BrowserHoldKeyInput Input`

      Hold a key or key chord down for a duration, then release it. Uses the same key
      names and "+" chord syntax as the key action.

      - `required double Duration`

        Seconds to hold the key down (maximum 30).

        minimum: 0, maximum: 30

      - `required string Text`

        The key or chord to hold.

      - `string? TabID`

        Tab to act on. Defaults to the active tab when omitted.

    - `JsonElement Name = "hold_key"`

    - `JsonElement ToolsetName = "browser"`

  - `class BrowserWaitToolUseBlock`

    - `JsonElement Type = "tool_use"`

    - `required string ID`

      pattern: ^[a-zA-Z0-9_-]+$

    - `required ToolUseCaller Caller`

      Which party invoked the tool call: the model directly, or a server tool on its behalf.

    - `required BrowserWaitInput Input`

      Pause for the given duration.

      - `required double Duration`

        Seconds to wait (maximum 30).

        minimum: 0, maximum: 30

      - `string? TabID`

        Tab to act on. Defaults to the active tab when omitted.

    - `JsonElement Name = "wait"`

    - `JsonElement ToolsetName = "browser"`

  - `class BrowserJavascriptExecToolUseBlock`

    - `JsonElement Type = "tool_use"`

    - `required string ID`

      pattern: ^[a-zA-Z0-9_-]+$

    - `required ToolUseCaller Caller`

      Which party invoked the tool call: the model directly, or a server tool on its behalf.

    - `required BrowserJavascriptExecInput Input`

      Execute JavaScript in the page context and return the value of the last
      expression. The code runs with access to the DOM, `window`, and page variables.
      Write the expression you want evaluated — do NOT use `return`.

      - `required string Text`

        JavaScript to execute in the page context.

      - `string? TabID`

        Tab to act on. Defaults to the active tab when omitted.

    - `JsonElement Name = "javascript_exec"`

    - `JsonElement ToolsetName = "browser"`

### Browser Toolset 20260801

- `class BrowserToolset20260801`

  The browser toolset: a single `tools[]` entry (carrying no
  `name`) that declares the browser tool family. The model is served
  the family's tool with any members disabled via `configs` removed
  from its schema.

  - `JsonElement Type = "browser_toolset_20260801"`

  - `CacheControlEphemeral? CacheControl`

    Create a cache control breakpoint at this content block.

    - `JsonElement Type = "ephemeral"`

    - `Ttl Ttl`

      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`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching?sdk_languages=csharp) for details.

      - `Ttl5m("5m")`

      - `Ttl1h("1h")`

  - `BrowserToolsetConfigs? Configs`

    Sparse per-member overrides, keyed by member name. Absent, null, and {} are equivalent; a member's defaults apply wherever its key is absent.

    - `BrowserTypeConfig? Type`

      `type`'s config overrides.

      - `bool? DeferLoading`

        Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

      - `bool? Enabled`

        Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

    - `BrowserCloseTabConfig? CloseTab`

      `close_tab`'s config overrides.

      - `bool? DeferLoading`

        Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

      - `bool? Enabled`

        Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

    - `BrowserDoubleClickConfig? DoubleClick`

      `double_click`'s config overrides.

      - `bool? DeferLoading`

        Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

      - `bool? Enabled`

        Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

    - `BrowserFileUploadConfig? FileUpload`

      `file_upload`'s config overrides.

      - `bool? DeferLoading`

        Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

      - `bool? Enabled`

        Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

    - `BrowserFindConfig? Find`

      `find`'s config overrides.

      - `bool? DeferLoading`

        Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

      - `bool? Enabled`

        Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

    - `BrowserFormInputConfig? FormInput`

      `form_input`'s config overrides.

      - `bool? DeferLoading`

        Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

      - `bool? Enabled`

        Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

    - `BrowserGetPageTextConfig? GetPageText`

      `get_page_text`'s config overrides.

      - `bool? DeferLoading`

        Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

      - `bool? Enabled`

        Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

    - `BrowserHoldKeyConfig? HoldKey`

      `hold_key`'s config overrides.

      - `bool? DeferLoading`

        Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

      - `bool? Enabled`

        Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

    - `BrowserHoverConfig? Hover`

      `hover`'s config overrides.

      - `bool? DeferLoading`

        Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

      - `bool? Enabled`

        Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

    - `BrowserJavascriptExecConfig? JavascriptExec`

      `javascript_exec`'s config overrides.

      - `bool? DeferLoading`

        Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

      - `bool? Enabled`

        Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

    - `BrowserKeyConfig? Key`

      `key`'s config overrides.

      - `bool? DeferLoading`

        Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

      - `bool? Enabled`

        Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

    - `BrowserLeftClickConfig? LeftClick`

      `left_click`'s config overrides.

      - `bool? DeferLoading`

        Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

      - `bool? Enabled`

        Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

    - `BrowserLeftClickDragConfig? LeftClickDrag`

      `left_click_drag`'s config overrides.

      - `bool? DeferLoading`

        Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

      - `bool? Enabled`

        Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

    - `BrowserLeftMouseDownConfig? LeftMouseDown`

      `left_mouse_down`'s config overrides.

      - `bool? DeferLoading`

        Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

      - `bool? Enabled`

        Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

    - `BrowserLeftMouseUpConfig? LeftMouseUp`

      `left_mouse_up`'s config overrides.

      - `bool? DeferLoading`

        Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

      - `bool? Enabled`

        Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

    - `BrowserListTabsConfig? ListTabs`

      `list_tabs`'s config overrides.

      - `bool? DeferLoading`

        Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

      - `bool? Enabled`

        Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

    - `BrowserMiddleClickConfig? MiddleClick`

      `middle_click`'s config overrides.

      - `bool? DeferLoading`

        Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

      - `bool? Enabled`

        Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

    - `BrowserMouseMoveConfig? MouseMove`

      `mouse_move`'s config overrides.

      - `bool? DeferLoading`

        Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

      - `bool? Enabled`

        Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

    - `BrowserNavigateConfig? Navigate`

      `navigate`'s config overrides.

      - `bool? DeferLoading`

        Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

      - `bool? Enabled`

        Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

    - `BrowserNewTabConfig? NewTab`

      `new_tab`'s config overrides.

      - `bool? DeferLoading`

        Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

      - `bool? Enabled`

        Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

    - `BrowserReadConsoleConfig? ReadConsole`

      `read_console`'s config overrides.

      - `bool? DeferLoading`

        Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

      - `bool? Enabled`

        Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

    - `BrowserReadNetworkConfig? ReadNetwork`

      `read_network`'s config overrides.

      - `bool? DeferLoading`

        Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

      - `bool? Enabled`

        Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

    - `BrowserReadPageConfig? ReadPage`

      `read_page`'s config overrides.

      - `bool? DeferLoading`

        Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

      - `bool? Enabled`

        Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

    - `BrowserRightClickConfig? RightClick`

      `right_click`'s config overrides.

      - `bool? DeferLoading`

        Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

      - `bool? Enabled`

        Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

    - `BrowserScreenshotConfig? Screenshot`

      `screenshot`'s config overrides.

      - `bool? DeferLoading`

        Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

      - `bool? Enabled`

        Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

    - `BrowserScrollConfig? Scroll`

      `scroll`'s config overrides.

      - `bool? DeferLoading`

        Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

      - `bool? Enabled`

        Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

    - `BrowserScrollToConfig? ScrollTo`

      `scroll_to`'s config overrides.

      - `bool? DeferLoading`

        Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

      - `bool? Enabled`

        Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

    - `BrowserSwitchTabConfig? SwitchTab`

      `switch_tab`'s config overrides.

      - `bool? DeferLoading`

        Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

      - `bool? Enabled`

        Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

    - `BrowserTripleClickConfig? TripleClick`

      `triple_click`'s config overrides.

      - `bool? DeferLoading`

        Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

      - `bool? Enabled`

        Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

    - `BrowserWaitConfig? Wait`

      `wait`'s config overrides.

      - `bool? DeferLoading`

        Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

      - `bool? Enabled`

        Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

    - `BrowserZoomConfig? Zoom`

      `zoom`'s config overrides.

      - `bool? DeferLoading`

        Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

      - `bool? Enabled`

        Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

### Browser Toolset Configs

- `class BrowserToolsetConfigs`

  Per-member configuration for `browser_toolset_20260801`: one
  optional field per member tool, keyed by the member name — the same
  name the member's `tool_use` blocks carry. Every member is an
  accepted key, and a member's defaults apply wherever its key is
  absent. Unknown keys are rejected: the field set is this toolset
  version's complete member set.

  - `BrowserTypeConfig? Type`

    `type`'s config overrides.

    - `bool? DeferLoading`

      Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

    - `bool? Enabled`

      Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

  - `BrowserCloseTabConfig? CloseTab`

    `close_tab`'s config overrides.

    - `bool? DeferLoading`

      Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

    - `bool? Enabled`

      Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

  - `BrowserDoubleClickConfig? DoubleClick`

    `double_click`'s config overrides.

    - `bool? DeferLoading`

      Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

    - `bool? Enabled`

      Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

  - `BrowserFileUploadConfig? FileUpload`

    `file_upload`'s config overrides.

    - `bool? DeferLoading`

      Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

    - `bool? Enabled`

      Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

  - `BrowserFindConfig? Find`

    `find`'s config overrides.

    - `bool? DeferLoading`

      Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

    - `bool? Enabled`

      Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

  - `BrowserFormInputConfig? FormInput`

    `form_input`'s config overrides.

    - `bool? DeferLoading`

      Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

    - `bool? Enabled`

      Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

  - `BrowserGetPageTextConfig? GetPageText`

    `get_page_text`'s config overrides.

    - `bool? DeferLoading`

      Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

    - `bool? Enabled`

      Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

  - `BrowserHoldKeyConfig? HoldKey`

    `hold_key`'s config overrides.

    - `bool? DeferLoading`

      Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

    - `bool? Enabled`

      Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

  - `BrowserHoverConfig? Hover`

    `hover`'s config overrides.

    - `bool? DeferLoading`

      Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

    - `bool? Enabled`

      Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

  - `BrowserJavascriptExecConfig? JavascriptExec`

    `javascript_exec`'s config overrides.

    - `bool? DeferLoading`

      Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

    - `bool? Enabled`

      Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

  - `BrowserKeyConfig? Key`

    `key`'s config overrides.

    - `bool? DeferLoading`

      Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

    - `bool? Enabled`

      Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

  - `BrowserLeftClickConfig? LeftClick`

    `left_click`'s config overrides.

    - `bool? DeferLoading`

      Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

    - `bool? Enabled`

      Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

  - `BrowserLeftClickDragConfig? LeftClickDrag`

    `left_click_drag`'s config overrides.

    - `bool? DeferLoading`

      Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

    - `bool? Enabled`

      Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

  - `BrowserLeftMouseDownConfig? LeftMouseDown`

    `left_mouse_down`'s config overrides.

    - `bool? DeferLoading`

      Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

    - `bool? Enabled`

      Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

  - `BrowserLeftMouseUpConfig? LeftMouseUp`

    `left_mouse_up`'s config overrides.

    - `bool? DeferLoading`

      Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

    - `bool? Enabled`

      Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

  - `BrowserListTabsConfig? ListTabs`

    `list_tabs`'s config overrides.

    - `bool? DeferLoading`

      Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

    - `bool? Enabled`

      Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

  - `BrowserMiddleClickConfig? MiddleClick`

    `middle_click`'s config overrides.

    - `bool? DeferLoading`

      Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

    - `bool? Enabled`

      Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

  - `BrowserMouseMoveConfig? MouseMove`

    `mouse_move`'s config overrides.

    - `bool? DeferLoading`

      Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

    - `bool? Enabled`

      Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

  - `BrowserNavigateConfig? Navigate`

    `navigate`'s config overrides.

    - `bool? DeferLoading`

      Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

    - `bool? Enabled`

      Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

  - `BrowserNewTabConfig? NewTab`

    `new_tab`'s config overrides.

    - `bool? DeferLoading`

      Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

    - `bool? Enabled`

      Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

  - `BrowserReadConsoleConfig? ReadConsole`

    `read_console`'s config overrides.

    - `bool? DeferLoading`

      Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

    - `bool? Enabled`

      Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

  - `BrowserReadNetworkConfig? ReadNetwork`

    `read_network`'s config overrides.

    - `bool? DeferLoading`

      Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

    - `bool? Enabled`

      Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

  - `BrowserReadPageConfig? ReadPage`

    `read_page`'s config overrides.

    - `bool? DeferLoading`

      Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

    - `bool? Enabled`

      Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

  - `BrowserRightClickConfig? RightClick`

    `right_click`'s config overrides.

    - `bool? DeferLoading`

      Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

    - `bool? Enabled`

      Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

  - `BrowserScreenshotConfig? Screenshot`

    `screenshot`'s config overrides.

    - `bool? DeferLoading`

      Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

    - `bool? Enabled`

      Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

  - `BrowserScrollConfig? Scroll`

    `scroll`'s config overrides.

    - `bool? DeferLoading`

      Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

    - `bool? Enabled`

      Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

  - `BrowserScrollToConfig? ScrollTo`

    `scroll_to`'s config overrides.

    - `bool? DeferLoading`

      Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

    - `bool? Enabled`

      Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

  - `BrowserSwitchTabConfig? SwitchTab`

    `switch_tab`'s config overrides.

    - `bool? DeferLoading`

      Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

    - `bool? Enabled`

      Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

  - `BrowserTripleClickConfig? TripleClick`

    `triple_click`'s config overrides.

    - `bool? DeferLoading`

      Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

    - `bool? Enabled`

      Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

  - `BrowserWaitConfig? Wait`

    `wait`'s config overrides.

    - `bool? DeferLoading`

      Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

    - `bool? Enabled`

      Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

  - `BrowserZoomConfig? Zoom`

    `zoom`'s config overrides.

    - `bool? DeferLoading`

      Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

    - `bool? Enabled`

      Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

### Browser Triple Click Config

- `class BrowserTripleClickConfig`

  `triple_click`'s config overrides.

  - `bool? DeferLoading`

    Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

  - `bool? Enabled`

    Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

### Browser Triple Click Input

- `class BrowserTripleClickInput`

  Triple left-click at a viewport coordinate or on an element by reference
  (typically selects a line or paragraph).

  - `required BrowserClickTarget Target`

    Where to act: either a viewport coordinate or an element reference.

    - `class BrowserCoordinateTarget`

      A point in the browser viewport, in viewport pixels (the same frame as a
      full-viewport screenshot).

      - `JsonElement Type = "coordinate"`

      - `required long X`

        Pixels from the left edge of the viewport.

        minimum: 0

      - `required long Y`

        Pixels from the top edge of the viewport.

        minimum: 0

    - `class BrowserRefTarget`

      An element on the page, identified by a reference from a prior `read_page` or
      `find` result. References are scoped to the tab that produced them and become
      stale after navigation or a major re-render.

      - `JsonElement Type = "ref"`

      - `required string Ref`

        An element reference (e.g. "ref_7") returned by a prior `read_page` or `find` result.

  - `string? Modifiers`

    Optional modifier key chord to hold for the duration of this action (e.g. "shift", "ctrl+shift", "cmd+alt").

  - `string? TabID`

    Tab to act on. Defaults to the active tab when omitted.

### Browser Triple Click Tool Use Block

- `class BrowserTripleClickToolUseBlock`

  - `JsonElement Type = "tool_use"`

  - `required string ID`

    pattern: ^[a-zA-Z0-9_-]+$

  - `required ToolUseCaller Caller`

    Which party invoked the tool call: the model directly, or a server tool on its behalf.

    - `class DirectCaller`

      Tool invocation directly from the model.

      - `JsonElement Type = "direct"`

    - `class ServerToolCaller`

      Tool invocation generated by a server-side tool.

      - `JsonElement Type = "code_execution_20250825"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

    - `class ServerToolCaller20260120`

      - `JsonElement Type = "code_execution_20260120"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

  - `required BrowserTripleClickInput Input`

    Triple left-click at a viewport coordinate or on an element by reference
    (typically selects a line or paragraph).

    - `required BrowserClickTarget Target`

      Where to act: either a viewport coordinate or an element reference.

      - `class BrowserCoordinateTarget`

        A point in the browser viewport, in viewport pixels (the same frame as a
        full-viewport screenshot).

        - `JsonElement Type = "coordinate"`

        - `required long X`

          Pixels from the left edge of the viewport.

          minimum: 0

        - `required long Y`

          Pixels from the top edge of the viewport.

          minimum: 0

      - `class BrowserRefTarget`

        An element on the page, identified by a reference from a prior `read_page` or
        `find` result. References are scoped to the tab that produced them and become
        stale after navigation or a major re-render.

        - `JsonElement Type = "ref"`

        - `required string Ref`

          An element reference (e.g. "ref_7") returned by a prior `read_page` or `find` result.

    - `string? Modifiers`

      Optional modifier key chord to hold for the duration of this action (e.g. "shift", "ctrl+shift", "cmd+alt").

    - `string? TabID`

      Tab to act on. Defaults to the active tab when omitted.

  - `JsonElement Name = "triple_click"`

  - `JsonElement ToolsetName = "browser"`

### Browser Type Config

- `class BrowserTypeConfig`

  `type`'s config overrides.

  - `bool? DeferLoading`

    Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

  - `bool? Enabled`

    Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

### Browser Type Input

- `class BrowserTypeInput`

  Type a literal string at the current focus.

  - `required string Text`

    The text to type.

  - `string? TabID`

    Tab to act on. Defaults to the active tab when omitted.

### Browser Type Tool Use Block

- `class BrowserTypeToolUseBlock`

  - `JsonElement Type = "tool_use"`

  - `required string ID`

    pattern: ^[a-zA-Z0-9_-]+$

  - `required ToolUseCaller Caller`

    Which party invoked the tool call: the model directly, or a server tool on its behalf.

    - `class DirectCaller`

      Tool invocation directly from the model.

      - `JsonElement Type = "direct"`

    - `class ServerToolCaller`

      Tool invocation generated by a server-side tool.

      - `JsonElement Type = "code_execution_20250825"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

    - `class ServerToolCaller20260120`

      - `JsonElement Type = "code_execution_20260120"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

  - `required BrowserTypeInput Input`

    Type a literal string at the current focus.

    - `required string Text`

      The text to type.

    - `string? TabID`

      Tab to act on. Defaults to the active tab when omitted.

  - `JsonElement Name = "type"`

  - `JsonElement ToolsetName = "browser"`

### Browser Wait Config

- `class BrowserWaitConfig`

  `wait`'s config overrides.

  - `bool? DeferLoading`

    Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

  - `bool? Enabled`

    Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

### Browser Wait Input

- `class BrowserWaitInput`

  Pause for the given duration.

  - `required double Duration`

    Seconds to wait (maximum 30).

    minimum: 0, maximum: 30

  - `string? TabID`

    Tab to act on. Defaults to the active tab when omitted.

### Browser Wait Tool Use Block

- `class BrowserWaitToolUseBlock`

  - `JsonElement Type = "tool_use"`

  - `required string ID`

    pattern: ^[a-zA-Z0-9_-]+$

  - `required ToolUseCaller Caller`

    Which party invoked the tool call: the model directly, or a server tool on its behalf.

    - `class DirectCaller`

      Tool invocation directly from the model.

      - `JsonElement Type = "direct"`

    - `class ServerToolCaller`

      Tool invocation generated by a server-side tool.

      - `JsonElement Type = "code_execution_20250825"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

    - `class ServerToolCaller20260120`

      - `JsonElement Type = "code_execution_20260120"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

  - `required BrowserWaitInput Input`

    Pause for the given duration.

    - `required double Duration`

      Seconds to wait (maximum 30).

      minimum: 0, maximum: 30

    - `string? TabID`

      Tab to act on. Defaults to the active tab when omitted.

  - `JsonElement Name = "wait"`

  - `JsonElement ToolsetName = "browser"`

### Browser Zoom Config

- `class BrowserZoomConfig`

  `zoom`'s config overrides.

  - `bool? DeferLoading`

    Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

  - `bool? Enabled`

    Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

### Browser Zoom Input

- `class BrowserZoomInput`

  Return a cropped screenshot of the given viewport region, scaled up for closer
  inspection — useful for small icons, buttons, or text. Coordinates are in the
  same viewport-pixel space as a full screenshot.

  - `required IReadOnlyList<long> Region`

    [x0, y0, x1, y1] in viewport pixels.

    minItems: 4, maxItems: 4

  - `string? TabID`

    Tab to act on. Defaults to the active tab when omitted.

### Browser Zoom Tool Use Block

- `class BrowserZoomToolUseBlock`

  - `JsonElement Type = "tool_use"`

  - `required string ID`

    pattern: ^[a-zA-Z0-9_-]+$

  - `required ToolUseCaller Caller`

    Which party invoked the tool call: the model directly, or a server tool on its behalf.

    - `class DirectCaller`

      Tool invocation directly from the model.

      - `JsonElement Type = "direct"`

    - `class ServerToolCaller`

      Tool invocation generated by a server-side tool.

      - `JsonElement Type = "code_execution_20250825"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

    - `class ServerToolCaller20260120`

      - `JsonElement Type = "code_execution_20260120"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

  - `required BrowserZoomInput Input`

    Return a cropped screenshot of the given viewport region, scaled up for closer
    inspection — useful for small icons, buttons, or text. Coordinates are in the
    same viewport-pixel space as a full screenshot.

    - `required IReadOnlyList<long> Region`

      [x0, y0, x1, y1] in viewport pixels.

      minItems: 4, maxItems: 4

    - `string? TabID`

      Tab to act on. Defaults to the active tab when omitted.

  - `JsonElement Name = "zoom"`

  - `JsonElement ToolsetName = "browser"`

### Cache Control Ephemeral

- `class CacheControlEphemeral`

  - `JsonElement Type = "ephemeral"`

  - `Ttl Ttl`

    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`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching?sdk_languages=csharp) for details.

    - `Ttl5m("5m")`

    - `Ttl1h("1h")`

### Cache Creation

- `class CacheCreation`

  - `required long Ephemeral1hInputTokens`

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

    minimum: 0

  - `required long Ephemeral5mInputTokens`

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

    minimum: 0

### Cache Miss Messages Changed

- `class CacheMissMessagesChanged`

  A `cache_miss_reason` for a request whose `messages` differ from the previous request's in an earlier entry, instead of only having entries appended. The `model`, `system`, and `tools` match.

  See the [cache diagnostics guide](https://platform.claude.com/docs/en/build-with-claude/cache-diagnostics?sdk_languages=csharp#cache-miss-reason-types) to learn what to change for each reason.

  - `JsonElement Type = "messages_changed"`

  - `required long CacheMissedInputTokens`

    Approximate number of input tokens that would have been read from cache had the prefix matched the previous request.

### Cache Miss Model Changed

- `class CacheMissModelChanged`

  A `cache_miss_reason` for a request whose `model` or `speed` differs from the previous request's.

  See the [cache diagnostics guide](https://platform.claude.com/docs/en/build-with-claude/cache-diagnostics?sdk_languages=csharp#cache-miss-reason-types) to learn what to change for each reason.

  - `JsonElement Type = "model_changed"`

  - `required long CacheMissedInputTokens`

    Approximate number of input tokens that would have been read from cache had the prefix matched the previous request.

### Cache Miss Previous Message Not Found

- `class CacheMissPreviousMessageNotFound`

  A `cache_miss_reason` for when the API doesn't have a stored record of the request that `diagnostics.previous_message_id` references.

  This doesn't mean that this request changed.

  See the [cache diagnostics guide](https://platform.claude.com/docs/en/build-with-claude/cache-diagnostics?sdk_languages=csharp#cache-miss-reason-types) to learn what to change for each reason.

  - `JsonElement Type = "previous_message_not_found"`

### Cache Miss Reason

- `class CacheMissReason: union`

  - `class CacheMissModelChanged`

    A `cache_miss_reason` for a request whose `model` or `speed` differs from the previous request's.

    See the [cache diagnostics guide](https://platform.claude.com/docs/en/build-with-claude/cache-diagnostics?sdk_languages=csharp#cache-miss-reason-types) to learn what to change for each reason.

    - `JsonElement Type = "model_changed"`

    - `required long CacheMissedInputTokens`

      Approximate number of input tokens that would have been read from cache had the prefix matched the previous request.

  - `class CacheMissSystemChanged`

    A `cache_miss_reason` for a request whose `system` differs from the previous request's.

    See the [cache diagnostics guide](https://platform.claude.com/docs/en/build-with-claude/cache-diagnostics?sdk_languages=csharp#cache-miss-reason-types) to learn what to change for each reason.

    - `JsonElement Type = "system_changed"`

    - `required long CacheMissedInputTokens`

      Approximate number of input tokens that would have been read from cache had the prefix matched the previous request.

  - `class CacheMissToolsChanged`

    A `cache_miss_reason` for a request whose `tools` differ from the previous request's, for example because tools were added, removed, or reordered.

    See the [cache diagnostics guide](https://platform.claude.com/docs/en/build-with-claude/cache-diagnostics?sdk_languages=csharp#cache-miss-reason-types) to learn what to change for each reason.

    - `JsonElement Type = "tools_changed"`

    - `required long CacheMissedInputTokens`

      Approximate number of input tokens that would have been read from cache had the prefix matched the previous request.

  - `class CacheMissMessagesChanged`

    A `cache_miss_reason` for a request whose `messages` differ from the previous request's in an earlier entry, instead of only having entries appended. The `model`, `system`, and `tools` match.

    See the [cache diagnostics guide](https://platform.claude.com/docs/en/build-with-claude/cache-diagnostics?sdk_languages=csharp#cache-miss-reason-types) to learn what to change for each reason.

    - `JsonElement Type = "messages_changed"`

    - `required long CacheMissedInputTokens`

      Approximate number of input tokens that would have been read from cache had the prefix matched the previous request.

  - `class CacheMissPreviousMessageNotFound`

    A `cache_miss_reason` for when the API doesn't have a stored record of the request that `diagnostics.previous_message_id` references.

    This doesn't mean that this request changed.

    See the [cache diagnostics guide](https://platform.claude.com/docs/en/build-with-claude/cache-diagnostics?sdk_languages=csharp#cache-miss-reason-types) to learn what to change for each reason.

    - `JsonElement Type = "previous_message_not_found"`

  - `class CacheMissUnavailable`

    A `cache_miss_reason` for when the API can't give a diagnosis. The request itself was processed normally.

    This includes a request whose `model`, `system`, and `tools` match the previous request's but whose other prompt-affecting parameters, such as `thinking` or `tool_choice`, differ.

    See the [cache diagnostics guide](https://platform.claude.com/docs/en/build-with-claude/cache-diagnostics?sdk_languages=csharp#cache-miss-reason-types) to learn what to change for each reason.

    - `JsonElement Type = "unavailable"`

### Cache Miss System Changed

- `class CacheMissSystemChanged`

  A `cache_miss_reason` for a request whose `system` differs from the previous request's.

  See the [cache diagnostics guide](https://platform.claude.com/docs/en/build-with-claude/cache-diagnostics?sdk_languages=csharp#cache-miss-reason-types) to learn what to change for each reason.

  - `JsonElement Type = "system_changed"`

  - `required long CacheMissedInputTokens`

    Approximate number of input tokens that would have been read from cache had the prefix matched the previous request.

### Cache Miss Tools Changed

- `class CacheMissToolsChanged`

  A `cache_miss_reason` for a request whose `tools` differ from the previous request's, for example because tools were added, removed, or reordered.

  See the [cache diagnostics guide](https://platform.claude.com/docs/en/build-with-claude/cache-diagnostics?sdk_languages=csharp#cache-miss-reason-types) to learn what to change for each reason.

  - `JsonElement Type = "tools_changed"`

  - `required long CacheMissedInputTokens`

    Approximate number of input tokens that would have been read from cache had the prefix matched the previous request.

### Cache Miss Unavailable

- `class CacheMissUnavailable`

  A `cache_miss_reason` for when the API can't give a diagnosis. The request itself was processed normally.

  This includes a request whose `model`, `system`, and `tools` match the previous request's but whose other prompt-affecting parameters, such as `thinking` or `tool_choice`, differ.

  See the [cache diagnostics guide](https://platform.claude.com/docs/en/build-with-claude/cache-diagnostics?sdk_languages=csharp#cache-miss-reason-types) to learn what to change for each reason.

  - `JsonElement Type = "unavailable"`

### Citation Char Location

- `class CitationCharLocation`

  - `JsonElement Type = "char_location"`

  - `required string CitedText`

  - `required long DocumentIndex`

    minimum: 0

  - `required string? DocumentTitle`

  - `required long EndCharIndex`

  - `required string? FileID`

  - `required long StartCharIndex`

    minimum: 0

### Citation Char Location Param

- `class CitationCharLocationParam`

  - `JsonElement Type = "char_location"`

  - `required string CitedText`

  - `required long DocumentIndex`

    minimum: 0

  - `required string? DocumentTitle`

    minLength: 1, maxLength: 500

  - `required long EndCharIndex`

  - `required long StartCharIndex`

    minimum: 0

### Citation Content Block Location

- `class CitationContentBlockLocation`

  - `JsonElement Type = "content_block_location"`

  - `required string CitedText`

    The full text of the cited block range, concatenated.

    Always equals the contents of `content[start_block_index:end_block_index]` joined together. The text block is the minimal citable unit; this field is never a substring of a single block. Not counted toward output tokens, and not counted toward input tokens when sent back in subsequent turns.

  - `required long DocumentIndex`

    minimum: 0

  - `required string? DocumentTitle`

  - `required long EndBlockIndex`

    Exclusive 0-based end index of the cited block range in the source's `content` array.

    Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`.

  - `required string? FileID`

  - `required long StartBlockIndex`

    0-based index of the first cited block in the source's `content` array.

    minimum: 0

### Citation Content Block Location Param

- `class CitationContentBlockLocationParam`

  - `JsonElement Type = "content_block_location"`

  - `required string CitedText`

    The full text of the cited block range, concatenated.

    Always equals the contents of `content[start_block_index:end_block_index]` joined together. The text block is the minimal citable unit; this field is never a substring of a single block. Not counted toward output tokens, and not counted toward input tokens when sent back in subsequent turns.

  - `required long DocumentIndex`

    minimum: 0

  - `required string? DocumentTitle`

    minLength: 1, maxLength: 500

  - `required long EndBlockIndex`

    Exclusive 0-based end index of the cited block range in the source's `content` array.

    Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`.

  - `required long StartBlockIndex`

    0-based index of the first cited block in the source's `content` array.

    minimum: 0

### Citation Page Location

- `class CitationPageLocation`

  - `JsonElement Type = "page_location"`

  - `required string CitedText`

  - `required long DocumentIndex`

    minimum: 0

  - `required string? DocumentTitle`

  - `required long EndPageNumber`

  - `required string? FileID`

  - `required long StartPageNumber`

    minimum: 1

### Citation Page Location Param

- `class CitationPageLocationParam`

  - `JsonElement Type = "page_location"`

  - `required string CitedText`

  - `required long DocumentIndex`

    minimum: 0

  - `required string? DocumentTitle`

    minLength: 1, maxLength: 500

  - `required long EndPageNumber`

  - `required long StartPageNumber`

    minimum: 1

### Citation Search Result Location Param

- `class CitationSearchResultLocationParam`

  - `JsonElement Type = "search_result_location"`

  - `required string CitedText`

    The full text of the cited block range, concatenated.

    Always equals the contents of `content[start_block_index:end_block_index]` joined together. The text block is the minimal citable unit; this field is never a substring of a single block. Not counted toward output tokens, and not counted toward input tokens when sent back in subsequent turns.

  - `required long EndBlockIndex`

    Exclusive 0-based end index of the cited block range in the source's `content` array.

    Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`.

  - `required long SearchResultIndex`

    0-based index of the cited search result among all `search_result` content blocks in the request, in the order they appear across messages and tool results.

    Counted separately from `document_index`; server-side web search results are not included in this count.

    minimum: 0

  - `required string Source`

  - `required long StartBlockIndex`

    0-based index of the first cited block in the source's `content` array.

    minimum: 0

  - `required string? Title`

### Citation Web Search Result Location Param

- `class CitationWebSearchResultLocationParam`

  - `JsonElement Type = "web_search_result_location"`

  - `required string CitedText`

  - `required string EncryptedIndex`

  - `required string? Title`

    minLength: 1, maxLength: 512

  - `required string Url`

    minLength: 1

### Citations Config

- `class CitationsConfig`

  - `required bool Enabled`

### Citations Config Param

- `class CitationsConfigParam`

  - `bool Enabled`

### Citations Delta

- `class CitationsDelta`

  - `JsonElement Type = "citations_delta"`

  - `required Citation Citation`

    - `class CitationCharLocation`

      - `JsonElement Type = "char_location"`

      - `required string CitedText`

      - `required long DocumentIndex`

        minimum: 0

      - `required string? DocumentTitle`

      - `required long EndCharIndex`

      - `required string? FileID`

      - `required long StartCharIndex`

        minimum: 0

    - `class CitationPageLocation`

      - `JsonElement Type = "page_location"`

      - `required string CitedText`

      - `required long DocumentIndex`

        minimum: 0

      - `required string? DocumentTitle`

      - `required long EndPageNumber`

      - `required string? FileID`

      - `required long StartPageNumber`

        minimum: 1

    - `class CitationContentBlockLocation`

      - `JsonElement Type = "content_block_location"`

      - `required string CitedText`

        The full text of the cited block range, concatenated.

        Always equals the contents of `content[start_block_index:end_block_index]` joined together. The text block is the minimal citable unit; this field is never a substring of a single block. Not counted toward output tokens, and not counted toward input tokens when sent back in subsequent turns.

      - `required long DocumentIndex`

        minimum: 0

      - `required string? DocumentTitle`

      - `required long EndBlockIndex`

        Exclusive 0-based end index of the cited block range in the source's `content` array.

        Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`.

      - `required string? FileID`

      - `required long StartBlockIndex`

        0-based index of the first cited block in the source's `content` array.

        minimum: 0

    - `class CitationsWebSearchResultLocation`

      - `JsonElement Type = "web_search_result_location"`

      - `required string CitedText`

      - `required string EncryptedIndex`

      - `required string? Title`

        maxLength: 512

      - `required string Url`

    - `class CitationsSearchResultLocation`

      - `JsonElement Type = "search_result_location"`

      - `required string CitedText`

        The full text of the cited block range, concatenated.

        Always equals the contents of `content[start_block_index:end_block_index]` joined together. The text block is the minimal citable unit; this field is never a substring of a single block. Not counted toward output tokens, and not counted toward input tokens when sent back in subsequent turns.

      - `required long EndBlockIndex`

        Exclusive 0-based end index of the cited block range in the source's `content` array.

        Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`.

      - `required long SearchResultIndex`

        0-based index of the cited search result among all `search_result` content blocks in the request, in the order they appear across messages and tool results.

        Counted separately from `document_index`; server-side web search results are not included in this count.

        minimum: 0

      - `required string Source`

      - `required long StartBlockIndex`

        0-based index of the first cited block in the source's `content` array.

        minimum: 0

      - `required string? Title`

### Citations Search Result Location

- `class CitationsSearchResultLocation`

  - `JsonElement Type = "search_result_location"`

  - `required string CitedText`

    The full text of the cited block range, concatenated.

    Always equals the contents of `content[start_block_index:end_block_index]` joined together. The text block is the minimal citable unit; this field is never a substring of a single block. Not counted toward output tokens, and not counted toward input tokens when sent back in subsequent turns.

  - `required long EndBlockIndex`

    Exclusive 0-based end index of the cited block range in the source's `content` array.

    Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`.

  - `required long SearchResultIndex`

    0-based index of the cited search result among all `search_result` content blocks in the request, in the order they appear across messages and tool results.

    Counted separately from `document_index`; server-side web search results are not included in this count.

    minimum: 0

  - `required string Source`

  - `required long StartBlockIndex`

    0-based index of the first cited block in the source's `content` array.

    minimum: 0

  - `required string? Title`

### Citations Web Search Result Location

- `class CitationsWebSearchResultLocation`

  - `JsonElement Type = "web_search_result_location"`

  - `required string CitedText`

  - `required string EncryptedIndex`

  - `required string? Title`

    maxLength: 512

  - `required string Url`

### Code Execution Output Block

- `class CodeExecutionOutputBlock`

  - `JsonElement Type = "code_execution_output"`

  - `required string FileID`

### Code Execution Output Block Param

- `class CodeExecutionOutputBlockParam`

  - `JsonElement Type = "code_execution_output"`

  - `required string FileID`

### Code Execution Result Block

- `class CodeExecutionResultBlock`

  - `JsonElement Type = "code_execution_result"`

  - `required IReadOnlyList<CodeExecutionOutputBlock> Content`

    - `JsonElement Type = "code_execution_output"`

    - `required string FileID`

  - `required long ReturnCode`

  - `required string Stderr`

  - `required string Stdout`

### Code Execution Result Block Param

- `class CodeExecutionResultBlockParam`

  - `JsonElement Type = "code_execution_result"`

  - `required IReadOnlyList<CodeExecutionOutputBlockParam> Content`

    - `JsonElement Type = "code_execution_output"`

    - `required string FileID`

  - `required long ReturnCode`

  - `required string Stderr`

  - `required string Stdout`

### Code Execution Tool 20250522

- `class CodeExecutionTool20250522`

  - `JsonElement Type = "code_execution_20250522"`

  - `JsonElement Name = "code_execution"`

    Name of the tool.

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

  - `IReadOnlyList<AllowedCaller> AllowedCallers`

    - `Direct("direct")`

    - `CodeExecution20250825("code_execution_20250825")`

    - `CodeExecution20260120("code_execution_20260120")`

    - `CodeExecution20260521("code_execution_20260521")`

  - `CacheControlEphemeral? CacheControl`

    Create a cache control breakpoint at this content block.

    - `JsonElement Type = "ephemeral"`

    - `Ttl Ttl`

      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`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching?sdk_languages=csharp) for details.

      - `Ttl5m("5m")`

      - `Ttl1h("1h")`

  - `bool DeferLoading`

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

  - `bool Strict`

    When true, guarantees schema validation on tool names and inputs

### Code Execution Tool 20250825

- `class CodeExecutionTool20250825`

  - `JsonElement Type = "code_execution_20250825"`

  - `JsonElement Name = "code_execution"`

    Name of the tool.

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

  - `IReadOnlyList<AllowedCaller> AllowedCallers`

    - `Direct("direct")`

    - `CodeExecution20250825("code_execution_20250825")`

    - `CodeExecution20260120("code_execution_20260120")`

    - `CodeExecution20260521("code_execution_20260521")`

  - `CacheControlEphemeral? CacheControl`

    Create a cache control breakpoint at this content block.

    - `JsonElement Type = "ephemeral"`

    - `Ttl Ttl`

      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`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching?sdk_languages=csharp) for details.

      - `Ttl5m("5m")`

      - `Ttl1h("1h")`

  - `bool DeferLoading`

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

  - `bool Strict`

    When true, guarantees schema validation on tool names and inputs

### Code Execution Tool 20260120

- `class CodeExecutionTool20260120`

  A `tools` entry for the code execution tool, version `code_execution_20260120`. It adds REPL state persistence to version `code_execution_20250825`.

  REPL state persistence applies with programmatic tool calling. With it, the Python interpreter state, such as variable bindings, persists across requests that reuse the container.

  See the [code execution tool guide](https://platform.claude.com/docs/en/agents-and-tools/tool-use/code-execution-tool?sdk_languages=csharp#tool-versions) to learn what each tool version adds.

  - `JsonElement Type = "code_execution_20260120"`

  - `JsonElement Name = "code_execution"`

    Name of the tool.

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

  - `IReadOnlyList<AllowedCaller> AllowedCallers`

    - `Direct("direct")`

    - `CodeExecution20250825("code_execution_20250825")`

    - `CodeExecution20260120("code_execution_20260120")`

    - `CodeExecution20260521("code_execution_20260521")`

  - `CacheControlEphemeral? CacheControl`

    Create a cache control breakpoint at this content block.

    - `JsonElement Type = "ephemeral"`

    - `Ttl Ttl`

      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`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching?sdk_languages=csharp) for details.

      - `Ttl5m("5m")`

      - `Ttl1h("1h")`

  - `bool DeferLoading`

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

  - `bool Strict`

    When true, guarantees schema validation on tool names and inputs

### Code Execution Tool 20260521

- `class CodeExecutionTool20260521`

  Code execution tool with REPL state persistence.

  - `JsonElement Type = "code_execution_20260521"`

  - `JsonElement Name = "code_execution"`

    Name of the tool.

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

  - `IReadOnlyList<AllowedCaller> AllowedCallers`

    - `Direct("direct")`

    - `CodeExecution20250825("code_execution_20250825")`

    - `CodeExecution20260120("code_execution_20260120")`

    - `CodeExecution20260521("code_execution_20260521")`

  - `CacheControlEphemeral? CacheControl`

    Create a cache control breakpoint at this content block.

    - `JsonElement Type = "ephemeral"`

    - `Ttl Ttl`

      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`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching?sdk_languages=csharp) for details.

      - `Ttl5m("5m")`

      - `Ttl1h("1h")`

  - `bool DeferLoading`

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

  - `bool Strict`

    When true, guarantees schema validation on tool names and inputs

### Code Execution Tool Result Block

- `class CodeExecutionToolResultBlock`

  - `JsonElement Type = "code_execution_tool_result"`

  - `required CodeExecutionToolResultBlockContent Content`

    - `class CodeExecutionToolResultError`

      - `JsonElement Type = "code_execution_tool_result_error"`

      - `required CodeExecutionToolResultErrorCode ErrorCode`

        - `InvalidToolInput("invalid_tool_input")`

        - `Unavailable("unavailable")`

        - `TooManyRequests("too_many_requests")`

        - `ExecutionTimeExceeded("execution_time_exceeded")`

    - `class CodeExecutionResultBlock`

      - `JsonElement Type = "code_execution_result"`

      - `required IReadOnlyList<CodeExecutionOutputBlock> Content`

        - `JsonElement Type = "code_execution_output"`

        - `required string FileID`

      - `required long ReturnCode`

      - `required string Stderr`

      - `required string Stdout`

    - `class EncryptedCodeExecutionResultBlock`

      The output and exit code of Python code that Claude ran with the code execution tool, with standard output in encrypted form.

      The API returns this block in place of `code_execution_result` when the code called the web search tool.

      See the [programmatic tool calling guide](https://platform.claude.com/docs/en/agents-and-tools/tool-use/programmatic-tool-calling?sdk_languages=csharp) to learn more about programmatic tool calling.

      - `JsonElement Type = "encrypted_code_execution_result"`

      - `required IReadOnlyList<CodeExecutionOutputBlock> Content`

        - `JsonElement Type = "code_execution_output"`

        - `required string FileID`

      - `required string EncryptedStdout`

      - `required long ReturnCode`

      - `required string Stderr`

  - `required string ToolUseID`

    pattern: ^srvtoolu_[a-zA-Z0-9_]+$

### Code Execution Tool Result Block Content

- `class CodeExecutionToolResultBlockContent: union`

  - `class CodeExecutionToolResultError`

    - `JsonElement Type = "code_execution_tool_result_error"`

    - `required CodeExecutionToolResultErrorCode ErrorCode`

      - `InvalidToolInput("invalid_tool_input")`

      - `Unavailable("unavailable")`

      - `TooManyRequests("too_many_requests")`

      - `ExecutionTimeExceeded("execution_time_exceeded")`

  - `class CodeExecutionResultBlock`

    - `JsonElement Type = "code_execution_result"`

    - `required IReadOnlyList<CodeExecutionOutputBlock> Content`

      - `JsonElement Type = "code_execution_output"`

      - `required string FileID`

    - `required long ReturnCode`

    - `required string Stderr`

    - `required string Stdout`

  - `class EncryptedCodeExecutionResultBlock`

    The output and exit code of Python code that Claude ran with the code execution tool, with standard output in encrypted form.

    The API returns this block in place of `code_execution_result` when the code called the web search tool.

    See the [programmatic tool calling guide](https://platform.claude.com/docs/en/agents-and-tools/tool-use/programmatic-tool-calling?sdk_languages=csharp) to learn more about programmatic tool calling.

    - `JsonElement Type = "encrypted_code_execution_result"`

    - `required IReadOnlyList<CodeExecutionOutputBlock> Content`

      - `JsonElement Type = "code_execution_output"`

      - `required string FileID`

    - `required string EncryptedStdout`

    - `required long ReturnCode`

    - `required string Stderr`

### Code Execution Tool Result Block Param

- `class CodeExecutionToolResultBlockParam`

  - `JsonElement Type = "code_execution_tool_result"`

  - `required CodeExecutionToolResultBlockParamContent Content`

    - `class CodeExecutionToolResultErrorParam`

      - `JsonElement Type = "code_execution_tool_result_error"`

      - `required CodeExecutionToolResultErrorCode ErrorCode`

        - `InvalidToolInput("invalid_tool_input")`

        - `Unavailable("unavailable")`

        - `TooManyRequests("too_many_requests")`

        - `ExecutionTimeExceeded("execution_time_exceeded")`

    - `class CodeExecutionResultBlockParam`

      - `JsonElement Type = "code_execution_result"`

      - `required IReadOnlyList<CodeExecutionOutputBlockParam> Content`

        - `JsonElement Type = "code_execution_output"`

        - `required string FileID`

      - `required long ReturnCode`

      - `required string Stderr`

      - `required string Stdout`

    - `class EncryptedCodeExecutionResultBlockParam`

      The output and exit code of Python code that Claude ran with the code execution tool, with standard output in encrypted form, sent back in a later request.

      - `JsonElement Type = "encrypted_code_execution_result"`

      - `required IReadOnlyList<CodeExecutionOutputBlockParam> Content`

        - `JsonElement Type = "code_execution_output"`

        - `required string FileID`

      - `required string EncryptedStdout`

      - `required long ReturnCode`

      - `required string Stderr`

  - `required string ToolUseID`

    pattern: ^srvtoolu_[a-zA-Z0-9_]+$

  - `CacheControlEphemeral? CacheControl`

    Create a cache control breakpoint at this content block.

    - `JsonElement Type = "ephemeral"`

    - `Ttl Ttl`

      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`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching?sdk_languages=csharp) for details.

      - `Ttl5m("5m")`

      - `Ttl1h("1h")`

### Code Execution Tool Result Block Param Content

- `class CodeExecutionToolResultBlockParamContent: union`

  - `class CodeExecutionToolResultErrorParam`

    - `JsonElement Type = "code_execution_tool_result_error"`

    - `required CodeExecutionToolResultErrorCode ErrorCode`

      - `InvalidToolInput("invalid_tool_input")`

      - `Unavailable("unavailable")`

      - `TooManyRequests("too_many_requests")`

      - `ExecutionTimeExceeded("execution_time_exceeded")`

  - `class CodeExecutionResultBlockParam`

    - `JsonElement Type = "code_execution_result"`

    - `required IReadOnlyList<CodeExecutionOutputBlockParam> Content`

      - `JsonElement Type = "code_execution_output"`

      - `required string FileID`

    - `required long ReturnCode`

    - `required string Stderr`

    - `required string Stdout`

  - `class EncryptedCodeExecutionResultBlockParam`

    The output and exit code of Python code that Claude ran with the code execution tool, with standard output in encrypted form, sent back in a later request.

    - `JsonElement Type = "encrypted_code_execution_result"`

    - `required IReadOnlyList<CodeExecutionOutputBlockParam> Content`

      - `JsonElement Type = "code_execution_output"`

      - `required string FileID`

    - `required string EncryptedStdout`

    - `required long ReturnCode`

    - `required string Stderr`

### Code Execution Tool Result Error

- `class CodeExecutionToolResultError`

  - `JsonElement Type = "code_execution_tool_result_error"`

  - `required CodeExecutionToolResultErrorCode ErrorCode`

    - `InvalidToolInput("invalid_tool_input")`

    - `Unavailable("unavailable")`

    - `TooManyRequests("too_many_requests")`

    - `ExecutionTimeExceeded("execution_time_exceeded")`

### Code Execution Tool Result Error Code

- `enum CodeExecutionToolResultErrorCode`

  - `InvalidToolInput("invalid_tool_input")`

  - `Unavailable("unavailable")`

  - `TooManyRequests("too_many_requests")`

  - `ExecutionTimeExceeded("execution_time_exceeded")`

### Code Execution Tool Result Error Param

- `class CodeExecutionToolResultErrorParam`

  - `JsonElement Type = "code_execution_tool_result_error"`

  - `required CodeExecutionToolResultErrorCode ErrorCode`

    - `InvalidToolInput("invalid_tool_input")`

    - `Unavailable("unavailable")`

    - `TooManyRequests("too_many_requests")`

    - `ExecutionTimeExceeded("execution_time_exceeded")`

### Computer Cursor Position Config

- `class ComputerCursorPositionConfig`

  `cursor_position`'s config overrides.

  - `bool? DeferLoading`

    Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

  - `bool? Enabled`

    Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

### Computer Cursor Position Input

- `class ComputerCursorPositionInput:`

  Get the current (x, y) pixel coordinate of the cursor.

### Computer Cursor Position Tool Use Block

- `class ComputerCursorPositionToolUseBlock`

  - `JsonElement Type = "tool_use"`

  - `required string ID`

    pattern: ^[a-zA-Z0-9_-]+$

  - `required ToolUseCaller Caller`

    Which party invoked the tool call: the model directly, or a server tool on its behalf.

    - `class DirectCaller`

      Tool invocation directly from the model.

      - `JsonElement Type = "direct"`

    - `class ServerToolCaller`

      Tool invocation generated by a server-side tool.

      - `JsonElement Type = "code_execution_20250825"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

    - `class ServerToolCaller20260120`

      - `JsonElement Type = "code_execution_20260120"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

  - `required ComputerCursorPositionInput Input`

    Get the current (x, y) pixel coordinate of the cursor.

  - `JsonElement Name = "cursor_position"`

  - `JsonElement ToolsetName = "computer"`

### Computer Double Click Config

- `class ComputerDoubleClickConfig`

  `double_click`'s config overrides.

  - `bool? DeferLoading`

    Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

  - `bool? Enabled`

    Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

### Computer Double Click Input

- `class ComputerDoubleClickInput`

  Double-click the left mouse button at the specified (x, y) pixel coordinate, or
  the current cursor position if `coordinate` is omitted.

  - `IReadOnlyList<long>? Coordinate`

    (x, y): x pixels from the left edge, y pixels from the top edge.

    minItems: 2, maxItems: 2

  - `string? Text`

    Optional key combination to hold down during this action (e.g. "ctrl", "shift", "ctrl+shift").

### Computer Double Click Tool Use Block

- `class ComputerDoubleClickToolUseBlock`

  - `JsonElement Type = "tool_use"`

  - `required string ID`

    pattern: ^[a-zA-Z0-9_-]+$

  - `required ToolUseCaller Caller`

    Which party invoked the tool call: the model directly, or a server tool on its behalf.

    - `class DirectCaller`

      Tool invocation directly from the model.

      - `JsonElement Type = "direct"`

    - `class ServerToolCaller`

      Tool invocation generated by a server-side tool.

      - `JsonElement Type = "code_execution_20250825"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

    - `class ServerToolCaller20260120`

      - `JsonElement Type = "code_execution_20260120"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

  - `required ComputerDoubleClickInput Input`

    Double-click the left mouse button at the specified (x, y) pixel coordinate, or
    the current cursor position if `coordinate` is omitted.

    - `IReadOnlyList<long>? Coordinate`

      (x, y): x pixels from the left edge, y pixels from the top edge.

      minItems: 2, maxItems: 2

    - `string? Text`

      Optional key combination to hold down during this action (e.g. "ctrl", "shift", "ctrl+shift").

  - `JsonElement Name = "double_click"`

  - `JsonElement ToolsetName = "computer"`

### Computer Hold Key Config

- `class ComputerHoldKeyConfig`

  `hold_key`'s config overrides.

  - `bool? DeferLoading`

    Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

  - `bool? Enabled`

    Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

### Computer Hold Key Input

- `class ComputerHoldKeyInput`

  Hold down a key or key-combination for a specified duration. Uses the same key
  syntax as `key`.

  - `required long Duration`

    Duration to hold the key, in seconds.

    maximum: 300

  - `required string Text`

    The key or key-combination to hold.

### Computer Hold Key Tool Use Block

- `class ComputerHoldKeyToolUseBlock`

  - `JsonElement Type = "tool_use"`

  - `required string ID`

    pattern: ^[a-zA-Z0-9_-]+$

  - `required ToolUseCaller Caller`

    Which party invoked the tool call: the model directly, or a server tool on its behalf.

    - `class DirectCaller`

      Tool invocation directly from the model.

      - `JsonElement Type = "direct"`

    - `class ServerToolCaller`

      Tool invocation generated by a server-side tool.

      - `JsonElement Type = "code_execution_20250825"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

    - `class ServerToolCaller20260120`

      - `JsonElement Type = "code_execution_20260120"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

  - `required ComputerHoldKeyInput Input`

    Hold down a key or key-combination for a specified duration. Uses the same key
    syntax as `key`.

    - `required long Duration`

      Duration to hold the key, in seconds.

      maximum: 300

    - `required string Text`

      The key or key-combination to hold.

  - `JsonElement Name = "hold_key"`

  - `JsonElement ToolsetName = "computer"`

### Computer Key Config

- `class ComputerKeyConfig`

  `key`'s config overrides.

  - `bool? DeferLoading`

    Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

  - `bool? Enabled`

    Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

### Computer Key Input

- `class ComputerKeyInput`

  Press a key or key-combination on the keyboard. Use "+" to combine modifiers with
  a key (e.g. "ctrl+s", "alt+Tab", "ctrl+shift+Escape"). Key names are
  case-insensitive; common names like "Return", "Tab", "Escape", "Up", "Down",
  "Left", "Right", "Home", "End", "Page_Up", "Page_Down", "Delete", "BackSpace" are
  supported.

  - `required string Text`

    The key or key-combination to press.

  - `long? Repeat`

    Number of times to repeat the key press. Default is 1.

    minimum: 1, maximum: 100

### Computer Key Tool Use Block

- `class ComputerKeyToolUseBlock`

  - `JsonElement Type = "tool_use"`

  - `required string ID`

    pattern: ^[a-zA-Z0-9_-]+$

  - `required ToolUseCaller Caller`

    Which party invoked the tool call: the model directly, or a server tool on its behalf.

    - `class DirectCaller`

      Tool invocation directly from the model.

      - `JsonElement Type = "direct"`

    - `class ServerToolCaller`

      Tool invocation generated by a server-side tool.

      - `JsonElement Type = "code_execution_20250825"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

    - `class ServerToolCaller20260120`

      - `JsonElement Type = "code_execution_20260120"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

  - `required ComputerKeyInput Input`

    Press a key or key-combination on the keyboard. Use "+" to combine modifiers with
    a key (e.g. "ctrl+s", "alt+Tab", "ctrl+shift+Escape"). Key names are
    case-insensitive; common names like "Return", "Tab", "Escape", "Up", "Down",
    "Left", "Right", "Home", "End", "Page_Up", "Page_Down", "Delete", "BackSpace" are
    supported.

    - `required string Text`

      The key or key-combination to press.

    - `long? Repeat`

      Number of times to repeat the key press. Default is 1.

      minimum: 1, maximum: 100

  - `JsonElement Name = "key"`

  - `JsonElement ToolsetName = "computer"`

### Computer Left Click Config

- `class ComputerLeftClickConfig`

  `left_click`'s config overrides.

  - `bool? DeferLoading`

    Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

  - `bool? Enabled`

    Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

### Computer Left Click Drag Config

- `class ComputerLeftClickDragConfig`

  `left_click_drag`'s config overrides.

  - `bool? DeferLoading`

    Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

  - `bool? Enabled`

    Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

### Computer Left Click Drag Input

- `class ComputerLeftClickDragInput`

  Click and drag the cursor from `start_coordinate` to `coordinate`.

  - `required IReadOnlyList<long> Coordinate`

    (x, y): x pixels from the left edge, y pixels from the top edge.

    minItems: 2, maxItems: 2

  - `required IReadOnlyList<long> StartCoordinate`

    (x, y): x pixels from the left edge, y pixels from the top edge.

    minItems: 2, maxItems: 2

  - `string? Text`

    Optional key combination to hold down during this action (e.g. "ctrl", "shift", "ctrl+shift").

### Computer Left Click Drag Tool Use Block

- `class ComputerLeftClickDragToolUseBlock`

  - `JsonElement Type = "tool_use"`

  - `required string ID`

    pattern: ^[a-zA-Z0-9_-]+$

  - `required ToolUseCaller Caller`

    Which party invoked the tool call: the model directly, or a server tool on its behalf.

    - `class DirectCaller`

      Tool invocation directly from the model.

      - `JsonElement Type = "direct"`

    - `class ServerToolCaller`

      Tool invocation generated by a server-side tool.

      - `JsonElement Type = "code_execution_20250825"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

    - `class ServerToolCaller20260120`

      - `JsonElement Type = "code_execution_20260120"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

  - `required ComputerLeftClickDragInput Input`

    Click and drag the cursor from `start_coordinate` to `coordinate`.

    - `required IReadOnlyList<long> Coordinate`

      (x, y): x pixels from the left edge, y pixels from the top edge.

      minItems: 2, maxItems: 2

    - `required IReadOnlyList<long> StartCoordinate`

      (x, y): x pixels from the left edge, y pixels from the top edge.

      minItems: 2, maxItems: 2

    - `string? Text`

      Optional key combination to hold down during this action (e.g. "ctrl", "shift", "ctrl+shift").

  - `JsonElement Name = "left_click_drag"`

  - `JsonElement ToolsetName = "computer"`

### Computer Left Click Input

- `class ComputerLeftClickInput`

  Click the left mouse button at the specified (x, y) pixel coordinate, or the
  current cursor position if `coordinate` is omitted.

  - `IReadOnlyList<long>? Coordinate`

    (x, y): x pixels from the left edge, y pixels from the top edge.

    minItems: 2, maxItems: 2

  - `string? Text`

    Optional key combination to hold down during this action (e.g. "ctrl", "shift", "ctrl+shift").

### Computer Left Click Tool Use Block

- `class ComputerLeftClickToolUseBlock`

  - `JsonElement Type = "tool_use"`

  - `required string ID`

    pattern: ^[a-zA-Z0-9_-]+$

  - `required ToolUseCaller Caller`

    Which party invoked the tool call: the model directly, or a server tool on its behalf.

    - `class DirectCaller`

      Tool invocation directly from the model.

      - `JsonElement Type = "direct"`

    - `class ServerToolCaller`

      Tool invocation generated by a server-side tool.

      - `JsonElement Type = "code_execution_20250825"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

    - `class ServerToolCaller20260120`

      - `JsonElement Type = "code_execution_20260120"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

  - `required ComputerLeftClickInput Input`

    Click the left mouse button at the specified (x, y) pixel coordinate, or the
    current cursor position if `coordinate` is omitted.

    - `IReadOnlyList<long>? Coordinate`

      (x, y): x pixels from the left edge, y pixels from the top edge.

      minItems: 2, maxItems: 2

    - `string? Text`

      Optional key combination to hold down during this action (e.g. "ctrl", "shift", "ctrl+shift").

  - `JsonElement Name = "left_click"`

  - `JsonElement ToolsetName = "computer"`

### Computer Left Mouse Down Config

- `class ComputerLeftMouseDownConfig`

  `left_mouse_down`'s config overrides.

  - `bool? DeferLoading`

    Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

  - `bool? Enabled`

    Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

### Computer Left Mouse Down Input

- `class ComputerLeftMouseDownInput:`

  Press and hold the left mouse button at the current cursor position.

### Computer Left Mouse Down Tool Use Block

- `class ComputerLeftMouseDownToolUseBlock`

  - `JsonElement Type = "tool_use"`

  - `required string ID`

    pattern: ^[a-zA-Z0-9_-]+$

  - `required ToolUseCaller Caller`

    Which party invoked the tool call: the model directly, or a server tool on its behalf.

    - `class DirectCaller`

      Tool invocation directly from the model.

      - `JsonElement Type = "direct"`

    - `class ServerToolCaller`

      Tool invocation generated by a server-side tool.

      - `JsonElement Type = "code_execution_20250825"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

    - `class ServerToolCaller20260120`

      - `JsonElement Type = "code_execution_20260120"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

  - `required ComputerLeftMouseDownInput Input`

    Press and hold the left mouse button at the current cursor position.

  - `JsonElement Name = "left_mouse_down"`

  - `JsonElement ToolsetName = "computer"`

### Computer Left Mouse Up Config

- `class ComputerLeftMouseUpConfig`

  `left_mouse_up`'s config overrides.

  - `bool? DeferLoading`

    Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

  - `bool? Enabled`

    Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

### Computer Left Mouse Up Input

- `class ComputerLeftMouseUpInput:`

  Release the left mouse button.

### Computer Left Mouse Up Tool Use Block

- `class ComputerLeftMouseUpToolUseBlock`

  - `JsonElement Type = "tool_use"`

  - `required string ID`

    pattern: ^[a-zA-Z0-9_-]+$

  - `required ToolUseCaller Caller`

    Which party invoked the tool call: the model directly, or a server tool on its behalf.

    - `class DirectCaller`

      Tool invocation directly from the model.

      - `JsonElement Type = "direct"`

    - `class ServerToolCaller`

      Tool invocation generated by a server-side tool.

      - `JsonElement Type = "code_execution_20250825"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

    - `class ServerToolCaller20260120`

      - `JsonElement Type = "code_execution_20260120"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

  - `required ComputerLeftMouseUpInput Input`

    Release the left mouse button.

  - `JsonElement Name = "left_mouse_up"`

  - `JsonElement ToolsetName = "computer"`

### Computer Middle Click Config

- `class ComputerMiddleClickConfig`

  `middle_click`'s config overrides.

  - `bool? DeferLoading`

    Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

  - `bool? Enabled`

    Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

### Computer Middle Click Input

- `class ComputerMiddleClickInput`

  Click the middle mouse button at the specified (x, y) pixel coordinate, or the
  current cursor position if `coordinate` is omitted.

  - `IReadOnlyList<long>? Coordinate`

    (x, y): x pixels from the left edge, y pixels from the top edge.

    minItems: 2, maxItems: 2

  - `string? Text`

    Optional key combination to hold down during this action (e.g. "ctrl", "shift", "ctrl+shift").

### Computer Middle Click Tool Use Block

- `class ComputerMiddleClickToolUseBlock`

  - `JsonElement Type = "tool_use"`

  - `required string ID`

    pattern: ^[a-zA-Z0-9_-]+$

  - `required ToolUseCaller Caller`

    Which party invoked the tool call: the model directly, or a server tool on its behalf.

    - `class DirectCaller`

      Tool invocation directly from the model.

      - `JsonElement Type = "direct"`

    - `class ServerToolCaller`

      Tool invocation generated by a server-side tool.

      - `JsonElement Type = "code_execution_20250825"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

    - `class ServerToolCaller20260120`

      - `JsonElement Type = "code_execution_20260120"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

  - `required ComputerMiddleClickInput Input`

    Click the middle mouse button at the specified (x, y) pixel coordinate, or the
    current cursor position if `coordinate` is omitted.

    - `IReadOnlyList<long>? Coordinate`

      (x, y): x pixels from the left edge, y pixels from the top edge.

      minItems: 2, maxItems: 2

    - `string? Text`

      Optional key combination to hold down during this action (e.g. "ctrl", "shift", "ctrl+shift").

  - `JsonElement Name = "middle_click"`

  - `JsonElement ToolsetName = "computer"`

### Computer Mouse Move Config

- `class ComputerMouseMoveConfig`

  `mouse_move`'s config overrides.

  - `bool? DeferLoading`

    Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

  - `bool? Enabled`

    Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

### Computer Mouse Move Input

- `class ComputerMouseMoveInput`

  Move the cursor to a specified (x, y) pixel coordinate. Use this ONLY to hover
  without clicking; otherwise use a click action directly.

  - `required IReadOnlyList<long> Coordinate`

    (x, y): x pixels from the left edge, y pixels from the top edge.

    minItems: 2, maxItems: 2

### Computer Mouse Move Tool Use Block

- `class ComputerMouseMoveToolUseBlock`

  - `JsonElement Type = "tool_use"`

  - `required string ID`

    pattern: ^[a-zA-Z0-9_-]+$

  - `required ToolUseCaller Caller`

    Which party invoked the tool call: the model directly, or a server tool on its behalf.

    - `class DirectCaller`

      Tool invocation directly from the model.

      - `JsonElement Type = "direct"`

    - `class ServerToolCaller`

      Tool invocation generated by a server-side tool.

      - `JsonElement Type = "code_execution_20250825"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

    - `class ServerToolCaller20260120`

      - `JsonElement Type = "code_execution_20260120"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

  - `required ComputerMouseMoveInput Input`

    Move the cursor to a specified (x, y) pixel coordinate. Use this ONLY to hover
    without clicking; otherwise use a click action directly.

    - `required IReadOnlyList<long> Coordinate`

      (x, y): x pixels from the left edge, y pixels from the top edge.

      minItems: 2, maxItems: 2

  - `JsonElement Name = "mouse_move"`

  - `JsonElement ToolsetName = "computer"`

### Computer Right Click Config

- `class ComputerRightClickConfig`

  `right_click`'s config overrides.

  - `bool? DeferLoading`

    Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

  - `bool? Enabled`

    Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

### Computer Right Click Input

- `class ComputerRightClickInput`

  Click the right mouse button at the specified (x, y) pixel coordinate, or the
  current cursor position if `coordinate` is omitted.

  - `IReadOnlyList<long>? Coordinate`

    (x, y): x pixels from the left edge, y pixels from the top edge.

    minItems: 2, maxItems: 2

  - `string? Text`

    Optional key combination to hold down during this action (e.g. "ctrl", "shift", "ctrl+shift").

### Computer Right Click Tool Use Block

- `class ComputerRightClickToolUseBlock`

  - `JsonElement Type = "tool_use"`

  - `required string ID`

    pattern: ^[a-zA-Z0-9_-]+$

  - `required ToolUseCaller Caller`

    Which party invoked the tool call: the model directly, or a server tool on its behalf.

    - `class DirectCaller`

      Tool invocation directly from the model.

      - `JsonElement Type = "direct"`

    - `class ServerToolCaller`

      Tool invocation generated by a server-side tool.

      - `JsonElement Type = "code_execution_20250825"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

    - `class ServerToolCaller20260120`

      - `JsonElement Type = "code_execution_20260120"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

  - `required ComputerRightClickInput Input`

    Click the right mouse button at the specified (x, y) pixel coordinate, or the
    current cursor position if `coordinate` is omitted.

    - `IReadOnlyList<long>? Coordinate`

      (x, y): x pixels from the left edge, y pixels from the top edge.

      minItems: 2, maxItems: 2

    - `string? Text`

      Optional key combination to hold down during this action (e.g. "ctrl", "shift", "ctrl+shift").

  - `JsonElement Name = "right_click"`

  - `JsonElement ToolsetName = "computer"`

### Computer Screenshot Config

- `class ComputerScreenshotConfig`

  `screenshot`'s config overrides.

  - `bool? DeferLoading`

    Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

  - `bool? Enabled`

    Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

### Computer Screenshot Input

- `class ComputerScreenshotInput:`

  Take a screenshot of the screen.

### Computer Screenshot Tool Use Block

- `class ComputerScreenshotToolUseBlock`

  - `JsonElement Type = "tool_use"`

  - `required string ID`

    pattern: ^[a-zA-Z0-9_-]+$

  - `required ToolUseCaller Caller`

    Which party invoked the tool call: the model directly, or a server tool on its behalf.

    - `class DirectCaller`

      Tool invocation directly from the model.

      - `JsonElement Type = "direct"`

    - `class ServerToolCaller`

      Tool invocation generated by a server-side tool.

      - `JsonElement Type = "code_execution_20250825"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

    - `class ServerToolCaller20260120`

      - `JsonElement Type = "code_execution_20260120"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

  - `required ComputerScreenshotInput Input`

    Take a screenshot of the screen.

  - `JsonElement Name = "screenshot"`

  - `JsonElement ToolsetName = "computer"`

### Computer Scroll Config

- `class ComputerScrollConfig`

  `scroll`'s config overrides.

  - `bool? DeferLoading`

    Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

  - `bool? Enabled`

    Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

### Computer Scroll Direction

- `enum ComputerScrollDirection`

  - `Up("up")`

  - `Down("down")`

  - `Left("left")`

  - `Right("right")`

### Computer Scroll Input

- `class ComputerScrollInput`

  Scroll the screen at the specified (x, y) pixel coordinate, or the current cursor
  position if `coordinate` is omitted. Do NOT use PageUp/PageDown to scroll.

  - `required long ScrollAmount`

    Number of 'clicks' of the scroll wheel.

  - `required ComputerScrollDirection ScrollDirection`

    - `Up("up")`

    - `Down("down")`

    - `Left("left")`

    - `Right("right")`

  - `IReadOnlyList<long>? Coordinate`

    (x, y): x pixels from the left edge, y pixels from the top edge.

    minItems: 2, maxItems: 2

  - `string? Text`

    Optional key combination to hold down during this action (e.g. "ctrl", "shift", "ctrl+shift").

### Computer Scroll Tool Use Block

- `class ComputerScrollToolUseBlock`

  - `JsonElement Type = "tool_use"`

  - `required string ID`

    pattern: ^[a-zA-Z0-9_-]+$

  - `required ToolUseCaller Caller`

    Which party invoked the tool call: the model directly, or a server tool on its behalf.

    - `class DirectCaller`

      Tool invocation directly from the model.

      - `JsonElement Type = "direct"`

    - `class ServerToolCaller`

      Tool invocation generated by a server-side tool.

      - `JsonElement Type = "code_execution_20250825"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

    - `class ServerToolCaller20260120`

      - `JsonElement Type = "code_execution_20260120"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

  - `required ComputerScrollInput Input`

    Scroll the screen at the specified (x, y) pixel coordinate, or the current cursor
    position if `coordinate` is omitted. Do NOT use PageUp/PageDown to scroll.

    - `required long ScrollAmount`

      Number of 'clicks' of the scroll wheel.

    - `required ComputerScrollDirection ScrollDirection`

      - `Up("up")`

      - `Down("down")`

      - `Left("left")`

      - `Right("right")`

    - `IReadOnlyList<long>? Coordinate`

      (x, y): x pixels from the left edge, y pixels from the top edge.

      minItems: 2, maxItems: 2

    - `string? Text`

      Optional key combination to hold down during this action (e.g. "ctrl", "shift", "ctrl+shift").

  - `JsonElement Name = "scroll"`

  - `JsonElement ToolsetName = "computer"`

### Computer Tool Use Block

- `class ComputerToolUseBlock: union`

  - `class ComputerKeyToolUseBlock`

    - `JsonElement Type = "tool_use"`

    - `required string ID`

      pattern: ^[a-zA-Z0-9_-]+$

    - `required ToolUseCaller Caller`

      Which party invoked the tool call: the model directly, or a server tool on its behalf.

      - `class DirectCaller`

        Tool invocation directly from the model.

        - `JsonElement Type = "direct"`

      - `class ServerToolCaller`

        Tool invocation generated by a server-side tool.

        - `JsonElement Type = "code_execution_20250825"`

        - `required string ToolID`

          pattern: ^srvtoolu_[a-zA-Z0-9_]+$

      - `class ServerToolCaller20260120`

        - `JsonElement Type = "code_execution_20260120"`

        - `required string ToolID`

          pattern: ^srvtoolu_[a-zA-Z0-9_]+$

    - `required ComputerKeyInput Input`

      Press a key or key-combination on the keyboard. Use "+" to combine modifiers with
      a key (e.g. "ctrl+s", "alt+Tab", "ctrl+shift+Escape"). Key names are
      case-insensitive; common names like "Return", "Tab", "Escape", "Up", "Down",
      "Left", "Right", "Home", "End", "Page_Up", "Page_Down", "Delete", "BackSpace" are
      supported.

      - `required string Text`

        The key or key-combination to press.

      - `long? Repeat`

        Number of times to repeat the key press. Default is 1.

        minimum: 1, maximum: 100

    - `JsonElement Name = "key"`

    - `JsonElement ToolsetName = "computer"`

  - `class ComputerHoldKeyToolUseBlock`

    - `JsonElement Type = "tool_use"`

    - `required string ID`

      pattern: ^[a-zA-Z0-9_-]+$

    - `required ToolUseCaller Caller`

      Which party invoked the tool call: the model directly, or a server tool on its behalf.

    - `required ComputerHoldKeyInput Input`

      Hold down a key or key-combination for a specified duration. Uses the same key
      syntax as `key`.

      - `required long Duration`

        Duration to hold the key, in seconds.

        maximum: 300

      - `required string Text`

        The key or key-combination to hold.

    - `JsonElement Name = "hold_key"`

    - `JsonElement ToolsetName = "computer"`

  - `class ComputerTypeToolUseBlock`

    - `JsonElement Type = "tool_use"`

    - `required string ID`

      pattern: ^[a-zA-Z0-9_-]+$

    - `required ToolUseCaller Caller`

      Which party invoked the tool call: the model directly, or a server tool on its behalf.

    - `required ComputerTypeInput Input`

      Type a string of text on the keyboard.

      - `required string Text`

        The text to type.

    - `JsonElement Name = "type"`

    - `JsonElement ToolsetName = "computer"`

  - `class ComputerCursorPositionToolUseBlock`

    - `JsonElement Type = "tool_use"`

    - `required string ID`

      pattern: ^[a-zA-Z0-9_-]+$

    - `required ToolUseCaller Caller`

      Which party invoked the tool call: the model directly, or a server tool on its behalf.

    - `required ComputerCursorPositionInput Input`

      Get the current (x, y) pixel coordinate of the cursor.

    - `JsonElement Name = "cursor_position"`

    - `JsonElement ToolsetName = "computer"`

  - `class ComputerMouseMoveToolUseBlock`

    - `JsonElement Type = "tool_use"`

    - `required string ID`

      pattern: ^[a-zA-Z0-9_-]+$

    - `required ToolUseCaller Caller`

      Which party invoked the tool call: the model directly, or a server tool on its behalf.

    - `required ComputerMouseMoveInput Input`

      Move the cursor to a specified (x, y) pixel coordinate. Use this ONLY to hover
      without clicking; otherwise use a click action directly.

      - `required IReadOnlyList<long> Coordinate`

        (x, y): x pixels from the left edge, y pixels from the top edge.

        minItems: 2, maxItems: 2

    - `JsonElement Name = "mouse_move"`

    - `JsonElement ToolsetName = "computer"`

  - `class ComputerLeftMouseDownToolUseBlock`

    - `JsonElement Type = "tool_use"`

    - `required string ID`

      pattern: ^[a-zA-Z0-9_-]+$

    - `required ToolUseCaller Caller`

      Which party invoked the tool call: the model directly, or a server tool on its behalf.

    - `required ComputerLeftMouseDownInput Input`

      Press and hold the left mouse button at the current cursor position.

    - `JsonElement Name = "left_mouse_down"`

    - `JsonElement ToolsetName = "computer"`

  - `class ComputerLeftMouseUpToolUseBlock`

    - `JsonElement Type = "tool_use"`

    - `required string ID`

      pattern: ^[a-zA-Z0-9_-]+$

    - `required ToolUseCaller Caller`

      Which party invoked the tool call: the model directly, or a server tool on its behalf.

    - `required ComputerLeftMouseUpInput Input`

      Release the left mouse button.

    - `JsonElement Name = "left_mouse_up"`

    - `JsonElement ToolsetName = "computer"`

  - `class ComputerLeftClickToolUseBlock`

    - `JsonElement Type = "tool_use"`

    - `required string ID`

      pattern: ^[a-zA-Z0-9_-]+$

    - `required ToolUseCaller Caller`

      Which party invoked the tool call: the model directly, or a server tool on its behalf.

    - `required ComputerLeftClickInput Input`

      Click the left mouse button at the specified (x, y) pixel coordinate, or the
      current cursor position if `coordinate` is omitted.

      - `IReadOnlyList<long>? Coordinate`

        (x, y): x pixels from the left edge, y pixels from the top edge.

        minItems: 2, maxItems: 2

      - `string? Text`

        Optional key combination to hold down during this action (e.g. "ctrl", "shift", "ctrl+shift").

    - `JsonElement Name = "left_click"`

    - `JsonElement ToolsetName = "computer"`

  - `class ComputerLeftClickDragToolUseBlock`

    - `JsonElement Type = "tool_use"`

    - `required string ID`

      pattern: ^[a-zA-Z0-9_-]+$

    - `required ToolUseCaller Caller`

      Which party invoked the tool call: the model directly, or a server tool on its behalf.

    - `required ComputerLeftClickDragInput Input`

      Click and drag the cursor from `start_coordinate` to `coordinate`.

      - `required IReadOnlyList<long> Coordinate`

        (x, y): x pixels from the left edge, y pixels from the top edge.

        minItems: 2, maxItems: 2

      - `required IReadOnlyList<long> StartCoordinate`

        (x, y): x pixels from the left edge, y pixels from the top edge.

        minItems: 2, maxItems: 2

      - `string? Text`

        Optional key combination to hold down during this action (e.g. "ctrl", "shift", "ctrl+shift").

    - `JsonElement Name = "left_click_drag"`

    - `JsonElement ToolsetName = "computer"`

  - `class ComputerRightClickToolUseBlock`

    - `JsonElement Type = "tool_use"`

    - `required string ID`

      pattern: ^[a-zA-Z0-9_-]+$

    - `required ToolUseCaller Caller`

      Which party invoked the tool call: the model directly, or a server tool on its behalf.

    - `required ComputerRightClickInput Input`

      Click the right mouse button at the specified (x, y) pixel coordinate, or the
      current cursor position if `coordinate` is omitted.

      - `IReadOnlyList<long>? Coordinate`

        (x, y): x pixels from the left edge, y pixels from the top edge.

        minItems: 2, maxItems: 2

      - `string? Text`

        Optional key combination to hold down during this action (e.g. "ctrl", "shift", "ctrl+shift").

    - `JsonElement Name = "right_click"`

    - `JsonElement ToolsetName = "computer"`

  - `class ComputerMiddleClickToolUseBlock`

    - `JsonElement Type = "tool_use"`

    - `required string ID`

      pattern: ^[a-zA-Z0-9_-]+$

    - `required ToolUseCaller Caller`

      Which party invoked the tool call: the model directly, or a server tool on its behalf.

    - `required ComputerMiddleClickInput Input`

      Click the middle mouse button at the specified (x, y) pixel coordinate, or the
      current cursor position if `coordinate` is omitted.

      - `IReadOnlyList<long>? Coordinate`

        (x, y): x pixels from the left edge, y pixels from the top edge.

        minItems: 2, maxItems: 2

      - `string? Text`

        Optional key combination to hold down during this action (e.g. "ctrl", "shift", "ctrl+shift").

    - `JsonElement Name = "middle_click"`

    - `JsonElement ToolsetName = "computer"`

  - `class ComputerDoubleClickToolUseBlock`

    - `JsonElement Type = "tool_use"`

    - `required string ID`

      pattern: ^[a-zA-Z0-9_-]+$

    - `required ToolUseCaller Caller`

      Which party invoked the tool call: the model directly, or a server tool on its behalf.

    - `required ComputerDoubleClickInput Input`

      Double-click the left mouse button at the specified (x, y) pixel coordinate, or
      the current cursor position if `coordinate` is omitted.

      - `IReadOnlyList<long>? Coordinate`

        (x, y): x pixels from the left edge, y pixels from the top edge.

        minItems: 2, maxItems: 2

      - `string? Text`

        Optional key combination to hold down during this action (e.g. "ctrl", "shift", "ctrl+shift").

    - `JsonElement Name = "double_click"`

    - `JsonElement ToolsetName = "computer"`

  - `class ComputerTripleClickToolUseBlock`

    - `JsonElement Type = "tool_use"`

    - `required string ID`

      pattern: ^[a-zA-Z0-9_-]+$

    - `required ToolUseCaller Caller`

      Which party invoked the tool call: the model directly, or a server tool on its behalf.

    - `required ComputerTripleClickInput Input`

      Triple-click the left mouse button at the specified (x, y) pixel coordinate, or
      the current cursor position if `coordinate` is omitted.

      - `IReadOnlyList<long>? Coordinate`

        (x, y): x pixels from the left edge, y pixels from the top edge.

        minItems: 2, maxItems: 2

      - `string? Text`

        Optional key combination to hold down during this action (e.g. "ctrl", "shift", "ctrl+shift").

    - `JsonElement Name = "triple_click"`

    - `JsonElement ToolsetName = "computer"`

  - `class ComputerScrollToolUseBlock`

    - `JsonElement Type = "tool_use"`

    - `required string ID`

      pattern: ^[a-zA-Z0-9_-]+$

    - `required ToolUseCaller Caller`

      Which party invoked the tool call: the model directly, or a server tool on its behalf.

    - `required ComputerScrollInput Input`

      Scroll the screen at the specified (x, y) pixel coordinate, or the current cursor
      position if `coordinate` is omitted. Do NOT use PageUp/PageDown to scroll.

      - `required long ScrollAmount`

        Number of 'clicks' of the scroll wheel.

      - `required ComputerScrollDirection ScrollDirection`

        - `Up("up")`

        - `Down("down")`

        - `Left("left")`

        - `Right("right")`

      - `IReadOnlyList<long>? Coordinate`

        (x, y): x pixels from the left edge, y pixels from the top edge.

        minItems: 2, maxItems: 2

      - `string? Text`

        Optional key combination to hold down during this action (e.g. "ctrl", "shift", "ctrl+shift").

    - `JsonElement Name = "scroll"`

    - `JsonElement ToolsetName = "computer"`

  - `class ComputerWaitToolUseBlock`

    - `JsonElement Type = "tool_use"`

    - `required string ID`

      pattern: ^[a-zA-Z0-9_-]+$

    - `required ToolUseCaller Caller`

      Which party invoked the tool call: the model directly, or a server tool on its behalf.

    - `required ComputerWaitInput Input`

      Wait for a specified duration.

      - `required long Duration`

        Duration to wait, in seconds.

        maximum: 300

    - `JsonElement Name = "wait"`

    - `JsonElement ToolsetName = "computer"`

  - `class ComputerScreenshotToolUseBlock`

    - `JsonElement Type = "tool_use"`

    - `required string ID`

      pattern: ^[a-zA-Z0-9_-]+$

    - `required ToolUseCaller Caller`

      Which party invoked the tool call: the model directly, or a server tool on its behalf.

    - `required ComputerScreenshotInput Input`

      Take a screenshot of the screen.

    - `JsonElement Name = "screenshot"`

    - `JsonElement ToolsetName = "computer"`

  - `class ComputerZoomToolUseBlock`

    - `JsonElement Type = "tool_use"`

    - `required string ID`

      pattern: ^[a-zA-Z0-9_-]+$

    - `required ToolUseCaller Caller`

      Which party invoked the tool call: the model directly, or a server tool on its behalf.

    - `required ComputerZoomInput Input`

      Take a screenshot of a rectangular region. Region coordinates are in the
      full-screenshot space (not physical display pixels). The crop is scaled up to
      fill the image budget so fine details become legible.

      - `required IReadOnlyList<long> Region`

        (x0, y0, x1, y1): The region to capture.

        minItems: 4, maxItems: 4

    - `JsonElement Name = "zoom"`

    - `JsonElement ToolsetName = "computer"`

### Computer Toolset 20260801

- `class ComputerToolset20260801`

  The computer toolset: a single `tools[]` entry (carrying no
  `name`) that declares the computer tool family. The model is
  served the family's tool with any members disabled via `configs`
  removed from its schema. Every member is enabled by default, zoom
  included. The single-tool options `display_number` and
  `enable_zoom` are not fields of a toolset entry — it carries only
  `type`, `configs`, and `cache_control`; zoom is controlled
  via `configs.zoom.enabled`.

  - `JsonElement Type = "computer_toolset_20260801"`

  - `CacheControlEphemeral? CacheControl`

    Create a cache control breakpoint at this content block.

    - `JsonElement Type = "ephemeral"`

    - `Ttl Ttl`

      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`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching?sdk_languages=csharp) for details.

      - `Ttl5m("5m")`

      - `Ttl1h("1h")`

  - `ComputerToolsetConfigs? Configs`

    Sparse per-member overrides, keyed by member name. Absent, null, and {} are equivalent; a member's defaults apply wherever its key is absent.

    - `ComputerTypeConfig? Type`

      `type`'s config overrides.

      - `bool? DeferLoading`

        Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

      - `bool? Enabled`

        Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

    - `ComputerCursorPositionConfig? CursorPosition`

      `cursor_position`'s config overrides.

      - `bool? DeferLoading`

        Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

      - `bool? Enabled`

        Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

    - `ComputerDoubleClickConfig? DoubleClick`

      `double_click`'s config overrides.

      - `bool? DeferLoading`

        Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

      - `bool? Enabled`

        Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

    - `ComputerHoldKeyConfig? HoldKey`

      `hold_key`'s config overrides.

      - `bool? DeferLoading`

        Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

      - `bool? Enabled`

        Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

    - `ComputerKeyConfig? Key`

      `key`'s config overrides.

      - `bool? DeferLoading`

        Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

      - `bool? Enabled`

        Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

    - `ComputerLeftClickConfig? LeftClick`

      `left_click`'s config overrides.

      - `bool? DeferLoading`

        Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

      - `bool? Enabled`

        Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

    - `ComputerLeftClickDragConfig? LeftClickDrag`

      `left_click_drag`'s config overrides.

      - `bool? DeferLoading`

        Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

      - `bool? Enabled`

        Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

    - `ComputerLeftMouseDownConfig? LeftMouseDown`

      `left_mouse_down`'s config overrides.

      - `bool? DeferLoading`

        Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

      - `bool? Enabled`

        Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

    - `ComputerLeftMouseUpConfig? LeftMouseUp`

      `left_mouse_up`'s config overrides.

      - `bool? DeferLoading`

        Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

      - `bool? Enabled`

        Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

    - `ComputerMiddleClickConfig? MiddleClick`

      `middle_click`'s config overrides.

      - `bool? DeferLoading`

        Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

      - `bool? Enabled`

        Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

    - `ComputerMouseMoveConfig? MouseMove`

      `mouse_move`'s config overrides.

      - `bool? DeferLoading`

        Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

      - `bool? Enabled`

        Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

    - `ComputerRightClickConfig? RightClick`

      `right_click`'s config overrides.

      - `bool? DeferLoading`

        Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

      - `bool? Enabled`

        Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

    - `ComputerScreenshotConfig? Screenshot`

      `screenshot`'s config overrides.

      - `bool? DeferLoading`

        Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

      - `bool? Enabled`

        Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

    - `ComputerScrollConfig? Scroll`

      `scroll`'s config overrides.

      - `bool? DeferLoading`

        Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

      - `bool? Enabled`

        Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

    - `ComputerTripleClickConfig? TripleClick`

      `triple_click`'s config overrides.

      - `bool? DeferLoading`

        Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

      - `bool? Enabled`

        Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

    - `ComputerWaitConfig? Wait`

      `wait`'s config overrides.

      - `bool? DeferLoading`

        Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

      - `bool? Enabled`

        Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

    - `ComputerZoomConfig? Zoom`

      `zoom`'s config overrides.

      - `bool? DeferLoading`

        Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

      - `bool? Enabled`

        Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

### Computer Toolset Configs

- `class ComputerToolsetConfigs`

  Per-member configuration for `computer_toolset_20260801`: one
  optional field per member tool, keyed by the member name — the same
  name the member's `tool_use` blocks carry. Every member is an
  accepted key, and a member's defaults apply wherever its key is
  absent. Unknown keys are rejected: the field set is this toolset
  version's complete member set.

  - `ComputerTypeConfig? Type`

    `type`'s config overrides.

    - `bool? DeferLoading`

      Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

    - `bool? Enabled`

      Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

  - `ComputerCursorPositionConfig? CursorPosition`

    `cursor_position`'s config overrides.

    - `bool? DeferLoading`

      Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

    - `bool? Enabled`

      Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

  - `ComputerDoubleClickConfig? DoubleClick`

    `double_click`'s config overrides.

    - `bool? DeferLoading`

      Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

    - `bool? Enabled`

      Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

  - `ComputerHoldKeyConfig? HoldKey`

    `hold_key`'s config overrides.

    - `bool? DeferLoading`

      Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

    - `bool? Enabled`

      Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

  - `ComputerKeyConfig? Key`

    `key`'s config overrides.

    - `bool? DeferLoading`

      Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

    - `bool? Enabled`

      Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

  - `ComputerLeftClickConfig? LeftClick`

    `left_click`'s config overrides.

    - `bool? DeferLoading`

      Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

    - `bool? Enabled`

      Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

  - `ComputerLeftClickDragConfig? LeftClickDrag`

    `left_click_drag`'s config overrides.

    - `bool? DeferLoading`

      Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

    - `bool? Enabled`

      Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

  - `ComputerLeftMouseDownConfig? LeftMouseDown`

    `left_mouse_down`'s config overrides.

    - `bool? DeferLoading`

      Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

    - `bool? Enabled`

      Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

  - `ComputerLeftMouseUpConfig? LeftMouseUp`

    `left_mouse_up`'s config overrides.

    - `bool? DeferLoading`

      Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

    - `bool? Enabled`

      Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

  - `ComputerMiddleClickConfig? MiddleClick`

    `middle_click`'s config overrides.

    - `bool? DeferLoading`

      Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

    - `bool? Enabled`

      Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

  - `ComputerMouseMoveConfig? MouseMove`

    `mouse_move`'s config overrides.

    - `bool? DeferLoading`

      Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

    - `bool? Enabled`

      Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

  - `ComputerRightClickConfig? RightClick`

    `right_click`'s config overrides.

    - `bool? DeferLoading`

      Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

    - `bool? Enabled`

      Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

  - `ComputerScreenshotConfig? Screenshot`

    `screenshot`'s config overrides.

    - `bool? DeferLoading`

      Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

    - `bool? Enabled`

      Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

  - `ComputerScrollConfig? Scroll`

    `scroll`'s config overrides.

    - `bool? DeferLoading`

      Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

    - `bool? Enabled`

      Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

  - `ComputerTripleClickConfig? TripleClick`

    `triple_click`'s config overrides.

    - `bool? DeferLoading`

      Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

    - `bool? Enabled`

      Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

  - `ComputerWaitConfig? Wait`

    `wait`'s config overrides.

    - `bool? DeferLoading`

      Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

    - `bool? Enabled`

      Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

  - `ComputerZoomConfig? Zoom`

    `zoom`'s config overrides.

    - `bool? DeferLoading`

      Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

    - `bool? Enabled`

      Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

### Computer Triple Click Config

- `class ComputerTripleClickConfig`

  `triple_click`'s config overrides.

  - `bool? DeferLoading`

    Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

  - `bool? Enabled`

    Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

### Computer Triple Click Input

- `class ComputerTripleClickInput`

  Triple-click the left mouse button at the specified (x, y) pixel coordinate, or
  the current cursor position if `coordinate` is omitted.

  - `IReadOnlyList<long>? Coordinate`

    (x, y): x pixels from the left edge, y pixels from the top edge.

    minItems: 2, maxItems: 2

  - `string? Text`

    Optional key combination to hold down during this action (e.g. "ctrl", "shift", "ctrl+shift").

### Computer Triple Click Tool Use Block

- `class ComputerTripleClickToolUseBlock`

  - `JsonElement Type = "tool_use"`

  - `required string ID`

    pattern: ^[a-zA-Z0-9_-]+$

  - `required ToolUseCaller Caller`

    Which party invoked the tool call: the model directly, or a server tool on its behalf.

    - `class DirectCaller`

      Tool invocation directly from the model.

      - `JsonElement Type = "direct"`

    - `class ServerToolCaller`

      Tool invocation generated by a server-side tool.

      - `JsonElement Type = "code_execution_20250825"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

    - `class ServerToolCaller20260120`

      - `JsonElement Type = "code_execution_20260120"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

  - `required ComputerTripleClickInput Input`

    Triple-click the left mouse button at the specified (x, y) pixel coordinate, or
    the current cursor position if `coordinate` is omitted.

    - `IReadOnlyList<long>? Coordinate`

      (x, y): x pixels from the left edge, y pixels from the top edge.

      minItems: 2, maxItems: 2

    - `string? Text`

      Optional key combination to hold down during this action (e.g. "ctrl", "shift", "ctrl+shift").

  - `JsonElement Name = "triple_click"`

  - `JsonElement ToolsetName = "computer"`

### Computer Type Config

- `class ComputerTypeConfig`

  `type`'s config overrides.

  - `bool? DeferLoading`

    Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

  - `bool? Enabled`

    Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

### Computer Type Input

- `class ComputerTypeInput`

  Type a string of text on the keyboard.

  - `required string Text`

    The text to type.

### Computer Type Tool Use Block

- `class ComputerTypeToolUseBlock`

  - `JsonElement Type = "tool_use"`

  - `required string ID`

    pattern: ^[a-zA-Z0-9_-]+$

  - `required ToolUseCaller Caller`

    Which party invoked the tool call: the model directly, or a server tool on its behalf.

    - `class DirectCaller`

      Tool invocation directly from the model.

      - `JsonElement Type = "direct"`

    - `class ServerToolCaller`

      Tool invocation generated by a server-side tool.

      - `JsonElement Type = "code_execution_20250825"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

    - `class ServerToolCaller20260120`

      - `JsonElement Type = "code_execution_20260120"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

  - `required ComputerTypeInput Input`

    Type a string of text on the keyboard.

    - `required string Text`

      The text to type.

  - `JsonElement Name = "type"`

  - `JsonElement ToolsetName = "computer"`

### Computer Wait Config

- `class ComputerWaitConfig`

  `wait`'s config overrides.

  - `bool? DeferLoading`

    Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

  - `bool? Enabled`

    Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

### Computer Wait Input

- `class ComputerWaitInput`

  Wait for a specified duration.

  - `required long Duration`

    Duration to wait, in seconds.

    maximum: 300

### Computer Wait Tool Use Block

- `class ComputerWaitToolUseBlock`

  - `JsonElement Type = "tool_use"`

  - `required string ID`

    pattern: ^[a-zA-Z0-9_-]+$

  - `required ToolUseCaller Caller`

    Which party invoked the tool call: the model directly, or a server tool on its behalf.

    - `class DirectCaller`

      Tool invocation directly from the model.

      - `JsonElement Type = "direct"`

    - `class ServerToolCaller`

      Tool invocation generated by a server-side tool.

      - `JsonElement Type = "code_execution_20250825"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

    - `class ServerToolCaller20260120`

      - `JsonElement Type = "code_execution_20260120"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

  - `required ComputerWaitInput Input`

    Wait for a specified duration.

    - `required long Duration`

      Duration to wait, in seconds.

      maximum: 300

  - `JsonElement Name = "wait"`

  - `JsonElement ToolsetName = "computer"`

### Computer Zoom Config

- `class ComputerZoomConfig`

  `zoom`'s config overrides.

  - `bool? DeferLoading`

    Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

  - `bool? Enabled`

    Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

### Computer Zoom Input

- `class ComputerZoomInput`

  Take a screenshot of a rectangular region. Region coordinates are in the
  full-screenshot space (not physical display pixels). The crop is scaled up to
  fill the image budget so fine details become legible.

  - `required IReadOnlyList<long> Region`

    (x0, y0, x1, y1): The region to capture.

    minItems: 4, maxItems: 4

### Computer Zoom Tool Use Block

- `class ComputerZoomToolUseBlock`

  - `JsonElement Type = "tool_use"`

  - `required string ID`

    pattern: ^[a-zA-Z0-9_-]+$

  - `required ToolUseCaller Caller`

    Which party invoked the tool call: the model directly, or a server tool on its behalf.

    - `class DirectCaller`

      Tool invocation directly from the model.

      - `JsonElement Type = "direct"`

    - `class ServerToolCaller`

      Tool invocation generated by a server-side tool.

      - `JsonElement Type = "code_execution_20250825"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

    - `class ServerToolCaller20260120`

      - `JsonElement Type = "code_execution_20260120"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

  - `required ComputerZoomInput Input`

    Take a screenshot of a rectangular region. Region coordinates are in the
    full-screenshot space (not physical display pixels). The crop is scaled up to
    fill the image budget so fine details become legible.

    - `required IReadOnlyList<long> Region`

      (x0, y0, x1, y1): The region to capture.

      minItems: 4, maxItems: 4

  - `JsonElement Name = "zoom"`

  - `JsonElement ToolsetName = "computer"`

### Container

- `class Container`

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

  - `required string ID`

    Identifier for the container used in this request

  - `required DateTimeOffset ExpiresAt`

    The time at which the container will expire.

    format: date-time

  - `required IReadOnlyList<ContainerSkill>? Skills`

    Skills loaded in the container

    - `required ContainerSkillType Type`

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

      - `Anthropic("anthropic")`

      - `Custom("custom")`

    - `required string SkillID`

      Skill ID

      minLength: 1, maxLength: 64

    - `required string Version`

      The resolved version: a skill version ID for custom skills.

      minLength: 1, maxLength: 64

### Container Params

- `class ContainerParams`

  Container parameters with skills to be loaded.

  - `string? ID`

    Container id

  - `IReadOnlyList<SkillParams>? Skills`

    List of skills to load in the container

    maxItems: 20

    - `required SkillParamsType Type`

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

      - `Anthropic("anthropic")`

      - `Custom("custom")`

    - `required string SkillID`

      Skill ID

      minLength: 1, maxLength: 64

    - `string Version`

      Skill version or 'latest' for most recent version

      minLength: 1, maxLength: 64

### Container Skill

- `class ContainerSkill`

  A skill that was loaded in a container (response model).

  - `required ContainerSkillType Type`

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

    - `Anthropic("anthropic")`

    - `Custom("custom")`

  - `required string SkillID`

    Skill ID

    minLength: 1, maxLength: 64

  - `required string Version`

    The resolved version: a skill version ID for custom skills.

    minLength: 1, maxLength: 64

### Container Upload Block

- `class ContainerUploadBlock`

  Response model for a file uploaded to the container.

  - `JsonElement Type = "container_upload"`

  - `required string FileID`

### Container Upload Block Param

- `class ContainerUploadBlockParam`

  A content block that represents a file to be uploaded to the container
  Files uploaded via this block will be available in the container's input directory.

  - `JsonElement Type = "container_upload"`

  - `required string FileID`

  - `CacheControlEphemeral? CacheControl`

    Create a cache control breakpoint at this content block.

    - `JsonElement Type = "ephemeral"`

    - `Ttl Ttl`

      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`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching?sdk_languages=csharp) for details.

      - `Ttl5m("5m")`

      - `Ttl1h("1h")`

### Content Block

- `class ContentBlock: union`

  - `class TextBlock`

    - `JsonElement Type = "text"`

    - `required IReadOnlyList<TextCitation>? Citations`

      Citations supporting the text block.

      The type of citation returned will depend on the type of document being cited. Citing a PDF results in `page_location`, plain text results in `char_location`, and content document results in `content_block_location`.

      - `class CitationCharLocation`

        - `JsonElement Type = "char_location"`

        - `required string CitedText`

        - `required long DocumentIndex`

          minimum: 0

        - `required string? DocumentTitle`

        - `required long EndCharIndex`

        - `required string? FileID`

        - `required long StartCharIndex`

          minimum: 0

      - `class CitationPageLocation`

        - `JsonElement Type = "page_location"`

        - `required string CitedText`

        - `required long DocumentIndex`

          minimum: 0

        - `required string? DocumentTitle`

        - `required long EndPageNumber`

        - `required string? FileID`

        - `required long StartPageNumber`

          minimum: 1

      - `class CitationContentBlockLocation`

        - `JsonElement Type = "content_block_location"`

        - `required string CitedText`

          The full text of the cited block range, concatenated.

          Always equals the contents of `content[start_block_index:end_block_index]` joined together. The text block is the minimal citable unit; this field is never a substring of a single block. Not counted toward output tokens, and not counted toward input tokens when sent back in subsequent turns.

        - `required long DocumentIndex`

          minimum: 0

        - `required string? DocumentTitle`

        - `required long EndBlockIndex`

          Exclusive 0-based end index of the cited block range in the source's `content` array.

          Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`.

        - `required string? FileID`

        - `required long StartBlockIndex`

          0-based index of the first cited block in the source's `content` array.

          minimum: 0

      - `class CitationsWebSearchResultLocation`

        - `JsonElement Type = "web_search_result_location"`

        - `required string CitedText`

        - `required string EncryptedIndex`

        - `required string? Title`

          maxLength: 512

        - `required string Url`

      - `class CitationsSearchResultLocation`

        - `JsonElement Type = "search_result_location"`

        - `required string CitedText`

          The full text of the cited block range, concatenated.

          Always equals the contents of `content[start_block_index:end_block_index]` joined together. The text block is the minimal citable unit; this field is never a substring of a single block. Not counted toward output tokens, and not counted toward input tokens when sent back in subsequent turns.

        - `required long EndBlockIndex`

          Exclusive 0-based end index of the cited block range in the source's `content` array.

          Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`.

        - `required long SearchResultIndex`

          0-based index of the cited search result among all `search_result` content blocks in the request, in the order they appear across messages and tool results.

          Counted separately from `document_index`; server-side web search results are not included in this count.

          minimum: 0

        - `required string Source`

        - `required long StartBlockIndex`

          0-based index of the first cited block in the source's `content` array.

          minimum: 0

        - `required string? Title`

    - `required string Text`

  - `class ThinkingBlock`

    - `JsonElement Type = "thinking"`

    - `required string Signature`

      A value used to verify that this thinking block was generated by Claude when it is passed back to the API.

      This is an opaque field and should not be interpreted or parsed. When passing thinking blocks back to the API (required when using tools with extended thinking), pass them back exactly as received, with this field intact.

      See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking?sdk_languages=csharp) for details.

    - `required string Thinking`

      The text of Claude's thinking process for this block.

  - `class RedactedThinkingBlock`

    - `JsonElement Type = "redacted_thinking"`

    - `required string Data`

      The contents of this redacted thinking block, returned when portions of the model's thinking were safety-redacted. This field is opaque and encrypted, with no readable content.

      Pass `redacted_thinking` blocks back to the API unchanged when continuing a multi-turn conversation.

      See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking?sdk_languages=csharp#redacted-thinking-blocks) for details.

  - `class ToolUseBlock`

    - `JsonElement Type = "tool_use"`

    - `required string ID`

      pattern: ^[a-zA-Z0-9_-]+$

    - `required Caller Caller`

      - `class DirectCaller`

        Tool invocation directly from the model.

        - `JsonElement Type = "direct"`

      - `class ServerToolCaller`

        Tool invocation generated by a server-side tool.

        - `JsonElement Type = "code_execution_20250825"`

        - `required string ToolID`

          pattern: ^srvtoolu_[a-zA-Z0-9_]+$

      - `class ServerToolCaller20260120`

        - `JsonElement Type = "code_execution_20260120"`

        - `required string ToolID`

          pattern: ^srvtoolu_[a-zA-Z0-9_]+$

    - `required IReadOnlyDictionary<string, JsonElement> Input`

    - `required string Name`

      minLength: 1

    - `string? ToolsetName`

      For a toolset member tool_use, the toolset family.

      minLength: 1, maxLength: 64, pattern: ^[a-zA-Z0-9_-]+$

  - `class ServerToolUseBlock`

    - `JsonElement Type = "server_tool_use"`

    - `required string ID`

      pattern: ^srvtoolu_[a-zA-Z0-9_]+$

    - `required Caller Caller`

      - `class DirectCaller`

        Tool invocation directly from the model.

      - `class ServerToolCaller`

        Tool invocation generated by a server-side tool.

      - `class ServerToolCaller20260120`

    - `required IReadOnlyDictionary<string, JsonElement> Input`

    - `required Name Name`

      - `WebSearch("web_search")`

      - `WebFetch("web_fetch")`

      - `CodeExecution("code_execution")`

      - `BashCodeExecution("bash_code_execution")`

      - `TextEditorCodeExecution("text_editor_code_execution")`

      - `ToolSearchToolRegex("tool_search_tool_regex")`

      - `ToolSearchToolBm25("tool_search_tool_bm25")`

  - `class WebSearchToolResultBlock`

    - `JsonElement Type = "web_search_tool_result"`

    - `required Caller Caller`

      - `class DirectCaller`

        Tool invocation directly from the model.

      - `class ServerToolCaller`

        Tool invocation generated by a server-side tool.

      - `class ServerToolCaller20260120`

    - `required WebSearchToolResultBlockContent Content`

      - `class WebSearchToolResultError`

        - `JsonElement Type = "web_search_tool_result_error"`

        - `required WebSearchToolResultErrorCode ErrorCode`

          - `InvalidToolInput("invalid_tool_input")`

          - `Unavailable("unavailable")`

          - `MaxUsesExceeded("max_uses_exceeded")`

          - `TooManyRequests("too_many_requests")`

          - `QueryTooLong("query_too_long")`

          - `RequestTooLarge("request_too_large")`

      - `IReadOnlyList<WebSearchResultBlock>`

        - `JsonElement Type = "web_search_result"`

        - `required string EncryptedContent`

        - `required string? PageAge`

        - `required string Title`

        - `required string Url`

    - `required string ToolUseID`

      pattern: ^srvtoolu_[a-zA-Z0-9_]+$

  - `class WebFetchToolResultBlock`

    - `JsonElement Type = "web_fetch_tool_result"`

    - `required Caller Caller`

      - `class DirectCaller`

        Tool invocation directly from the model.

      - `class ServerToolCaller`

        Tool invocation generated by a server-side tool.

      - `class ServerToolCaller20260120`

    - `required Content Content`

      - `class WebFetchToolResultErrorBlock`

        - `JsonElement Type = "web_fetch_tool_result_error"`

        - `required WebFetchToolResultErrorCode ErrorCode`

          - `InvalidToolInput("invalid_tool_input")`

          - `UrlTooLong("url_too_long")`

          - `UrlNotAllowed("url_not_allowed")`

          - `UrlNotInPriorContext("url_not_in_prior_context")`

          - `UrlNotAccessible("url_not_accessible")`

          - `UnsupportedContentType("unsupported_content_type")`

          - `TooManyRequests("too_many_requests")`

          - `MaxUsesExceeded("max_uses_exceeded")`

          - `Unavailable("unavailable")`

          - `ContentTooLarge("content_too_large")`

      - `class WebFetchBlock`

        - `JsonElement Type = "web_fetch_result"`

        - `required DocumentBlock Content`

          - `JsonElement Type = "document"`

          - `required CitationsConfig? Citations`

            Citation configuration for the document

            - `required bool Enabled`

          - `required Source Source`

            - `class Base64PdfSource`

              - `JsonElement Type = "base64"`

              - `required string Data`

                format: byte

              - `JsonElement MediaType = "application/pdf"`

            - `class PlainTextSource`

              - `JsonElement Type = "text"`

              - `required string Data`

              - `JsonElement MediaType = "text/plain"`

          - `required string? Title`

            The title of the document

        - `required string? RetrievedAt`

          ISO 8601 timestamp when the content was retrieved

        - `required string Url`

          Fetched content URL

    - `required string ToolUseID`

      pattern: ^srvtoolu_[a-zA-Z0-9_]+$

  - `class CodeExecutionToolResultBlock`

    - `JsonElement Type = "code_execution_tool_result"`

    - `required CodeExecutionToolResultBlockContent Content`

      - `class CodeExecutionToolResultError`

        - `JsonElement Type = "code_execution_tool_result_error"`

        - `required CodeExecutionToolResultErrorCode ErrorCode`

          - `InvalidToolInput("invalid_tool_input")`

          - `Unavailable("unavailable")`

          - `TooManyRequests("too_many_requests")`

          - `ExecutionTimeExceeded("execution_time_exceeded")`

      - `class CodeExecutionResultBlock`

        - `JsonElement Type = "code_execution_result"`

        - `required IReadOnlyList<CodeExecutionOutputBlock> Content`

          - `JsonElement Type = "code_execution_output"`

          - `required string FileID`

        - `required long ReturnCode`

        - `required string Stderr`

        - `required string Stdout`

      - `class EncryptedCodeExecutionResultBlock`

        The output and exit code of Python code that Claude ran with the code execution tool, with standard output in encrypted form.

        The API returns this block in place of `code_execution_result` when the code called the web search tool.

        See the [programmatic tool calling guide](https://platform.claude.com/docs/en/agents-and-tools/tool-use/programmatic-tool-calling?sdk_languages=csharp) to learn more about programmatic tool calling.

        - `JsonElement Type = "encrypted_code_execution_result"`

        - `required IReadOnlyList<CodeExecutionOutputBlock> Content`

          - `JsonElement Type = "code_execution_output"`

          - `required string FileID`

        - `required string EncryptedStdout`

        - `required long ReturnCode`

        - `required string Stderr`

    - `required string ToolUseID`

      pattern: ^srvtoolu_[a-zA-Z0-9_]+$

  - `class BashCodeExecutionToolResultBlock`

    - `JsonElement Type = "bash_code_execution_tool_result"`

    - `required Content Content`

      - `class BashCodeExecutionToolResultError`

        - `JsonElement Type = "bash_code_execution_tool_result_error"`

        - `required BashCodeExecutionToolResultErrorCode ErrorCode`

          - `InvalidToolInput("invalid_tool_input")`

          - `Unavailable("unavailable")`

          - `TooManyRequests("too_many_requests")`

          - `ExecutionTimeExceeded("execution_time_exceeded")`

          - `OutputFileTooLarge("output_file_too_large")`

      - `class BashCodeExecutionResultBlock`

        - `JsonElement Type = "bash_code_execution_result"`

        - `required IReadOnlyList<BashCodeExecutionOutputBlock> Content`

          - `JsonElement Type = "bash_code_execution_output"`

          - `required string FileID`

        - `required long ReturnCode`

        - `required string Stderr`

        - `required string Stdout`

    - `required string ToolUseID`

      pattern: ^srvtoolu_[a-zA-Z0-9_]+$

  - `class TextEditorCodeExecutionToolResultBlock`

    - `JsonElement Type = "text_editor_code_execution_tool_result"`

    - `required Content Content`

      - `class TextEditorCodeExecutionToolResultError`

        - `JsonElement Type = "text_editor_code_execution_tool_result_error"`

        - `required TextEditorCodeExecutionToolResultErrorCode ErrorCode`

          - `InvalidToolInput("invalid_tool_input")`

          - `Unavailable("unavailable")`

          - `TooManyRequests("too_many_requests")`

          - `ExecutionTimeExceeded("execution_time_exceeded")`

          - `FileNotFound("file_not_found")`

        - `required string? ErrorMessage`

      - `class TextEditorCodeExecutionViewResultBlock`

        - `JsonElement Type = "text_editor_code_execution_view_result"`

        - `required string Content`

        - `required FileType FileType`

          - `Text("text")`

          - `Image("image")`

          - `Pdf("pdf")`

        - `required long? NumLines`

        - `required long? StartLine`

        - `required long? TotalLines`

      - `class TextEditorCodeExecutionCreateResultBlock`

        - `JsonElement Type = "text_editor_code_execution_create_result"`

        - `required bool IsFileUpdate`

      - `class TextEditorCodeExecutionStrReplaceResultBlock`

        - `JsonElement Type = "text_editor_code_execution_str_replace_result"`

        - `required IReadOnlyList<string>? Lines`

        - `required long? NewLines`

        - `required long? NewStart`

        - `required long? OldLines`

        - `required long? OldStart`

    - `required string ToolUseID`

      pattern: ^srvtoolu_[a-zA-Z0-9_]+$

  - `class ToolSearchToolResultBlock`

    - `JsonElement Type = "tool_search_tool_result"`

    - `required Content Content`

      - `class ToolSearchToolResultError`

        - `JsonElement Type = "tool_search_tool_result_error"`

        - `required ToolSearchToolResultErrorCode ErrorCode`

          - `InvalidToolInput("invalid_tool_input")`

          - `Unavailable("unavailable")`

          - `TooManyRequests("too_many_requests")`

          - `ExecutionTimeExceeded("execution_time_exceeded")`

        - `required string? ErrorMessage`

      - `class ToolSearchToolSearchResultBlock`

        - `JsonElement Type = "tool_search_tool_search_result"`

        - `required IReadOnlyList<ToolReferenceBlock> ToolReferences`

          - `JsonElement Type = "tool_reference"`

          - `required string ToolName`

            minLength: 1, maxLength: 256, pattern: ^[a-zA-Z0-9_-]{1,256}$

    - `required string ToolUseID`

      pattern: ^srvtoolu_[a-zA-Z0-9_]+$

  - `class ContainerUploadBlock`

    Response model for a file uploaded to the container.

    - `JsonElement Type = "container_upload"`

    - `required string FileID`

### Content Block Param

- `class ContentBlockParam: union`

  - `class TextBlockParam`

    - `JsonElement Type = "text"`

    - `required string Text`

      minLength: 1

    - `CacheControlEphemeral? CacheControl`

      Create a cache control breakpoint at this content block.

      - `JsonElement Type = "ephemeral"`

      - `Ttl Ttl`

        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`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching?sdk_languages=csharp) for details.

        - `Ttl5m("5m")`

        - `Ttl1h("1h")`

    - `IReadOnlyList<TextCitationParam>? Citations`

      - `class CitationCharLocationParam`

        - `JsonElement Type = "char_location"`

        - `required string CitedText`

        - `required long DocumentIndex`

          minimum: 0

        - `required string? DocumentTitle`

          minLength: 1, maxLength: 500

        - `required long EndCharIndex`

        - `required long StartCharIndex`

          minimum: 0

      - `class CitationPageLocationParam`

        - `JsonElement Type = "page_location"`

        - `required string CitedText`

        - `required long DocumentIndex`

          minimum: 0

        - `required string? DocumentTitle`

          minLength: 1, maxLength: 500

        - `required long EndPageNumber`

        - `required long StartPageNumber`

          minimum: 1

      - `class CitationContentBlockLocationParam`

        - `JsonElement Type = "content_block_location"`

        - `required string CitedText`

          The full text of the cited block range, concatenated.

          Always equals the contents of `content[start_block_index:end_block_index]` joined together. The text block is the minimal citable unit; this field is never a substring of a single block. Not counted toward output tokens, and not counted toward input tokens when sent back in subsequent turns.

        - `required long DocumentIndex`

          minimum: 0

        - `required string? DocumentTitle`

          minLength: 1, maxLength: 500

        - `required long EndBlockIndex`

          Exclusive 0-based end index of the cited block range in the source's `content` array.

          Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`.

        - `required long StartBlockIndex`

          0-based index of the first cited block in the source's `content` array.

          minimum: 0

      - `class CitationWebSearchResultLocationParam`

        - `JsonElement Type = "web_search_result_location"`

        - `required string CitedText`

        - `required string EncryptedIndex`

        - `required string? Title`

          minLength: 1, maxLength: 512

        - `required string Url`

          minLength: 1

      - `class CitationSearchResultLocationParam`

        - `JsonElement Type = "search_result_location"`

        - `required string CitedText`

          The full text of the cited block range, concatenated.

          Always equals the contents of `content[start_block_index:end_block_index]` joined together. The text block is the minimal citable unit; this field is never a substring of a single block. Not counted toward output tokens, and not counted toward input tokens when sent back in subsequent turns.

        - `required long EndBlockIndex`

          Exclusive 0-based end index of the cited block range in the source's `content` array.

          Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`.

        - `required long SearchResultIndex`

          0-based index of the cited search result among all `search_result` content blocks in the request, in the order they appear across messages and tool results.

          Counted separately from `document_index`; server-side web search results are not included in this count.

          minimum: 0

        - `required string Source`

        - `required long StartBlockIndex`

          0-based index of the first cited block in the source's `content` array.

          minimum: 0

        - `required string? Title`

  - `class ImageBlockParam`

    - `JsonElement Type = "image"`

    - `required Source Source`

      - `class Base64ImageSource`

        - `JsonElement Type = "base64"`

        - `required string Data`

          format: byte

        - `required MediaType MediaType`

          - `ImageJpeg("image/jpeg")`

          - `ImagePng("image/png")`

          - `ImageGif("image/gif")`

          - `ImageWebP("image/webp")`

      - `class UrlImageSource`

        - `JsonElement Type = "url"`

        - `required string Url`

      - `class FileImageSource`

        - `JsonElement Type = "file"`

        - `required string FileID`

    - `CacheControlEphemeral? CacheControl`

      Create a cache control breakpoint at this content block.

    - `ImageTransformationsParam? Transformations`

      Configures the transformations the server applies to this image before the model observes it. Each key names a condition the server transforms images for; its value selects the transformation applied. Omitted keys keep their default behavior, and an empty object is equivalent to omitting the field.

      - `OversizedImage OversizedImage`

        What the server does when this image exceeds the model's maximum image size. `"downsize"` (the default) scales the image down to fit, which changes the dimensions the model observes without telling you. `"error"` instead rejects the request with a 400 error naming the image's dimensions and the largest dimensions that fit, so you can scale the image deliberately — your image is never silently scaled down.

        - `Downsize("downsize")`

        - `Error("error")`

  - `class DocumentBlockParam`

    - `JsonElement Type = "document"`

    - `required Source Source`

      - `class Base64PdfSource`

        - `JsonElement Type = "base64"`

        - `required string Data`

          format: byte

        - `JsonElement MediaType = "application/pdf"`

      - `class PlainTextSource`

        - `JsonElement Type = "text"`

        - `required string Data`

        - `JsonElement MediaType = "text/plain"`

      - `class ContentBlockSource`

        - `JsonElement Type = "content"`

        - `required Content Content`

          - `string`

          - `IReadOnlyList<ContentBlockSourceContent>`

            - `class TextBlockParam`

            - `class ImageBlockParam`

      - `class UrlPdfSource`

        - `JsonElement Type = "url"`

        - `required string Url`

      - `class FileDocumentSource`

        - `JsonElement Type = "file"`

        - `required string FileID`

    - `CacheControlEphemeral? CacheControl`

      Create a cache control breakpoint at this content block.

    - `CitationsConfigParam? Citations`

      - `bool Enabled`

    - `string? Context`

      minLength: 1

    - `string? Title`

      minLength: 1, maxLength: 500

  - `class SearchResultBlockParam`

    - `JsonElement Type = "search_result"`

    - `required IReadOnlyList<TextBlockParam> Content`

      - `JsonElement Type = "text"`

      - `required string Text`

        minLength: 1

      - `CacheControlEphemeral? CacheControl`

        Create a cache control breakpoint at this content block.

      - `IReadOnlyList<TextCitationParam>? Citations`

    - `required string Source`

    - `required string Title`

    - `CacheControlEphemeral? CacheControl`

      Create a cache control breakpoint at this content block.

    - `CitationsConfigParam Citations`

  - `class ThinkingBlockParam`

    - `JsonElement Type = "thinking"`

    - `required string Signature`

      The `signature` value of this thinking block, exactly as returned by the API in a previous response. Used to verify that the block was generated by Claude.

      Thinking blocks must be passed back unmodified and in their original order; a modified block results in a 400 `invalid_request_error`.

    - `required string Thinking`

      The `thinking` text of this block as returned by the API.

  - `class RedactedThinkingBlockParam`

    - `JsonElement Type = "redacted_thinking"`

    - `required string Data`

      The `data` value of this redacted thinking block, exactly as returned by the API in a previous response. Opaque and encrypted; pass it back unchanged.

  - `class ToolUseBlockParam`

    - `JsonElement Type = "tool_use"`

    - `required string ID`

      pattern: ^[a-zA-Z0-9_-]+$

    - `required IReadOnlyDictionary<string, JsonElement> Input`

    - `required string Name`

      minLength: 1, maxLength: 200

    - `CacheControlEphemeral? CacheControl`

      Create a cache control breakpoint at this content block.

    - `Caller Caller`

      - `class DirectCaller`

        Tool invocation directly from the model.

        - `JsonElement Type = "direct"`

      - `class ServerToolCaller`

        Tool invocation generated by a server-side tool.

        - `JsonElement Type = "code_execution_20250825"`

        - `required string ToolID`

          pattern: ^srvtoolu_[a-zA-Z0-9_]+$

      - `class ServerToolCaller20260120`

        - `JsonElement Type = "code_execution_20260120"`

        - `required string ToolID`

          pattern: ^srvtoolu_[a-zA-Z0-9_]+$

    - `string? ToolsetName`

      For a toolset member tool_use, the toolset family this member belongs to.

      minLength: 1, maxLength: 64, pattern: ^[a-zA-Z0-9_-]+$

  - `class ToolResultBlockParam`

    - `JsonElement Type = "tool_result"`

    - `required string ToolUseID`

      pattern: ^[a-zA-Z0-9_-]+$

    - `CacheControlEphemeral? CacheControl`

      Create a cache control breakpoint at this content block.

    - `Content Content`

      - `string`

      - `IReadOnlyList<Block>`

        - `class TextBlockParam`

        - `class ImageBlockParam`

        - `class SearchResultBlockParam`

        - `class DocumentBlockParam`

        - `class ToolReferenceBlockParam`

          Tool reference block that can be included in tool_result content.

          - `JsonElement Type = "tool_reference"`

          - `required string ToolName`

            minLength: 1, maxLength: 256, pattern: ^[a-zA-Z0-9_-]{1,256}$

          - `CacheControlEphemeral? CacheControl`

            Create a cache control breakpoint at this content block.

        - `class BrowserStateBlockParam`

          The caller's browser state after a browser toolset member call —
          the full inventory of open tabs, which tab is active, and any side
          effects (tabs opened, download state changes) the call produced.

          At most one per `tool_result`, only on a non-error result answering a
          browser toolset member `tool_use`. The server renders the
          model-visible text from it; the model never sees the raw fields.

          - `JsonElement Type = "browser_state"`

          - `required IReadOnlyList<BrowserStateTabEntry> Tabs`

            All tabs open in the browser after this call — the full inventory, not a delta. May be empty. Whenever non-empty, exactly one entry carries `active: true`.

            maxItems: 100

            - `required string TabID`

              The caller-assigned identifier for this tab, unique within the inventory.

              minLength: 1, maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

            - `required string Title`

              The title of the page the tab is showing. May be empty.

              maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

            - `required string Url`

              The URL of the page the tab is showing. May be empty.

              maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

            - `bool Active`

              Whether this tab is the active tab after this call. Whenever `tabs` is non-empty, exactly one entry is marked `active: true`.

          - `CacheControlEphemeral? CacheControl`

            Create a cache control breakpoint at this content block.

          - `IReadOnlyList<BrowserStateChange>? StateChanges`

            Tabs opened and download state changes during this call. "Nothing to report" is expressed by omitting the field, never by an empty list.

            minItems: 1, maxItems: 200

            - `class BrowserStateChangeTabOpened`

              A tab this call's execution opened that remains open at its end —
              the creation delta of the `tabs` inventory, not an event log.

              Carries only the `tab_id`; the tab's `title` and `url` live on its
              `tabs` entry, which must include the same `tab_id`. A tab opened
              during a failed call gets no deferred `tab_opened`; it simply appears
              in the next result's `tabs` inventory.

              - `JsonElement Type = "tab_opened"`

              - `required string TabID`

                The `tab_id` of the opened tab, present in `tabs`.

                minLength: 1, maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

            - `class BrowserStateChangeDownloadStarted`

              A file download that started during this call.

              - `JsonElement Type = "download_started"`

              - `required string DownloadID`

                The caller-assigned identifier for this download, stable across the state changes reporting it.

                minLength: 1, maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

              - `required string Url`

                The final post-redirect URL the download was served from.

                maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

            - `class BrowserStateChangeDownloadCompleted`

              A file download that finished during this call, reported with the
              same `download_id` as its `download_started` — or without a prior
              `download_started`, when the download finished during the call that
              started it (at most one state change per `download_id` per result).

              - `JsonElement Type = "download_completed"`

              - `required string DownloadID`

                The caller-assigned identifier for this download, stable across the state changes reporting it.

                minLength: 1, maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

              - `required string Url`

                The final post-redirect URL the download was served from.

                maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

              - `string? Path`

                Where the executor saved the file, on the executor's filesystem. Only included when another tool in the same environment can read the file at that path.

                maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

              - `long? SizeBytes`

                The completed download's size.

                minimum: 0

            - `class BrowserStateChangeDownloadFailed`

              A file download that failed — or was cancelled — during this call.

              - `JsonElement Type = "download_failed"`

              - `required string DownloadID`

                The caller-assigned identifier for this download, stable across the state changes reporting it.

                minLength: 1, maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

              - `required string Url`

                The final post-redirect URL the download was served from.

                maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

              - `string? Error`

                The failure or cancellation detail, when known.

                maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

    - `bool IsError`

    - `string? ToolsetName`

      For a toolset member tool_result, the toolset family of the paired tool_use.

      minLength: 1, maxLength: 64, pattern: ^[a-zA-Z0-9_-]+$

  - `class ServerToolUseBlockParam`

    - `JsonElement Type = "server_tool_use"`

    - `required string ID`

      pattern: ^srvtoolu_[a-zA-Z0-9_]+$

    - `required IReadOnlyDictionary<string, JsonElement> Input`

    - `required Name Name`

      - `WebSearch("web_search")`

      - `WebFetch("web_fetch")`

      - `CodeExecution("code_execution")`

      - `BashCodeExecution("bash_code_execution")`

      - `TextEditorCodeExecution("text_editor_code_execution")`

      - `ToolSearchToolRegex("tool_search_tool_regex")`

      - `ToolSearchToolBm25("tool_search_tool_bm25")`

    - `CacheControlEphemeral? CacheControl`

      Create a cache control breakpoint at this content block.

    - `Caller Caller`

      - `class DirectCaller`

        Tool invocation directly from the model.

      - `class ServerToolCaller`

        Tool invocation generated by a server-side tool.

      - `class ServerToolCaller20260120`

  - `class WebSearchToolResultBlockParam`

    - `JsonElement Type = "web_search_tool_result"`

    - `required WebSearchToolResultBlockParamContent Content`

      - `IReadOnlyList<WebSearchResultBlockParam>`

        - `JsonElement Type = "web_search_result"`

        - `required string EncryptedContent`

        - `required string Title`

        - `required string Url`

        - `string? PageAge`

      - `class WebSearchToolRequestError`

        - `JsonElement Type = "web_search_tool_result_error"`

        - `required WebSearchToolResultErrorCode ErrorCode`

          - `InvalidToolInput("invalid_tool_input")`

          - `Unavailable("unavailable")`

          - `MaxUsesExceeded("max_uses_exceeded")`

          - `TooManyRequests("too_many_requests")`

          - `QueryTooLong("query_too_long")`

          - `RequestTooLarge("request_too_large")`

    - `required string ToolUseID`

      pattern: ^srvtoolu_[a-zA-Z0-9_]+$

    - `CacheControlEphemeral? CacheControl`

      Create a cache control breakpoint at this content block.

    - `Caller Caller`

      - `class DirectCaller`

        Tool invocation directly from the model.

      - `class ServerToolCaller`

        Tool invocation generated by a server-side tool.

      - `class ServerToolCaller20260120`

  - `class WebFetchToolResultBlockParam`

    - `JsonElement Type = "web_fetch_tool_result"`

    - `required Content Content`

      - `class WebFetchToolResultErrorBlockParam`

        - `JsonElement Type = "web_fetch_tool_result_error"`

        - `required WebFetchToolResultErrorCode ErrorCode`

          - `InvalidToolInput("invalid_tool_input")`

          - `UrlTooLong("url_too_long")`

          - `UrlNotAllowed("url_not_allowed")`

          - `UrlNotInPriorContext("url_not_in_prior_context")`

          - `UrlNotAccessible("url_not_accessible")`

          - `UnsupportedContentType("unsupported_content_type")`

          - `TooManyRequests("too_many_requests")`

          - `MaxUsesExceeded("max_uses_exceeded")`

          - `Unavailable("unavailable")`

          - `ContentTooLarge("content_too_large")`

      - `class WebFetchBlockParam`

        - `JsonElement Type = "web_fetch_result"`

        - `required DocumentBlockParam Content`

        - `required string Url`

          Fetched content URL

        - `string? RetrievedAt`

          ISO 8601 timestamp when the content was retrieved

    - `required string ToolUseID`

      pattern: ^srvtoolu_[a-zA-Z0-9_]+$

    - `CacheControlEphemeral? CacheControl`

      Create a cache control breakpoint at this content block.

    - `Caller Caller`

      - `class DirectCaller`

        Tool invocation directly from the model.

      - `class ServerToolCaller`

        Tool invocation generated by a server-side tool.

      - `class ServerToolCaller20260120`

  - `class CodeExecutionToolResultBlockParam`

    - `JsonElement Type = "code_execution_tool_result"`

    - `required CodeExecutionToolResultBlockParamContent Content`

      - `class CodeExecutionToolResultErrorParam`

        - `JsonElement Type = "code_execution_tool_result_error"`

        - `required CodeExecutionToolResultErrorCode ErrorCode`

          - `InvalidToolInput("invalid_tool_input")`

          - `Unavailable("unavailable")`

          - `TooManyRequests("too_many_requests")`

          - `ExecutionTimeExceeded("execution_time_exceeded")`

      - `class CodeExecutionResultBlockParam`

        - `JsonElement Type = "code_execution_result"`

        - `required IReadOnlyList<CodeExecutionOutputBlockParam> Content`

          - `JsonElement Type = "code_execution_output"`

          - `required string FileID`

        - `required long ReturnCode`

        - `required string Stderr`

        - `required string Stdout`

      - `class EncryptedCodeExecutionResultBlockParam`

        The output and exit code of Python code that Claude ran with the code execution tool, with standard output in encrypted form, sent back in a later request.

        - `JsonElement Type = "encrypted_code_execution_result"`

        - `required IReadOnlyList<CodeExecutionOutputBlockParam> Content`

          - `JsonElement Type = "code_execution_output"`

          - `required string FileID`

        - `required string EncryptedStdout`

        - `required long ReturnCode`

        - `required string Stderr`

    - `required string ToolUseID`

      pattern: ^srvtoolu_[a-zA-Z0-9_]+$

    - `CacheControlEphemeral? CacheControl`

      Create a cache control breakpoint at this content block.

  - `class BashCodeExecutionToolResultBlockParam`

    - `JsonElement Type = "bash_code_execution_tool_result"`

    - `required Content Content`

      - `class BashCodeExecutionToolResultErrorParam`

        - `JsonElement Type = "bash_code_execution_tool_result_error"`

        - `required BashCodeExecutionToolResultErrorCode ErrorCode`

          - `InvalidToolInput("invalid_tool_input")`

          - `Unavailable("unavailable")`

          - `TooManyRequests("too_many_requests")`

          - `ExecutionTimeExceeded("execution_time_exceeded")`

          - `OutputFileTooLarge("output_file_too_large")`

      - `class BashCodeExecutionResultBlockParam`

        - `JsonElement Type = "bash_code_execution_result"`

        - `required IReadOnlyList<BashCodeExecutionOutputBlockParam> Content`

          - `JsonElement Type = "bash_code_execution_output"`

          - `required string FileID`

        - `required long ReturnCode`

        - `required string Stderr`

        - `required string Stdout`

    - `required string ToolUseID`

      pattern: ^srvtoolu_[a-zA-Z0-9_]+$

    - `CacheControlEphemeral? CacheControl`

      Create a cache control breakpoint at this content block.

  - `class TextEditorCodeExecutionToolResultBlockParam`

    - `JsonElement Type = "text_editor_code_execution_tool_result"`

    - `required Content Content`

      - `class TextEditorCodeExecutionToolResultErrorParam`

        - `JsonElement Type = "text_editor_code_execution_tool_result_error"`

        - `required TextEditorCodeExecutionToolResultErrorCode ErrorCode`

          - `InvalidToolInput("invalid_tool_input")`

          - `Unavailable("unavailable")`

          - `TooManyRequests("too_many_requests")`

          - `ExecutionTimeExceeded("execution_time_exceeded")`

          - `FileNotFound("file_not_found")`

        - `string? ErrorMessage`

      - `class TextEditorCodeExecutionViewResultBlockParam`

        - `JsonElement Type = "text_editor_code_execution_view_result"`

        - `required string Content`

        - `required FileType FileType`

          - `Text("text")`

          - `Image("image")`

          - `Pdf("pdf")`

        - `long? NumLines`

        - `long? StartLine`

        - `long? TotalLines`

      - `class TextEditorCodeExecutionCreateResultBlockParam`

        - `JsonElement Type = "text_editor_code_execution_create_result"`

        - `required bool IsFileUpdate`

      - `class TextEditorCodeExecutionStrReplaceResultBlockParam`

        - `JsonElement Type = "text_editor_code_execution_str_replace_result"`

        - `IReadOnlyList<string>? Lines`

        - `long? NewLines`

        - `long? NewStart`

        - `long? OldLines`

        - `long? OldStart`

    - `required string ToolUseID`

      pattern: ^srvtoolu_[a-zA-Z0-9_]+$

    - `CacheControlEphemeral? CacheControl`

      Create a cache control breakpoint at this content block.

  - `class ToolSearchToolResultBlockParam`

    - `JsonElement Type = "tool_search_tool_result"`

    - `required Content Content`

      - `class ToolSearchToolResultErrorParam`

        - `JsonElement Type = "tool_search_tool_result_error"`

        - `required ToolSearchToolResultErrorCode ErrorCode`

          - `InvalidToolInput("invalid_tool_input")`

          - `Unavailable("unavailable")`

          - `TooManyRequests("too_many_requests")`

          - `ExecutionTimeExceeded("execution_time_exceeded")`

        - `string? ErrorMessage`

      - `class ToolSearchToolSearchResultBlockParam`

        - `JsonElement Type = "tool_search_tool_search_result"`

        - `required IReadOnlyList<ToolReferenceBlockParam> ToolReferences`

          - `JsonElement Type = "tool_reference"`

          - `required string ToolName`

            minLength: 1, maxLength: 256, pattern: ^[a-zA-Z0-9_-]{1,256}$

          - `CacheControlEphemeral? CacheControl`

            Create a cache control breakpoint at this content block.

    - `required string ToolUseID`

      pattern: ^srvtoolu_[a-zA-Z0-9_]+$

    - `CacheControlEphemeral? CacheControl`

      Create a cache control breakpoint at this content block.

  - `class ContainerUploadBlockParam`

    A content block that represents a file to be uploaded to the container
    Files uploaded via this block will be available in the container's input directory.

    - `JsonElement Type = "container_upload"`

    - `required string FileID`

    - `CacheControlEphemeral? CacheControl`

      Create a cache control breakpoint at this content block.

### Content Block Source

- `class ContentBlockSource`

  - `JsonElement Type = "content"`

  - `required Content Content`

    - `string`

    - `IReadOnlyList<ContentBlockSourceContent>`

      - `class TextBlockParam`

        - `JsonElement Type = "text"`

        - `required string Text`

          minLength: 1

        - `CacheControlEphemeral? CacheControl`

          Create a cache control breakpoint at this content block.

          - `JsonElement Type = "ephemeral"`

          - `Ttl Ttl`

            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`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching?sdk_languages=csharp) for details.

            - `Ttl5m("5m")`

            - `Ttl1h("1h")`

        - `IReadOnlyList<TextCitationParam>? Citations`

          - `class CitationCharLocationParam`

            - `JsonElement Type = "char_location"`

            - `required string CitedText`

            - `required long DocumentIndex`

              minimum: 0

            - `required string? DocumentTitle`

              minLength: 1, maxLength: 500

            - `required long EndCharIndex`

            - `required long StartCharIndex`

              minimum: 0

          - `class CitationPageLocationParam`

            - `JsonElement Type = "page_location"`

            - `required string CitedText`

            - `required long DocumentIndex`

              minimum: 0

            - `required string? DocumentTitle`

              minLength: 1, maxLength: 500

            - `required long EndPageNumber`

            - `required long StartPageNumber`

              minimum: 1

          - `class CitationContentBlockLocationParam`

            - `JsonElement Type = "content_block_location"`

            - `required string CitedText`

              The full text of the cited block range, concatenated.

              Always equals the contents of `content[start_block_index:end_block_index]` joined together. The text block is the minimal citable unit; this field is never a substring of a single block. Not counted toward output tokens, and not counted toward input tokens when sent back in subsequent turns.

            - `required long DocumentIndex`

              minimum: 0

            - `required string? DocumentTitle`

              minLength: 1, maxLength: 500

            - `required long EndBlockIndex`

              Exclusive 0-based end index of the cited block range in the source's `content` array.

              Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`.

            - `required long StartBlockIndex`

              0-based index of the first cited block in the source's `content` array.

              minimum: 0

          - `class CitationWebSearchResultLocationParam`

            - `JsonElement Type = "web_search_result_location"`

            - `required string CitedText`

            - `required string EncryptedIndex`

            - `required string? Title`

              minLength: 1, maxLength: 512

            - `required string Url`

              minLength: 1

          - `class CitationSearchResultLocationParam`

            - `JsonElement Type = "search_result_location"`

            - `required string CitedText`

              The full text of the cited block range, concatenated.

              Always equals the contents of `content[start_block_index:end_block_index]` joined together. The text block is the minimal citable unit; this field is never a substring of a single block. Not counted toward output tokens, and not counted toward input tokens when sent back in subsequent turns.

            - `required long EndBlockIndex`

              Exclusive 0-based end index of the cited block range in the source's `content` array.

              Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`.

            - `required long SearchResultIndex`

              0-based index of the cited search result among all `search_result` content blocks in the request, in the order they appear across messages and tool results.

              Counted separately from `document_index`; server-side web search results are not included in this count.

              minimum: 0

            - `required string Source`

            - `required long StartBlockIndex`

              0-based index of the first cited block in the source's `content` array.

              minimum: 0

            - `required string? Title`

      - `class ImageBlockParam`

        - `JsonElement Type = "image"`

        - `required Source Source`

          - `class Base64ImageSource`

            - `JsonElement Type = "base64"`

            - `required string Data`

              format: byte

            - `required MediaType MediaType`

              - `ImageJpeg("image/jpeg")`

              - `ImagePng("image/png")`

              - `ImageGif("image/gif")`

              - `ImageWebP("image/webp")`

          - `class UrlImageSource`

            - `JsonElement Type = "url"`

            - `required string Url`

          - `class FileImageSource`

            - `JsonElement Type = "file"`

            - `required string FileID`

        - `CacheControlEphemeral? CacheControl`

          Create a cache control breakpoint at this content block.

        - `ImageTransformationsParam? Transformations`

          Configures the transformations the server applies to this image before the model observes it. Each key names a condition the server transforms images for; its value selects the transformation applied. Omitted keys keep their default behavior, and an empty object is equivalent to omitting the field.

          - `OversizedImage OversizedImage`

            What the server does when this image exceeds the model's maximum image size. `"downsize"` (the default) scales the image down to fit, which changes the dimensions the model observes without telling you. `"error"` instead rejects the request with a 400 error naming the image's dimensions and the largest dimensions that fit, so you can scale the image deliberately — your image is never silently scaled down.

            - `Downsize("downsize")`

            - `Error("error")`

### Content Block Source Content

- `class ContentBlockSourceContent: union`

  - `class TextBlockParam`

    - `JsonElement Type = "text"`

    - `required string Text`

      minLength: 1

    - `CacheControlEphemeral? CacheControl`

      Create a cache control breakpoint at this content block.

      - `JsonElement Type = "ephemeral"`

      - `Ttl Ttl`

        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`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching?sdk_languages=csharp) for details.

        - `Ttl5m("5m")`

        - `Ttl1h("1h")`

    - `IReadOnlyList<TextCitationParam>? Citations`

      - `class CitationCharLocationParam`

        - `JsonElement Type = "char_location"`

        - `required string CitedText`

        - `required long DocumentIndex`

          minimum: 0

        - `required string? DocumentTitle`

          minLength: 1, maxLength: 500

        - `required long EndCharIndex`

        - `required long StartCharIndex`

          minimum: 0

      - `class CitationPageLocationParam`

        - `JsonElement Type = "page_location"`

        - `required string CitedText`

        - `required long DocumentIndex`

          minimum: 0

        - `required string? DocumentTitle`

          minLength: 1, maxLength: 500

        - `required long EndPageNumber`

        - `required long StartPageNumber`

          minimum: 1

      - `class CitationContentBlockLocationParam`

        - `JsonElement Type = "content_block_location"`

        - `required string CitedText`

          The full text of the cited block range, concatenated.

          Always equals the contents of `content[start_block_index:end_block_index]` joined together. The text block is the minimal citable unit; this field is never a substring of a single block. Not counted toward output tokens, and not counted toward input tokens when sent back in subsequent turns.

        - `required long DocumentIndex`

          minimum: 0

        - `required string? DocumentTitle`

          minLength: 1, maxLength: 500

        - `required long EndBlockIndex`

          Exclusive 0-based end index of the cited block range in the source's `content` array.

          Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`.

        - `required long StartBlockIndex`

          0-based index of the first cited block in the source's `content` array.

          minimum: 0

      - `class CitationWebSearchResultLocationParam`

        - `JsonElement Type = "web_search_result_location"`

        - `required string CitedText`

        - `required string EncryptedIndex`

        - `required string? Title`

          minLength: 1, maxLength: 512

        - `required string Url`

          minLength: 1

      - `class CitationSearchResultLocationParam`

        - `JsonElement Type = "search_result_location"`

        - `required string CitedText`

          The full text of the cited block range, concatenated.

          Always equals the contents of `content[start_block_index:end_block_index]` joined together. The text block is the minimal citable unit; this field is never a substring of a single block. Not counted toward output tokens, and not counted toward input tokens when sent back in subsequent turns.

        - `required long EndBlockIndex`

          Exclusive 0-based end index of the cited block range in the source's `content` array.

          Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`.

        - `required long SearchResultIndex`

          0-based index of the cited search result among all `search_result` content blocks in the request, in the order they appear across messages and tool results.

          Counted separately from `document_index`; server-side web search results are not included in this count.

          minimum: 0

        - `required string Source`

        - `required long StartBlockIndex`

          0-based index of the first cited block in the source's `content` array.

          minimum: 0

        - `required string? Title`

  - `class ImageBlockParam`

    - `JsonElement Type = "image"`

    - `required Source Source`

      - `class Base64ImageSource`

        - `JsonElement Type = "base64"`

        - `required string Data`

          format: byte

        - `required MediaType MediaType`

          - `ImageJpeg("image/jpeg")`

          - `ImagePng("image/png")`

          - `ImageGif("image/gif")`

          - `ImageWebP("image/webp")`

      - `class UrlImageSource`

        - `JsonElement Type = "url"`

        - `required string Url`

      - `class FileImageSource`

        - `JsonElement Type = "file"`

        - `required string FileID`

    - `CacheControlEphemeral? CacheControl`

      Create a cache control breakpoint at this content block.

    - `ImageTransformationsParam? Transformations`

      Configures the transformations the server applies to this image before the model observes it. Each key names a condition the server transforms images for; its value selects the transformation applied. Omitted keys keep their default behavior, and an empty object is equivalent to omitting the field.

      - `OversizedImage OversizedImage`

        What the server does when this image exceeds the model's maximum image size. `"downsize"` (the default) scales the image down to fit, which changes the dimensions the model observes without telling you. `"error"` instead rejects the request with a 400 error naming the image's dimensions and the largest dimensions that fit, so you can scale the image deliberately — your image is never silently scaled down.

        - `Downsize("downsize")`

        - `Error("error")`

### Diagnostics

- `class Diagnostics`

  Request-level diagnostics: why the prompt cache could not fully reuse
  the prefix of the request named by `diagnostics.previous_message_id`.

  - `required CacheMissReason? CacheMissReason`

    Explains why the prompt cache could not fully reuse the prefix from the request identified by `diagnostics.previous_message_id`. `null` means diagnosis is still pending — the response was serialized before the background comparison completed.

    - `class CacheMissModelChanged`

      A `cache_miss_reason` for a request whose `model` or `speed` differs from the previous request's.

      See the [cache diagnostics guide](https://platform.claude.com/docs/en/build-with-claude/cache-diagnostics?sdk_languages=csharp#cache-miss-reason-types) to learn what to change for each reason.

      - `JsonElement Type = "model_changed"`

      - `required long CacheMissedInputTokens`

        Approximate number of input tokens that would have been read from cache had the prefix matched the previous request.

    - `class CacheMissSystemChanged`

      A `cache_miss_reason` for a request whose `system` differs from the previous request's.

      See the [cache diagnostics guide](https://platform.claude.com/docs/en/build-with-claude/cache-diagnostics?sdk_languages=csharp#cache-miss-reason-types) to learn what to change for each reason.

      - `JsonElement Type = "system_changed"`

      - `required long CacheMissedInputTokens`

        Approximate number of input tokens that would have been read from cache had the prefix matched the previous request.

    - `class CacheMissToolsChanged`

      A `cache_miss_reason` for a request whose `tools` differ from the previous request's, for example because tools were added, removed, or reordered.

      See the [cache diagnostics guide](https://platform.claude.com/docs/en/build-with-claude/cache-diagnostics?sdk_languages=csharp#cache-miss-reason-types) to learn what to change for each reason.

      - `JsonElement Type = "tools_changed"`

      - `required long CacheMissedInputTokens`

        Approximate number of input tokens that would have been read from cache had the prefix matched the previous request.

    - `class CacheMissMessagesChanged`

      A `cache_miss_reason` for a request whose `messages` differ from the previous request's in an earlier entry, instead of only having entries appended. The `model`, `system`, and `tools` match.

      See the [cache diagnostics guide](https://platform.claude.com/docs/en/build-with-claude/cache-diagnostics?sdk_languages=csharp#cache-miss-reason-types) to learn what to change for each reason.

      - `JsonElement Type = "messages_changed"`

      - `required long CacheMissedInputTokens`

        Approximate number of input tokens that would have been read from cache had the prefix matched the previous request.

    - `class CacheMissPreviousMessageNotFound`

      A `cache_miss_reason` for when the API doesn't have a stored record of the request that `diagnostics.previous_message_id` references.

      This doesn't mean that this request changed.

      See the [cache diagnostics guide](https://platform.claude.com/docs/en/build-with-claude/cache-diagnostics?sdk_languages=csharp#cache-miss-reason-types) to learn what to change for each reason.

      - `JsonElement Type = "previous_message_not_found"`

    - `class CacheMissUnavailable`

      A `cache_miss_reason` for when the API can't give a diagnosis. The request itself was processed normally.

      This includes a request whose `model`, `system`, and `tools` match the previous request's but whose other prompt-affecting parameters, such as `thinking` or `tool_choice`, differ.

      See the [cache diagnostics guide](https://platform.claude.com/docs/en/build-with-claude/cache-diagnostics?sdk_languages=csharp#cache-miss-reason-types) to learn what to change for each reason.

      - `JsonElement Type = "unavailable"`

### Diagnostics Param

- `class DiagnosticsParam`

  Request-level diagnostics. Currently carries the previous response
  id for prompt-cache divergence reporting.

  - `string? PreviousMessageID`

    The `id` (`msg_...`) from this client's previous /v1/messages response. The server compares that request's prompt fingerprint against this one and returns `diagnostics.cache_miss_reason` when the prompt-cache prefix could not be reused. Pass `null` on the first turn to opt in without a prior message to compare.

    maxLength: 256

### Direct Caller

- `class DirectCaller`

  Tool invocation directly from the model.

  - `JsonElement Type = "direct"`

### Document Block

- `class DocumentBlock`

  - `JsonElement Type = "document"`

  - `required CitationsConfig? Citations`

    Citation configuration for the document

    - `required bool Enabled`

  - `required Source Source`

    - `class Base64PdfSource`

      - `JsonElement Type = "base64"`

      - `required string Data`

        format: byte

      - `JsonElement MediaType = "application/pdf"`

    - `class PlainTextSource`

      - `JsonElement Type = "text"`

      - `required string Data`

      - `JsonElement MediaType = "text/plain"`

  - `required string? Title`

    The title of the document

### Document Block Param

- `class DocumentBlockParam`

  - `JsonElement Type = "document"`

  - `required Source Source`

    - `class Base64PdfSource`

      - `JsonElement Type = "base64"`

      - `required string Data`

        format: byte

      - `JsonElement MediaType = "application/pdf"`

    - `class PlainTextSource`

      - `JsonElement Type = "text"`

      - `required string Data`

      - `JsonElement MediaType = "text/plain"`

    - `class ContentBlockSource`

      - `JsonElement Type = "content"`

      - `required Content Content`

        - `string`

        - `IReadOnlyList<ContentBlockSourceContent>`

          - `class TextBlockParam`

            - `JsonElement Type = "text"`

            - `required string Text`

              minLength: 1

            - `CacheControlEphemeral? CacheControl`

              Create a cache control breakpoint at this content block.

              - `JsonElement Type = "ephemeral"`

              - `Ttl Ttl`

                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`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching?sdk_languages=csharp) for details.

                - `Ttl5m("5m")`

                - `Ttl1h("1h")`

            - `IReadOnlyList<TextCitationParam>? Citations`

              - `class CitationCharLocationParam`

                - `JsonElement Type = "char_location"`

                - `required string CitedText`

                - `required long DocumentIndex`

                  minimum: 0

                - `required string? DocumentTitle`

                  minLength: 1, maxLength: 500

                - `required long EndCharIndex`

                - `required long StartCharIndex`

                  minimum: 0

              - `class CitationPageLocationParam`

                - `JsonElement Type = "page_location"`

                - `required string CitedText`

                - `required long DocumentIndex`

                  minimum: 0

                - `required string? DocumentTitle`

                  minLength: 1, maxLength: 500

                - `required long EndPageNumber`

                - `required long StartPageNumber`

                  minimum: 1

              - `class CitationContentBlockLocationParam`

                - `JsonElement Type = "content_block_location"`

                - `required string CitedText`

                  The full text of the cited block range, concatenated.

                  Always equals the contents of `content[start_block_index:end_block_index]` joined together. The text block is the minimal citable unit; this field is never a substring of a single block. Not counted toward output tokens, and not counted toward input tokens when sent back in subsequent turns.

                - `required long DocumentIndex`

                  minimum: 0

                - `required string? DocumentTitle`

                  minLength: 1, maxLength: 500

                - `required long EndBlockIndex`

                  Exclusive 0-based end index of the cited block range in the source's `content` array.

                  Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`.

                - `required long StartBlockIndex`

                  0-based index of the first cited block in the source's `content` array.

                  minimum: 0

              - `class CitationWebSearchResultLocationParam`

                - `JsonElement Type = "web_search_result_location"`

                - `required string CitedText`

                - `required string EncryptedIndex`

                - `required string? Title`

                  minLength: 1, maxLength: 512

                - `required string Url`

                  minLength: 1

              - `class CitationSearchResultLocationParam`

                - `JsonElement Type = "search_result_location"`

                - `required string CitedText`

                  The full text of the cited block range, concatenated.

                  Always equals the contents of `content[start_block_index:end_block_index]` joined together. The text block is the minimal citable unit; this field is never a substring of a single block. Not counted toward output tokens, and not counted toward input tokens when sent back in subsequent turns.

                - `required long EndBlockIndex`

                  Exclusive 0-based end index of the cited block range in the source's `content` array.

                  Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`.

                - `required long SearchResultIndex`

                  0-based index of the cited search result among all `search_result` content blocks in the request, in the order they appear across messages and tool results.

                  Counted separately from `document_index`; server-side web search results are not included in this count.

                  minimum: 0

                - `required string Source`

                - `required long StartBlockIndex`

                  0-based index of the first cited block in the source's `content` array.

                  minimum: 0

                - `required string? Title`

          - `class ImageBlockParam`

            - `JsonElement Type = "image"`

            - `required Source Source`

              - `class Base64ImageSource`

                - `JsonElement Type = "base64"`

                - `required string Data`

                  format: byte

                - `required MediaType MediaType`

                  - `ImageJpeg("image/jpeg")`

                  - `ImagePng("image/png")`

                  - `ImageGif("image/gif")`

                  - `ImageWebP("image/webp")`

              - `class UrlImageSource`

                - `JsonElement Type = "url"`

                - `required string Url`

              - `class FileImageSource`

                - `JsonElement Type = "file"`

                - `required string FileID`

            - `CacheControlEphemeral? CacheControl`

              Create a cache control breakpoint at this content block.

            - `ImageTransformationsParam? Transformations`

              Configures the transformations the server applies to this image before the model observes it. Each key names a condition the server transforms images for; its value selects the transformation applied. Omitted keys keep their default behavior, and an empty object is equivalent to omitting the field.

              - `OversizedImage OversizedImage`

                What the server does when this image exceeds the model's maximum image size. `"downsize"` (the default) scales the image down to fit, which changes the dimensions the model observes without telling you. `"error"` instead rejects the request with a 400 error naming the image's dimensions and the largest dimensions that fit, so you can scale the image deliberately — your image is never silently scaled down.

                - `Downsize("downsize")`

                - `Error("error")`

    - `class UrlPdfSource`

      - `JsonElement Type = "url"`

      - `required string Url`

    - `class FileDocumentSource`

      - `JsonElement Type = "file"`

      - `required string FileID`

  - `CacheControlEphemeral? CacheControl`

    Create a cache control breakpoint at this content block.

  - `CitationsConfigParam? Citations`

    - `bool Enabled`

  - `string? Context`

    minLength: 1

  - `string? Title`

    minLength: 1, maxLength: 500

### Encrypted Code Execution Result Block

- `class EncryptedCodeExecutionResultBlock`

  The output and exit code of Python code that Claude ran with the code execution tool, with standard output in encrypted form.

  The API returns this block in place of `code_execution_result` when the code called the web search tool.

  See the [programmatic tool calling guide](https://platform.claude.com/docs/en/agents-and-tools/tool-use/programmatic-tool-calling?sdk_languages=csharp) to learn more about programmatic tool calling.

  - `JsonElement Type = "encrypted_code_execution_result"`

  - `required IReadOnlyList<CodeExecutionOutputBlock> Content`

    - `JsonElement Type = "code_execution_output"`

    - `required string FileID`

  - `required string EncryptedStdout`

  - `required long ReturnCode`

  - `required string Stderr`

### Encrypted Code Execution Result Block Param

- `class EncryptedCodeExecutionResultBlockParam`

  The output and exit code of Python code that Claude ran with the code execution tool, with standard output in encrypted form, sent back in a later request.

  - `JsonElement Type = "encrypted_code_execution_result"`

  - `required IReadOnlyList<CodeExecutionOutputBlockParam> Content`

    - `JsonElement Type = "code_execution_output"`

    - `required string FileID`

  - `required string EncryptedStdout`

  - `required long ReturnCode`

  - `required string Stderr`

### File Document Source

- `class FileDocumentSource`

  - `JsonElement Type = "file"`

  - `required string FileID`

### File Image Source

- `class FileImageSource`

  - `JsonElement Type = "file"`

  - `required string FileID`

### Image Block Param

- `class ImageBlockParam`

  - `JsonElement Type = "image"`

  - `required Source Source`

    - `class Base64ImageSource`

      - `JsonElement Type = "base64"`

      - `required string Data`

        format: byte

      - `required MediaType MediaType`

        - `ImageJpeg("image/jpeg")`

        - `ImagePng("image/png")`

        - `ImageGif("image/gif")`

        - `ImageWebP("image/webp")`

    - `class UrlImageSource`

      - `JsonElement Type = "url"`

      - `required string Url`

    - `class FileImageSource`

      - `JsonElement Type = "file"`

      - `required string FileID`

  - `CacheControlEphemeral? CacheControl`

    Create a cache control breakpoint at this content block.

    - `JsonElement Type = "ephemeral"`

    - `Ttl Ttl`

      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`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching?sdk_languages=csharp) for details.

      - `Ttl5m("5m")`

      - `Ttl1h("1h")`

  - `ImageTransformationsParam? Transformations`

    Configures the transformations the server applies to this image before the model observes it. Each key names a condition the server transforms images for; its value selects the transformation applied. Omitted keys keep their default behavior, and an empty object is equivalent to omitting the field.

    - `OversizedImage OversizedImage`

      What the server does when this image exceeds the model's maximum image size. `"downsize"` (the default) scales the image down to fit, which changes the dimensions the model observes without telling you. `"error"` instead rejects the request with a 400 error naming the image's dimensions and the largest dimensions that fit, so you can scale the image deliberately — your image is never silently scaled down.

      - `Downsize("downsize")`

      - `Error("error")`

### Image Transformations Param

- `class ImageTransformationsParam`

  Configures the transformations the server applies to this image before the model observes it. Each key names a condition the server transforms images for; its value selects the transformation applied. Omitted keys keep their default behavior, and an empty object is equivalent to omitting the field.

  - `OversizedImage OversizedImage`

    What the server does when this image exceeds the model's maximum image size. `"downsize"` (the default) scales the image down to fit, which changes the dimensions the model observes without telling you. `"error"` instead rejects the request with a 400 error naming the image's dimensions and the largest dimensions that fit, so you can scale the image deliberately — your image is never silently scaled down.

    - `Downsize("downsize")`

    - `Error("error")`

### Input JSON Delta

- `class InputJsonDelta`

  - `JsonElement Type = "input_json_delta"`

  - `required string PartialJson`

### JSON Output Format

- `class JsonOutputFormat`

  - `JsonElement Type = "json_schema"`

  - `required IReadOnlyDictionary<string, JsonElement> Schema`

    The JSON schema of the format

### Memory Tool 20250818

- `class MemoryTool20250818`

  - `JsonElement Type = "memory_20250818"`

  - `JsonElement Name = "memory"`

    Name of the tool.

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

  - `IReadOnlyList<AllowedCaller> AllowedCallers`

    - `Direct("direct")`

    - `CodeExecution20250825("code_execution_20250825")`

    - `CodeExecution20260120("code_execution_20260120")`

    - `CodeExecution20260521("code_execution_20260521")`

  - `CacheControlEphemeral? CacheControl`

    Create a cache control breakpoint at this content block.

    - `JsonElement Type = "ephemeral"`

    - `Ttl Ttl`

      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`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching?sdk_languages=csharp) for details.

      - `Ttl5m("5m")`

      - `Ttl1h("1h")`

  - `bool DeferLoading`

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

  - `IReadOnlyList<IReadOnlyDictionary<string, JsonElement>> InputExamples`

  - `bool Strict`

    When true, guarantees schema validation on tool names and inputs

### Message

- `class Message`

  - `JsonElement Type = "message"`

    Object type.

    For Messages, this is always `"message"`.

  - `required string ID`

    Unique object identifier.

    The format and length of IDs may change over time.

  - `required Container? Container`

    Information about the container used in this request.

    This will be non-null if a container tool (e.g. code execution) was used.

    - `required string ID`

      Identifier for the container used in this request

    - `required DateTimeOffset ExpiresAt`

      The time at which the container will expire.

      format: date-time

    - `required IReadOnlyList<ContainerSkill>? Skills`

      Skills loaded in the container

      - `required ContainerSkillType Type`

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

        - `Anthropic("anthropic")`

        - `Custom("custom")`

      - `required string SkillID`

        Skill ID

        minLength: 1, maxLength: 64

      - `required string Version`

        The resolved version: a skill version ID for custom skills.

        minLength: 1, maxLength: 64

  - `required IReadOnlyList<ContentBlock> Content`

    Content generated by the model.

    This is an array of content blocks, each of which has a `type` that determines its shape.

    Example:

    ```json
    [{"type": "text", "text": "Hi, I'm Claude."}]
    ```

    If the request input `messages` ended with an `assistant` turn, then the response `content` will continue directly from that last turn. You can use this to constrain the model's output.

    For example, if the input `messages` were:

    ```json
    [
      {"role": "user", "content": "What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun"},
      {"role": "assistant", "content": "The best answer is ("}
    ]
    ```

    Then the response `content` might be:

    ```json
    [{"type": "text", "text": "B)"}]
    ```

    - `class TextBlock`

      - `JsonElement Type = "text"`

      - `required IReadOnlyList<TextCitation>? Citations`

        Citations supporting the text block.

        The type of citation returned will depend on the type of document being cited. Citing a PDF results in `page_location`, plain text results in `char_location`, and content document results in `content_block_location`.

        - `class CitationCharLocation`

          - `JsonElement Type = "char_location"`

          - `required string CitedText`

          - `required long DocumentIndex`

            minimum: 0

          - `required string? DocumentTitle`

          - `required long EndCharIndex`

          - `required string? FileID`

          - `required long StartCharIndex`

            minimum: 0

        - `class CitationPageLocation`

          - `JsonElement Type = "page_location"`

          - `required string CitedText`

          - `required long DocumentIndex`

            minimum: 0

          - `required string? DocumentTitle`

          - `required long EndPageNumber`

          - `required string? FileID`

          - `required long StartPageNumber`

            minimum: 1

        - `class CitationContentBlockLocation`

          - `JsonElement Type = "content_block_location"`

          - `required string CitedText`

            The full text of the cited block range, concatenated.

            Always equals the contents of `content[start_block_index:end_block_index]` joined together. The text block is the minimal citable unit; this field is never a substring of a single block. Not counted toward output tokens, and not counted toward input tokens when sent back in subsequent turns.

          - `required long DocumentIndex`

            minimum: 0

          - `required string? DocumentTitle`

          - `required long EndBlockIndex`

            Exclusive 0-based end index of the cited block range in the source's `content` array.

            Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`.

          - `required string? FileID`

          - `required long StartBlockIndex`

            0-based index of the first cited block in the source's `content` array.

            minimum: 0

        - `class CitationsWebSearchResultLocation`

          - `JsonElement Type = "web_search_result_location"`

          - `required string CitedText`

          - `required string EncryptedIndex`

          - `required string? Title`

            maxLength: 512

          - `required string Url`

        - `class CitationsSearchResultLocation`

          - `JsonElement Type = "search_result_location"`

          - `required string CitedText`

            The full text of the cited block range, concatenated.

            Always equals the contents of `content[start_block_index:end_block_index]` joined together. The text block is the minimal citable unit; this field is never a substring of a single block. Not counted toward output tokens, and not counted toward input tokens when sent back in subsequent turns.

          - `required long EndBlockIndex`

            Exclusive 0-based end index of the cited block range in the source's `content` array.

            Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`.

          - `required long SearchResultIndex`

            0-based index of the cited search result among all `search_result` content blocks in the request, in the order they appear across messages and tool results.

            Counted separately from `document_index`; server-side web search results are not included in this count.

            minimum: 0

          - `required string Source`

          - `required long StartBlockIndex`

            0-based index of the first cited block in the source's `content` array.

            minimum: 0

          - `required string? Title`

      - `required string Text`

    - `class ThinkingBlock`

      - `JsonElement Type = "thinking"`

      - `required string Signature`

        A value used to verify that this thinking block was generated by Claude when it is passed back to the API.

        This is an opaque field and should not be interpreted or parsed. When passing thinking blocks back to the API (required when using tools with extended thinking), pass them back exactly as received, with this field intact.

        See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking?sdk_languages=csharp) for details.

      - `required string Thinking`

        The text of Claude's thinking process for this block.

    - `class RedactedThinkingBlock`

      - `JsonElement Type = "redacted_thinking"`

      - `required string Data`

        The contents of this redacted thinking block, returned when portions of the model's thinking were safety-redacted. This field is opaque and encrypted, with no readable content.

        Pass `redacted_thinking` blocks back to the API unchanged when continuing a multi-turn conversation.

        See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking?sdk_languages=csharp#redacted-thinking-blocks) for details.

    - `class ToolUseBlock`

      - `JsonElement Type = "tool_use"`

      - `required string ID`

        pattern: ^[a-zA-Z0-9_-]+$

      - `required Caller Caller`

        - `class DirectCaller`

          Tool invocation directly from the model.

          - `JsonElement Type = "direct"`

        - `class ServerToolCaller`

          Tool invocation generated by a server-side tool.

          - `JsonElement Type = "code_execution_20250825"`

          - `required string ToolID`

            pattern: ^srvtoolu_[a-zA-Z0-9_]+$

        - `class ServerToolCaller20260120`

          - `JsonElement Type = "code_execution_20260120"`

          - `required string ToolID`

            pattern: ^srvtoolu_[a-zA-Z0-9_]+$

      - `required IReadOnlyDictionary<string, JsonElement> Input`

      - `required string Name`

        minLength: 1

      - `string? ToolsetName`

        For a toolset member tool_use, the toolset family.

        minLength: 1, maxLength: 64, pattern: ^[a-zA-Z0-9_-]+$

    - `class ServerToolUseBlock`

      - `JsonElement Type = "server_tool_use"`

      - `required string ID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

      - `required Caller Caller`

        - `class DirectCaller`

          Tool invocation directly from the model.

        - `class ServerToolCaller`

          Tool invocation generated by a server-side tool.

        - `class ServerToolCaller20260120`

      - `required IReadOnlyDictionary<string, JsonElement> Input`

      - `required Name Name`

        - `WebSearch("web_search")`

        - `WebFetch("web_fetch")`

        - `CodeExecution("code_execution")`

        - `BashCodeExecution("bash_code_execution")`

        - `TextEditorCodeExecution("text_editor_code_execution")`

        - `ToolSearchToolRegex("tool_search_tool_regex")`

        - `ToolSearchToolBm25("tool_search_tool_bm25")`

    - `class WebSearchToolResultBlock`

      - `JsonElement Type = "web_search_tool_result"`

      - `required Caller Caller`

        - `class DirectCaller`

          Tool invocation directly from the model.

        - `class ServerToolCaller`

          Tool invocation generated by a server-side tool.

        - `class ServerToolCaller20260120`

      - `required WebSearchToolResultBlockContent Content`

        - `class WebSearchToolResultError`

          - `JsonElement Type = "web_search_tool_result_error"`

          - `required WebSearchToolResultErrorCode ErrorCode`

            - `InvalidToolInput("invalid_tool_input")`

            - `Unavailable("unavailable")`

            - `MaxUsesExceeded("max_uses_exceeded")`

            - `TooManyRequests("too_many_requests")`

            - `QueryTooLong("query_too_long")`

            - `RequestTooLarge("request_too_large")`

        - `IReadOnlyList<WebSearchResultBlock>`

          - `JsonElement Type = "web_search_result"`

          - `required string EncryptedContent`

          - `required string? PageAge`

          - `required string Title`

          - `required string Url`

      - `required string ToolUseID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

    - `class WebFetchToolResultBlock`

      - `JsonElement Type = "web_fetch_tool_result"`

      - `required Caller Caller`

        - `class DirectCaller`

          Tool invocation directly from the model.

        - `class ServerToolCaller`

          Tool invocation generated by a server-side tool.

        - `class ServerToolCaller20260120`

      - `required Content Content`

        - `class WebFetchToolResultErrorBlock`

          - `JsonElement Type = "web_fetch_tool_result_error"`

          - `required WebFetchToolResultErrorCode ErrorCode`

            - `InvalidToolInput("invalid_tool_input")`

            - `UrlTooLong("url_too_long")`

            - `UrlNotAllowed("url_not_allowed")`

            - `UrlNotInPriorContext("url_not_in_prior_context")`

            - `UrlNotAccessible("url_not_accessible")`

            - `UnsupportedContentType("unsupported_content_type")`

            - `TooManyRequests("too_many_requests")`

            - `MaxUsesExceeded("max_uses_exceeded")`

            - `Unavailable("unavailable")`

            - `ContentTooLarge("content_too_large")`

        - `class WebFetchBlock`

          - `JsonElement Type = "web_fetch_result"`

          - `required DocumentBlock Content`

            - `JsonElement Type = "document"`

            - `required CitationsConfig? Citations`

              Citation configuration for the document

              - `required bool Enabled`

            - `required Source Source`

              - `class Base64PdfSource`

                - `JsonElement Type = "base64"`

                - `required string Data`

                  format: byte

                - `JsonElement MediaType = "application/pdf"`

              - `class PlainTextSource`

                - `JsonElement Type = "text"`

                - `required string Data`

                - `JsonElement MediaType = "text/plain"`

            - `required string? Title`

              The title of the document

          - `required string? RetrievedAt`

            ISO 8601 timestamp when the content was retrieved

          - `required string Url`

            Fetched content URL

      - `required string ToolUseID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

    - `class CodeExecutionToolResultBlock`

      - `JsonElement Type = "code_execution_tool_result"`

      - `required CodeExecutionToolResultBlockContent Content`

        - `class CodeExecutionToolResultError`

          - `JsonElement Type = "code_execution_tool_result_error"`

          - `required CodeExecutionToolResultErrorCode ErrorCode`

            - `InvalidToolInput("invalid_tool_input")`

            - `Unavailable("unavailable")`

            - `TooManyRequests("too_many_requests")`

            - `ExecutionTimeExceeded("execution_time_exceeded")`

        - `class CodeExecutionResultBlock`

          - `JsonElement Type = "code_execution_result"`

          - `required IReadOnlyList<CodeExecutionOutputBlock> Content`

            - `JsonElement Type = "code_execution_output"`

            - `required string FileID`

          - `required long ReturnCode`

          - `required string Stderr`

          - `required string Stdout`

        - `class EncryptedCodeExecutionResultBlock`

          The output and exit code of Python code that Claude ran with the code execution tool, with standard output in encrypted form.

          The API returns this block in place of `code_execution_result` when the code called the web search tool.

          See the [programmatic tool calling guide](https://platform.claude.com/docs/en/agents-and-tools/tool-use/programmatic-tool-calling?sdk_languages=csharp) to learn more about programmatic tool calling.

          - `JsonElement Type = "encrypted_code_execution_result"`

          - `required IReadOnlyList<CodeExecutionOutputBlock> Content`

            - `JsonElement Type = "code_execution_output"`

            - `required string FileID`

          - `required string EncryptedStdout`

          - `required long ReturnCode`

          - `required string Stderr`

      - `required string ToolUseID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

    - `class BashCodeExecutionToolResultBlock`

      - `JsonElement Type = "bash_code_execution_tool_result"`

      - `required Content Content`

        - `class BashCodeExecutionToolResultError`

          - `JsonElement Type = "bash_code_execution_tool_result_error"`

          - `required BashCodeExecutionToolResultErrorCode ErrorCode`

            - `InvalidToolInput("invalid_tool_input")`

            - `Unavailable("unavailable")`

            - `TooManyRequests("too_many_requests")`

            - `ExecutionTimeExceeded("execution_time_exceeded")`

            - `OutputFileTooLarge("output_file_too_large")`

        - `class BashCodeExecutionResultBlock`

          - `JsonElement Type = "bash_code_execution_result"`

          - `required IReadOnlyList<BashCodeExecutionOutputBlock> Content`

            - `JsonElement Type = "bash_code_execution_output"`

            - `required string FileID`

          - `required long ReturnCode`

          - `required string Stderr`

          - `required string Stdout`

      - `required string ToolUseID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

    - `class TextEditorCodeExecutionToolResultBlock`

      - `JsonElement Type = "text_editor_code_execution_tool_result"`

      - `required Content Content`

        - `class TextEditorCodeExecutionToolResultError`

          - `JsonElement Type = "text_editor_code_execution_tool_result_error"`

          - `required TextEditorCodeExecutionToolResultErrorCode ErrorCode`

            - `InvalidToolInput("invalid_tool_input")`

            - `Unavailable("unavailable")`

            - `TooManyRequests("too_many_requests")`

            - `ExecutionTimeExceeded("execution_time_exceeded")`

            - `FileNotFound("file_not_found")`

          - `required string? ErrorMessage`

        - `class TextEditorCodeExecutionViewResultBlock`

          - `JsonElement Type = "text_editor_code_execution_view_result"`

          - `required string Content`

          - `required FileType FileType`

            - `Text("text")`

            - `Image("image")`

            - `Pdf("pdf")`

          - `required long? NumLines`

          - `required long? StartLine`

          - `required long? TotalLines`

        - `class TextEditorCodeExecutionCreateResultBlock`

          - `JsonElement Type = "text_editor_code_execution_create_result"`

          - `required bool IsFileUpdate`

        - `class TextEditorCodeExecutionStrReplaceResultBlock`

          - `JsonElement Type = "text_editor_code_execution_str_replace_result"`

          - `required IReadOnlyList<string>? Lines`

          - `required long? NewLines`

          - `required long? NewStart`

          - `required long? OldLines`

          - `required long? OldStart`

      - `required string ToolUseID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

    - `class ToolSearchToolResultBlock`

      - `JsonElement Type = "tool_search_tool_result"`

      - `required Content Content`

        - `class ToolSearchToolResultError`

          - `JsonElement Type = "tool_search_tool_result_error"`

          - `required ToolSearchToolResultErrorCode ErrorCode`

            - `InvalidToolInput("invalid_tool_input")`

            - `Unavailable("unavailable")`

            - `TooManyRequests("too_many_requests")`

            - `ExecutionTimeExceeded("execution_time_exceeded")`

          - `required string? ErrorMessage`

        - `class ToolSearchToolSearchResultBlock`

          - `JsonElement Type = "tool_search_tool_search_result"`

          - `required IReadOnlyList<ToolReferenceBlock> ToolReferences`

            - `JsonElement Type = "tool_reference"`

            - `required string ToolName`

              minLength: 1, maxLength: 256, pattern: ^[a-zA-Z0-9_-]{1,256}$

      - `required string ToolUseID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

    - `class ContainerUploadBlock`

      Response model for a file uploaded to the container.

      - `JsonElement Type = "container_upload"`

      - `required string FileID`

  - `required Diagnostics? Diagnostics`

    Request-level diagnostics. `null` when the request did not supply `diagnostics`, or when it did and no prompt-cache divergence was detected.

    - `required CacheMissReason? CacheMissReason`

      Explains why the prompt cache could not fully reuse the prefix from the request identified by `diagnostics.previous_message_id`. `null` means diagnosis is still pending — the response was serialized before the background comparison completed.

      - `class CacheMissModelChanged`

        A `cache_miss_reason` for a request whose `model` or `speed` differs from the previous request's.

        See the [cache diagnostics guide](https://platform.claude.com/docs/en/build-with-claude/cache-diagnostics?sdk_languages=csharp#cache-miss-reason-types) to learn what to change for each reason.

        - `JsonElement Type = "model_changed"`

        - `required long CacheMissedInputTokens`

          Approximate number of input tokens that would have been read from cache had the prefix matched the previous request.

      - `class CacheMissSystemChanged`

        A `cache_miss_reason` for a request whose `system` differs from the previous request's.

        See the [cache diagnostics guide](https://platform.claude.com/docs/en/build-with-claude/cache-diagnostics?sdk_languages=csharp#cache-miss-reason-types) to learn what to change for each reason.

        - `JsonElement Type = "system_changed"`

        - `required long CacheMissedInputTokens`

          Approximate number of input tokens that would have been read from cache had the prefix matched the previous request.

      - `class CacheMissToolsChanged`

        A `cache_miss_reason` for a request whose `tools` differ from the previous request's, for example because tools were added, removed, or reordered.

        See the [cache diagnostics guide](https://platform.claude.com/docs/en/build-with-claude/cache-diagnostics?sdk_languages=csharp#cache-miss-reason-types) to learn what to change for each reason.

        - `JsonElement Type = "tools_changed"`

        - `required long CacheMissedInputTokens`

          Approximate number of input tokens that would have been read from cache had the prefix matched the previous request.

      - `class CacheMissMessagesChanged`

        A `cache_miss_reason` for a request whose `messages` differ from the previous request's in an earlier entry, instead of only having entries appended. The `model`, `system`, and `tools` match.

        See the [cache diagnostics guide](https://platform.claude.com/docs/en/build-with-claude/cache-diagnostics?sdk_languages=csharp#cache-miss-reason-types) to learn what to change for each reason.

        - `JsonElement Type = "messages_changed"`

        - `required long CacheMissedInputTokens`

          Approximate number of input tokens that would have been read from cache had the prefix matched the previous request.

      - `class CacheMissPreviousMessageNotFound`

        A `cache_miss_reason` for when the API doesn't have a stored record of the request that `diagnostics.previous_message_id` references.

        This doesn't mean that this request changed.

        See the [cache diagnostics guide](https://platform.claude.com/docs/en/build-with-claude/cache-diagnostics?sdk_languages=csharp#cache-miss-reason-types) to learn what to change for each reason.

        - `JsonElement Type = "previous_message_not_found"`

      - `class CacheMissUnavailable`

        A `cache_miss_reason` for when the API can't give a diagnosis. The request itself was processed normally.

        This includes a request whose `model`, `system`, and `tools` match the previous request's but whose other prompt-affecting parameters, such as `thinking` or `tool_choice`, differ.

        See the [cache diagnostics guide](https://platform.claude.com/docs/en/build-with-claude/cache-diagnostics?sdk_languages=csharp#cache-miss-reason-types) to learn what to change for each reason.

        - `JsonElement Type = "unavailable"`

  - `required Model Model`

    The model that will complete your prompt.

    See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options.

    - `ClaudeHaiku5_5("claude-haiku-5-5")`

      Fastest model for high-volume, real-time tasks

    - `ClaudeSonnet5_5("claude-sonnet-5-5")`

      Efficient model for coding and agents

    - `ClaudeFable5_1("claude-fable-5-1")`

      Frontier intelligence for ambitious tasks across coding, scientific discovery, and enterprise workflows

    - `ClaudeOpus5_5("claude-opus-5-5")`

      Powerful intelligence for coding, knowledge work, and long-running agents

    - `ClaudeMythos5_1("claude-mythos-5-1")`

      Our most capable model for cybersecurity and biology research, available through trusted access programs

    - `ClaudeSonnet5("claude-sonnet-5")`

      Efficient model for coding and agents

    - `ClaudeFable5("claude-fable-5")`

      Next generation of intelligence for the hardest knowledge work and coding problems

    - `ClaudeMythos5("claude-mythos-5")`

      Most capable model for cybersecurity and biology research

    - `ClaudeOpus5("claude-opus-5")`

      Powerful intelligence for long-running agents and coding

    - `ClaudeOpus4_8("claude-opus-4-8")`

      Powerful intelligence for long-running agents and coding

    - `ClaudeOpus4_7("claude-opus-4-7")`

      Powerful intelligence for long-running agents and coding

    - `ClaudeOpus4_6("claude-opus-4-6")`

      Powerful intelligence for long-running agents and coding

    - `ClaudeSonnet4_6("claude-sonnet-4-6")`

      Best combination of speed and intelligence

    - `ClaudeHaiku4_5("claude-haiku-4-5")`

    - `ClaudeHaiku4_5_20251001("claude-haiku-4-5-20251001")`

    - `ClaudeOpus4_5("claude-opus-4-5")`

      Powerful intelligence for long-running agents and coding

    - `ClaudeOpus4_5_20251101("claude-opus-4-5-20251101")`

      Powerful intelligence for long-running agents and coding

    - `ClaudeMythosPreview("claude-mythos-preview")`

      **Deprecated**: Will reach end-of-life on June 30, 2026. Please migrate to claude-mythos-5. Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for more information.

      New class of intelligence, strongest in coding and cybersecurity

    - `ClaudeSonnet4_5("claude-sonnet-4-5")`

      **Deprecated**: Will reach end-of-life on November 30, 2026. Please migrate to claude-sonnet-5-5. Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for more information.

      High-performance model for agents and coding

    - `ClaudeSonnet4_5_20250929("claude-sonnet-4-5-20250929")`

      **Deprecated**: Will reach end-of-life on November 30, 2026. Please migrate to claude-sonnet-5-5. Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for more information.

      High-performance model for agents and coding

  - `JsonElement Role = "assistant"`

    Conversational role of the generated message.

    This will always be `"assistant"`.

  - `required RefusalStopDetails? StopDetails`

    Structured information about why model output stopped.

    This is `null` when the `stop_reason` has no additional detail to report.

    - `JsonElement Type = "refusal"`

    - `required Category? Category`

      The policy category that triggered the refusal.

      `null` when the refusal doesn't map to a named category.

      - `Cyber("cyber")`

        The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category.

      - `Bio("bio")`

        The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category.

      - `FrontierLlm("frontier_llm")`

        The request could assist the development of competing AI models, which is restricted under [Anthropic's commercial terms](https://www.anthropic.com/legal/commercial-terms). Benign machine learning work can also trigger this category.

      - `ReasoningExtraction("reasoning_extraction")`

        The request asks the model to reproduce its internal reasoning in the response text. To get reasoning in a structured form instead, use [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking?sdk_languages=csharp).

      - `GeneralHarms("general_harms")`

        The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category.

    - `required string? Explanation`

      Human-readable explanation of the refusal.

      This text is not guaranteed to be stable. `null` when no explanation is available for the category.

  - `required StopReason? StopReason`

    The reason that we stopped.

    This may be one the following values:

    * `"end_turn"`: the model reached a natural stopping point
    * `"max_tokens"`: we exceeded the requested `max_tokens` or the model's maximum
    * `"stop_sequence"`: one of your provided custom `stop_sequences` was generated
    * `"tool_use"`: the model invoked one or more tools
    * `"pause_turn"`: we paused a long-running turn. You may provide the response back as-is in a subsequent request to let the model continue.
    * `"refusal"`: when streaming classifiers intervene to handle potential policy violations
    * `"model_context_window_exceeded"`: we exceeded the model's context window

    In non-streaming mode this value is always non-null. In streaming mode, it is null in the `message_start` event and non-null otherwise.

    - `EndTurn("end_turn")`

    - `MaxTokens("max_tokens")`

    - `StopSequence("stop_sequence")`

    - `ToolUse("tool_use")`

    - `PauseTurn("pause_turn")`

    - `Refusal("refusal")`

    - `ModelContextWindowExceeded("model_context_window_exceeded")`

  - `required string? StopSequence`

    Which custom stop sequence was generated, if any.

    This value will be a non-null string if one of your custom stop sequences was generated.

  - `required Usage Usage`

    Billing and rate-limit usage.

    Anthropic's API bills and rate-limits by token counts, as tokens represent the underlying cost to our systems.

    Under the hood, the API transforms requests into a format suitable for the model. The model's output then goes through a parsing stage before becoming an API response. As a result, the token counts in `usage` will not match one-to-one with the exact visible content of an API request or response.

    For example, `output_tokens` will be non-zero, even for an empty string response from Claude.

    Total input tokens in a request is the summation of `input_tokens`, `cache_creation_input_tokens`, and `cache_read_input_tokens`.

    - `required CacheCreation? CacheCreation`

      Breakdown of cached tokens by TTL

      - `required long Ephemeral1hInputTokens`

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

        minimum: 0

      - `required long Ephemeral5mInputTokens`

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

        minimum: 0

    - `required long? CacheCreationInputTokens`

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

      minimum: 0

    - `required long? CacheReadInputTokens`

      The number of input tokens read from the cache.

      minimum: 0

    - `required string? InferenceGeo`

      The geographic region where inference was performed for this request.

    - `required long InputTokens`

      The number of input tokens which were used.

      minimum: 0

    - `required long OutputTokens`

      The number of output tokens which were used.

      minimum: 0

    - `required OutputTokensDetails? OutputTokensDetails`

      Breakdown of output tokens by category.

      `output_tokens` remains the inclusive, authoritative total used for billing.
      This object provides a read-only decomposition for observability — for example,
      how many of the billed output tokens were spent on internal reasoning that may
      have been summarized before being returned to you.

      - `required long ThinkingTokens`

        Number of output tokens the model generated as internal reasoning, including
        the thinking-block delimiter tokens.

        Reflects the raw reasoning the model produced, not the (possibly shorter)
        summarized thinking text returned in the response body. Computed by
        re-tokenizing the raw reasoning text, so it may differ from the model's exact
        generation count by a small number of tokens. Always ≤ `output_tokens`;
        `output_tokens - thinking_tokens` approximates the non-reasoning output.

        minimum: 0

    - `required ServerToolUsage? ServerToolUse`

      The number of server tool requests.

      - `required long WebFetchRequests`

        The number of web fetch tool requests.

        minimum: 0

      - `required long WebSearchRequests`

        The number of web search tool requests.

        minimum: 0

    - `required ServiceTier? ServiceTier`

      If the request used the priority, standard, or batch tier.

      - `Standard("standard")`

      - `Priority("priority")`

      - `Batch("batch")`

    - `required Speed? Speed`

      The inference speed mode used for this request.

      - `Standard("standard")`

      - `Fast("fast")`

### Message Content Param

- `class MessageContentParam: union`

  - `string`

  - `IReadOnlyList<ContentBlockParam>`

    - `class TextBlockParam`

      - `JsonElement Type = "text"`

      - `required string Text`

        minLength: 1

      - `CacheControlEphemeral? CacheControl`

        Create a cache control breakpoint at this content block.

        - `JsonElement Type = "ephemeral"`

        - `Ttl Ttl`

          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`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching?sdk_languages=csharp) for details.

          - `Ttl5m("5m")`

          - `Ttl1h("1h")`

      - `IReadOnlyList<TextCitationParam>? Citations`

        - `class CitationCharLocationParam`

          - `JsonElement Type = "char_location"`

          - `required string CitedText`

          - `required long DocumentIndex`

            minimum: 0

          - `required string? DocumentTitle`

            minLength: 1, maxLength: 500

          - `required long EndCharIndex`

          - `required long StartCharIndex`

            minimum: 0

        - `class CitationPageLocationParam`

          - `JsonElement Type = "page_location"`

          - `required string CitedText`

          - `required long DocumentIndex`

            minimum: 0

          - `required string? DocumentTitle`

            minLength: 1, maxLength: 500

          - `required long EndPageNumber`

          - `required long StartPageNumber`

            minimum: 1

        - `class CitationContentBlockLocationParam`

          - `JsonElement Type = "content_block_location"`

          - `required string CitedText`

            The full text of the cited block range, concatenated.

            Always equals the contents of `content[start_block_index:end_block_index]` joined together. The text block is the minimal citable unit; this field is never a substring of a single block. Not counted toward output tokens, and not counted toward input tokens when sent back in subsequent turns.

          - `required long DocumentIndex`

            minimum: 0

          - `required string? DocumentTitle`

            minLength: 1, maxLength: 500

          - `required long EndBlockIndex`

            Exclusive 0-based end index of the cited block range in the source's `content` array.

            Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`.

          - `required long StartBlockIndex`

            0-based index of the first cited block in the source's `content` array.

            minimum: 0

        - `class CitationWebSearchResultLocationParam`

          - `JsonElement Type = "web_search_result_location"`

          - `required string CitedText`

          - `required string EncryptedIndex`

          - `required string? Title`

            minLength: 1, maxLength: 512

          - `required string Url`

            minLength: 1

        - `class CitationSearchResultLocationParam`

          - `JsonElement Type = "search_result_location"`

          - `required string CitedText`

            The full text of the cited block range, concatenated.

            Always equals the contents of `content[start_block_index:end_block_index]` joined together. The text block is the minimal citable unit; this field is never a substring of a single block. Not counted toward output tokens, and not counted toward input tokens when sent back in subsequent turns.

          - `required long EndBlockIndex`

            Exclusive 0-based end index of the cited block range in the source's `content` array.

            Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`.

          - `required long SearchResultIndex`

            0-based index of the cited search result among all `search_result` content blocks in the request, in the order they appear across messages and tool results.

            Counted separately from `document_index`; server-side web search results are not included in this count.

            minimum: 0

          - `required string Source`

          - `required long StartBlockIndex`

            0-based index of the first cited block in the source's `content` array.

            minimum: 0

          - `required string? Title`

    - `class ImageBlockParam`

      - `JsonElement Type = "image"`

      - `required Source Source`

        - `class Base64ImageSource`

          - `JsonElement Type = "base64"`

          - `required string Data`

            format: byte

          - `required MediaType MediaType`

            - `ImageJpeg("image/jpeg")`

            - `ImagePng("image/png")`

            - `ImageGif("image/gif")`

            - `ImageWebP("image/webp")`

        - `class UrlImageSource`

          - `JsonElement Type = "url"`

          - `required string Url`

        - `class FileImageSource`

          - `JsonElement Type = "file"`

          - `required string FileID`

      - `CacheControlEphemeral? CacheControl`

        Create a cache control breakpoint at this content block.

      - `ImageTransformationsParam? Transformations`

        Configures the transformations the server applies to this image before the model observes it. Each key names a condition the server transforms images for; its value selects the transformation applied. Omitted keys keep their default behavior, and an empty object is equivalent to omitting the field.

        - `OversizedImage OversizedImage`

          What the server does when this image exceeds the model's maximum image size. `"downsize"` (the default) scales the image down to fit, which changes the dimensions the model observes without telling you. `"error"` instead rejects the request with a 400 error naming the image's dimensions and the largest dimensions that fit, so you can scale the image deliberately — your image is never silently scaled down.

          - `Downsize("downsize")`

          - `Error("error")`

    - `class DocumentBlockParam`

      - `JsonElement Type = "document"`

      - `required Source Source`

        - `class Base64PdfSource`

          - `JsonElement Type = "base64"`

          - `required string Data`

            format: byte

          - `JsonElement MediaType = "application/pdf"`

        - `class PlainTextSource`

          - `JsonElement Type = "text"`

          - `required string Data`

          - `JsonElement MediaType = "text/plain"`

        - `class ContentBlockSource`

          - `JsonElement Type = "content"`

          - `required Content Content`

            - `string`

            - `IReadOnlyList<ContentBlockSourceContent>`

              - `class TextBlockParam`

              - `class ImageBlockParam`

        - `class UrlPdfSource`

          - `JsonElement Type = "url"`

          - `required string Url`

        - `class FileDocumentSource`

          - `JsonElement Type = "file"`

          - `required string FileID`

      - `CacheControlEphemeral? CacheControl`

        Create a cache control breakpoint at this content block.

      - `CitationsConfigParam? Citations`

        - `bool Enabled`

      - `string? Context`

        minLength: 1

      - `string? Title`

        minLength: 1, maxLength: 500

    - `class SearchResultBlockParam`

      - `JsonElement Type = "search_result"`

      - `required IReadOnlyList<TextBlockParam> Content`

        - `JsonElement Type = "text"`

        - `required string Text`

          minLength: 1

        - `CacheControlEphemeral? CacheControl`

          Create a cache control breakpoint at this content block.

        - `IReadOnlyList<TextCitationParam>? Citations`

      - `required string Source`

      - `required string Title`

      - `CacheControlEphemeral? CacheControl`

        Create a cache control breakpoint at this content block.

      - `CitationsConfigParam Citations`

    - `class ThinkingBlockParam`

      - `JsonElement Type = "thinking"`

      - `required string Signature`

        The `signature` value of this thinking block, exactly as returned by the API in a previous response. Used to verify that the block was generated by Claude.

        Thinking blocks must be passed back unmodified and in their original order; a modified block results in a 400 `invalid_request_error`.

      - `required string Thinking`

        The `thinking` text of this block as returned by the API.

    - `class RedactedThinkingBlockParam`

      - `JsonElement Type = "redacted_thinking"`

      - `required string Data`

        The `data` value of this redacted thinking block, exactly as returned by the API in a previous response. Opaque and encrypted; pass it back unchanged.

    - `class ToolUseBlockParam`

      - `JsonElement Type = "tool_use"`

      - `required string ID`

        pattern: ^[a-zA-Z0-9_-]+$

      - `required IReadOnlyDictionary<string, JsonElement> Input`

      - `required string Name`

        minLength: 1, maxLength: 200

      - `CacheControlEphemeral? CacheControl`

        Create a cache control breakpoint at this content block.

      - `Caller Caller`

        - `class DirectCaller`

          Tool invocation directly from the model.

          - `JsonElement Type = "direct"`

        - `class ServerToolCaller`

          Tool invocation generated by a server-side tool.

          - `JsonElement Type = "code_execution_20250825"`

          - `required string ToolID`

            pattern: ^srvtoolu_[a-zA-Z0-9_]+$

        - `class ServerToolCaller20260120`

          - `JsonElement Type = "code_execution_20260120"`

          - `required string ToolID`

            pattern: ^srvtoolu_[a-zA-Z0-9_]+$

      - `string? ToolsetName`

        For a toolset member tool_use, the toolset family this member belongs to.

        minLength: 1, maxLength: 64, pattern: ^[a-zA-Z0-9_-]+$

    - `class ToolResultBlockParam`

      - `JsonElement Type = "tool_result"`

      - `required string ToolUseID`

        pattern: ^[a-zA-Z0-9_-]+$

      - `CacheControlEphemeral? CacheControl`

        Create a cache control breakpoint at this content block.

      - `Content Content`

        - `string`

        - `IReadOnlyList<Block>`

          - `class TextBlockParam`

          - `class ImageBlockParam`

          - `class SearchResultBlockParam`

          - `class DocumentBlockParam`

          - `class ToolReferenceBlockParam`

            Tool reference block that can be included in tool_result content.

            - `JsonElement Type = "tool_reference"`

            - `required string ToolName`

              minLength: 1, maxLength: 256, pattern: ^[a-zA-Z0-9_-]{1,256}$

            - `CacheControlEphemeral? CacheControl`

              Create a cache control breakpoint at this content block.

          - `class BrowserStateBlockParam`

            The caller's browser state after a browser toolset member call —
            the full inventory of open tabs, which tab is active, and any side
            effects (tabs opened, download state changes) the call produced.

            At most one per `tool_result`, only on a non-error result answering a
            browser toolset member `tool_use`. The server renders the
            model-visible text from it; the model never sees the raw fields.

            - `JsonElement Type = "browser_state"`

            - `required IReadOnlyList<BrowserStateTabEntry> Tabs`

              All tabs open in the browser after this call — the full inventory, not a delta. May be empty. Whenever non-empty, exactly one entry carries `active: true`.

              maxItems: 100

              - `required string TabID`

                The caller-assigned identifier for this tab, unique within the inventory.

                minLength: 1, maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

              - `required string Title`

                The title of the page the tab is showing. May be empty.

                maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

              - `required string Url`

                The URL of the page the tab is showing. May be empty.

                maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

              - `bool Active`

                Whether this tab is the active tab after this call. Whenever `tabs` is non-empty, exactly one entry is marked `active: true`.

            - `CacheControlEphemeral? CacheControl`

              Create a cache control breakpoint at this content block.

            - `IReadOnlyList<BrowserStateChange>? StateChanges`

              Tabs opened and download state changes during this call. "Nothing to report" is expressed by omitting the field, never by an empty list.

              minItems: 1, maxItems: 200

              - `class BrowserStateChangeTabOpened`

                A tab this call's execution opened that remains open at its end —
                the creation delta of the `tabs` inventory, not an event log.

                Carries only the `tab_id`; the tab's `title` and `url` live on its
                `tabs` entry, which must include the same `tab_id`. A tab opened
                during a failed call gets no deferred `tab_opened`; it simply appears
                in the next result's `tabs` inventory.

                - `JsonElement Type = "tab_opened"`

                - `required string TabID`

                  The `tab_id` of the opened tab, present in `tabs`.

                  minLength: 1, maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

              - `class BrowserStateChangeDownloadStarted`

                A file download that started during this call.

                - `JsonElement Type = "download_started"`

                - `required string DownloadID`

                  The caller-assigned identifier for this download, stable across the state changes reporting it.

                  minLength: 1, maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

                - `required string Url`

                  The final post-redirect URL the download was served from.

                  maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

              - `class BrowserStateChangeDownloadCompleted`

                A file download that finished during this call, reported with the
                same `download_id` as its `download_started` — or without a prior
                `download_started`, when the download finished during the call that
                started it (at most one state change per `download_id` per result).

                - `JsonElement Type = "download_completed"`

                - `required string DownloadID`

                  The caller-assigned identifier for this download, stable across the state changes reporting it.

                  minLength: 1, maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

                - `required string Url`

                  The final post-redirect URL the download was served from.

                  maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

                - `string? Path`

                  Where the executor saved the file, on the executor's filesystem. Only included when another tool in the same environment can read the file at that path.

                  maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

                - `long? SizeBytes`

                  The completed download's size.

                  minimum: 0

              - `class BrowserStateChangeDownloadFailed`

                A file download that failed — or was cancelled — during this call.

                - `JsonElement Type = "download_failed"`

                - `required string DownloadID`

                  The caller-assigned identifier for this download, stable across the state changes reporting it.

                  minLength: 1, maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

                - `required string Url`

                  The final post-redirect URL the download was served from.

                  maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

                - `string? Error`

                  The failure or cancellation detail, when known.

                  maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

      - `bool IsError`

      - `string? ToolsetName`

        For a toolset member tool_result, the toolset family of the paired tool_use.

        minLength: 1, maxLength: 64, pattern: ^[a-zA-Z0-9_-]+$

    - `class ServerToolUseBlockParam`

      - `JsonElement Type = "server_tool_use"`

      - `required string ID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

      - `required IReadOnlyDictionary<string, JsonElement> Input`

      - `required Name Name`

        - `WebSearch("web_search")`

        - `WebFetch("web_fetch")`

        - `CodeExecution("code_execution")`

        - `BashCodeExecution("bash_code_execution")`

        - `TextEditorCodeExecution("text_editor_code_execution")`

        - `ToolSearchToolRegex("tool_search_tool_regex")`

        - `ToolSearchToolBm25("tool_search_tool_bm25")`

      - `CacheControlEphemeral? CacheControl`

        Create a cache control breakpoint at this content block.

      - `Caller Caller`

        - `class DirectCaller`

          Tool invocation directly from the model.

        - `class ServerToolCaller`

          Tool invocation generated by a server-side tool.

        - `class ServerToolCaller20260120`

    - `class WebSearchToolResultBlockParam`

      - `JsonElement Type = "web_search_tool_result"`

      - `required WebSearchToolResultBlockParamContent Content`

        - `IReadOnlyList<WebSearchResultBlockParam>`

          - `JsonElement Type = "web_search_result"`

          - `required string EncryptedContent`

          - `required string Title`

          - `required string Url`

          - `string? PageAge`

        - `class WebSearchToolRequestError`

          - `JsonElement Type = "web_search_tool_result_error"`

          - `required WebSearchToolResultErrorCode ErrorCode`

            - `InvalidToolInput("invalid_tool_input")`

            - `Unavailable("unavailable")`

            - `MaxUsesExceeded("max_uses_exceeded")`

            - `TooManyRequests("too_many_requests")`

            - `QueryTooLong("query_too_long")`

            - `RequestTooLarge("request_too_large")`

      - `required string ToolUseID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

      - `CacheControlEphemeral? CacheControl`

        Create a cache control breakpoint at this content block.

      - `Caller Caller`

        - `class DirectCaller`

          Tool invocation directly from the model.

        - `class ServerToolCaller`

          Tool invocation generated by a server-side tool.

        - `class ServerToolCaller20260120`

    - `class WebFetchToolResultBlockParam`

      - `JsonElement Type = "web_fetch_tool_result"`

      - `required Content Content`

        - `class WebFetchToolResultErrorBlockParam`

          - `JsonElement Type = "web_fetch_tool_result_error"`

          - `required WebFetchToolResultErrorCode ErrorCode`

            - `InvalidToolInput("invalid_tool_input")`

            - `UrlTooLong("url_too_long")`

            - `UrlNotAllowed("url_not_allowed")`

            - `UrlNotInPriorContext("url_not_in_prior_context")`

            - `UrlNotAccessible("url_not_accessible")`

            - `UnsupportedContentType("unsupported_content_type")`

            - `TooManyRequests("too_many_requests")`

            - `MaxUsesExceeded("max_uses_exceeded")`

            - `Unavailable("unavailable")`

            - `ContentTooLarge("content_too_large")`

        - `class WebFetchBlockParam`

          - `JsonElement Type = "web_fetch_result"`

          - `required DocumentBlockParam Content`

          - `required string Url`

            Fetched content URL

          - `string? RetrievedAt`

            ISO 8601 timestamp when the content was retrieved

      - `required string ToolUseID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

      - `CacheControlEphemeral? CacheControl`

        Create a cache control breakpoint at this content block.

      - `Caller Caller`

        - `class DirectCaller`

          Tool invocation directly from the model.

        - `class ServerToolCaller`

          Tool invocation generated by a server-side tool.

        - `class ServerToolCaller20260120`

    - `class CodeExecutionToolResultBlockParam`

      - `JsonElement Type = "code_execution_tool_result"`

      - `required CodeExecutionToolResultBlockParamContent Content`

        - `class CodeExecutionToolResultErrorParam`

          - `JsonElement Type = "code_execution_tool_result_error"`

          - `required CodeExecutionToolResultErrorCode ErrorCode`

            - `InvalidToolInput("invalid_tool_input")`

            - `Unavailable("unavailable")`

            - `TooManyRequests("too_many_requests")`

            - `ExecutionTimeExceeded("execution_time_exceeded")`

        - `class CodeExecutionResultBlockParam`

          - `JsonElement Type = "code_execution_result"`

          - `required IReadOnlyList<CodeExecutionOutputBlockParam> Content`

            - `JsonElement Type = "code_execution_output"`

            - `required string FileID`

          - `required long ReturnCode`

          - `required string Stderr`

          - `required string Stdout`

        - `class EncryptedCodeExecutionResultBlockParam`

          The output and exit code of Python code that Claude ran with the code execution tool, with standard output in encrypted form, sent back in a later request.

          - `JsonElement Type = "encrypted_code_execution_result"`

          - `required IReadOnlyList<CodeExecutionOutputBlockParam> Content`

            - `JsonElement Type = "code_execution_output"`

            - `required string FileID`

          - `required string EncryptedStdout`

          - `required long ReturnCode`

          - `required string Stderr`

      - `required string ToolUseID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

      - `CacheControlEphemeral? CacheControl`

        Create a cache control breakpoint at this content block.

    - `class BashCodeExecutionToolResultBlockParam`

      - `JsonElement Type = "bash_code_execution_tool_result"`

      - `required Content Content`

        - `class BashCodeExecutionToolResultErrorParam`

          - `JsonElement Type = "bash_code_execution_tool_result_error"`

          - `required BashCodeExecutionToolResultErrorCode ErrorCode`

            - `InvalidToolInput("invalid_tool_input")`

            - `Unavailable("unavailable")`

            - `TooManyRequests("too_many_requests")`

            - `ExecutionTimeExceeded("execution_time_exceeded")`

            - `OutputFileTooLarge("output_file_too_large")`

        - `class BashCodeExecutionResultBlockParam`

          - `JsonElement Type = "bash_code_execution_result"`

          - `required IReadOnlyList<BashCodeExecutionOutputBlockParam> Content`

            - `JsonElement Type = "bash_code_execution_output"`

            - `required string FileID`

          - `required long ReturnCode`

          - `required string Stderr`

          - `required string Stdout`

      - `required string ToolUseID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

      - `CacheControlEphemeral? CacheControl`

        Create a cache control breakpoint at this content block.

    - `class TextEditorCodeExecutionToolResultBlockParam`

      - `JsonElement Type = "text_editor_code_execution_tool_result"`

      - `required Content Content`

        - `class TextEditorCodeExecutionToolResultErrorParam`

          - `JsonElement Type = "text_editor_code_execution_tool_result_error"`

          - `required TextEditorCodeExecutionToolResultErrorCode ErrorCode`

            - `InvalidToolInput("invalid_tool_input")`

            - `Unavailable("unavailable")`

            - `TooManyRequests("too_many_requests")`

            - `ExecutionTimeExceeded("execution_time_exceeded")`

            - `FileNotFound("file_not_found")`

          - `string? ErrorMessage`

        - `class TextEditorCodeExecutionViewResultBlockParam`

          - `JsonElement Type = "text_editor_code_execution_view_result"`

          - `required string Content`

          - `required FileType FileType`

            - `Text("text")`

            - `Image("image")`

            - `Pdf("pdf")`

          - `long? NumLines`

          - `long? StartLine`

          - `long? TotalLines`

        - `class TextEditorCodeExecutionCreateResultBlockParam`

          - `JsonElement Type = "text_editor_code_execution_create_result"`

          - `required bool IsFileUpdate`

        - `class TextEditorCodeExecutionStrReplaceResultBlockParam`

          - `JsonElement Type = "text_editor_code_execution_str_replace_result"`

          - `IReadOnlyList<string>? Lines`

          - `long? NewLines`

          - `long? NewStart`

          - `long? OldLines`

          - `long? OldStart`

      - `required string ToolUseID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

      - `CacheControlEphemeral? CacheControl`

        Create a cache control breakpoint at this content block.

    - `class ToolSearchToolResultBlockParam`

      - `JsonElement Type = "tool_search_tool_result"`

      - `required Content Content`

        - `class ToolSearchToolResultErrorParam`

          - `JsonElement Type = "tool_search_tool_result_error"`

          - `required ToolSearchToolResultErrorCode ErrorCode`

            - `InvalidToolInput("invalid_tool_input")`

            - `Unavailable("unavailable")`

            - `TooManyRequests("too_many_requests")`

            - `ExecutionTimeExceeded("execution_time_exceeded")`

          - `string? ErrorMessage`

        - `class ToolSearchToolSearchResultBlockParam`

          - `JsonElement Type = "tool_search_tool_search_result"`

          - `required IReadOnlyList<ToolReferenceBlockParam> ToolReferences`

            - `JsonElement Type = "tool_reference"`

            - `required string ToolName`

              minLength: 1, maxLength: 256, pattern: ^[a-zA-Z0-9_-]{1,256}$

            - `CacheControlEphemeral? CacheControl`

              Create a cache control breakpoint at this content block.

      - `required string ToolUseID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

      - `CacheControlEphemeral? CacheControl`

        Create a cache control breakpoint at this content block.

    - `class ContainerUploadBlockParam`

      A content block that represents a file to be uploaded to the container
      Files uploaded via this block will be available in the container's input directory.

      - `JsonElement Type = "container_upload"`

      - `required string FileID`

      - `CacheControlEphemeral? CacheControl`

        Create a cache control breakpoint at this content block.

### Message Count Tokens Tool

- `class MessageCountTokensTool: union`

  - `class Tool`

    - `Type? Type`

    - `required InputSchema InputSchema`

      [JSON schema](https://json-schema.org/draft/2020-12) for this tool's input.

      This defines the shape of the `input` that your tool accepts and that the model will produce.

      - `JsonElement Type = "object"`

      - `IReadOnlyDictionary<string, JsonElement>? Properties`

      - `IReadOnlyList<string>? Required`

    - `required string Name`

      Name of the tool.

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

      minLength: 1, maxLength: 128, pattern: ^[a-zA-Z0-9_-]{1,128}$

    - `IReadOnlyList<AllowedCaller> AllowedCallers`

      - `Direct("direct")`

      - `CodeExecution20250825("code_execution_20250825")`

      - `CodeExecution20260120("code_execution_20260120")`

      - `CodeExecution20260521("code_execution_20260521")`

    - `CacheControlEphemeral? CacheControl`

      Create a cache control breakpoint at this content block.

      - `JsonElement Type = "ephemeral"`

      - `Ttl Ttl`

        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`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching?sdk_languages=csharp) for details.

        - `Ttl5m("5m")`

        - `Ttl1h("1h")`

    - `bool DeferLoading`

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

    - `string Description`

      Description of what this tool does.

      Tool descriptions should be as detailed as possible. The more information that the model has about what the tool is and how to use it, the better it will perform. You can use natural language descriptions to reinforce important aspects of the tool input JSON schema.

    - `bool? EagerInputStreaming`

      Enable eager input streaming for this tool. When true, tool input parameters will be streamed incrementally as they are generated, and types will be inferred on-the-fly rather than buffering the full JSON output. When false, streaming is disabled for this tool even if the fine-grained-tool-streaming beta is active. When null (default), uses the default behavior based on beta headers.

    - `IReadOnlyList<IReadOnlyDictionary<string, JsonElement>> InputExamples`

    - `bool Strict`

      When true, guarantees schema validation on tool names and inputs

  - `class ToolBash20250124`

    - `JsonElement Type = "bash_20250124"`

    - `JsonElement Name = "bash"`

      Name of the tool.

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

    - `IReadOnlyList<AllowedCaller> AllowedCallers`

      - `Direct("direct")`

      - `CodeExecution20250825("code_execution_20250825")`

      - `CodeExecution20260120("code_execution_20260120")`

      - `CodeExecution20260521("code_execution_20260521")`

    - `CacheControlEphemeral? CacheControl`

      Create a cache control breakpoint at this content block.

    - `bool DeferLoading`

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

    - `IReadOnlyList<IReadOnlyDictionary<string, JsonElement>> InputExamples`

    - `bool Strict`

      When true, guarantees schema validation on tool names and inputs

  - `class CodeExecutionTool20250522`

    - `JsonElement Type = "code_execution_20250522"`

    - `JsonElement Name = "code_execution"`

      Name of the tool.

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

    - `IReadOnlyList<AllowedCaller> AllowedCallers`

      - `Direct("direct")`

      - `CodeExecution20250825("code_execution_20250825")`

      - `CodeExecution20260120("code_execution_20260120")`

      - `CodeExecution20260521("code_execution_20260521")`

    - `CacheControlEphemeral? CacheControl`

      Create a cache control breakpoint at this content block.

    - `bool DeferLoading`

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

    - `bool Strict`

      When true, guarantees schema validation on tool names and inputs

  - `class CodeExecutionTool20250825`

    - `JsonElement Type = "code_execution_20250825"`

    - `JsonElement Name = "code_execution"`

      Name of the tool.

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

    - `IReadOnlyList<AllowedCaller> AllowedCallers`

      - `Direct("direct")`

      - `CodeExecution20250825("code_execution_20250825")`

      - `CodeExecution20260120("code_execution_20260120")`

      - `CodeExecution20260521("code_execution_20260521")`

    - `CacheControlEphemeral? CacheControl`

      Create a cache control breakpoint at this content block.

    - `bool DeferLoading`

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

    - `bool Strict`

      When true, guarantees schema validation on tool names and inputs

  - `class CodeExecutionTool20260120`

    A `tools` entry for the code execution tool, version `code_execution_20260120`. It adds REPL state persistence to version `code_execution_20250825`.

    REPL state persistence applies with programmatic tool calling. With it, the Python interpreter state, such as variable bindings, persists across requests that reuse the container.

    See the [code execution tool guide](https://platform.claude.com/docs/en/agents-and-tools/tool-use/code-execution-tool?sdk_languages=csharp#tool-versions) to learn what each tool version adds.

    - `JsonElement Type = "code_execution_20260120"`

    - `JsonElement Name = "code_execution"`

      Name of the tool.

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

    - `IReadOnlyList<AllowedCaller> AllowedCallers`

      - `Direct("direct")`

      - `CodeExecution20250825("code_execution_20250825")`

      - `CodeExecution20260120("code_execution_20260120")`

      - `CodeExecution20260521("code_execution_20260521")`

    - `CacheControlEphemeral? CacheControl`

      Create a cache control breakpoint at this content block.

    - `bool DeferLoading`

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

    - `bool Strict`

      When true, guarantees schema validation on tool names and inputs

  - `class CodeExecutionTool20260521`

    Code execution tool with REPL state persistence.

    - `JsonElement Type = "code_execution_20260521"`

    - `JsonElement Name = "code_execution"`

      Name of the tool.

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

    - `IReadOnlyList<AllowedCaller> AllowedCallers`

      - `Direct("direct")`

      - `CodeExecution20250825("code_execution_20250825")`

      - `CodeExecution20260120("code_execution_20260120")`

      - `CodeExecution20260521("code_execution_20260521")`

    - `CacheControlEphemeral? CacheControl`

      Create a cache control breakpoint at this content block.

    - `bool DeferLoading`

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

    - `bool Strict`

      When true, guarantees schema validation on tool names and inputs

  - `class BrowserToolset20260801`

    The browser toolset: a single `tools[]` entry (carrying no
    `name`) that declares the browser tool family. The model is served
    the family's tool with any members disabled via `configs` removed
    from its schema.

    - `JsonElement Type = "browser_toolset_20260801"`

    - `CacheControlEphemeral? CacheControl`

      Create a cache control breakpoint at this content block.

    - `BrowserToolsetConfigs? Configs`

      Sparse per-member overrides, keyed by member name. Absent, null, and {} are equivalent; a member's defaults apply wherever its key is absent.

      - `BrowserTypeConfig? Type`

        `type`'s config overrides.

        - `bool? DeferLoading`

          Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

        - `bool? Enabled`

          Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

      - `BrowserCloseTabConfig? CloseTab`

        `close_tab`'s config overrides.

        - `bool? DeferLoading`

          Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

        - `bool? Enabled`

          Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

      - `BrowserDoubleClickConfig? DoubleClick`

        `double_click`'s config overrides.

        - `bool? DeferLoading`

          Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

        - `bool? Enabled`

          Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

      - `BrowserFileUploadConfig? FileUpload`

        `file_upload`'s config overrides.

        - `bool? DeferLoading`

          Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

        - `bool? Enabled`

          Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

      - `BrowserFindConfig? Find`

        `find`'s config overrides.

        - `bool? DeferLoading`

          Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

        - `bool? Enabled`

          Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

      - `BrowserFormInputConfig? FormInput`

        `form_input`'s config overrides.

        - `bool? DeferLoading`

          Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

        - `bool? Enabled`

          Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

      - `BrowserGetPageTextConfig? GetPageText`

        `get_page_text`'s config overrides.

        - `bool? DeferLoading`

          Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

        - `bool? Enabled`

          Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

      - `BrowserHoldKeyConfig? HoldKey`

        `hold_key`'s config overrides.

        - `bool? DeferLoading`

          Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

        - `bool? Enabled`

          Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

      - `BrowserHoverConfig? Hover`

        `hover`'s config overrides.

        - `bool? DeferLoading`

          Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

        - `bool? Enabled`

          Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

      - `BrowserJavascriptExecConfig? JavascriptExec`

        `javascript_exec`'s config overrides.

        - `bool? DeferLoading`

          Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

        - `bool? Enabled`

          Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

      - `BrowserKeyConfig? Key`

        `key`'s config overrides.

        - `bool? DeferLoading`

          Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

        - `bool? Enabled`

          Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

      - `BrowserLeftClickConfig? LeftClick`

        `left_click`'s config overrides.

        - `bool? DeferLoading`

          Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

        - `bool? Enabled`

          Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

      - `BrowserLeftClickDragConfig? LeftClickDrag`

        `left_click_drag`'s config overrides.

        - `bool? DeferLoading`

          Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

        - `bool? Enabled`

          Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

      - `BrowserLeftMouseDownConfig? LeftMouseDown`

        `left_mouse_down`'s config overrides.

        - `bool? DeferLoading`

          Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

        - `bool? Enabled`

          Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

      - `BrowserLeftMouseUpConfig? LeftMouseUp`

        `left_mouse_up`'s config overrides.

        - `bool? DeferLoading`

          Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

        - `bool? Enabled`

          Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

      - `BrowserListTabsConfig? ListTabs`

        `list_tabs`'s config overrides.

        - `bool? DeferLoading`

          Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

        - `bool? Enabled`

          Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

      - `BrowserMiddleClickConfig? MiddleClick`

        `middle_click`'s config overrides.

        - `bool? DeferLoading`

          Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

        - `bool? Enabled`

          Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

      - `BrowserMouseMoveConfig? MouseMove`

        `mouse_move`'s config overrides.

        - `bool? DeferLoading`

          Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

        - `bool? Enabled`

          Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

      - `BrowserNavigateConfig? Navigate`

        `navigate`'s config overrides.

        - `bool? DeferLoading`

          Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

        - `bool? Enabled`

          Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

      - `BrowserNewTabConfig? NewTab`

        `new_tab`'s config overrides.

        - `bool? DeferLoading`

          Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

        - `bool? Enabled`

          Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

      - `BrowserReadConsoleConfig? ReadConsole`

        `read_console`'s config overrides.

        - `bool? DeferLoading`

          Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

        - `bool? Enabled`

          Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

      - `BrowserReadNetworkConfig? ReadNetwork`

        `read_network`'s config overrides.

        - `bool? DeferLoading`

          Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

        - `bool? Enabled`

          Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

      - `BrowserReadPageConfig? ReadPage`

        `read_page`'s config overrides.

        - `bool? DeferLoading`

          Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

        - `bool? Enabled`

          Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

      - `BrowserRightClickConfig? RightClick`

        `right_click`'s config overrides.

        - `bool? DeferLoading`

          Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

        - `bool? Enabled`

          Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

      - `BrowserScreenshotConfig? Screenshot`

        `screenshot`'s config overrides.

        - `bool? DeferLoading`

          Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

        - `bool? Enabled`

          Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

      - `BrowserScrollConfig? Scroll`

        `scroll`'s config overrides.

        - `bool? DeferLoading`

          Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

        - `bool? Enabled`

          Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

      - `BrowserScrollToConfig? ScrollTo`

        `scroll_to`'s config overrides.

        - `bool? DeferLoading`

          Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

        - `bool? Enabled`

          Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

      - `BrowserSwitchTabConfig? SwitchTab`

        `switch_tab`'s config overrides.

        - `bool? DeferLoading`

          Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

        - `bool? Enabled`

          Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

      - `BrowserTripleClickConfig? TripleClick`

        `triple_click`'s config overrides.

        - `bool? DeferLoading`

          Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

        - `bool? Enabled`

          Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

      - `BrowserWaitConfig? Wait`

        `wait`'s config overrides.

        - `bool? DeferLoading`

          Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

        - `bool? Enabled`

          Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

      - `BrowserZoomConfig? Zoom`

        `zoom`'s config overrides.

        - `bool? DeferLoading`

          Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

        - `bool? Enabled`

          Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

  - `class MemoryTool20250818`

    - `JsonElement Type = "memory_20250818"`

    - `JsonElement Name = "memory"`

      Name of the tool.

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

    - `IReadOnlyList<AllowedCaller> AllowedCallers`

      - `Direct("direct")`

      - `CodeExecution20250825("code_execution_20250825")`

      - `CodeExecution20260120("code_execution_20260120")`

      - `CodeExecution20260521("code_execution_20260521")`

    - `CacheControlEphemeral? CacheControl`

      Create a cache control breakpoint at this content block.

    - `bool DeferLoading`

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

    - `IReadOnlyList<IReadOnlyDictionary<string, JsonElement>> InputExamples`

    - `bool Strict`

      When true, guarantees schema validation on tool names and inputs

  - `class ComputerToolset20260801`

    The computer toolset: a single `tools[]` entry (carrying no
    `name`) that declares the computer tool family. The model is
    served the family's tool with any members disabled via `configs`
    removed from its schema. Every member is enabled by default, zoom
    included. The single-tool options `display_number` and
    `enable_zoom` are not fields of a toolset entry — it carries only
    `type`, `configs`, and `cache_control`; zoom is controlled
    via `configs.zoom.enabled`.

    - `JsonElement Type = "computer_toolset_20260801"`

    - `CacheControlEphemeral? CacheControl`

      Create a cache control breakpoint at this content block.

    - `ComputerToolsetConfigs? Configs`

      Sparse per-member overrides, keyed by member name. Absent, null, and {} are equivalent; a member's defaults apply wherever its key is absent.

      - `ComputerTypeConfig? Type`

        `type`'s config overrides.

        - `bool? DeferLoading`

          Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

        - `bool? Enabled`

          Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

      - `ComputerCursorPositionConfig? CursorPosition`

        `cursor_position`'s config overrides.

        - `bool? DeferLoading`

          Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

        - `bool? Enabled`

          Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

      - `ComputerDoubleClickConfig? DoubleClick`

        `double_click`'s config overrides.

        - `bool? DeferLoading`

          Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

        - `bool? Enabled`

          Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

      - `ComputerHoldKeyConfig? HoldKey`

        `hold_key`'s config overrides.

        - `bool? DeferLoading`

          Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

        - `bool? Enabled`

          Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

      - `ComputerKeyConfig? Key`

        `key`'s config overrides.

        - `bool? DeferLoading`

          Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

        - `bool? Enabled`

          Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

      - `ComputerLeftClickConfig? LeftClick`

        `left_click`'s config overrides.

        - `bool? DeferLoading`

          Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

        - `bool? Enabled`

          Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

      - `ComputerLeftClickDragConfig? LeftClickDrag`

        `left_click_drag`'s config overrides.

        - `bool? DeferLoading`

          Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

        - `bool? Enabled`

          Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

      - `ComputerLeftMouseDownConfig? LeftMouseDown`

        `left_mouse_down`'s config overrides.

        - `bool? DeferLoading`

          Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

        - `bool? Enabled`

          Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

      - `ComputerLeftMouseUpConfig? LeftMouseUp`

        `left_mouse_up`'s config overrides.

        - `bool? DeferLoading`

          Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

        - `bool? Enabled`

          Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

      - `ComputerMiddleClickConfig? MiddleClick`

        `middle_click`'s config overrides.

        - `bool? DeferLoading`

          Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

        - `bool? Enabled`

          Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

      - `ComputerMouseMoveConfig? MouseMove`

        `mouse_move`'s config overrides.

        - `bool? DeferLoading`

          Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

        - `bool? Enabled`

          Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

      - `ComputerRightClickConfig? RightClick`

        `right_click`'s config overrides.

        - `bool? DeferLoading`

          Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

        - `bool? Enabled`

          Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

      - `ComputerScreenshotConfig? Screenshot`

        `screenshot`'s config overrides.

        - `bool? DeferLoading`

          Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

        - `bool? Enabled`

          Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

      - `ComputerScrollConfig? Scroll`

        `scroll`'s config overrides.

        - `bool? DeferLoading`

          Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

        - `bool? Enabled`

          Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

      - `ComputerTripleClickConfig? TripleClick`

        `triple_click`'s config overrides.

        - `bool? DeferLoading`

          Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

        - `bool? Enabled`

          Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

      - `ComputerWaitConfig? Wait`

        `wait`'s config overrides.

        - `bool? DeferLoading`

          Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

        - `bool? Enabled`

          Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

      - `ComputerZoomConfig? Zoom`

        `zoom`'s config overrides.

        - `bool? DeferLoading`

          Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

        - `bool? Enabled`

          Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

  - `class ToolTextEditor20250124`

    - `JsonElement Type = "text_editor_20250124"`

    - `JsonElement Name = "str_replace_editor"`

      Name of the tool.

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

    - `IReadOnlyList<AllowedCaller> AllowedCallers`

      - `Direct("direct")`

      - `CodeExecution20250825("code_execution_20250825")`

      - `CodeExecution20260120("code_execution_20260120")`

      - `CodeExecution20260521("code_execution_20260521")`

    - `CacheControlEphemeral? CacheControl`

      Create a cache control breakpoint at this content block.

    - `bool DeferLoading`

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

    - `IReadOnlyList<IReadOnlyDictionary<string, JsonElement>> InputExamples`

    - `bool Strict`

      When true, guarantees schema validation on tool names and inputs

  - `class ToolTextEditor20250429`

    - `JsonElement Type = "text_editor_20250429"`

    - `JsonElement Name = "str_replace_based_edit_tool"`

      Name of the tool.

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

    - `IReadOnlyList<AllowedCaller> AllowedCallers`

      - `Direct("direct")`

      - `CodeExecution20250825("code_execution_20250825")`

      - `CodeExecution20260120("code_execution_20260120")`

      - `CodeExecution20260521("code_execution_20260521")`

    - `CacheControlEphemeral? CacheControl`

      Create a cache control breakpoint at this content block.

    - `bool DeferLoading`

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

    - `IReadOnlyList<IReadOnlyDictionary<string, JsonElement>> InputExamples`

    - `bool Strict`

      When true, guarantees schema validation on tool names and inputs

  - `class ToolTextEditor20250728`

    - `JsonElement Type = "text_editor_20250728"`

    - `JsonElement Name = "str_replace_based_edit_tool"`

      Name of the tool.

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

    - `IReadOnlyList<AllowedCaller> AllowedCallers`

      - `Direct("direct")`

      - `CodeExecution20250825("code_execution_20250825")`

      - `CodeExecution20260120("code_execution_20260120")`

      - `CodeExecution20260521("code_execution_20260521")`

    - `CacheControlEphemeral? CacheControl`

      Create a cache control breakpoint at this content block.

    - `bool DeferLoading`

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

    - `IReadOnlyList<IReadOnlyDictionary<string, JsonElement>> InputExamples`

    - `long? MaxCharacters`

      Maximum number of characters to display when viewing a file. If not specified, defaults to displaying the full file.

      minimum: 1

    - `bool Strict`

      When true, guarantees schema validation on tool names and inputs

  - `class WebSearchTool20250305`

    - `JsonElement Type = "web_search_20250305"`

    - `JsonElement Name = "web_search"`

      Name of the tool.

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

    - `IReadOnlyList<AllowedCaller> AllowedCallers`

      - `Direct("direct")`

      - `CodeExecution20250825("code_execution_20250825")`

      - `CodeExecution20260120("code_execution_20260120")`

      - `CodeExecution20260521("code_execution_20260521")`

    - `IReadOnlyList<string>? AllowedDomains`

      If provided, only these domains will be included in results. Cannot be used alongside `blocked_domains`.

    - `IReadOnlyList<string>? BlockedDomains`

      If provided, these domains will never appear in results. Cannot be used alongside `allowed_domains`.

    - `CacheControlEphemeral? CacheControl`

      Create a cache control breakpoint at this content block.

    - `bool DeferLoading`

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

    - `long? MaxUses`

      Maximum number of times the tool can be used in the API request.

      minimum: 1

    - `bool Strict`

      When true, guarantees schema validation on tool names and inputs

    - `UserLocation? UserLocation`

      Parameters for the user's location. Used to provide more relevant search results.

      - `JsonElement Type = "approximate"`

      - `string? City`

        The city of the user.

        minLength: 1, maxLength: 255

      - `string? Country`

        The two letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the user.

        minLength: 2, maxLength: 2

      - `string? Region`

        The region of the user.

        minLength: 1, maxLength: 255

      - `string? Timezone`

        The [IANA timezone](https://nodatime.org/TimeZones) of the user.

        minLength: 1, maxLength: 255

  - `class WebFetchTool20250910`

    - `JsonElement Type = "web_fetch_20250910"`

    - `JsonElement Name = "web_fetch"`

      Name of the tool.

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

    - `IReadOnlyList<AllowedCaller> AllowedCallers`

      - `Direct("direct")`

      - `CodeExecution20250825("code_execution_20250825")`

      - `CodeExecution20260120("code_execution_20260120")`

      - `CodeExecution20260521("code_execution_20260521")`

    - `IReadOnlyList<string>? AllowedDomains`

      List of domains to allow fetching from

    - `IReadOnlyList<string>? BlockedDomains`

      List of domains to block fetching from

    - `CacheControlEphemeral? CacheControl`

      Create a cache control breakpoint at this content block.

    - `CitationsConfigParam? Citations`

      Citations configuration for fetched documents. Citations are disabled by default.

      - `bool Enabled`

    - `bool DeferLoading`

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

    - `long? MaxContentTokens`

      Maximum number of tokens used by including web page text content in the context. The limit is approximate and does not apply to binary content such as PDFs.

      minimum: 1

    - `long? MaxUses`

      Maximum number of times the tool can be used in the API request.

      minimum: 1

    - `bool Strict`

      When true, guarantees schema validation on tool names and inputs

    - `WebFetchUrlSources? UrlSources`

      Which sources contribute to the set of URLs the tool may fetch. Omitted means every source.

      - `ClientToolResults ClientToolResults`

        Which client tools' results contribute fetchable URLs: "all", "none", or an only or except list of client tool names from tools[].

        - `class WebFetchUrlSourceAll`

          The `url_sources` variant under which a source contributes in
          full: every result of the tool filter's source, or all user input.

          - `JsonElement Type = "all"`

        - `class WebFetchUrlSourceNone`

          The `url_sources` variant under which a source contributes nothing:
          no result of the tool filter's source, or no user input.

          - `JsonElement Type = "none"`

        - `class WebFetchUrlSourceOnly`

          The tool filter variant under which only the named tools' results
          contribute.

          - `JsonElement Type = "only"`

          - `required IReadOnlyList<WebFetchUrlSourceToolReference> Tools`

            - `JsonElement Type = "tool_reference"`

            - `required string Name`

        - `class WebFetchUrlSourceExcept`

          The tool filter variant under which every result but the named
          tools' contributes.

          - `JsonElement Type = "except"`

          - `required IReadOnlyList<WebFetchUrlSourceToolReference> Tools`

            - `JsonElement Type = "tool_reference"`

            - `required string Name`

      - `ServerToolResults ServerToolResults`

        Which server tools' results contribute fetchable URLs: "all", "none", or an only or except list of server tool names from tools[]; only web_search and web_fetch results ever contribute.

        - `class WebFetchUrlSourceAll`

          The `url_sources` variant under which a source contributes in
          full: every result of the tool filter's source, or all user input.

        - `class WebFetchUrlSourceNone`

          The `url_sources` variant under which a source contributes nothing:
          no result of the tool filter's source, or no user input.

        - `class WebFetchUrlSourceOnly`

          The tool filter variant under which only the named tools' results
          contribute.

        - `class WebFetchUrlSourceExcept`

          The tool filter variant under which every result but the named
          tools' contributes.

      - `UserInput UserInput`

        Whether URLs in user messages are fetchable: "all" or "none".

        - `class WebFetchUrlSourceAll`

          The `url_sources` variant under which a source contributes in
          full: every result of the tool filter's source, or all user input.

        - `class WebFetchUrlSourceNone`

          The `url_sources` variant under which a source contributes nothing:
          no result of the tool filter's source, or no user input.

  - `class WebSearchTool20260209`

    - `JsonElement Type = "web_search_20260209"`

    - `JsonElement Name = "web_search"`

      Name of the tool.

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

    - `IReadOnlyList<AllowedCaller> AllowedCallers`

      - `Direct("direct")`

      - `CodeExecution20250825("code_execution_20250825")`

      - `CodeExecution20260120("code_execution_20260120")`

      - `CodeExecution20260521("code_execution_20260521")`

    - `IReadOnlyList<string>? AllowedDomains`

      If provided, only these domains will be included in results. Cannot be used alongside `blocked_domains`.

    - `IReadOnlyList<string>? BlockedDomains`

      If provided, these domains will never appear in results. Cannot be used alongside `allowed_domains`.

    - `CacheControlEphemeral? CacheControl`

      Create a cache control breakpoint at this content block.

    - `bool DeferLoading`

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

    - `long? MaxUses`

      Maximum number of times the tool can be used in the API request.

      minimum: 1

    - `bool Strict`

      When true, guarantees schema validation on tool names and inputs

    - `UserLocation? UserLocation`

      Parameters for the user's location. Used to provide more relevant search results.

  - `class WebFetchTool20260209`

    - `JsonElement Type = "web_fetch_20260209"`

    - `JsonElement Name = "web_fetch"`

      Name of the tool.

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

    - `IReadOnlyList<AllowedCaller> AllowedCallers`

      - `Direct("direct")`

      - `CodeExecution20250825("code_execution_20250825")`

      - `CodeExecution20260120("code_execution_20260120")`

      - `CodeExecution20260521("code_execution_20260521")`

    - `IReadOnlyList<string>? AllowedDomains`

      List of domains to allow fetching from

    - `IReadOnlyList<string>? BlockedDomains`

      List of domains to block fetching from

    - `CacheControlEphemeral? CacheControl`

      Create a cache control breakpoint at this content block.

    - `CitationsConfigParam? Citations`

      Citations configuration for fetched documents. Citations are disabled by default.

    - `bool DeferLoading`

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

    - `long? MaxContentTokens`

      Maximum number of tokens used by including web page text content in the context. The limit is approximate and does not apply to binary content such as PDFs.

      minimum: 1

    - `long? MaxUses`

      Maximum number of times the tool can be used in the API request.

      minimum: 1

    - `bool Strict`

      When true, guarantees schema validation on tool names and inputs

    - `WebFetchUrlSources? UrlSources`

      Which sources contribute to the set of URLs the tool may fetch. Omitted means every source.

  - `class WebFetchTool20260309`

    Web fetch tool with use_cache parameter for bypassing cached content.

    - `JsonElement Type = "web_fetch_20260309"`

    - `JsonElement Name = "web_fetch"`

      Name of the tool.

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

    - `IReadOnlyList<AllowedCaller> AllowedCallers`

      - `Direct("direct")`

      - `CodeExecution20250825("code_execution_20250825")`

      - `CodeExecution20260120("code_execution_20260120")`

      - `CodeExecution20260521("code_execution_20260521")`

    - `IReadOnlyList<string>? AllowedDomains`

      List of domains to allow fetching from

    - `IReadOnlyList<string>? BlockedDomains`

      List of domains to block fetching from

    - `CacheControlEphemeral? CacheControl`

      Create a cache control breakpoint at this content block.

    - `CitationsConfigParam? Citations`

      Citations configuration for fetched documents. Citations are disabled by default.

    - `bool DeferLoading`

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

    - `long? MaxContentTokens`

      Maximum number of tokens used by including web page text content in the context. The limit is approximate and does not apply to binary content such as PDFs.

      minimum: 1

    - `long? MaxUses`

      Maximum number of times the tool can be used in the API request.

      minimum: 1

    - `bool Strict`

      When true, guarantees schema validation on tool names and inputs

    - `WebFetchUrlSources? UrlSources`

      Which sources contribute to the set of URLs the tool may fetch. Omitted means every source.

    - `bool UseCache`

      Whether to use cached content. Set to false to bypass the cache and fetch fresh content. Only set to false when the user explicitly requests fresh content or when fetching rapidly-changing sources.

  - `class WebSearchTool20260318`

    - `JsonElement Type = "web_search_20260318"`

    - `JsonElement Name = "web_search"`

      Name of the tool.

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

    - `IReadOnlyList<AllowedCaller> AllowedCallers`

      - `Direct("direct")`

      - `CodeExecution20250825("code_execution_20250825")`

      - `CodeExecution20260120("code_execution_20260120")`

      - `CodeExecution20260521("code_execution_20260521")`

    - `IReadOnlyList<string>? AllowedDomains`

      If provided, only these domains will be included in results. Cannot be used alongside `blocked_domains`.

    - `IReadOnlyList<string>? BlockedDomains`

      If provided, these domains will never appear in results. Cannot be used alongside `allowed_domains`.

    - `CacheControlEphemeral? CacheControl`

      Create a cache control breakpoint at this content block.

    - `bool DeferLoading`

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

    - `long? MaxUses`

      Maximum number of times the tool can be used in the API request.

      minimum: 1

    - `ResponseInclusion ResponseInclusion`

      How this tool's result blocks appear in the API response when the result was consumed by a completed code_execution call in the same turn. 'full' returns the complete content (default). 'excluded' drops the nested server_tool_use and result block pair entirely. Results from direct calls, or from code_execution calls that paused before completing, are always returned in full so they can be sent back on the next turn.

      - `Full("full")`

      - `Excluded("excluded")`

    - `bool Strict`

      When true, guarantees schema validation on tool names and inputs

    - `UserLocation? UserLocation`

      Parameters for the user's location. Used to provide more relevant search results.

  - `class WebFetchTool20260318`

    - `JsonElement Type = "web_fetch_20260318"`

    - `JsonElement Name = "web_fetch"`

      Name of the tool.

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

    - `IReadOnlyList<AllowedCaller> AllowedCallers`

      - `Direct("direct")`

      - `CodeExecution20250825("code_execution_20250825")`

      - `CodeExecution20260120("code_execution_20260120")`

      - `CodeExecution20260521("code_execution_20260521")`

    - `IReadOnlyList<string>? AllowedDomains`

      List of domains to allow fetching from

    - `IReadOnlyList<string>? BlockedDomains`

      List of domains to block fetching from

    - `CacheControlEphemeral? CacheControl`

      Create a cache control breakpoint at this content block.

    - `CitationsConfigParam? Citations`

      Citations configuration for fetched documents. Citations are disabled by default.

    - `bool DeferLoading`

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

    - `long? MaxContentTokens`

      Maximum number of tokens used by including web page text content in the context. The limit is approximate and does not apply to binary content such as PDFs.

      minimum: 1

    - `long? MaxUses`

      Maximum number of times the tool can be used in the API request.

      minimum: 1

    - `ResponseInclusion ResponseInclusion`

      How this tool's result blocks appear in the API response when the result was consumed by a completed code_execution call in the same turn. 'full' returns the complete content (default). 'excluded' drops the nested server_tool_use and result block pair entirely. Results from direct calls, or from code_execution calls that paused before completing, are always returned in full so they can be sent back on the next turn.

      - `Full("full")`

      - `Excluded("excluded")`

    - `bool Strict`

      When true, guarantees schema validation on tool names and inputs

    - `WebFetchUrlSources? UrlSources`

      Which sources contribute to the set of URLs the tool may fetch. Omitted means every source.

    - `bool UseCache`

      Whether to use cached content. Set to false to bypass the cache and fetch fresh content. Only set to false when the user explicitly requests fresh content or when fetching rapidly-changing sources.

  - `class ToolSearchToolBm25_20251119`

    - `required Type Type`

      - `ToolSearchToolBm25_20251119("tool_search_tool_bm25_20251119")`

      - `ToolSearchToolBm25("tool_search_tool_bm25")`

    - `JsonElement Name = "tool_search_tool_bm25"`

      Name of the tool.

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

    - `IReadOnlyList<AllowedCaller> AllowedCallers`

      - `Direct("direct")`

      - `CodeExecution20250825("code_execution_20250825")`

      - `CodeExecution20260120("code_execution_20260120")`

      - `CodeExecution20260521("code_execution_20260521")`

    - `CacheControlEphemeral? CacheControl`

      Create a cache control breakpoint at this content block.

    - `bool DeferLoading`

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

    - `bool Strict`

      When true, guarantees schema validation on tool names and inputs

  - `class ToolSearchToolRegex20251119`

    - `required Type Type`

      - `ToolSearchToolRegex20251119("tool_search_tool_regex_20251119")`

      - `ToolSearchToolRegex("tool_search_tool_regex")`

    - `JsonElement Name = "tool_search_tool_regex"`

      Name of the tool.

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

    - `IReadOnlyList<AllowedCaller> AllowedCallers`

      - `Direct("direct")`

      - `CodeExecution20250825("code_execution_20250825")`

      - `CodeExecution20260120("code_execution_20260120")`

      - `CodeExecution20260521("code_execution_20260521")`

    - `CacheControlEphemeral? CacheControl`

      Create a cache control breakpoint at this content block.

    - `bool DeferLoading`

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

    - `bool Strict`

      When true, guarantees schema validation on tool names and inputs

### Message Create Params Container

- `class MessageCreateParamsContainer: union`

  Container identifier for reuse across requests.

  - `class ContainerParams`

    Container parameters with skills to be loaded.

    - `string? ID`

      Container id

    - `IReadOnlyList<SkillParams>? Skills`

      List of skills to load in the container

      maxItems: 20

      - `required SkillParamsType Type`

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

        - `Anthropic("anthropic")`

        - `Custom("custom")`

      - `required string SkillID`

        Skill ID

        minLength: 1, maxLength: 64

      - `string Version`

        Skill version or 'latest' for most recent version

        minLength: 1, maxLength: 64

  - `string`

### Message Delta Usage

- `class MessageDeltaUsage`

  - `required long? CacheCreationInputTokens`

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

    minimum: 0

  - `required long? CacheReadInputTokens`

    The cumulative number of input tokens read from the cache.

    minimum: 0

  - `required long? InputTokens`

    The cumulative number of input tokens which were used.

    minimum: 0

  - `required long OutputTokens`

    The cumulative number of output tokens which were used.

  - `required OutputTokensDetails? OutputTokensDetails`

    Breakdown of output tokens by category.

    `output_tokens` remains the inclusive, authoritative total used for billing.
    This object provides a read-only decomposition for observability — for example,
    how many of the billed output tokens were spent on internal reasoning that may
    have been summarized before being returned to you.

    - `required long ThinkingTokens`

      Number of output tokens the model generated as internal reasoning, including
      the thinking-block delimiter tokens.

      Reflects the raw reasoning the model produced, not the (possibly shorter)
      summarized thinking text returned in the response body. Computed by
      re-tokenizing the raw reasoning text, so it may differ from the model's exact
      generation count by a small number of tokens. Always ≤ `output_tokens`;
      `output_tokens - thinking_tokens` approximates the non-reasoning output.

      minimum: 0

  - `required ServerToolUsage? ServerToolUse`

    The number of server tool requests.

    - `required long WebFetchRequests`

      The number of web fetch tool requests.

      minimum: 0

    - `required long WebSearchRequests`

      The number of web search tool requests.

      minimum: 0

### Message Param

- `class MessageParam: union`

  - `class UserMessageParam`

    - `required MessageContentParam Content`

      - `string`

      - `IReadOnlyList<ContentBlockParam>`

        - `class TextBlockParam`

          - `JsonElement Type = "text"`

          - `required string Text`

            minLength: 1

          - `CacheControlEphemeral? CacheControl`

            Create a cache control breakpoint at this content block.

            - `JsonElement Type = "ephemeral"`

            - `Ttl Ttl`

              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`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching?sdk_languages=csharp) for details.

              - `Ttl5m("5m")`

              - `Ttl1h("1h")`

          - `IReadOnlyList<TextCitationParam>? Citations`

            - `class CitationCharLocationParam`

              - `JsonElement Type = "char_location"`

              - `required string CitedText`

              - `required long DocumentIndex`

                minimum: 0

              - `required string? DocumentTitle`

                minLength: 1, maxLength: 500

              - `required long EndCharIndex`

              - `required long StartCharIndex`

                minimum: 0

            - `class CitationPageLocationParam`

              - `JsonElement Type = "page_location"`

              - `required string CitedText`

              - `required long DocumentIndex`

                minimum: 0

              - `required string? DocumentTitle`

                minLength: 1, maxLength: 500

              - `required long EndPageNumber`

              - `required long StartPageNumber`

                minimum: 1

            - `class CitationContentBlockLocationParam`

              - `JsonElement Type = "content_block_location"`

              - `required string CitedText`

                The full text of the cited block range, concatenated.

                Always equals the contents of `content[start_block_index:end_block_index]` joined together. The text block is the minimal citable unit; this field is never a substring of a single block. Not counted toward output tokens, and not counted toward input tokens when sent back in subsequent turns.

              - `required long DocumentIndex`

                minimum: 0

              - `required string? DocumentTitle`

                minLength: 1, maxLength: 500

              - `required long EndBlockIndex`

                Exclusive 0-based end index of the cited block range in the source's `content` array.

                Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`.

              - `required long StartBlockIndex`

                0-based index of the first cited block in the source's `content` array.

                minimum: 0

            - `class CitationWebSearchResultLocationParam`

              - `JsonElement Type = "web_search_result_location"`

              - `required string CitedText`

              - `required string EncryptedIndex`

              - `required string? Title`

                minLength: 1, maxLength: 512

              - `required string Url`

                minLength: 1

            - `class CitationSearchResultLocationParam`

              - `JsonElement Type = "search_result_location"`

              - `required string CitedText`

                The full text of the cited block range, concatenated.

                Always equals the contents of `content[start_block_index:end_block_index]` joined together. The text block is the minimal citable unit; this field is never a substring of a single block. Not counted toward output tokens, and not counted toward input tokens when sent back in subsequent turns.

              - `required long EndBlockIndex`

                Exclusive 0-based end index of the cited block range in the source's `content` array.

                Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`.

              - `required long SearchResultIndex`

                0-based index of the cited search result among all `search_result` content blocks in the request, in the order they appear across messages and tool results.

                Counted separately from `document_index`; server-side web search results are not included in this count.

                minimum: 0

              - `required string Source`

              - `required long StartBlockIndex`

                0-based index of the first cited block in the source's `content` array.

                minimum: 0

              - `required string? Title`

        - `class ImageBlockParam`

          - `JsonElement Type = "image"`

          - `required Source Source`

            - `class Base64ImageSource`

              - `JsonElement Type = "base64"`

              - `required string Data`

                format: byte

              - `required MediaType MediaType`

                - `ImageJpeg("image/jpeg")`

                - `ImagePng("image/png")`

                - `ImageGif("image/gif")`

                - `ImageWebP("image/webp")`

            - `class UrlImageSource`

              - `JsonElement Type = "url"`

              - `required string Url`

            - `class FileImageSource`

              - `JsonElement Type = "file"`

              - `required string FileID`

          - `CacheControlEphemeral? CacheControl`

            Create a cache control breakpoint at this content block.

          - `ImageTransformationsParam? Transformations`

            Configures the transformations the server applies to this image before the model observes it. Each key names a condition the server transforms images for; its value selects the transformation applied. Omitted keys keep their default behavior, and an empty object is equivalent to omitting the field.

            - `OversizedImage OversizedImage`

              What the server does when this image exceeds the model's maximum image size. `"downsize"` (the default) scales the image down to fit, which changes the dimensions the model observes without telling you. `"error"` instead rejects the request with a 400 error naming the image's dimensions and the largest dimensions that fit, so you can scale the image deliberately — your image is never silently scaled down.

              - `Downsize("downsize")`

              - `Error("error")`

        - `class DocumentBlockParam`

          - `JsonElement Type = "document"`

          - `required Source Source`

            - `class Base64PdfSource`

              - `JsonElement Type = "base64"`

              - `required string Data`

                format: byte

              - `JsonElement MediaType = "application/pdf"`

            - `class PlainTextSource`

              - `JsonElement Type = "text"`

              - `required string Data`

              - `JsonElement MediaType = "text/plain"`

            - `class ContentBlockSource`

              - `JsonElement Type = "content"`

              - `required Content Content`

                - `string`

                - `IReadOnlyList<ContentBlockSourceContent>`

                  - `class TextBlockParam`

                  - `class ImageBlockParam`

            - `class UrlPdfSource`

              - `JsonElement Type = "url"`

              - `required string Url`

            - `class FileDocumentSource`

              - `JsonElement Type = "file"`

              - `required string FileID`

          - `CacheControlEphemeral? CacheControl`

            Create a cache control breakpoint at this content block.

          - `CitationsConfigParam? Citations`

            - `bool Enabled`

          - `string? Context`

            minLength: 1

          - `string? Title`

            minLength: 1, maxLength: 500

        - `class SearchResultBlockParam`

          - `JsonElement Type = "search_result"`

          - `required IReadOnlyList<TextBlockParam> Content`

            - `JsonElement Type = "text"`

            - `required string Text`

              minLength: 1

            - `CacheControlEphemeral? CacheControl`

              Create a cache control breakpoint at this content block.

            - `IReadOnlyList<TextCitationParam>? Citations`

          - `required string Source`

          - `required string Title`

          - `CacheControlEphemeral? CacheControl`

            Create a cache control breakpoint at this content block.

          - `CitationsConfigParam Citations`

        - `class ThinkingBlockParam`

          - `JsonElement Type = "thinking"`

          - `required string Signature`

            The `signature` value of this thinking block, exactly as returned by the API in a previous response. Used to verify that the block was generated by Claude.

            Thinking blocks must be passed back unmodified and in their original order; a modified block results in a 400 `invalid_request_error`.

          - `required string Thinking`

            The `thinking` text of this block as returned by the API.

        - `class RedactedThinkingBlockParam`

          - `JsonElement Type = "redacted_thinking"`

          - `required string Data`

            The `data` value of this redacted thinking block, exactly as returned by the API in a previous response. Opaque and encrypted; pass it back unchanged.

        - `class ToolUseBlockParam`

          - `JsonElement Type = "tool_use"`

          - `required string ID`

            pattern: ^[a-zA-Z0-9_-]+$

          - `required IReadOnlyDictionary<string, JsonElement> Input`

          - `required string Name`

            minLength: 1, maxLength: 200

          - `CacheControlEphemeral? CacheControl`

            Create a cache control breakpoint at this content block.

          - `Caller Caller`

            - `class DirectCaller`

              Tool invocation directly from the model.

              - `JsonElement Type = "direct"`

            - `class ServerToolCaller`

              Tool invocation generated by a server-side tool.

              - `JsonElement Type = "code_execution_20250825"`

              - `required string ToolID`

                pattern: ^srvtoolu_[a-zA-Z0-9_]+$

            - `class ServerToolCaller20260120`

              - `JsonElement Type = "code_execution_20260120"`

              - `required string ToolID`

                pattern: ^srvtoolu_[a-zA-Z0-9_]+$

          - `string? ToolsetName`

            For a toolset member tool_use, the toolset family this member belongs to.

            minLength: 1, maxLength: 64, pattern: ^[a-zA-Z0-9_-]+$

        - `class ToolResultBlockParam`

          - `JsonElement Type = "tool_result"`

          - `required string ToolUseID`

            pattern: ^[a-zA-Z0-9_-]+$

          - `CacheControlEphemeral? CacheControl`

            Create a cache control breakpoint at this content block.

          - `Content Content`

            - `string`

            - `IReadOnlyList<Block>`

              - `class TextBlockParam`

              - `class ImageBlockParam`

              - `class SearchResultBlockParam`

              - `class DocumentBlockParam`

              - `class ToolReferenceBlockParam`

                Tool reference block that can be included in tool_result content.

                - `JsonElement Type = "tool_reference"`

                - `required string ToolName`

                  minLength: 1, maxLength: 256, pattern: ^[a-zA-Z0-9_-]{1,256}$

                - `CacheControlEphemeral? CacheControl`

                  Create a cache control breakpoint at this content block.

              - `class BrowserStateBlockParam`

                The caller's browser state after a browser toolset member call —
                the full inventory of open tabs, which tab is active, and any side
                effects (tabs opened, download state changes) the call produced.

                At most one per `tool_result`, only on a non-error result answering a
                browser toolset member `tool_use`. The server renders the
                model-visible text from it; the model never sees the raw fields.

                - `JsonElement Type = "browser_state"`

                - `required IReadOnlyList<BrowserStateTabEntry> Tabs`

                  All tabs open in the browser after this call — the full inventory, not a delta. May be empty. Whenever non-empty, exactly one entry carries `active: true`.

                  maxItems: 100

                  - `required string TabID`

                    The caller-assigned identifier for this tab, unique within the inventory.

                    minLength: 1, maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

                  - `required string Title`

                    The title of the page the tab is showing. May be empty.

                    maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

                  - `required string Url`

                    The URL of the page the tab is showing. May be empty.

                    maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

                  - `bool Active`

                    Whether this tab is the active tab after this call. Whenever `tabs` is non-empty, exactly one entry is marked `active: true`.

                - `CacheControlEphemeral? CacheControl`

                  Create a cache control breakpoint at this content block.

                - `IReadOnlyList<BrowserStateChange>? StateChanges`

                  Tabs opened and download state changes during this call. "Nothing to report" is expressed by omitting the field, never by an empty list.

                  minItems: 1, maxItems: 200

                  - `class BrowserStateChangeTabOpened`

                    A tab this call's execution opened that remains open at its end —
                    the creation delta of the `tabs` inventory, not an event log.

                    Carries only the `tab_id`; the tab's `title` and `url` live on its
                    `tabs` entry, which must include the same `tab_id`. A tab opened
                    during a failed call gets no deferred `tab_opened`; it simply appears
                    in the next result's `tabs` inventory.

                    - `JsonElement Type = "tab_opened"`

                    - `required string TabID`

                      The `tab_id` of the opened tab, present in `tabs`.

                      minLength: 1, maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

                  - `class BrowserStateChangeDownloadStarted`

                    A file download that started during this call.

                    - `JsonElement Type = "download_started"`

                    - `required string DownloadID`

                      The caller-assigned identifier for this download, stable across the state changes reporting it.

                      minLength: 1, maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

                    - `required string Url`

                      The final post-redirect URL the download was served from.

                      maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

                  - `class BrowserStateChangeDownloadCompleted`

                    A file download that finished during this call, reported with the
                    same `download_id` as its `download_started` — or without a prior
                    `download_started`, when the download finished during the call that
                    started it (at most one state change per `download_id` per result).

                    - `JsonElement Type = "download_completed"`

                    - `required string DownloadID`

                      The caller-assigned identifier for this download, stable across the state changes reporting it.

                      minLength: 1, maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

                    - `required string Url`

                      The final post-redirect URL the download was served from.

                      maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

                    - `string? Path`

                      Where the executor saved the file, on the executor's filesystem. Only included when another tool in the same environment can read the file at that path.

                      maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

                    - `long? SizeBytes`

                      The completed download's size.

                      minimum: 0

                  - `class BrowserStateChangeDownloadFailed`

                    A file download that failed — or was cancelled — during this call.

                    - `JsonElement Type = "download_failed"`

                    - `required string DownloadID`

                      The caller-assigned identifier for this download, stable across the state changes reporting it.

                      minLength: 1, maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

                    - `required string Url`

                      The final post-redirect URL the download was served from.

                      maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

                    - `string? Error`

                      The failure or cancellation detail, when known.

                      maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

          - `bool IsError`

          - `string? ToolsetName`

            For a toolset member tool_result, the toolset family of the paired tool_use.

            minLength: 1, maxLength: 64, pattern: ^[a-zA-Z0-9_-]+$

        - `class ServerToolUseBlockParam`

          - `JsonElement Type = "server_tool_use"`

          - `required string ID`

            pattern: ^srvtoolu_[a-zA-Z0-9_]+$

          - `required IReadOnlyDictionary<string, JsonElement> Input`

          - `required Name Name`

            - `WebSearch("web_search")`

            - `WebFetch("web_fetch")`

            - `CodeExecution("code_execution")`

            - `BashCodeExecution("bash_code_execution")`

            - `TextEditorCodeExecution("text_editor_code_execution")`

            - `ToolSearchToolRegex("tool_search_tool_regex")`

            - `ToolSearchToolBm25("tool_search_tool_bm25")`

          - `CacheControlEphemeral? CacheControl`

            Create a cache control breakpoint at this content block.

          - `Caller Caller`

            - `class DirectCaller`

              Tool invocation directly from the model.

            - `class ServerToolCaller`

              Tool invocation generated by a server-side tool.

            - `class ServerToolCaller20260120`

        - `class WebSearchToolResultBlockParam`

          - `JsonElement Type = "web_search_tool_result"`

          - `required WebSearchToolResultBlockParamContent Content`

            - `IReadOnlyList<WebSearchResultBlockParam>`

              - `JsonElement Type = "web_search_result"`

              - `required string EncryptedContent`

              - `required string Title`

              - `required string Url`

              - `string? PageAge`

            - `class WebSearchToolRequestError`

              - `JsonElement Type = "web_search_tool_result_error"`

              - `required WebSearchToolResultErrorCode ErrorCode`

                - `InvalidToolInput("invalid_tool_input")`

                - `Unavailable("unavailable")`

                - `MaxUsesExceeded("max_uses_exceeded")`

                - `TooManyRequests("too_many_requests")`

                - `QueryTooLong("query_too_long")`

                - `RequestTooLarge("request_too_large")`

          - `required string ToolUseID`

            pattern: ^srvtoolu_[a-zA-Z0-9_]+$

          - `CacheControlEphemeral? CacheControl`

            Create a cache control breakpoint at this content block.

          - `Caller Caller`

            - `class DirectCaller`

              Tool invocation directly from the model.

            - `class ServerToolCaller`

              Tool invocation generated by a server-side tool.

            - `class ServerToolCaller20260120`

        - `class WebFetchToolResultBlockParam`

          - `JsonElement Type = "web_fetch_tool_result"`

          - `required Content Content`

            - `class WebFetchToolResultErrorBlockParam`

              - `JsonElement Type = "web_fetch_tool_result_error"`

              - `required WebFetchToolResultErrorCode ErrorCode`

                - `InvalidToolInput("invalid_tool_input")`

                - `UrlTooLong("url_too_long")`

                - `UrlNotAllowed("url_not_allowed")`

                - `UrlNotInPriorContext("url_not_in_prior_context")`

                - `UrlNotAccessible("url_not_accessible")`

                - `UnsupportedContentType("unsupported_content_type")`

                - `TooManyRequests("too_many_requests")`

                - `MaxUsesExceeded("max_uses_exceeded")`

                - `Unavailable("unavailable")`

                - `ContentTooLarge("content_too_large")`

            - `class WebFetchBlockParam`

              - `JsonElement Type = "web_fetch_result"`

              - `required DocumentBlockParam Content`

              - `required string Url`

                Fetched content URL

              - `string? RetrievedAt`

                ISO 8601 timestamp when the content was retrieved

          - `required string ToolUseID`

            pattern: ^srvtoolu_[a-zA-Z0-9_]+$

          - `CacheControlEphemeral? CacheControl`

            Create a cache control breakpoint at this content block.

          - `Caller Caller`

            - `class DirectCaller`

              Tool invocation directly from the model.

            - `class ServerToolCaller`

              Tool invocation generated by a server-side tool.

            - `class ServerToolCaller20260120`

        - `class CodeExecutionToolResultBlockParam`

          - `JsonElement Type = "code_execution_tool_result"`

          - `required CodeExecutionToolResultBlockParamContent Content`

            - `class CodeExecutionToolResultErrorParam`

              - `JsonElement Type = "code_execution_tool_result_error"`

              - `required CodeExecutionToolResultErrorCode ErrorCode`

                - `InvalidToolInput("invalid_tool_input")`

                - `Unavailable("unavailable")`

                - `TooManyRequests("too_many_requests")`

                - `ExecutionTimeExceeded("execution_time_exceeded")`

            - `class CodeExecutionResultBlockParam`

              - `JsonElement Type = "code_execution_result"`

              - `required IReadOnlyList<CodeExecutionOutputBlockParam> Content`

                - `JsonElement Type = "code_execution_output"`

                - `required string FileID`

              - `required long ReturnCode`

              - `required string Stderr`

              - `required string Stdout`

            - `class EncryptedCodeExecutionResultBlockParam`

              The output and exit code of Python code that Claude ran with the code execution tool, with standard output in encrypted form, sent back in a later request.

              - `JsonElement Type = "encrypted_code_execution_result"`

              - `required IReadOnlyList<CodeExecutionOutputBlockParam> Content`

                - `JsonElement Type = "code_execution_output"`

                - `required string FileID`

              - `required string EncryptedStdout`

              - `required long ReturnCode`

              - `required string Stderr`

          - `required string ToolUseID`

            pattern: ^srvtoolu_[a-zA-Z0-9_]+$

          - `CacheControlEphemeral? CacheControl`

            Create a cache control breakpoint at this content block.

        - `class BashCodeExecutionToolResultBlockParam`

          - `JsonElement Type = "bash_code_execution_tool_result"`

          - `required Content Content`

            - `class BashCodeExecutionToolResultErrorParam`

              - `JsonElement Type = "bash_code_execution_tool_result_error"`

              - `required BashCodeExecutionToolResultErrorCode ErrorCode`

                - `InvalidToolInput("invalid_tool_input")`

                - `Unavailable("unavailable")`

                - `TooManyRequests("too_many_requests")`

                - `ExecutionTimeExceeded("execution_time_exceeded")`

                - `OutputFileTooLarge("output_file_too_large")`

            - `class BashCodeExecutionResultBlockParam`

              - `JsonElement Type = "bash_code_execution_result"`

              - `required IReadOnlyList<BashCodeExecutionOutputBlockParam> Content`

                - `JsonElement Type = "bash_code_execution_output"`

                - `required string FileID`

              - `required long ReturnCode`

              - `required string Stderr`

              - `required string Stdout`

          - `required string ToolUseID`

            pattern: ^srvtoolu_[a-zA-Z0-9_]+$

          - `CacheControlEphemeral? CacheControl`

            Create a cache control breakpoint at this content block.

        - `class TextEditorCodeExecutionToolResultBlockParam`

          - `JsonElement Type = "text_editor_code_execution_tool_result"`

          - `required Content Content`

            - `class TextEditorCodeExecutionToolResultErrorParam`

              - `JsonElement Type = "text_editor_code_execution_tool_result_error"`

              - `required TextEditorCodeExecutionToolResultErrorCode ErrorCode`

                - `InvalidToolInput("invalid_tool_input")`

                - `Unavailable("unavailable")`

                - `TooManyRequests("too_many_requests")`

                - `ExecutionTimeExceeded("execution_time_exceeded")`

                - `FileNotFound("file_not_found")`

              - `string? ErrorMessage`

            - `class TextEditorCodeExecutionViewResultBlockParam`

              - `JsonElement Type = "text_editor_code_execution_view_result"`

              - `required string Content`

              - `required FileType FileType`

                - `Text("text")`

                - `Image("image")`

                - `Pdf("pdf")`

              - `long? NumLines`

              - `long? StartLine`

              - `long? TotalLines`

            - `class TextEditorCodeExecutionCreateResultBlockParam`

              - `JsonElement Type = "text_editor_code_execution_create_result"`

              - `required bool IsFileUpdate`

            - `class TextEditorCodeExecutionStrReplaceResultBlockParam`

              - `JsonElement Type = "text_editor_code_execution_str_replace_result"`

              - `IReadOnlyList<string>? Lines`

              - `long? NewLines`

              - `long? NewStart`

              - `long? OldLines`

              - `long? OldStart`

          - `required string ToolUseID`

            pattern: ^srvtoolu_[a-zA-Z0-9_]+$

          - `CacheControlEphemeral? CacheControl`

            Create a cache control breakpoint at this content block.

        - `class ToolSearchToolResultBlockParam`

          - `JsonElement Type = "tool_search_tool_result"`

          - `required Content Content`

            - `class ToolSearchToolResultErrorParam`

              - `JsonElement Type = "tool_search_tool_result_error"`

              - `required ToolSearchToolResultErrorCode ErrorCode`

                - `InvalidToolInput("invalid_tool_input")`

                - `Unavailable("unavailable")`

                - `TooManyRequests("too_many_requests")`

                - `ExecutionTimeExceeded("execution_time_exceeded")`

              - `string? ErrorMessage`

            - `class ToolSearchToolSearchResultBlockParam`

              - `JsonElement Type = "tool_search_tool_search_result"`

              - `required IReadOnlyList<ToolReferenceBlockParam> ToolReferences`

                - `JsonElement Type = "tool_reference"`

                - `required string ToolName`

                  minLength: 1, maxLength: 256, pattern: ^[a-zA-Z0-9_-]{1,256}$

                - `CacheControlEphemeral? CacheControl`

                  Create a cache control breakpoint at this content block.

          - `required string ToolUseID`

            pattern: ^srvtoolu_[a-zA-Z0-9_]+$

          - `CacheControlEphemeral? CacheControl`

            Create a cache control breakpoint at this content block.

        - `class ContainerUploadBlockParam`

          A content block that represents a file to be uploaded to the container
          Files uploaded via this block will be available in the container's input directory.

          - `JsonElement Type = "container_upload"`

          - `required string FileID`

          - `CacheControlEphemeral? CacheControl`

            Create a cache control breakpoint at this content block.

    - `JsonElement Role = "user"`

  - `class AssistantMessageParam`

    - `required MessageContentParam Content`

    - `JsonElement Role = "assistant"`

  - `class SystemMessageParam`

    - `required Content Content`

      - `string`

      - `IReadOnlyList<TextBlockParam>`

        - `JsonElement Type = "text"`

        - `required string Text`

          minLength: 1

        - `CacheControlEphemeral? CacheControl`

          Create a cache control breakpoint at this content block.

        - `IReadOnlyList<TextCitationParam>? Citations`

    - `JsonElement Role = "system"`

### Message Tokens Count

- `class MessageTokensCount`

  - `required long InputTokens`

    The total number of tokens across the provided list of messages, system prompt, and tools.

### Metadata

- `class Metadata`

  - `string? UserID`

    An external identifier for the user who is associated with the request.

    This should be a uuid, hash value, or other opaque identifier. Anthropic may use this id to help detect abuse. Do not include any identifying information such as name, email address, or phone number.

    maxLength: 512

### Output Config

- `class OutputConfig`

  - `Effort? Effort`

    How much effort the model should put into its response. Higher effort levels may result in more thorough analysis but take longer.

    Valid values are `low`, `medium`, `high`, `xhigh`, or `max`.

    - `Low("low")`

    - `Medium("medium")`

    - `High("high")`

    - `Xhigh("xhigh")`

    - `Max("max")`

  - `JsonOutputFormat? Format`

    A schema to specify Claude's output format in responses. See [structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs?sdk_languages=csharp)

    - `JsonElement Type = "json_schema"`

    - `required IReadOnlyDictionary<string, JsonElement> Schema`

      The JSON schema of the format

### Output Tokens Details

- `class OutputTokensDetails`

  - `required long ThinkingTokens`

    Number of output tokens the model generated as internal reasoning, including
    the thinking-block delimiter tokens.

    Reflects the raw reasoning the model produced, not the (possibly shorter)
    summarized thinking text returned in the response body. Computed by
    re-tokenizing the raw reasoning text, so it may differ from the model's exact
    generation count by a small number of tokens. Always ≤ `output_tokens`;
    `output_tokens - thinking_tokens` approximates the non-reasoning output.

    minimum: 0

### Plain Text Source

- `class PlainTextSource`

  - `JsonElement Type = "text"`

  - `required string Data`

  - `JsonElement MediaType = "text/plain"`

### Raw Content Block Delta

- `class RawContentBlockDelta: union`

  - `class TextDelta`

    - `JsonElement Type = "text_delta"`

    - `required string Text`

  - `class InputJsonDelta`

    - `JsonElement Type = "input_json_delta"`

    - `required string PartialJson`

  - `class CitationsDelta`

    - `JsonElement Type = "citations_delta"`

    - `required Citation Citation`

      - `class CitationCharLocation`

        - `JsonElement Type = "char_location"`

        - `required string CitedText`

        - `required long DocumentIndex`

          minimum: 0

        - `required string? DocumentTitle`

        - `required long EndCharIndex`

        - `required string? FileID`

        - `required long StartCharIndex`

          minimum: 0

      - `class CitationPageLocation`

        - `JsonElement Type = "page_location"`

        - `required string CitedText`

        - `required long DocumentIndex`

          minimum: 0

        - `required string? DocumentTitle`

        - `required long EndPageNumber`

        - `required string? FileID`

        - `required long StartPageNumber`

          minimum: 1

      - `class CitationContentBlockLocation`

        - `JsonElement Type = "content_block_location"`

        - `required string CitedText`

          The full text of the cited block range, concatenated.

          Always equals the contents of `content[start_block_index:end_block_index]` joined together. The text block is the minimal citable unit; this field is never a substring of a single block. Not counted toward output tokens, and not counted toward input tokens when sent back in subsequent turns.

        - `required long DocumentIndex`

          minimum: 0

        - `required string? DocumentTitle`

        - `required long EndBlockIndex`

          Exclusive 0-based end index of the cited block range in the source's `content` array.

          Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`.

        - `required string? FileID`

        - `required long StartBlockIndex`

          0-based index of the first cited block in the source's `content` array.

          minimum: 0

      - `class CitationsWebSearchResultLocation`

        - `JsonElement Type = "web_search_result_location"`

        - `required string CitedText`

        - `required string EncryptedIndex`

        - `required string? Title`

          maxLength: 512

        - `required string Url`

      - `class CitationsSearchResultLocation`

        - `JsonElement Type = "search_result_location"`

        - `required string CitedText`

          The full text of the cited block range, concatenated.

          Always equals the contents of `content[start_block_index:end_block_index]` joined together. The text block is the minimal citable unit; this field is never a substring of a single block. Not counted toward output tokens, and not counted toward input tokens when sent back in subsequent turns.

        - `required long EndBlockIndex`

          Exclusive 0-based end index of the cited block range in the source's `content` array.

          Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`.

        - `required long SearchResultIndex`

          0-based index of the cited search result among all `search_result` content blocks in the request, in the order they appear across messages and tool results.

          Counted separately from `document_index`; server-side web search results are not included in this count.

          minimum: 0

        - `required string Source`

        - `required long StartBlockIndex`

          0-based index of the first cited block in the source's `content` array.

          minimum: 0

        - `required string? Title`

  - `class ThinkingDelta`

    - `JsonElement Type = "thinking_delta"`

    - `required string Thinking`

      The incremental `thinking` text for this content block. Concatenate the `thinking` values of successive `thinking_delta` events to assemble the block's full `thinking` value.

  - `class SignatureDelta`

    - `JsonElement Type = "signature_delta"`

    - `required string Signature`

      The `signature` for this thinking block: an opaque value used to verify that the block was generated by Claude when it is passed back to the API. Delivered in a `signature_delta` event just before the block's `content_block_stop` event.

### Raw Content Block Delta Event

- `class RawContentBlockDeltaEvent`

  - `JsonElement Type = "content_block_delta"`

  - `required RawContentBlockDelta Delta`

    - `class TextDelta`

      - `JsonElement Type = "text_delta"`

      - `required string Text`

    - `class InputJsonDelta`

      - `JsonElement Type = "input_json_delta"`

      - `required string PartialJson`

    - `class CitationsDelta`

      - `JsonElement Type = "citations_delta"`

      - `required Citation Citation`

        - `class CitationCharLocation`

          - `JsonElement Type = "char_location"`

          - `required string CitedText`

          - `required long DocumentIndex`

            minimum: 0

          - `required string? DocumentTitle`

          - `required long EndCharIndex`

          - `required string? FileID`

          - `required long StartCharIndex`

            minimum: 0

        - `class CitationPageLocation`

          - `JsonElement Type = "page_location"`

          - `required string CitedText`

          - `required long DocumentIndex`

            minimum: 0

          - `required string? DocumentTitle`

          - `required long EndPageNumber`

          - `required string? FileID`

          - `required long StartPageNumber`

            minimum: 1

        - `class CitationContentBlockLocation`

          - `JsonElement Type = "content_block_location"`

          - `required string CitedText`

            The full text of the cited block range, concatenated.

            Always equals the contents of `content[start_block_index:end_block_index]` joined together. The text block is the minimal citable unit; this field is never a substring of a single block. Not counted toward output tokens, and not counted toward input tokens when sent back in subsequent turns.

          - `required long DocumentIndex`

            minimum: 0

          - `required string? DocumentTitle`

          - `required long EndBlockIndex`

            Exclusive 0-based end index of the cited block range in the source's `content` array.

            Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`.

          - `required string? FileID`

          - `required long StartBlockIndex`

            0-based index of the first cited block in the source's `content` array.

            minimum: 0

        - `class CitationsWebSearchResultLocation`

          - `JsonElement Type = "web_search_result_location"`

          - `required string CitedText`

          - `required string EncryptedIndex`

          - `required string? Title`

            maxLength: 512

          - `required string Url`

        - `class CitationsSearchResultLocation`

          - `JsonElement Type = "search_result_location"`

          - `required string CitedText`

            The full text of the cited block range, concatenated.

            Always equals the contents of `content[start_block_index:end_block_index]` joined together. The text block is the minimal citable unit; this field is never a substring of a single block. Not counted toward output tokens, and not counted toward input tokens when sent back in subsequent turns.

          - `required long EndBlockIndex`

            Exclusive 0-based end index of the cited block range in the source's `content` array.

            Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`.

          - `required long SearchResultIndex`

            0-based index of the cited search result among all `search_result` content blocks in the request, in the order they appear across messages and tool results.

            Counted separately from `document_index`; server-side web search results are not included in this count.

            minimum: 0

          - `required string Source`

          - `required long StartBlockIndex`

            0-based index of the first cited block in the source's `content` array.

            minimum: 0

          - `required string? Title`

    - `class ThinkingDelta`

      - `JsonElement Type = "thinking_delta"`

      - `required string Thinking`

        The incremental `thinking` text for this content block. Concatenate the `thinking` values of successive `thinking_delta` events to assemble the block's full `thinking` value.

    - `class SignatureDelta`

      - `JsonElement Type = "signature_delta"`

      - `required string Signature`

        The `signature` for this thinking block: an opaque value used to verify that the block was generated by Claude when it is passed back to the API. Delivered in a `signature_delta` event just before the block's `content_block_stop` event.

  - `required long Index`

### Raw Content Block Start Event

- `class RawContentBlockStartEvent`

  - `JsonElement Type = "content_block_start"`

  - `required ContentBlock ContentBlock`

    - `class TextBlock`

      - `JsonElement Type = "text"`

      - `required IReadOnlyList<TextCitation>? Citations`

        Citations supporting the text block.

        The type of citation returned will depend on the type of document being cited. Citing a PDF results in `page_location`, plain text results in `char_location`, and content document results in `content_block_location`.

        - `class CitationCharLocation`

          - `JsonElement Type = "char_location"`

          - `required string CitedText`

          - `required long DocumentIndex`

            minimum: 0

          - `required string? DocumentTitle`

          - `required long EndCharIndex`

          - `required string? FileID`

          - `required long StartCharIndex`

            minimum: 0

        - `class CitationPageLocation`

          - `JsonElement Type = "page_location"`

          - `required string CitedText`

          - `required long DocumentIndex`

            minimum: 0

          - `required string? DocumentTitle`

          - `required long EndPageNumber`

          - `required string? FileID`

          - `required long StartPageNumber`

            minimum: 1

        - `class CitationContentBlockLocation`

          - `JsonElement Type = "content_block_location"`

          - `required string CitedText`

            The full text of the cited block range, concatenated.

            Always equals the contents of `content[start_block_index:end_block_index]` joined together. The text block is the minimal citable unit; this field is never a substring of a single block. Not counted toward output tokens, and not counted toward input tokens when sent back in subsequent turns.

          - `required long DocumentIndex`

            minimum: 0

          - `required string? DocumentTitle`

          - `required long EndBlockIndex`

            Exclusive 0-based end index of the cited block range in the source's `content` array.

            Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`.

          - `required string? FileID`

          - `required long StartBlockIndex`

            0-based index of the first cited block in the source's `content` array.

            minimum: 0

        - `class CitationsWebSearchResultLocation`

          - `JsonElement Type = "web_search_result_location"`

          - `required string CitedText`

          - `required string EncryptedIndex`

          - `required string? Title`

            maxLength: 512

          - `required string Url`

        - `class CitationsSearchResultLocation`

          - `JsonElement Type = "search_result_location"`

          - `required string CitedText`

            The full text of the cited block range, concatenated.

            Always equals the contents of `content[start_block_index:end_block_index]` joined together. The text block is the minimal citable unit; this field is never a substring of a single block. Not counted toward output tokens, and not counted toward input tokens when sent back in subsequent turns.

          - `required long EndBlockIndex`

            Exclusive 0-based end index of the cited block range in the source's `content` array.

            Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`.

          - `required long SearchResultIndex`

            0-based index of the cited search result among all `search_result` content blocks in the request, in the order they appear across messages and tool results.

            Counted separately from `document_index`; server-side web search results are not included in this count.

            minimum: 0

          - `required string Source`

          - `required long StartBlockIndex`

            0-based index of the first cited block in the source's `content` array.

            minimum: 0

          - `required string? Title`

      - `required string Text`

    - `class ThinkingBlock`

      - `JsonElement Type = "thinking"`

      - `required string Signature`

        A value used to verify that this thinking block was generated by Claude when it is passed back to the API.

        This is an opaque field and should not be interpreted or parsed. When passing thinking blocks back to the API (required when using tools with extended thinking), pass them back exactly as received, with this field intact.

        See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking?sdk_languages=csharp) for details.

      - `required string Thinking`

        The text of Claude's thinking process for this block.

    - `class RedactedThinkingBlock`

      - `JsonElement Type = "redacted_thinking"`

      - `required string Data`

        The contents of this redacted thinking block, returned when portions of the model's thinking were safety-redacted. This field is opaque and encrypted, with no readable content.

        Pass `redacted_thinking` blocks back to the API unchanged when continuing a multi-turn conversation.

        See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking?sdk_languages=csharp#redacted-thinking-blocks) for details.

    - `class ToolUseBlock`

      - `JsonElement Type = "tool_use"`

      - `required string ID`

        pattern: ^[a-zA-Z0-9_-]+$

      - `required Caller Caller`

        - `class DirectCaller`

          Tool invocation directly from the model.

          - `JsonElement Type = "direct"`

        - `class ServerToolCaller`

          Tool invocation generated by a server-side tool.

          - `JsonElement Type = "code_execution_20250825"`

          - `required string ToolID`

            pattern: ^srvtoolu_[a-zA-Z0-9_]+$

        - `class ServerToolCaller20260120`

          - `JsonElement Type = "code_execution_20260120"`

          - `required string ToolID`

            pattern: ^srvtoolu_[a-zA-Z0-9_]+$

      - `required IReadOnlyDictionary<string, JsonElement> Input`

      - `required string Name`

        minLength: 1

      - `string? ToolsetName`

        For a toolset member tool_use, the toolset family.

        minLength: 1, maxLength: 64, pattern: ^[a-zA-Z0-9_-]+$

    - `class ServerToolUseBlock`

      - `JsonElement Type = "server_tool_use"`

      - `required string ID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

      - `required Caller Caller`

        - `class DirectCaller`

          Tool invocation directly from the model.

        - `class ServerToolCaller`

          Tool invocation generated by a server-side tool.

        - `class ServerToolCaller20260120`

      - `required IReadOnlyDictionary<string, JsonElement> Input`

      - `required Name Name`

        - `WebSearch("web_search")`

        - `WebFetch("web_fetch")`

        - `CodeExecution("code_execution")`

        - `BashCodeExecution("bash_code_execution")`

        - `TextEditorCodeExecution("text_editor_code_execution")`

        - `ToolSearchToolRegex("tool_search_tool_regex")`

        - `ToolSearchToolBm25("tool_search_tool_bm25")`

    - `class WebSearchToolResultBlock`

      - `JsonElement Type = "web_search_tool_result"`

      - `required Caller Caller`

        - `class DirectCaller`

          Tool invocation directly from the model.

        - `class ServerToolCaller`

          Tool invocation generated by a server-side tool.

        - `class ServerToolCaller20260120`

      - `required WebSearchToolResultBlockContent Content`

        - `class WebSearchToolResultError`

          - `JsonElement Type = "web_search_tool_result_error"`

          - `required WebSearchToolResultErrorCode ErrorCode`

            - `InvalidToolInput("invalid_tool_input")`

            - `Unavailable("unavailable")`

            - `MaxUsesExceeded("max_uses_exceeded")`

            - `TooManyRequests("too_many_requests")`

            - `QueryTooLong("query_too_long")`

            - `RequestTooLarge("request_too_large")`

        - `IReadOnlyList<WebSearchResultBlock>`

          - `JsonElement Type = "web_search_result"`

          - `required string EncryptedContent`

          - `required string? PageAge`

          - `required string Title`

          - `required string Url`

      - `required string ToolUseID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

    - `class WebFetchToolResultBlock`

      - `JsonElement Type = "web_fetch_tool_result"`

      - `required Caller Caller`

        - `class DirectCaller`

          Tool invocation directly from the model.

        - `class ServerToolCaller`

          Tool invocation generated by a server-side tool.

        - `class ServerToolCaller20260120`

      - `required Content Content`

        - `class WebFetchToolResultErrorBlock`

          - `JsonElement Type = "web_fetch_tool_result_error"`

          - `required WebFetchToolResultErrorCode ErrorCode`

            - `InvalidToolInput("invalid_tool_input")`

            - `UrlTooLong("url_too_long")`

            - `UrlNotAllowed("url_not_allowed")`

            - `UrlNotInPriorContext("url_not_in_prior_context")`

            - `UrlNotAccessible("url_not_accessible")`

            - `UnsupportedContentType("unsupported_content_type")`

            - `TooManyRequests("too_many_requests")`

            - `MaxUsesExceeded("max_uses_exceeded")`

            - `Unavailable("unavailable")`

            - `ContentTooLarge("content_too_large")`

        - `class WebFetchBlock`

          - `JsonElement Type = "web_fetch_result"`

          - `required DocumentBlock Content`

            - `JsonElement Type = "document"`

            - `required CitationsConfig? Citations`

              Citation configuration for the document

              - `required bool Enabled`

            - `required Source Source`

              - `class Base64PdfSource`

                - `JsonElement Type = "base64"`

                - `required string Data`

                  format: byte

                - `JsonElement MediaType = "application/pdf"`

              - `class PlainTextSource`

                - `JsonElement Type = "text"`

                - `required string Data`

                - `JsonElement MediaType = "text/plain"`

            - `required string? Title`

              The title of the document

          - `required string? RetrievedAt`

            ISO 8601 timestamp when the content was retrieved

          - `required string Url`

            Fetched content URL

      - `required string ToolUseID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

    - `class CodeExecutionToolResultBlock`

      - `JsonElement Type = "code_execution_tool_result"`

      - `required CodeExecutionToolResultBlockContent Content`

        - `class CodeExecutionToolResultError`

          - `JsonElement Type = "code_execution_tool_result_error"`

          - `required CodeExecutionToolResultErrorCode ErrorCode`

            - `InvalidToolInput("invalid_tool_input")`

            - `Unavailable("unavailable")`

            - `TooManyRequests("too_many_requests")`

            - `ExecutionTimeExceeded("execution_time_exceeded")`

        - `class CodeExecutionResultBlock`

          - `JsonElement Type = "code_execution_result"`

          - `required IReadOnlyList<CodeExecutionOutputBlock> Content`

            - `JsonElement Type = "code_execution_output"`

            - `required string FileID`

          - `required long ReturnCode`

          - `required string Stderr`

          - `required string Stdout`

        - `class EncryptedCodeExecutionResultBlock`

          The output and exit code of Python code that Claude ran with the code execution tool, with standard output in encrypted form.

          The API returns this block in place of `code_execution_result` when the code called the web search tool.

          See the [programmatic tool calling guide](https://platform.claude.com/docs/en/agents-and-tools/tool-use/programmatic-tool-calling?sdk_languages=csharp) to learn more about programmatic tool calling.

          - `JsonElement Type = "encrypted_code_execution_result"`

          - `required IReadOnlyList<CodeExecutionOutputBlock> Content`

            - `JsonElement Type = "code_execution_output"`

            - `required string FileID`

          - `required string EncryptedStdout`

          - `required long ReturnCode`

          - `required string Stderr`

      - `required string ToolUseID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

    - `class BashCodeExecutionToolResultBlock`

      - `JsonElement Type = "bash_code_execution_tool_result"`

      - `required Content Content`

        - `class BashCodeExecutionToolResultError`

          - `JsonElement Type = "bash_code_execution_tool_result_error"`

          - `required BashCodeExecutionToolResultErrorCode ErrorCode`

            - `InvalidToolInput("invalid_tool_input")`

            - `Unavailable("unavailable")`

            - `TooManyRequests("too_many_requests")`

            - `ExecutionTimeExceeded("execution_time_exceeded")`

            - `OutputFileTooLarge("output_file_too_large")`

        - `class BashCodeExecutionResultBlock`

          - `JsonElement Type = "bash_code_execution_result"`

          - `required IReadOnlyList<BashCodeExecutionOutputBlock> Content`

            - `JsonElement Type = "bash_code_execution_output"`

            - `required string FileID`

          - `required long ReturnCode`

          - `required string Stderr`

          - `required string Stdout`

      - `required string ToolUseID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

    - `class TextEditorCodeExecutionToolResultBlock`

      - `JsonElement Type = "text_editor_code_execution_tool_result"`

      - `required Content Content`

        - `class TextEditorCodeExecutionToolResultError`

          - `JsonElement Type = "text_editor_code_execution_tool_result_error"`

          - `required TextEditorCodeExecutionToolResultErrorCode ErrorCode`

            - `InvalidToolInput("invalid_tool_input")`

            - `Unavailable("unavailable")`

            - `TooManyRequests("too_many_requests")`

            - `ExecutionTimeExceeded("execution_time_exceeded")`

            - `FileNotFound("file_not_found")`

          - `required string? ErrorMessage`

        - `class TextEditorCodeExecutionViewResultBlock`

          - `JsonElement Type = "text_editor_code_execution_view_result"`

          - `required string Content`

          - `required FileType FileType`

            - `Text("text")`

            - `Image("image")`

            - `Pdf("pdf")`

          - `required long? NumLines`

          - `required long? StartLine`

          - `required long? TotalLines`

        - `class TextEditorCodeExecutionCreateResultBlock`

          - `JsonElement Type = "text_editor_code_execution_create_result"`

          - `required bool IsFileUpdate`

        - `class TextEditorCodeExecutionStrReplaceResultBlock`

          - `JsonElement Type = "text_editor_code_execution_str_replace_result"`

          - `required IReadOnlyList<string>? Lines`

          - `required long? NewLines`

          - `required long? NewStart`

          - `required long? OldLines`

          - `required long? OldStart`

      - `required string ToolUseID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

    - `class ToolSearchToolResultBlock`

      - `JsonElement Type = "tool_search_tool_result"`

      - `required Content Content`

        - `class ToolSearchToolResultError`

          - `JsonElement Type = "tool_search_tool_result_error"`

          - `required ToolSearchToolResultErrorCode ErrorCode`

            - `InvalidToolInput("invalid_tool_input")`

            - `Unavailable("unavailable")`

            - `TooManyRequests("too_many_requests")`

            - `ExecutionTimeExceeded("execution_time_exceeded")`

          - `required string? ErrorMessage`

        - `class ToolSearchToolSearchResultBlock`

          - `JsonElement Type = "tool_search_tool_search_result"`

          - `required IReadOnlyList<ToolReferenceBlock> ToolReferences`

            - `JsonElement Type = "tool_reference"`

            - `required string ToolName`

              minLength: 1, maxLength: 256, pattern: ^[a-zA-Z0-9_-]{1,256}$

      - `required string ToolUseID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

    - `class ContainerUploadBlock`

      Response model for a file uploaded to the container.

      - `JsonElement Type = "container_upload"`

      - `required string FileID`

  - `required long Index`

### Raw Content Block Stop Event

- `class RawContentBlockStopEvent`

  - `JsonElement Type = "content_block_stop"`

  - `required long Index`

### Raw Message Delta Event

- `class RawMessageDeltaEvent`

  - `JsonElement Type = "message_delta"`

  - `required Delta Delta`

    - `required Container? Container`

      Information about the container used in this request.

      This will be non-null if a container tool (e.g. code execution) was used.

      - `required string ID`

        Identifier for the container used in this request

      - `required DateTimeOffset ExpiresAt`

        The time at which the container will expire.

        format: date-time

      - `required IReadOnlyList<ContainerSkill>? Skills`

        Skills loaded in the container

        - `required ContainerSkillType Type`

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

          - `Anthropic("anthropic")`

          - `Custom("custom")`

        - `required string SkillID`

          Skill ID

          minLength: 1, maxLength: 64

        - `required string Version`

          The resolved version: a skill version ID for custom skills.

          minLength: 1, maxLength: 64

    - `required RefusalStopDetails? StopDetails`

      Structured information about why model output stopped.

      This is `null` when the `stop_reason` has no additional detail to report.

      - `JsonElement Type = "refusal"`

      - `required Category? Category`

        The policy category that triggered the refusal.

        `null` when the refusal doesn't map to a named category.

        - `Cyber("cyber")`

          The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category.

        - `Bio("bio")`

          The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category.

        - `FrontierLlm("frontier_llm")`

          The request could assist the development of competing AI models, which is restricted under [Anthropic's commercial terms](https://www.anthropic.com/legal/commercial-terms). Benign machine learning work can also trigger this category.

        - `ReasoningExtraction("reasoning_extraction")`

          The request asks the model to reproduce its internal reasoning in the response text. To get reasoning in a structured form instead, use [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking?sdk_languages=csharp).

        - `GeneralHarms("general_harms")`

          The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category.

      - `required string? Explanation`

        Human-readable explanation of the refusal.

        This text is not guaranteed to be stable. `null` when no explanation is available for the category.

    - `required StopReason? StopReason`

      - `EndTurn("end_turn")`

      - `MaxTokens("max_tokens")`

      - `StopSequence("stop_sequence")`

      - `ToolUse("tool_use")`

      - `PauseTurn("pause_turn")`

      - `Refusal("refusal")`

      - `ModelContextWindowExceeded("model_context_window_exceeded")`

    - `required string? StopSequence`

  - `required MessageDeltaUsage Usage`

    Billing and rate-limit usage.

    Anthropic's API bills and rate-limits by token counts, as tokens represent the underlying cost to our systems.

    Under the hood, the API transforms requests into a format suitable for the model. The model's output then goes through a parsing stage before becoming an API response. As a result, the token counts in `usage` will not match one-to-one with the exact visible content of an API request or response.

    For example, `output_tokens` will be non-zero, even for an empty string response from Claude.

    Total input tokens in a request is the summation of `input_tokens`, `cache_creation_input_tokens`, and `cache_read_input_tokens`.

    - `required long? CacheCreationInputTokens`

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

      minimum: 0

    - `required long? CacheReadInputTokens`

      The cumulative number of input tokens read from the cache.

      minimum: 0

    - `required long? InputTokens`

      The cumulative number of input tokens which were used.

      minimum: 0

    - `required long OutputTokens`

      The cumulative number of output tokens which were used.

    - `required OutputTokensDetails? OutputTokensDetails`

      Breakdown of output tokens by category.

      `output_tokens` remains the inclusive, authoritative total used for billing.
      This object provides a read-only decomposition for observability — for example,
      how many of the billed output tokens were spent on internal reasoning that may
      have been summarized before being returned to you.

      - `required long ThinkingTokens`

        Number of output tokens the model generated as internal reasoning, including
        the thinking-block delimiter tokens.

        Reflects the raw reasoning the model produced, not the (possibly shorter)
        summarized thinking text returned in the response body. Computed by
        re-tokenizing the raw reasoning text, so it may differ from the model's exact
        generation count by a small number of tokens. Always ≤ `output_tokens`;
        `output_tokens - thinking_tokens` approximates the non-reasoning output.

        minimum: 0

    - `required ServerToolUsage? ServerToolUse`

      The number of server tool requests.

      - `required long WebFetchRequests`

        The number of web fetch tool requests.

        minimum: 0

      - `required long WebSearchRequests`

        The number of web search tool requests.

        minimum: 0

### Raw Message Start Event

- `class RawMessageStartEvent`

  - `JsonElement Type = "message_start"`

  - `required Message Message`

    - `JsonElement Type = "message"`

      Object type.

      For Messages, this is always `"message"`.

    - `required string ID`

      Unique object identifier.

      The format and length of IDs may change over time.

    - `required Container? Container`

      Information about the container used in this request.

      This will be non-null if a container tool (e.g. code execution) was used.

      - `required string ID`

        Identifier for the container used in this request

      - `required DateTimeOffset ExpiresAt`

        The time at which the container will expire.

        format: date-time

      - `required IReadOnlyList<ContainerSkill>? Skills`

        Skills loaded in the container

        - `required ContainerSkillType Type`

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

          - `Anthropic("anthropic")`

          - `Custom("custom")`

        - `required string SkillID`

          Skill ID

          minLength: 1, maxLength: 64

        - `required string Version`

          The resolved version: a skill version ID for custom skills.

          minLength: 1, maxLength: 64

    - `required IReadOnlyList<ContentBlock> Content`

      Content generated by the model.

      This is an array of content blocks, each of which has a `type` that determines its shape.

      Example:

      ```json
      [{"type": "text", "text": "Hi, I'm Claude."}]
      ```

      If the request input `messages` ended with an `assistant` turn, then the response `content` will continue directly from that last turn. You can use this to constrain the model's output.

      For example, if the input `messages` were:

      ```json
      [
        {"role": "user", "content": "What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun"},
        {"role": "assistant", "content": "The best answer is ("}
      ]
      ```

      Then the response `content` might be:

      ```json
      [{"type": "text", "text": "B)"}]
      ```

      - `class TextBlock`

        - `JsonElement Type = "text"`

        - `required IReadOnlyList<TextCitation>? Citations`

          Citations supporting the text block.

          The type of citation returned will depend on the type of document being cited. Citing a PDF results in `page_location`, plain text results in `char_location`, and content document results in `content_block_location`.

          - `class CitationCharLocation`

            - `JsonElement Type = "char_location"`

            - `required string CitedText`

            - `required long DocumentIndex`

              minimum: 0

            - `required string? DocumentTitle`

            - `required long EndCharIndex`

            - `required string? FileID`

            - `required long StartCharIndex`

              minimum: 0

          - `class CitationPageLocation`

            - `JsonElement Type = "page_location"`

            - `required string CitedText`

            - `required long DocumentIndex`

              minimum: 0

            - `required string? DocumentTitle`

            - `required long EndPageNumber`

            - `required string? FileID`

            - `required long StartPageNumber`

              minimum: 1

          - `class CitationContentBlockLocation`

            - `JsonElement Type = "content_block_location"`

            - `required string CitedText`

              The full text of the cited block range, concatenated.

              Always equals the contents of `content[start_block_index:end_block_index]` joined together. The text block is the minimal citable unit; this field is never a substring of a single block. Not counted toward output tokens, and not counted toward input tokens when sent back in subsequent turns.

            - `required long DocumentIndex`

              minimum: 0

            - `required string? DocumentTitle`

            - `required long EndBlockIndex`

              Exclusive 0-based end index of the cited block range in the source's `content` array.

              Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`.

            - `required string? FileID`

            - `required long StartBlockIndex`

              0-based index of the first cited block in the source's `content` array.

              minimum: 0

          - `class CitationsWebSearchResultLocation`

            - `JsonElement Type = "web_search_result_location"`

            - `required string CitedText`

            - `required string EncryptedIndex`

            - `required string? Title`

              maxLength: 512

            - `required string Url`

          - `class CitationsSearchResultLocation`

            - `JsonElement Type = "search_result_location"`

            - `required string CitedText`

              The full text of the cited block range, concatenated.

              Always equals the contents of `content[start_block_index:end_block_index]` joined together. The text block is the minimal citable unit; this field is never a substring of a single block. Not counted toward output tokens, and not counted toward input tokens when sent back in subsequent turns.

            - `required long EndBlockIndex`

              Exclusive 0-based end index of the cited block range in the source's `content` array.

              Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`.

            - `required long SearchResultIndex`

              0-based index of the cited search result among all `search_result` content blocks in the request, in the order they appear across messages and tool results.

              Counted separately from `document_index`; server-side web search results are not included in this count.

              minimum: 0

            - `required string Source`

            - `required long StartBlockIndex`

              0-based index of the first cited block in the source's `content` array.

              minimum: 0

            - `required string? Title`

        - `required string Text`

      - `class ThinkingBlock`

        - `JsonElement Type = "thinking"`

        - `required string Signature`

          A value used to verify that this thinking block was generated by Claude when it is passed back to the API.

          This is an opaque field and should not be interpreted or parsed. When passing thinking blocks back to the API (required when using tools with extended thinking), pass them back exactly as received, with this field intact.

          See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking?sdk_languages=csharp) for details.

        - `required string Thinking`

          The text of Claude's thinking process for this block.

      - `class RedactedThinkingBlock`

        - `JsonElement Type = "redacted_thinking"`

        - `required string Data`

          The contents of this redacted thinking block, returned when portions of the model's thinking were safety-redacted. This field is opaque and encrypted, with no readable content.

          Pass `redacted_thinking` blocks back to the API unchanged when continuing a multi-turn conversation.

          See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking?sdk_languages=csharp#redacted-thinking-blocks) for details.

      - `class ToolUseBlock`

        - `JsonElement Type = "tool_use"`

        - `required string ID`

          pattern: ^[a-zA-Z0-9_-]+$

        - `required Caller Caller`

          - `class DirectCaller`

            Tool invocation directly from the model.

            - `JsonElement Type = "direct"`

          - `class ServerToolCaller`

            Tool invocation generated by a server-side tool.

            - `JsonElement Type = "code_execution_20250825"`

            - `required string ToolID`

              pattern: ^srvtoolu_[a-zA-Z0-9_]+$

          - `class ServerToolCaller20260120`

            - `JsonElement Type = "code_execution_20260120"`

            - `required string ToolID`

              pattern: ^srvtoolu_[a-zA-Z0-9_]+$

        - `required IReadOnlyDictionary<string, JsonElement> Input`

        - `required string Name`

          minLength: 1

        - `string? ToolsetName`

          For a toolset member tool_use, the toolset family.

          minLength: 1, maxLength: 64, pattern: ^[a-zA-Z0-9_-]+$

      - `class ServerToolUseBlock`

        - `JsonElement Type = "server_tool_use"`

        - `required string ID`

          pattern: ^srvtoolu_[a-zA-Z0-9_]+$

        - `required Caller Caller`

          - `class DirectCaller`

            Tool invocation directly from the model.

          - `class ServerToolCaller`

            Tool invocation generated by a server-side tool.

          - `class ServerToolCaller20260120`

        - `required IReadOnlyDictionary<string, JsonElement> Input`

        - `required Name Name`

          - `WebSearch("web_search")`

          - `WebFetch("web_fetch")`

          - `CodeExecution("code_execution")`

          - `BashCodeExecution("bash_code_execution")`

          - `TextEditorCodeExecution("text_editor_code_execution")`

          - `ToolSearchToolRegex("tool_search_tool_regex")`

          - `ToolSearchToolBm25("tool_search_tool_bm25")`

      - `class WebSearchToolResultBlock`

        - `JsonElement Type = "web_search_tool_result"`

        - `required Caller Caller`

          - `class DirectCaller`

            Tool invocation directly from the model.

          - `class ServerToolCaller`

            Tool invocation generated by a server-side tool.

          - `class ServerToolCaller20260120`

        - `required WebSearchToolResultBlockContent Content`

          - `class WebSearchToolResultError`

            - `JsonElement Type = "web_search_tool_result_error"`

            - `required WebSearchToolResultErrorCode ErrorCode`

              - `InvalidToolInput("invalid_tool_input")`

              - `Unavailable("unavailable")`

              - `MaxUsesExceeded("max_uses_exceeded")`

              - `TooManyRequests("too_many_requests")`

              - `QueryTooLong("query_too_long")`

              - `RequestTooLarge("request_too_large")`

          - `IReadOnlyList<WebSearchResultBlock>`

            - `JsonElement Type = "web_search_result"`

            - `required string EncryptedContent`

            - `required string? PageAge`

            - `required string Title`

            - `required string Url`

        - `required string ToolUseID`

          pattern: ^srvtoolu_[a-zA-Z0-9_]+$

      - `class WebFetchToolResultBlock`

        - `JsonElement Type = "web_fetch_tool_result"`

        - `required Caller Caller`

          - `class DirectCaller`

            Tool invocation directly from the model.

          - `class ServerToolCaller`

            Tool invocation generated by a server-side tool.

          - `class ServerToolCaller20260120`

        - `required Content Content`

          - `class WebFetchToolResultErrorBlock`

            - `JsonElement Type = "web_fetch_tool_result_error"`

            - `required WebFetchToolResultErrorCode ErrorCode`

              - `InvalidToolInput("invalid_tool_input")`

              - `UrlTooLong("url_too_long")`

              - `UrlNotAllowed("url_not_allowed")`

              - `UrlNotInPriorContext("url_not_in_prior_context")`

              - `UrlNotAccessible("url_not_accessible")`

              - `UnsupportedContentType("unsupported_content_type")`

              - `TooManyRequests("too_many_requests")`

              - `MaxUsesExceeded("max_uses_exceeded")`

              - `Unavailable("unavailable")`

              - `ContentTooLarge("content_too_large")`

          - `class WebFetchBlock`

            - `JsonElement Type = "web_fetch_result"`

            - `required DocumentBlock Content`

              - `JsonElement Type = "document"`

              - `required CitationsConfig? Citations`

                Citation configuration for the document

                - `required bool Enabled`

              - `required Source Source`

                - `class Base64PdfSource`

                  - `JsonElement Type = "base64"`

                  - `required string Data`

                    format: byte

                  - `JsonElement MediaType = "application/pdf"`

                - `class PlainTextSource`

                  - `JsonElement Type = "text"`

                  - `required string Data`

                  - `JsonElement MediaType = "text/plain"`

              - `required string? Title`

                The title of the document

            - `required string? RetrievedAt`

              ISO 8601 timestamp when the content was retrieved

            - `required string Url`

              Fetched content URL

        - `required string ToolUseID`

          pattern: ^srvtoolu_[a-zA-Z0-9_]+$

      - `class CodeExecutionToolResultBlock`

        - `JsonElement Type = "code_execution_tool_result"`

        - `required CodeExecutionToolResultBlockContent Content`

          - `class CodeExecutionToolResultError`

            - `JsonElement Type = "code_execution_tool_result_error"`

            - `required CodeExecutionToolResultErrorCode ErrorCode`

              - `InvalidToolInput("invalid_tool_input")`

              - `Unavailable("unavailable")`

              - `TooManyRequests("too_many_requests")`

              - `ExecutionTimeExceeded("execution_time_exceeded")`

          - `class CodeExecutionResultBlock`

            - `JsonElement Type = "code_execution_result"`

            - `required IReadOnlyList<CodeExecutionOutputBlock> Content`

              - `JsonElement Type = "code_execution_output"`

              - `required string FileID`

            - `required long ReturnCode`

            - `required string Stderr`

            - `required string Stdout`

          - `class EncryptedCodeExecutionResultBlock`

            The output and exit code of Python code that Claude ran with the code execution tool, with standard output in encrypted form.

            The API returns this block in place of `code_execution_result` when the code called the web search tool.

            See the [programmatic tool calling guide](https://platform.claude.com/docs/en/agents-and-tools/tool-use/programmatic-tool-calling?sdk_languages=csharp) to learn more about programmatic tool calling.

            - `JsonElement Type = "encrypted_code_execution_result"`

            - `required IReadOnlyList<CodeExecutionOutputBlock> Content`

              - `JsonElement Type = "code_execution_output"`

              - `required string FileID`

            - `required string EncryptedStdout`

            - `required long ReturnCode`

            - `required string Stderr`

        - `required string ToolUseID`

          pattern: ^srvtoolu_[a-zA-Z0-9_]+$

      - `class BashCodeExecutionToolResultBlock`

        - `JsonElement Type = "bash_code_execution_tool_result"`

        - `required Content Content`

          - `class BashCodeExecutionToolResultError`

            - `JsonElement Type = "bash_code_execution_tool_result_error"`

            - `required BashCodeExecutionToolResultErrorCode ErrorCode`

              - `InvalidToolInput("invalid_tool_input")`

              - `Unavailable("unavailable")`

              - `TooManyRequests("too_many_requests")`

              - `ExecutionTimeExceeded("execution_time_exceeded")`

              - `OutputFileTooLarge("output_file_too_large")`

          - `class BashCodeExecutionResultBlock`

            - `JsonElement Type = "bash_code_execution_result"`

            - `required IReadOnlyList<BashCodeExecutionOutputBlock> Content`

              - `JsonElement Type = "bash_code_execution_output"`

              - `required string FileID`

            - `required long ReturnCode`

            - `required string Stderr`

            - `required string Stdout`

        - `required string ToolUseID`

          pattern: ^srvtoolu_[a-zA-Z0-9_]+$

      - `class TextEditorCodeExecutionToolResultBlock`

        - `JsonElement Type = "text_editor_code_execution_tool_result"`

        - `required Content Content`

          - `class TextEditorCodeExecutionToolResultError`

            - `JsonElement Type = "text_editor_code_execution_tool_result_error"`

            - `required TextEditorCodeExecutionToolResultErrorCode ErrorCode`

              - `InvalidToolInput("invalid_tool_input")`

              - `Unavailable("unavailable")`

              - `TooManyRequests("too_many_requests")`

              - `ExecutionTimeExceeded("execution_time_exceeded")`

              - `FileNotFound("file_not_found")`

            - `required string? ErrorMessage`

          - `class TextEditorCodeExecutionViewResultBlock`

            - `JsonElement Type = "text_editor_code_execution_view_result"`

            - `required string Content`

            - `required FileType FileType`

              - `Text("text")`

              - `Image("image")`

              - `Pdf("pdf")`

            - `required long? NumLines`

            - `required long? StartLine`

            - `required long? TotalLines`

          - `class TextEditorCodeExecutionCreateResultBlock`

            - `JsonElement Type = "text_editor_code_execution_create_result"`

            - `required bool IsFileUpdate`

          - `class TextEditorCodeExecutionStrReplaceResultBlock`

            - `JsonElement Type = "text_editor_code_execution_str_replace_result"`

            - `required IReadOnlyList<string>? Lines`

            - `required long? NewLines`

            - `required long? NewStart`

            - `required long? OldLines`

            - `required long? OldStart`

        - `required string ToolUseID`

          pattern: ^srvtoolu_[a-zA-Z0-9_]+$

      - `class ToolSearchToolResultBlock`

        - `JsonElement Type = "tool_search_tool_result"`

        - `required Content Content`

          - `class ToolSearchToolResultError`

            - `JsonElement Type = "tool_search_tool_result_error"`

            - `required ToolSearchToolResultErrorCode ErrorCode`

              - `InvalidToolInput("invalid_tool_input")`

              - `Unavailable("unavailable")`

              - `TooManyRequests("too_many_requests")`

              - `ExecutionTimeExceeded("execution_time_exceeded")`

            - `required string? ErrorMessage`

          - `class ToolSearchToolSearchResultBlock`

            - `JsonElement Type = "tool_search_tool_search_result"`

            - `required IReadOnlyList<ToolReferenceBlock> ToolReferences`

              - `JsonElement Type = "tool_reference"`

              - `required string ToolName`

                minLength: 1, maxLength: 256, pattern: ^[a-zA-Z0-9_-]{1,256}$

        - `required string ToolUseID`

          pattern: ^srvtoolu_[a-zA-Z0-9_]+$

      - `class ContainerUploadBlock`

        Response model for a file uploaded to the container.

        - `JsonElement Type = "container_upload"`

        - `required string FileID`

    - `required Diagnostics? Diagnostics`

      Request-level diagnostics. `null` when the request did not supply `diagnostics`, or when it did and no prompt-cache divergence was detected.

      - `required CacheMissReason? CacheMissReason`

        Explains why the prompt cache could not fully reuse the prefix from the request identified by `diagnostics.previous_message_id`. `null` means diagnosis is still pending — the response was serialized before the background comparison completed.

        - `class CacheMissModelChanged`

          A `cache_miss_reason` for a request whose `model` or `speed` differs from the previous request's.

          See the [cache diagnostics guide](https://platform.claude.com/docs/en/build-with-claude/cache-diagnostics?sdk_languages=csharp#cache-miss-reason-types) to learn what to change for each reason.

          - `JsonElement Type = "model_changed"`

          - `required long CacheMissedInputTokens`

            Approximate number of input tokens that would have been read from cache had the prefix matched the previous request.

        - `class CacheMissSystemChanged`

          A `cache_miss_reason` for a request whose `system` differs from the previous request's.

          See the [cache diagnostics guide](https://platform.claude.com/docs/en/build-with-claude/cache-diagnostics?sdk_languages=csharp#cache-miss-reason-types) to learn what to change for each reason.

          - `JsonElement Type = "system_changed"`

          - `required long CacheMissedInputTokens`

            Approximate number of input tokens that would have been read from cache had the prefix matched the previous request.

        - `class CacheMissToolsChanged`

          A `cache_miss_reason` for a request whose `tools` differ from the previous request's, for example because tools were added, removed, or reordered.

          See the [cache diagnostics guide](https://platform.claude.com/docs/en/build-with-claude/cache-diagnostics?sdk_languages=csharp#cache-miss-reason-types) to learn what to change for each reason.

          - `JsonElement Type = "tools_changed"`

          - `required long CacheMissedInputTokens`

            Approximate number of input tokens that would have been read from cache had the prefix matched the previous request.

        - `class CacheMissMessagesChanged`

          A `cache_miss_reason` for a request whose `messages` differ from the previous request's in an earlier entry, instead of only having entries appended. The `model`, `system`, and `tools` match.

          See the [cache diagnostics guide](https://platform.claude.com/docs/en/build-with-claude/cache-diagnostics?sdk_languages=csharp#cache-miss-reason-types) to learn what to change for each reason.

          - `JsonElement Type = "messages_changed"`

          - `required long CacheMissedInputTokens`

            Approximate number of input tokens that would have been read from cache had the prefix matched the previous request.

        - `class CacheMissPreviousMessageNotFound`

          A `cache_miss_reason` for when the API doesn't have a stored record of the request that `diagnostics.previous_message_id` references.

          This doesn't mean that this request changed.

          See the [cache diagnostics guide](https://platform.claude.com/docs/en/build-with-claude/cache-diagnostics?sdk_languages=csharp#cache-miss-reason-types) to learn what to change for each reason.

          - `JsonElement Type = "previous_message_not_found"`

        - `class CacheMissUnavailable`

          A `cache_miss_reason` for when the API can't give a diagnosis. The request itself was processed normally.

          This includes a request whose `model`, `system`, and `tools` match the previous request's but whose other prompt-affecting parameters, such as `thinking` or `tool_choice`, differ.

          See the [cache diagnostics guide](https://platform.claude.com/docs/en/build-with-claude/cache-diagnostics?sdk_languages=csharp#cache-miss-reason-types) to learn what to change for each reason.

          - `JsonElement Type = "unavailable"`

    - `required Model Model`

      The model that will complete your prompt.

      See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options.

      - `ClaudeHaiku5_5("claude-haiku-5-5")`

        Fastest model for high-volume, real-time tasks

      - `ClaudeSonnet5_5("claude-sonnet-5-5")`

        Efficient model for coding and agents

      - `ClaudeFable5_1("claude-fable-5-1")`

        Frontier intelligence for ambitious tasks across coding, scientific discovery, and enterprise workflows

      - `ClaudeOpus5_5("claude-opus-5-5")`

        Powerful intelligence for coding, knowledge work, and long-running agents

      - `ClaudeMythos5_1("claude-mythos-5-1")`

        Our most capable model for cybersecurity and biology research, available through trusted access programs

      - `ClaudeSonnet5("claude-sonnet-5")`

        Efficient model for coding and agents

      - `ClaudeFable5("claude-fable-5")`

        Next generation of intelligence for the hardest knowledge work and coding problems

      - `ClaudeMythos5("claude-mythos-5")`

        Most capable model for cybersecurity and biology research

      - `ClaudeOpus5("claude-opus-5")`

        Powerful intelligence for long-running agents and coding

      - `ClaudeOpus4_8("claude-opus-4-8")`

        Powerful intelligence for long-running agents and coding

      - `ClaudeOpus4_7("claude-opus-4-7")`

        Powerful intelligence for long-running agents and coding

      - `ClaudeOpus4_6("claude-opus-4-6")`

        Powerful intelligence for long-running agents and coding

      - `ClaudeSonnet4_6("claude-sonnet-4-6")`

        Best combination of speed and intelligence

      - `ClaudeHaiku4_5("claude-haiku-4-5")`

      - `ClaudeHaiku4_5_20251001("claude-haiku-4-5-20251001")`

      - `ClaudeOpus4_5("claude-opus-4-5")`

        Powerful intelligence for long-running agents and coding

      - `ClaudeOpus4_5_20251101("claude-opus-4-5-20251101")`

        Powerful intelligence for long-running agents and coding

      - `ClaudeMythosPreview("claude-mythos-preview")`

        **Deprecated**: Will reach end-of-life on June 30, 2026. Please migrate to claude-mythos-5. Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for more information.

        New class of intelligence, strongest in coding and cybersecurity

      - `ClaudeSonnet4_5("claude-sonnet-4-5")`

        **Deprecated**: Will reach end-of-life on November 30, 2026. Please migrate to claude-sonnet-5-5. Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for more information.

        High-performance model for agents and coding

      - `ClaudeSonnet4_5_20250929("claude-sonnet-4-5-20250929")`

        **Deprecated**: Will reach end-of-life on November 30, 2026. Please migrate to claude-sonnet-5-5. Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for more information.

        High-performance model for agents and coding

    - `JsonElement Role = "assistant"`

      Conversational role of the generated message.

      This will always be `"assistant"`.

    - `required RefusalStopDetails? StopDetails`

      Structured information about why model output stopped.

      This is `null` when the `stop_reason` has no additional detail to report.

      - `JsonElement Type = "refusal"`

      - `required Category? Category`

        The policy category that triggered the refusal.

        `null` when the refusal doesn't map to a named category.

        - `Cyber("cyber")`

          The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category.

        - `Bio("bio")`

          The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category.

        - `FrontierLlm("frontier_llm")`

          The request could assist the development of competing AI models, which is restricted under [Anthropic's commercial terms](https://www.anthropic.com/legal/commercial-terms). Benign machine learning work can also trigger this category.

        - `ReasoningExtraction("reasoning_extraction")`

          The request asks the model to reproduce its internal reasoning in the response text. To get reasoning in a structured form instead, use [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking?sdk_languages=csharp).

        - `GeneralHarms("general_harms")`

          The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category.

      - `required string? Explanation`

        Human-readable explanation of the refusal.

        This text is not guaranteed to be stable. `null` when no explanation is available for the category.

    - `required StopReason? StopReason`

      The reason that we stopped.

      This may be one the following values:

      * `"end_turn"`: the model reached a natural stopping point
      * `"max_tokens"`: we exceeded the requested `max_tokens` or the model's maximum
      * `"stop_sequence"`: one of your provided custom `stop_sequences` was generated
      * `"tool_use"`: the model invoked one or more tools
      * `"pause_turn"`: we paused a long-running turn. You may provide the response back as-is in a subsequent request to let the model continue.
      * `"refusal"`: when streaming classifiers intervene to handle potential policy violations
      * `"model_context_window_exceeded"`: we exceeded the model's context window

      In non-streaming mode this value is always non-null. In streaming mode, it is null in the `message_start` event and non-null otherwise.

      - `EndTurn("end_turn")`

      - `MaxTokens("max_tokens")`

      - `StopSequence("stop_sequence")`

      - `ToolUse("tool_use")`

      - `PauseTurn("pause_turn")`

      - `Refusal("refusal")`

      - `ModelContextWindowExceeded("model_context_window_exceeded")`

    - `required string? StopSequence`

      Which custom stop sequence was generated, if any.

      This value will be a non-null string if one of your custom stop sequences was generated.

    - `required Usage Usage`

      Billing and rate-limit usage.

      Anthropic's API bills and rate-limits by token counts, as tokens represent the underlying cost to our systems.

      Under the hood, the API transforms requests into a format suitable for the model. The model's output then goes through a parsing stage before becoming an API response. As a result, the token counts in `usage` will not match one-to-one with the exact visible content of an API request or response.

      For example, `output_tokens` will be non-zero, even for an empty string response from Claude.

      Total input tokens in a request is the summation of `input_tokens`, `cache_creation_input_tokens`, and `cache_read_input_tokens`.

      - `required CacheCreation? CacheCreation`

        Breakdown of cached tokens by TTL

        - `required long Ephemeral1hInputTokens`

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

          minimum: 0

        - `required long Ephemeral5mInputTokens`

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

          minimum: 0

      - `required long? CacheCreationInputTokens`

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

        minimum: 0

      - `required long? CacheReadInputTokens`

        The number of input tokens read from the cache.

        minimum: 0

      - `required string? InferenceGeo`

        The geographic region where inference was performed for this request.

      - `required long InputTokens`

        The number of input tokens which were used.

        minimum: 0

      - `required long OutputTokens`

        The number of output tokens which were used.

        minimum: 0

      - `required OutputTokensDetails? OutputTokensDetails`

        Breakdown of output tokens by category.

        `output_tokens` remains the inclusive, authoritative total used for billing.
        This object provides a read-only decomposition for observability — for example,
        how many of the billed output tokens were spent on internal reasoning that may
        have been summarized before being returned to you.

        - `required long ThinkingTokens`

          Number of output tokens the model generated as internal reasoning, including
          the thinking-block delimiter tokens.

          Reflects the raw reasoning the model produced, not the (possibly shorter)
          summarized thinking text returned in the response body. Computed by
          re-tokenizing the raw reasoning text, so it may differ from the model's exact
          generation count by a small number of tokens. Always ≤ `output_tokens`;
          `output_tokens - thinking_tokens` approximates the non-reasoning output.

          minimum: 0

      - `required ServerToolUsage? ServerToolUse`

        The number of server tool requests.

        - `required long WebFetchRequests`

          The number of web fetch tool requests.

          minimum: 0

        - `required long WebSearchRequests`

          The number of web search tool requests.

          minimum: 0

      - `required ServiceTier? ServiceTier`

        If the request used the priority, standard, or batch tier.

        - `Standard("standard")`

        - `Priority("priority")`

        - `Batch("batch")`

      - `required Speed? Speed`

        The inference speed mode used for this request.

        - `Standard("standard")`

        - `Fast("fast")`

### Raw Message Stop Event

- `class RawMessageStopEvent`

  - `JsonElement Type = "message_stop"`

### Raw Message Stream Event

- `class RawMessageStreamEvent: union`

  - `class RawMessageStartEvent`

    - `JsonElement Type = "message_start"`

    - `required Message Message`

      - `JsonElement Type = "message"`

        Object type.

        For Messages, this is always `"message"`.

      - `required string ID`

        Unique object identifier.

        The format and length of IDs may change over time.

      - `required Container? Container`

        Information about the container used in this request.

        This will be non-null if a container tool (e.g. code execution) was used.

        - `required string ID`

          Identifier for the container used in this request

        - `required DateTimeOffset ExpiresAt`

          The time at which the container will expire.

          format: date-time

        - `required IReadOnlyList<ContainerSkill>? Skills`

          Skills loaded in the container

          - `required ContainerSkillType Type`

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

            - `Anthropic("anthropic")`

            - `Custom("custom")`

          - `required string SkillID`

            Skill ID

            minLength: 1, maxLength: 64

          - `required string Version`

            The resolved version: a skill version ID for custom skills.

            minLength: 1, maxLength: 64

      - `required IReadOnlyList<ContentBlock> Content`

        Content generated by the model.

        This is an array of content blocks, each of which has a `type` that determines its shape.

        Example:

        ```json
        [{"type": "text", "text": "Hi, I'm Claude."}]
        ```

        If the request input `messages` ended with an `assistant` turn, then the response `content` will continue directly from that last turn. You can use this to constrain the model's output.

        For example, if the input `messages` were:

        ```json
        [
          {"role": "user", "content": "What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun"},
          {"role": "assistant", "content": "The best answer is ("}
        ]
        ```

        Then the response `content` might be:

        ```json
        [{"type": "text", "text": "B)"}]
        ```

        - `class TextBlock`

          - `JsonElement Type = "text"`

          - `required IReadOnlyList<TextCitation>? Citations`

            Citations supporting the text block.

            The type of citation returned will depend on the type of document being cited. Citing a PDF results in `page_location`, plain text results in `char_location`, and content document results in `content_block_location`.

            - `class CitationCharLocation`

              - `JsonElement Type = "char_location"`

              - `required string CitedText`

              - `required long DocumentIndex`

                minimum: 0

              - `required string? DocumentTitle`

              - `required long EndCharIndex`

              - `required string? FileID`

              - `required long StartCharIndex`

                minimum: 0

            - `class CitationPageLocation`

              - `JsonElement Type = "page_location"`

              - `required string CitedText`

              - `required long DocumentIndex`

                minimum: 0

              - `required string? DocumentTitle`

              - `required long EndPageNumber`

              - `required string? FileID`

              - `required long StartPageNumber`

                minimum: 1

            - `class CitationContentBlockLocation`

              - `JsonElement Type = "content_block_location"`

              - `required string CitedText`

                The full text of the cited block range, concatenated.

                Always equals the contents of `content[start_block_index:end_block_index]` joined together. The text block is the minimal citable unit; this field is never a substring of a single block. Not counted toward output tokens, and not counted toward input tokens when sent back in subsequent turns.

              - `required long DocumentIndex`

                minimum: 0

              - `required string? DocumentTitle`

              - `required long EndBlockIndex`

                Exclusive 0-based end index of the cited block range in the source's `content` array.

                Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`.

              - `required string? FileID`

              - `required long StartBlockIndex`

                0-based index of the first cited block in the source's `content` array.

                minimum: 0

            - `class CitationsWebSearchResultLocation`

              - `JsonElement Type = "web_search_result_location"`

              - `required string CitedText`

              - `required string EncryptedIndex`

              - `required string? Title`

                maxLength: 512

              - `required string Url`

            - `class CitationsSearchResultLocation`

              - `JsonElement Type = "search_result_location"`

              - `required string CitedText`

                The full text of the cited block range, concatenated.

                Always equals the contents of `content[start_block_index:end_block_index]` joined together. The text block is the minimal citable unit; this field is never a substring of a single block. Not counted toward output tokens, and not counted toward input tokens when sent back in subsequent turns.

              - `required long EndBlockIndex`

                Exclusive 0-based end index of the cited block range in the source's `content` array.

                Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`.

              - `required long SearchResultIndex`

                0-based index of the cited search result among all `search_result` content blocks in the request, in the order they appear across messages and tool results.

                Counted separately from `document_index`; server-side web search results are not included in this count.

                minimum: 0

              - `required string Source`

              - `required long StartBlockIndex`

                0-based index of the first cited block in the source's `content` array.

                minimum: 0

              - `required string? Title`

          - `required string Text`

        - `class ThinkingBlock`

          - `JsonElement Type = "thinking"`

          - `required string Signature`

            A value used to verify that this thinking block was generated by Claude when it is passed back to the API.

            This is an opaque field and should not be interpreted or parsed. When passing thinking blocks back to the API (required when using tools with extended thinking), pass them back exactly as received, with this field intact.

            See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking?sdk_languages=csharp) for details.

          - `required string Thinking`

            The text of Claude's thinking process for this block.

        - `class RedactedThinkingBlock`

          - `JsonElement Type = "redacted_thinking"`

          - `required string Data`

            The contents of this redacted thinking block, returned when portions of the model's thinking were safety-redacted. This field is opaque and encrypted, with no readable content.

            Pass `redacted_thinking` blocks back to the API unchanged when continuing a multi-turn conversation.

            See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking?sdk_languages=csharp#redacted-thinking-blocks) for details.

        - `class ToolUseBlock`

          - `JsonElement Type = "tool_use"`

          - `required string ID`

            pattern: ^[a-zA-Z0-9_-]+$

          - `required Caller Caller`

            - `class DirectCaller`

              Tool invocation directly from the model.

              - `JsonElement Type = "direct"`

            - `class ServerToolCaller`

              Tool invocation generated by a server-side tool.

              - `JsonElement Type = "code_execution_20250825"`

              - `required string ToolID`

                pattern: ^srvtoolu_[a-zA-Z0-9_]+$

            - `class ServerToolCaller20260120`

              - `JsonElement Type = "code_execution_20260120"`

              - `required string ToolID`

                pattern: ^srvtoolu_[a-zA-Z0-9_]+$

          - `required IReadOnlyDictionary<string, JsonElement> Input`

          - `required string Name`

            minLength: 1

          - `string? ToolsetName`

            For a toolset member tool_use, the toolset family.

            minLength: 1, maxLength: 64, pattern: ^[a-zA-Z0-9_-]+$

        - `class ServerToolUseBlock`

          - `JsonElement Type = "server_tool_use"`

          - `required string ID`

            pattern: ^srvtoolu_[a-zA-Z0-9_]+$

          - `required Caller Caller`

            - `class DirectCaller`

              Tool invocation directly from the model.

            - `class ServerToolCaller`

              Tool invocation generated by a server-side tool.

            - `class ServerToolCaller20260120`

          - `required IReadOnlyDictionary<string, JsonElement> Input`

          - `required Name Name`

            - `WebSearch("web_search")`

            - `WebFetch("web_fetch")`

            - `CodeExecution("code_execution")`

            - `BashCodeExecution("bash_code_execution")`

            - `TextEditorCodeExecution("text_editor_code_execution")`

            - `ToolSearchToolRegex("tool_search_tool_regex")`

            - `ToolSearchToolBm25("tool_search_tool_bm25")`

        - `class WebSearchToolResultBlock`

          - `JsonElement Type = "web_search_tool_result"`

          - `required Caller Caller`

            - `class DirectCaller`

              Tool invocation directly from the model.

            - `class ServerToolCaller`

              Tool invocation generated by a server-side tool.

            - `class ServerToolCaller20260120`

          - `required WebSearchToolResultBlockContent Content`

            - `class WebSearchToolResultError`

              - `JsonElement Type = "web_search_tool_result_error"`

              - `required WebSearchToolResultErrorCode ErrorCode`

                - `InvalidToolInput("invalid_tool_input")`

                - `Unavailable("unavailable")`

                - `MaxUsesExceeded("max_uses_exceeded")`

                - `TooManyRequests("too_many_requests")`

                - `QueryTooLong("query_too_long")`

                - `RequestTooLarge("request_too_large")`

            - `IReadOnlyList<WebSearchResultBlock>`

              - `JsonElement Type = "web_search_result"`

              - `required string EncryptedContent`

              - `required string? PageAge`

              - `required string Title`

              - `required string Url`

          - `required string ToolUseID`

            pattern: ^srvtoolu_[a-zA-Z0-9_]+$

        - `class WebFetchToolResultBlock`

          - `JsonElement Type = "web_fetch_tool_result"`

          - `required Caller Caller`

            - `class DirectCaller`

              Tool invocation directly from the model.

            - `class ServerToolCaller`

              Tool invocation generated by a server-side tool.

            - `class ServerToolCaller20260120`

          - `required Content Content`

            - `class WebFetchToolResultErrorBlock`

              - `JsonElement Type = "web_fetch_tool_result_error"`

              - `required WebFetchToolResultErrorCode ErrorCode`

                - `InvalidToolInput("invalid_tool_input")`

                - `UrlTooLong("url_too_long")`

                - `UrlNotAllowed("url_not_allowed")`

                - `UrlNotInPriorContext("url_not_in_prior_context")`

                - `UrlNotAccessible("url_not_accessible")`

                - `UnsupportedContentType("unsupported_content_type")`

                - `TooManyRequests("too_many_requests")`

                - `MaxUsesExceeded("max_uses_exceeded")`

                - `Unavailable("unavailable")`

                - `ContentTooLarge("content_too_large")`

            - `class WebFetchBlock`

              - `JsonElement Type = "web_fetch_result"`

              - `required DocumentBlock Content`

                - `JsonElement Type = "document"`

                - `required CitationsConfig? Citations`

                  Citation configuration for the document

                  - `required bool Enabled`

                - `required Source Source`

                  - `class Base64PdfSource`

                    - `JsonElement Type = "base64"`

                    - `required string Data`

                      format: byte

                    - `JsonElement MediaType = "application/pdf"`

                  - `class PlainTextSource`

                    - `JsonElement Type = "text"`

                    - `required string Data`

                    - `JsonElement MediaType = "text/plain"`

                - `required string? Title`

                  The title of the document

              - `required string? RetrievedAt`

                ISO 8601 timestamp when the content was retrieved

              - `required string Url`

                Fetched content URL

          - `required string ToolUseID`

            pattern: ^srvtoolu_[a-zA-Z0-9_]+$

        - `class CodeExecutionToolResultBlock`

          - `JsonElement Type = "code_execution_tool_result"`

          - `required CodeExecutionToolResultBlockContent Content`

            - `class CodeExecutionToolResultError`

              - `JsonElement Type = "code_execution_tool_result_error"`

              - `required CodeExecutionToolResultErrorCode ErrorCode`

                - `InvalidToolInput("invalid_tool_input")`

                - `Unavailable("unavailable")`

                - `TooManyRequests("too_many_requests")`

                - `ExecutionTimeExceeded("execution_time_exceeded")`

            - `class CodeExecutionResultBlock`

              - `JsonElement Type = "code_execution_result"`

              - `required IReadOnlyList<CodeExecutionOutputBlock> Content`

                - `JsonElement Type = "code_execution_output"`

                - `required string FileID`

              - `required long ReturnCode`

              - `required string Stderr`

              - `required string Stdout`

            - `class EncryptedCodeExecutionResultBlock`

              The output and exit code of Python code that Claude ran with the code execution tool, with standard output in encrypted form.

              The API returns this block in place of `code_execution_result` when the code called the web search tool.

              See the [programmatic tool calling guide](https://platform.claude.com/docs/en/agents-and-tools/tool-use/programmatic-tool-calling?sdk_languages=csharp) to learn more about programmatic tool calling.

              - `JsonElement Type = "encrypted_code_execution_result"`

              - `required IReadOnlyList<CodeExecutionOutputBlock> Content`

                - `JsonElement Type = "code_execution_output"`

                - `required string FileID`

              - `required string EncryptedStdout`

              - `required long ReturnCode`

              - `required string Stderr`

          - `required string ToolUseID`

            pattern: ^srvtoolu_[a-zA-Z0-9_]+$

        - `class BashCodeExecutionToolResultBlock`

          - `JsonElement Type = "bash_code_execution_tool_result"`

          - `required Content Content`

            - `class BashCodeExecutionToolResultError`

              - `JsonElement Type = "bash_code_execution_tool_result_error"`

              - `required BashCodeExecutionToolResultErrorCode ErrorCode`

                - `InvalidToolInput("invalid_tool_input")`

                - `Unavailable("unavailable")`

                - `TooManyRequests("too_many_requests")`

                - `ExecutionTimeExceeded("execution_time_exceeded")`

                - `OutputFileTooLarge("output_file_too_large")`

            - `class BashCodeExecutionResultBlock`

              - `JsonElement Type = "bash_code_execution_result"`

              - `required IReadOnlyList<BashCodeExecutionOutputBlock> Content`

                - `JsonElement Type = "bash_code_execution_output"`

                - `required string FileID`

              - `required long ReturnCode`

              - `required string Stderr`

              - `required string Stdout`

          - `required string ToolUseID`

            pattern: ^srvtoolu_[a-zA-Z0-9_]+$

        - `class TextEditorCodeExecutionToolResultBlock`

          - `JsonElement Type = "text_editor_code_execution_tool_result"`

          - `required Content Content`

            - `class TextEditorCodeExecutionToolResultError`

              - `JsonElement Type = "text_editor_code_execution_tool_result_error"`

              - `required TextEditorCodeExecutionToolResultErrorCode ErrorCode`

                - `InvalidToolInput("invalid_tool_input")`

                - `Unavailable("unavailable")`

                - `TooManyRequests("too_many_requests")`

                - `ExecutionTimeExceeded("execution_time_exceeded")`

                - `FileNotFound("file_not_found")`

              - `required string? ErrorMessage`

            - `class TextEditorCodeExecutionViewResultBlock`

              - `JsonElement Type = "text_editor_code_execution_view_result"`

              - `required string Content`

              - `required FileType FileType`

                - `Text("text")`

                - `Image("image")`

                - `Pdf("pdf")`

              - `required long? NumLines`

              - `required long? StartLine`

              - `required long? TotalLines`

            - `class TextEditorCodeExecutionCreateResultBlock`

              - `JsonElement Type = "text_editor_code_execution_create_result"`

              - `required bool IsFileUpdate`

            - `class TextEditorCodeExecutionStrReplaceResultBlock`

              - `JsonElement Type = "text_editor_code_execution_str_replace_result"`

              - `required IReadOnlyList<string>? Lines`

              - `required long? NewLines`

              - `required long? NewStart`

              - `required long? OldLines`

              - `required long? OldStart`

          - `required string ToolUseID`

            pattern: ^srvtoolu_[a-zA-Z0-9_]+$

        - `class ToolSearchToolResultBlock`

          - `JsonElement Type = "tool_search_tool_result"`

          - `required Content Content`

            - `class ToolSearchToolResultError`

              - `JsonElement Type = "tool_search_tool_result_error"`

              - `required ToolSearchToolResultErrorCode ErrorCode`

                - `InvalidToolInput("invalid_tool_input")`

                - `Unavailable("unavailable")`

                - `TooManyRequests("too_many_requests")`

                - `ExecutionTimeExceeded("execution_time_exceeded")`

              - `required string? ErrorMessage`

            - `class ToolSearchToolSearchResultBlock`

              - `JsonElement Type = "tool_search_tool_search_result"`

              - `required IReadOnlyList<ToolReferenceBlock> ToolReferences`

                - `JsonElement Type = "tool_reference"`

                - `required string ToolName`

                  minLength: 1, maxLength: 256, pattern: ^[a-zA-Z0-9_-]{1,256}$

          - `required string ToolUseID`

            pattern: ^srvtoolu_[a-zA-Z0-9_]+$

        - `class ContainerUploadBlock`

          Response model for a file uploaded to the container.

          - `JsonElement Type = "container_upload"`

          - `required string FileID`

      - `required Diagnostics? Diagnostics`

        Request-level diagnostics. `null` when the request did not supply `diagnostics`, or when it did and no prompt-cache divergence was detected.

        - `required CacheMissReason? CacheMissReason`

          Explains why the prompt cache could not fully reuse the prefix from the request identified by `diagnostics.previous_message_id`. `null` means diagnosis is still pending — the response was serialized before the background comparison completed.

          - `class CacheMissModelChanged`

            A `cache_miss_reason` for a request whose `model` or `speed` differs from the previous request's.

            See the [cache diagnostics guide](https://platform.claude.com/docs/en/build-with-claude/cache-diagnostics?sdk_languages=csharp#cache-miss-reason-types) to learn what to change for each reason.

            - `JsonElement Type = "model_changed"`

            - `required long CacheMissedInputTokens`

              Approximate number of input tokens that would have been read from cache had the prefix matched the previous request.

          - `class CacheMissSystemChanged`

            A `cache_miss_reason` for a request whose `system` differs from the previous request's.

            See the [cache diagnostics guide](https://platform.claude.com/docs/en/build-with-claude/cache-diagnostics?sdk_languages=csharp#cache-miss-reason-types) to learn what to change for each reason.

            - `JsonElement Type = "system_changed"`

            - `required long CacheMissedInputTokens`

              Approximate number of input tokens that would have been read from cache had the prefix matched the previous request.

          - `class CacheMissToolsChanged`

            A `cache_miss_reason` for a request whose `tools` differ from the previous request's, for example because tools were added, removed, or reordered.

            See the [cache diagnostics guide](https://platform.claude.com/docs/en/build-with-claude/cache-diagnostics?sdk_languages=csharp#cache-miss-reason-types) to learn what to change for each reason.

            - `JsonElement Type = "tools_changed"`

            - `required long CacheMissedInputTokens`

              Approximate number of input tokens that would have been read from cache had the prefix matched the previous request.

          - `class CacheMissMessagesChanged`

            A `cache_miss_reason` for a request whose `messages` differ from the previous request's in an earlier entry, instead of only having entries appended. The `model`, `system`, and `tools` match.

            See the [cache diagnostics guide](https://platform.claude.com/docs/en/build-with-claude/cache-diagnostics?sdk_languages=csharp#cache-miss-reason-types) to learn what to change for each reason.

            - `JsonElement Type = "messages_changed"`

            - `required long CacheMissedInputTokens`

              Approximate number of input tokens that would have been read from cache had the prefix matched the previous request.

          - `class CacheMissPreviousMessageNotFound`

            A `cache_miss_reason` for when the API doesn't have a stored record of the request that `diagnostics.previous_message_id` references.

            This doesn't mean that this request changed.

            See the [cache diagnostics guide](https://platform.claude.com/docs/en/build-with-claude/cache-diagnostics?sdk_languages=csharp#cache-miss-reason-types) to learn what to change for each reason.

            - `JsonElement Type = "previous_message_not_found"`

          - `class CacheMissUnavailable`

            A `cache_miss_reason` for when the API can't give a diagnosis. The request itself was processed normally.

            This includes a request whose `model`, `system`, and `tools` match the previous request's but whose other prompt-affecting parameters, such as `thinking` or `tool_choice`, differ.

            See the [cache diagnostics guide](https://platform.claude.com/docs/en/build-with-claude/cache-diagnostics?sdk_languages=csharp#cache-miss-reason-types) to learn what to change for each reason.

            - `JsonElement Type = "unavailable"`

      - `required Model Model`

        The model that will complete your prompt.

        See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options.

        - `ClaudeHaiku5_5("claude-haiku-5-5")`

          Fastest model for high-volume, real-time tasks

        - `ClaudeSonnet5_5("claude-sonnet-5-5")`

          Efficient model for coding and agents

        - `ClaudeFable5_1("claude-fable-5-1")`

          Frontier intelligence for ambitious tasks across coding, scientific discovery, and enterprise workflows

        - `ClaudeOpus5_5("claude-opus-5-5")`

          Powerful intelligence for coding, knowledge work, and long-running agents

        - `ClaudeMythos5_1("claude-mythos-5-1")`

          Our most capable model for cybersecurity and biology research, available through trusted access programs

        - `ClaudeSonnet5("claude-sonnet-5")`

          Efficient model for coding and agents

        - `ClaudeFable5("claude-fable-5")`

          Next generation of intelligence for the hardest knowledge work and coding problems

        - `ClaudeMythos5("claude-mythos-5")`

          Most capable model for cybersecurity and biology research

        - `ClaudeOpus5("claude-opus-5")`

          Powerful intelligence for long-running agents and coding

        - `ClaudeOpus4_8("claude-opus-4-8")`

          Powerful intelligence for long-running agents and coding

        - `ClaudeOpus4_7("claude-opus-4-7")`

          Powerful intelligence for long-running agents and coding

        - `ClaudeOpus4_6("claude-opus-4-6")`

          Powerful intelligence for long-running agents and coding

        - `ClaudeSonnet4_6("claude-sonnet-4-6")`

          Best combination of speed and intelligence

        - `ClaudeHaiku4_5("claude-haiku-4-5")`

        - `ClaudeHaiku4_5_20251001("claude-haiku-4-5-20251001")`

        - `ClaudeOpus4_5("claude-opus-4-5")`

          Powerful intelligence for long-running agents and coding

        - `ClaudeOpus4_5_20251101("claude-opus-4-5-20251101")`

          Powerful intelligence for long-running agents and coding

        - `ClaudeMythosPreview("claude-mythos-preview")`

          **Deprecated**: Will reach end-of-life on June 30, 2026. Please migrate to claude-mythos-5. Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for more information.

          New class of intelligence, strongest in coding and cybersecurity

        - `ClaudeSonnet4_5("claude-sonnet-4-5")`

          **Deprecated**: Will reach end-of-life on November 30, 2026. Please migrate to claude-sonnet-5-5. Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for more information.

          High-performance model for agents and coding

        - `ClaudeSonnet4_5_20250929("claude-sonnet-4-5-20250929")`

          **Deprecated**: Will reach end-of-life on November 30, 2026. Please migrate to claude-sonnet-5-5. Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for more information.

          High-performance model for agents and coding

      - `JsonElement Role = "assistant"`

        Conversational role of the generated message.

        This will always be `"assistant"`.

      - `required RefusalStopDetails? StopDetails`

        Structured information about why model output stopped.

        This is `null` when the `stop_reason` has no additional detail to report.

        - `JsonElement Type = "refusal"`

        - `required Category? Category`

          The policy category that triggered the refusal.

          `null` when the refusal doesn't map to a named category.

          - `Cyber("cyber")`

            The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category.

          - `Bio("bio")`

            The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category.

          - `FrontierLlm("frontier_llm")`

            The request could assist the development of competing AI models, which is restricted under [Anthropic's commercial terms](https://www.anthropic.com/legal/commercial-terms). Benign machine learning work can also trigger this category.

          - `ReasoningExtraction("reasoning_extraction")`

            The request asks the model to reproduce its internal reasoning in the response text. To get reasoning in a structured form instead, use [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking?sdk_languages=csharp).

          - `GeneralHarms("general_harms")`

            The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category.

        - `required string? Explanation`

          Human-readable explanation of the refusal.

          This text is not guaranteed to be stable. `null` when no explanation is available for the category.

      - `required StopReason? StopReason`

        The reason that we stopped.

        This may be one the following values:

        * `"end_turn"`: the model reached a natural stopping point
        * `"max_tokens"`: we exceeded the requested `max_tokens` or the model's maximum
        * `"stop_sequence"`: one of your provided custom `stop_sequences` was generated
        * `"tool_use"`: the model invoked one or more tools
        * `"pause_turn"`: we paused a long-running turn. You may provide the response back as-is in a subsequent request to let the model continue.
        * `"refusal"`: when streaming classifiers intervene to handle potential policy violations
        * `"model_context_window_exceeded"`: we exceeded the model's context window

        In non-streaming mode this value is always non-null. In streaming mode, it is null in the `message_start` event and non-null otherwise.

        - `EndTurn("end_turn")`

        - `MaxTokens("max_tokens")`

        - `StopSequence("stop_sequence")`

        - `ToolUse("tool_use")`

        - `PauseTurn("pause_turn")`

        - `Refusal("refusal")`

        - `ModelContextWindowExceeded("model_context_window_exceeded")`

      - `required string? StopSequence`

        Which custom stop sequence was generated, if any.

        This value will be a non-null string if one of your custom stop sequences was generated.

      - `required Usage Usage`

        Billing and rate-limit usage.

        Anthropic's API bills and rate-limits by token counts, as tokens represent the underlying cost to our systems.

        Under the hood, the API transforms requests into a format suitable for the model. The model's output then goes through a parsing stage before becoming an API response. As a result, the token counts in `usage` will not match one-to-one with the exact visible content of an API request or response.

        For example, `output_tokens` will be non-zero, even for an empty string response from Claude.

        Total input tokens in a request is the summation of `input_tokens`, `cache_creation_input_tokens`, and `cache_read_input_tokens`.

        - `required CacheCreation? CacheCreation`

          Breakdown of cached tokens by TTL

          - `required long Ephemeral1hInputTokens`

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

            minimum: 0

          - `required long Ephemeral5mInputTokens`

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

            minimum: 0

        - `required long? CacheCreationInputTokens`

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

          minimum: 0

        - `required long? CacheReadInputTokens`

          The number of input tokens read from the cache.

          minimum: 0

        - `required string? InferenceGeo`

          The geographic region where inference was performed for this request.

        - `required long InputTokens`

          The number of input tokens which were used.

          minimum: 0

        - `required long OutputTokens`

          The number of output tokens which were used.

          minimum: 0

        - `required OutputTokensDetails? OutputTokensDetails`

          Breakdown of output tokens by category.

          `output_tokens` remains the inclusive, authoritative total used for billing.
          This object provides a read-only decomposition for observability — for example,
          how many of the billed output tokens were spent on internal reasoning that may
          have been summarized before being returned to you.

          - `required long ThinkingTokens`

            Number of output tokens the model generated as internal reasoning, including
            the thinking-block delimiter tokens.

            Reflects the raw reasoning the model produced, not the (possibly shorter)
            summarized thinking text returned in the response body. Computed by
            re-tokenizing the raw reasoning text, so it may differ from the model's exact
            generation count by a small number of tokens. Always ≤ `output_tokens`;
            `output_tokens - thinking_tokens` approximates the non-reasoning output.

            minimum: 0

        - `required ServerToolUsage? ServerToolUse`

          The number of server tool requests.

          - `required long WebFetchRequests`

            The number of web fetch tool requests.

            minimum: 0

          - `required long WebSearchRequests`

            The number of web search tool requests.

            minimum: 0

        - `required ServiceTier? ServiceTier`

          If the request used the priority, standard, or batch tier.

          - `Standard("standard")`

          - `Priority("priority")`

          - `Batch("batch")`

        - `required Speed? Speed`

          The inference speed mode used for this request.

          - `Standard("standard")`

          - `Fast("fast")`

  - `class RawMessageDeltaEvent`

    - `JsonElement Type = "message_delta"`

    - `required Delta Delta`

      - `required Container? Container`

        Information about the container used in this request.

        This will be non-null if a container tool (e.g. code execution) was used.

      - `required RefusalStopDetails? StopDetails`

        Structured information about why model output stopped.

        This is `null` when the `stop_reason` has no additional detail to report.

      - `required StopReason? StopReason`

      - `required string? StopSequence`

    - `required MessageDeltaUsage Usage`

      Billing and rate-limit usage.

      Anthropic's API bills and rate-limits by token counts, as tokens represent the underlying cost to our systems.

      Under the hood, the API transforms requests into a format suitable for the model. The model's output then goes through a parsing stage before becoming an API response. As a result, the token counts in `usage` will not match one-to-one with the exact visible content of an API request or response.

      For example, `output_tokens` will be non-zero, even for an empty string response from Claude.

      Total input tokens in a request is the summation of `input_tokens`, `cache_creation_input_tokens`, and `cache_read_input_tokens`.

      - `required long? CacheCreationInputTokens`

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

        minimum: 0

      - `required long? CacheReadInputTokens`

        The cumulative number of input tokens read from the cache.

        minimum: 0

      - `required long? InputTokens`

        The cumulative number of input tokens which were used.

        minimum: 0

      - `required long OutputTokens`

        The cumulative number of output tokens which were used.

      - `required OutputTokensDetails? OutputTokensDetails`

        Breakdown of output tokens by category.

        `output_tokens` remains the inclusive, authoritative total used for billing.
        This object provides a read-only decomposition for observability — for example,
        how many of the billed output tokens were spent on internal reasoning that may
        have been summarized before being returned to you.

      - `required ServerToolUsage? ServerToolUse`

        The number of server tool requests.

  - `class RawMessageStopEvent`

    - `JsonElement Type = "message_stop"`

  - `class RawContentBlockStartEvent`

    - `JsonElement Type = "content_block_start"`

    - `required ContentBlock ContentBlock`

      - `class TextBlock`

      - `class ThinkingBlock`

      - `class RedactedThinkingBlock`

      - `class ToolUseBlock`

      - `class ServerToolUseBlock`

      - `class WebSearchToolResultBlock`

      - `class WebFetchToolResultBlock`

      - `class CodeExecutionToolResultBlock`

      - `class BashCodeExecutionToolResultBlock`

      - `class TextEditorCodeExecutionToolResultBlock`

      - `class ToolSearchToolResultBlock`

      - `class ContainerUploadBlock`

        Response model for a file uploaded to the container.

    - `required long Index`

  - `class RawContentBlockDeltaEvent`

    - `JsonElement Type = "content_block_delta"`

    - `required RawContentBlockDelta Delta`

      - `class TextDelta`

        - `JsonElement Type = "text_delta"`

        - `required string Text`

      - `class InputJsonDelta`

        - `JsonElement Type = "input_json_delta"`

        - `required string PartialJson`

      - `class CitationsDelta`

        - `JsonElement Type = "citations_delta"`

        - `required Citation Citation`

          - `class CitationCharLocation`

          - `class CitationPageLocation`

          - `class CitationContentBlockLocation`

          - `class CitationsWebSearchResultLocation`

          - `class CitationsSearchResultLocation`

      - `class ThinkingDelta`

        - `JsonElement Type = "thinking_delta"`

        - `required string Thinking`

          The incremental `thinking` text for this content block. Concatenate the `thinking` values of successive `thinking_delta` events to assemble the block's full `thinking` value.

      - `class SignatureDelta`

        - `JsonElement Type = "signature_delta"`

        - `required string Signature`

          The `signature` for this thinking block: an opaque value used to verify that the block was generated by Claude when it is passed back to the API. Delivered in a `signature_delta` event just before the block's `content_block_stop` event.

    - `required long Index`

  - `class RawContentBlockStopEvent`

    - `JsonElement Type = "content_block_stop"`

    - `required long Index`

### Redacted Thinking Block

- `class RedactedThinkingBlock`

  - `JsonElement Type = "redacted_thinking"`

  - `required string Data`

    The contents of this redacted thinking block, returned when portions of the model's thinking were safety-redacted. This field is opaque and encrypted, with no readable content.

    Pass `redacted_thinking` blocks back to the API unchanged when continuing a multi-turn conversation.

    See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking?sdk_languages=csharp#redacted-thinking-blocks) for details.

### Redacted Thinking Block Param

- `class RedactedThinkingBlockParam`

  - `JsonElement Type = "redacted_thinking"`

  - `required string Data`

    The `data` value of this redacted thinking block, exactly as returned by the API in a previous response. Opaque and encrypted; pass it back unchanged.

### Refusal Stop Details

- `class RefusalStopDetails`

  Structured information about a refusal.

  - `JsonElement Type = "refusal"`

  - `required Category? Category`

    The policy category that triggered the refusal.

    `null` when the refusal doesn't map to a named category.

    - `Cyber("cyber")`

      The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category.

    - `Bio("bio")`

      The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category.

    - `FrontierLlm("frontier_llm")`

      The request could assist the development of competing AI models, which is restricted under [Anthropic's commercial terms](https://www.anthropic.com/legal/commercial-terms). Benign machine learning work can also trigger this category.

    - `ReasoningExtraction("reasoning_extraction")`

      The request asks the model to reproduce its internal reasoning in the response text. To get reasoning in a structured form instead, use [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking?sdk_languages=csharp).

    - `GeneralHarms("general_harms")`

      The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category.

  - `required string? Explanation`

    Human-readable explanation of the refusal.

    This text is not guaranteed to be stable. `null` when no explanation is available for the category.

### Search Result Block Param

- `class SearchResultBlockParam`

  - `JsonElement Type = "search_result"`

  - `required IReadOnlyList<TextBlockParam> Content`

    - `JsonElement Type = "text"`

    - `required string Text`

      minLength: 1

    - `CacheControlEphemeral? CacheControl`

      Create a cache control breakpoint at this content block.

      - `JsonElement Type = "ephemeral"`

      - `Ttl Ttl`

        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`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching?sdk_languages=csharp) for details.

        - `Ttl5m("5m")`

        - `Ttl1h("1h")`

    - `IReadOnlyList<TextCitationParam>? Citations`

      - `class CitationCharLocationParam`

        - `JsonElement Type = "char_location"`

        - `required string CitedText`

        - `required long DocumentIndex`

          minimum: 0

        - `required string? DocumentTitle`

          minLength: 1, maxLength: 500

        - `required long EndCharIndex`

        - `required long StartCharIndex`

          minimum: 0

      - `class CitationPageLocationParam`

        - `JsonElement Type = "page_location"`

        - `required string CitedText`

        - `required long DocumentIndex`

          minimum: 0

        - `required string? DocumentTitle`

          minLength: 1, maxLength: 500

        - `required long EndPageNumber`

        - `required long StartPageNumber`

          minimum: 1

      - `class CitationContentBlockLocationParam`

        - `JsonElement Type = "content_block_location"`

        - `required string CitedText`

          The full text of the cited block range, concatenated.

          Always equals the contents of `content[start_block_index:end_block_index]` joined together. The text block is the minimal citable unit; this field is never a substring of a single block. Not counted toward output tokens, and not counted toward input tokens when sent back in subsequent turns.

        - `required long DocumentIndex`

          minimum: 0

        - `required string? DocumentTitle`

          minLength: 1, maxLength: 500

        - `required long EndBlockIndex`

          Exclusive 0-based end index of the cited block range in the source's `content` array.

          Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`.

        - `required long StartBlockIndex`

          0-based index of the first cited block in the source's `content` array.

          minimum: 0

      - `class CitationWebSearchResultLocationParam`

        - `JsonElement Type = "web_search_result_location"`

        - `required string CitedText`

        - `required string EncryptedIndex`

        - `required string? Title`

          minLength: 1, maxLength: 512

        - `required string Url`

          minLength: 1

      - `class CitationSearchResultLocationParam`

        - `JsonElement Type = "search_result_location"`

        - `required string CitedText`

          The full text of the cited block range, concatenated.

          Always equals the contents of `content[start_block_index:end_block_index]` joined together. The text block is the minimal citable unit; this field is never a substring of a single block. Not counted toward output tokens, and not counted toward input tokens when sent back in subsequent turns.

        - `required long EndBlockIndex`

          Exclusive 0-based end index of the cited block range in the source's `content` array.

          Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`.

        - `required long SearchResultIndex`

          0-based index of the cited search result among all `search_result` content blocks in the request, in the order they appear across messages and tool results.

          Counted separately from `document_index`; server-side web search results are not included in this count.

          minimum: 0

        - `required string Source`

        - `required long StartBlockIndex`

          0-based index of the first cited block in the source's `content` array.

          minimum: 0

        - `required string? Title`

  - `required string Source`

  - `required string Title`

  - `CacheControlEphemeral? CacheControl`

    Create a cache control breakpoint at this content block.

  - `CitationsConfigParam Citations`

    - `bool Enabled`

### Server Tool Caller

- `class ServerToolCaller`

  Tool invocation generated by a server-side tool.

  - `JsonElement Type = "code_execution_20250825"`

  - `required string ToolID`

    pattern: ^srvtoolu_[a-zA-Z0-9_]+$

### Server Tool Caller 20260120

- `class ServerToolCaller20260120`

  - `JsonElement Type = "code_execution_20260120"`

  - `required string ToolID`

    pattern: ^srvtoolu_[a-zA-Z0-9_]+$

### Server Tool Usage

- `class ServerToolUsage`

  - `required long WebFetchRequests`

    The number of web fetch tool requests.

    minimum: 0

  - `required long WebSearchRequests`

    The number of web search tool requests.

    minimum: 0

### Server Tool Use Block

- `class ServerToolUseBlock`

  - `JsonElement Type = "server_tool_use"`

  - `required string ID`

    pattern: ^srvtoolu_[a-zA-Z0-9_]+$

  - `required Caller Caller`

    - `class DirectCaller`

      Tool invocation directly from the model.

      - `JsonElement Type = "direct"`

    - `class ServerToolCaller`

      Tool invocation generated by a server-side tool.

      - `JsonElement Type = "code_execution_20250825"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

    - `class ServerToolCaller20260120`

      - `JsonElement Type = "code_execution_20260120"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

  - `required IReadOnlyDictionary<string, JsonElement> Input`

  - `required Name Name`

    - `WebSearch("web_search")`

    - `WebFetch("web_fetch")`

    - `CodeExecution("code_execution")`

    - `BashCodeExecution("bash_code_execution")`

    - `TextEditorCodeExecution("text_editor_code_execution")`

    - `ToolSearchToolRegex("tool_search_tool_regex")`

    - `ToolSearchToolBm25("tool_search_tool_bm25")`

### Server Tool Use Block Param

- `class ServerToolUseBlockParam`

  - `JsonElement Type = "server_tool_use"`

  - `required string ID`

    pattern: ^srvtoolu_[a-zA-Z0-9_]+$

  - `required IReadOnlyDictionary<string, JsonElement> Input`

  - `required Name Name`

    - `WebSearch("web_search")`

    - `WebFetch("web_fetch")`

    - `CodeExecution("code_execution")`

    - `BashCodeExecution("bash_code_execution")`

    - `TextEditorCodeExecution("text_editor_code_execution")`

    - `ToolSearchToolRegex("tool_search_tool_regex")`

    - `ToolSearchToolBm25("tool_search_tool_bm25")`

  - `CacheControlEphemeral? CacheControl`

    Create a cache control breakpoint at this content block.

    - `JsonElement Type = "ephemeral"`

    - `Ttl Ttl`

      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`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching?sdk_languages=csharp) for details.

      - `Ttl5m("5m")`

      - `Ttl1h("1h")`

  - `Caller Caller`

    - `class DirectCaller`

      Tool invocation directly from the model.

      - `JsonElement Type = "direct"`

    - `class ServerToolCaller`

      Tool invocation generated by a server-side tool.

      - `JsonElement Type = "code_execution_20250825"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

    - `class ServerToolCaller20260120`

      - `JsonElement Type = "code_execution_20260120"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

### Signature Delta

- `class SignatureDelta`

  - `JsonElement Type = "signature_delta"`

  - `required string Signature`

    The `signature` for this thinking block: an opaque value used to verify that the block was generated by Claude when it is passed back to the API. Delivered in a `signature_delta` event just before the block's `content_block_stop` event.

### Skill Params

- `class SkillParams`

  Specification for a skill to be loaded in a container.

  - `required SkillParamsType Type`

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

    - `Anthropic("anthropic")`

    - `Custom("custom")`

  - `required string SkillID`

    Skill ID

    minLength: 1, maxLength: 64

  - `string Version`

    Skill version or 'latest' for most recent version

    minLength: 1, maxLength: 64

### Stop Reason

- `enum StopReason`

  - `EndTurn("end_turn")`

  - `MaxTokens("max_tokens")`

  - `StopSequence("stop_sequence")`

  - `ToolUse("tool_use")`

  - `PauseTurn("pause_turn")`

  - `Refusal("refusal")`

  - `ModelContextWindowExceeded("model_context_window_exceeded")`

### System Message Param

- `class SystemMessageParam`

  - `required Content Content`

    - `string`

    - `IReadOnlyList<TextBlockParam>`

      - `JsonElement Type = "text"`

      - `required string Text`

        minLength: 1

      - `CacheControlEphemeral? CacheControl`

        Create a cache control breakpoint at this content block.

        - `JsonElement Type = "ephemeral"`

        - `Ttl Ttl`

          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`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching?sdk_languages=csharp) for details.

          - `Ttl5m("5m")`

          - `Ttl1h("1h")`

      - `IReadOnlyList<TextCitationParam>? Citations`

        - `class CitationCharLocationParam`

          - `JsonElement Type = "char_location"`

          - `required string CitedText`

          - `required long DocumentIndex`

            minimum: 0

          - `required string? DocumentTitle`

            minLength: 1, maxLength: 500

          - `required long EndCharIndex`

          - `required long StartCharIndex`

            minimum: 0

        - `class CitationPageLocationParam`

          - `JsonElement Type = "page_location"`

          - `required string CitedText`

          - `required long DocumentIndex`

            minimum: 0

          - `required string? DocumentTitle`

            minLength: 1, maxLength: 500

          - `required long EndPageNumber`

          - `required long StartPageNumber`

            minimum: 1

        - `class CitationContentBlockLocationParam`

          - `JsonElement Type = "content_block_location"`

          - `required string CitedText`

            The full text of the cited block range, concatenated.

            Always equals the contents of `content[start_block_index:end_block_index]` joined together. The text block is the minimal citable unit; this field is never a substring of a single block. Not counted toward output tokens, and not counted toward input tokens when sent back in subsequent turns.

          - `required long DocumentIndex`

            minimum: 0

          - `required string? DocumentTitle`

            minLength: 1, maxLength: 500

          - `required long EndBlockIndex`

            Exclusive 0-based end index of the cited block range in the source's `content` array.

            Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`.

          - `required long StartBlockIndex`

            0-based index of the first cited block in the source's `content` array.

            minimum: 0

        - `class CitationWebSearchResultLocationParam`

          - `JsonElement Type = "web_search_result_location"`

          - `required string CitedText`

          - `required string EncryptedIndex`

          - `required string? Title`

            minLength: 1, maxLength: 512

          - `required string Url`

            minLength: 1

        - `class CitationSearchResultLocationParam`

          - `JsonElement Type = "search_result_location"`

          - `required string CitedText`

            The full text of the cited block range, concatenated.

            Always equals the contents of `content[start_block_index:end_block_index]` joined together. The text block is the minimal citable unit; this field is never a substring of a single block. Not counted toward output tokens, and not counted toward input tokens when sent back in subsequent turns.

          - `required long EndBlockIndex`

            Exclusive 0-based end index of the cited block range in the source's `content` array.

            Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`.

          - `required long SearchResultIndex`

            0-based index of the cited search result among all `search_result` content blocks in the request, in the order they appear across messages and tool results.

            Counted separately from `document_index`; server-side web search results are not included in this count.

            minimum: 0

          - `required string Source`

          - `required long StartBlockIndex`

            0-based index of the first cited block in the source's `content` array.

            minimum: 0

          - `required string? Title`

  - `JsonElement Role = "system"`

### Text Block

- `class TextBlock`

  - `JsonElement Type = "text"`

  - `required IReadOnlyList<TextCitation>? Citations`

    Citations supporting the text block.

    The type of citation returned will depend on the type of document being cited. Citing a PDF results in `page_location`, plain text results in `char_location`, and content document results in `content_block_location`.

    - `class CitationCharLocation`

      - `JsonElement Type = "char_location"`

      - `required string CitedText`

      - `required long DocumentIndex`

        minimum: 0

      - `required string? DocumentTitle`

      - `required long EndCharIndex`

      - `required string? FileID`

      - `required long StartCharIndex`

        minimum: 0

    - `class CitationPageLocation`

      - `JsonElement Type = "page_location"`

      - `required string CitedText`

      - `required long DocumentIndex`

        minimum: 0

      - `required string? DocumentTitle`

      - `required long EndPageNumber`

      - `required string? FileID`

      - `required long StartPageNumber`

        minimum: 1

    - `class CitationContentBlockLocation`

      - `JsonElement Type = "content_block_location"`

      - `required string CitedText`

        The full text of the cited block range, concatenated.

        Always equals the contents of `content[start_block_index:end_block_index]` joined together. The text block is the minimal citable unit; this field is never a substring of a single block. Not counted toward output tokens, and not counted toward input tokens when sent back in subsequent turns.

      - `required long DocumentIndex`

        minimum: 0

      - `required string? DocumentTitle`

      - `required long EndBlockIndex`

        Exclusive 0-based end index of the cited block range in the source's `content` array.

        Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`.

      - `required string? FileID`

      - `required long StartBlockIndex`

        0-based index of the first cited block in the source's `content` array.

        minimum: 0

    - `class CitationsWebSearchResultLocation`

      - `JsonElement Type = "web_search_result_location"`

      - `required string CitedText`

      - `required string EncryptedIndex`

      - `required string? Title`

        maxLength: 512

      - `required string Url`

    - `class CitationsSearchResultLocation`

      - `JsonElement Type = "search_result_location"`

      - `required string CitedText`

        The full text of the cited block range, concatenated.

        Always equals the contents of `content[start_block_index:end_block_index]` joined together. The text block is the minimal citable unit; this field is never a substring of a single block. Not counted toward output tokens, and not counted toward input tokens when sent back in subsequent turns.

      - `required long EndBlockIndex`

        Exclusive 0-based end index of the cited block range in the source's `content` array.

        Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`.

      - `required long SearchResultIndex`

        0-based index of the cited search result among all `search_result` content blocks in the request, in the order they appear across messages and tool results.

        Counted separately from `document_index`; server-side web search results are not included in this count.

        minimum: 0

      - `required string Source`

      - `required long StartBlockIndex`

        0-based index of the first cited block in the source's `content` array.

        minimum: 0

      - `required string? Title`

  - `required string Text`

### Text Block Param

- `class TextBlockParam`

  - `JsonElement Type = "text"`

  - `required string Text`

    minLength: 1

  - `CacheControlEphemeral? CacheControl`

    Create a cache control breakpoint at this content block.

    - `JsonElement Type = "ephemeral"`

    - `Ttl Ttl`

      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`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching?sdk_languages=csharp) for details.

      - `Ttl5m("5m")`

      - `Ttl1h("1h")`

  - `IReadOnlyList<TextCitationParam>? Citations`

    - `class CitationCharLocationParam`

      - `JsonElement Type = "char_location"`

      - `required string CitedText`

      - `required long DocumentIndex`

        minimum: 0

      - `required string? DocumentTitle`

        minLength: 1, maxLength: 500

      - `required long EndCharIndex`

      - `required long StartCharIndex`

        minimum: 0

    - `class CitationPageLocationParam`

      - `JsonElement Type = "page_location"`

      - `required string CitedText`

      - `required long DocumentIndex`

        minimum: 0

      - `required string? DocumentTitle`

        minLength: 1, maxLength: 500

      - `required long EndPageNumber`

      - `required long StartPageNumber`

        minimum: 1

    - `class CitationContentBlockLocationParam`

      - `JsonElement Type = "content_block_location"`

      - `required string CitedText`

        The full text of the cited block range, concatenated.

        Always equals the contents of `content[start_block_index:end_block_index]` joined together. The text block is the minimal citable unit; this field is never a substring of a single block. Not counted toward output tokens, and not counted toward input tokens when sent back in subsequent turns.

      - `required long DocumentIndex`

        minimum: 0

      - `required string? DocumentTitle`

        minLength: 1, maxLength: 500

      - `required long EndBlockIndex`

        Exclusive 0-based end index of the cited block range in the source's `content` array.

        Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`.

      - `required long StartBlockIndex`

        0-based index of the first cited block in the source's `content` array.

        minimum: 0

    - `class CitationWebSearchResultLocationParam`

      - `JsonElement Type = "web_search_result_location"`

      - `required string CitedText`

      - `required string EncryptedIndex`

      - `required string? Title`

        minLength: 1, maxLength: 512

      - `required string Url`

        minLength: 1

    - `class CitationSearchResultLocationParam`

      - `JsonElement Type = "search_result_location"`

      - `required string CitedText`

        The full text of the cited block range, concatenated.

        Always equals the contents of `content[start_block_index:end_block_index]` joined together. The text block is the minimal citable unit; this field is never a substring of a single block. Not counted toward output tokens, and not counted toward input tokens when sent back in subsequent turns.

      - `required long EndBlockIndex`

        Exclusive 0-based end index of the cited block range in the source's `content` array.

        Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`.

      - `required long SearchResultIndex`

        0-based index of the cited search result among all `search_result` content blocks in the request, in the order they appear across messages and tool results.

        Counted separately from `document_index`; server-side web search results are not included in this count.

        minimum: 0

      - `required string Source`

      - `required long StartBlockIndex`

        0-based index of the first cited block in the source's `content` array.

        minimum: 0

      - `required string? Title`

### Text Citation

- `class TextCitation: union`

  - `class CitationCharLocation`

    - `JsonElement Type = "char_location"`

    - `required string CitedText`

    - `required long DocumentIndex`

      minimum: 0

    - `required string? DocumentTitle`

    - `required long EndCharIndex`

    - `required string? FileID`

    - `required long StartCharIndex`

      minimum: 0

  - `class CitationPageLocation`

    - `JsonElement Type = "page_location"`

    - `required string CitedText`

    - `required long DocumentIndex`

      minimum: 0

    - `required string? DocumentTitle`

    - `required long EndPageNumber`

    - `required string? FileID`

    - `required long StartPageNumber`

      minimum: 1

  - `class CitationContentBlockLocation`

    - `JsonElement Type = "content_block_location"`

    - `required string CitedText`

      The full text of the cited block range, concatenated.

      Always equals the contents of `content[start_block_index:end_block_index]` joined together. The text block is the minimal citable unit; this field is never a substring of a single block. Not counted toward output tokens, and not counted toward input tokens when sent back in subsequent turns.

    - `required long DocumentIndex`

      minimum: 0

    - `required string? DocumentTitle`

    - `required long EndBlockIndex`

      Exclusive 0-based end index of the cited block range in the source's `content` array.

      Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`.

    - `required string? FileID`

    - `required long StartBlockIndex`

      0-based index of the first cited block in the source's `content` array.

      minimum: 0

  - `class CitationsWebSearchResultLocation`

    - `JsonElement Type = "web_search_result_location"`

    - `required string CitedText`

    - `required string EncryptedIndex`

    - `required string? Title`

      maxLength: 512

    - `required string Url`

  - `class CitationsSearchResultLocation`

    - `JsonElement Type = "search_result_location"`

    - `required string CitedText`

      The full text of the cited block range, concatenated.

      Always equals the contents of `content[start_block_index:end_block_index]` joined together. The text block is the minimal citable unit; this field is never a substring of a single block. Not counted toward output tokens, and not counted toward input tokens when sent back in subsequent turns.

    - `required long EndBlockIndex`

      Exclusive 0-based end index of the cited block range in the source's `content` array.

      Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`.

    - `required long SearchResultIndex`

      0-based index of the cited search result among all `search_result` content blocks in the request, in the order they appear across messages and tool results.

      Counted separately from `document_index`; server-side web search results are not included in this count.

      minimum: 0

    - `required string Source`

    - `required long StartBlockIndex`

      0-based index of the first cited block in the source's `content` array.

      minimum: 0

    - `required string? Title`

### Text Citation Param

- `class TextCitationParam: union`

  - `class CitationCharLocationParam`

    - `JsonElement Type = "char_location"`

    - `required string CitedText`

    - `required long DocumentIndex`

      minimum: 0

    - `required string? DocumentTitle`

      minLength: 1, maxLength: 500

    - `required long EndCharIndex`

    - `required long StartCharIndex`

      minimum: 0

  - `class CitationPageLocationParam`

    - `JsonElement Type = "page_location"`

    - `required string CitedText`

    - `required long DocumentIndex`

      minimum: 0

    - `required string? DocumentTitle`

      minLength: 1, maxLength: 500

    - `required long EndPageNumber`

    - `required long StartPageNumber`

      minimum: 1

  - `class CitationContentBlockLocationParam`

    - `JsonElement Type = "content_block_location"`

    - `required string CitedText`

      The full text of the cited block range, concatenated.

      Always equals the contents of `content[start_block_index:end_block_index]` joined together. The text block is the minimal citable unit; this field is never a substring of a single block. Not counted toward output tokens, and not counted toward input tokens when sent back in subsequent turns.

    - `required long DocumentIndex`

      minimum: 0

    - `required string? DocumentTitle`

      minLength: 1, maxLength: 500

    - `required long EndBlockIndex`

      Exclusive 0-based end index of the cited block range in the source's `content` array.

      Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`.

    - `required long StartBlockIndex`

      0-based index of the first cited block in the source's `content` array.

      minimum: 0

  - `class CitationWebSearchResultLocationParam`

    - `JsonElement Type = "web_search_result_location"`

    - `required string CitedText`

    - `required string EncryptedIndex`

    - `required string? Title`

      minLength: 1, maxLength: 512

    - `required string Url`

      minLength: 1

  - `class CitationSearchResultLocationParam`

    - `JsonElement Type = "search_result_location"`

    - `required string CitedText`

      The full text of the cited block range, concatenated.

      Always equals the contents of `content[start_block_index:end_block_index]` joined together. The text block is the minimal citable unit; this field is never a substring of a single block. Not counted toward output tokens, and not counted toward input tokens when sent back in subsequent turns.

    - `required long EndBlockIndex`

      Exclusive 0-based end index of the cited block range in the source's `content` array.

      Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`.

    - `required long SearchResultIndex`

      0-based index of the cited search result among all `search_result` content blocks in the request, in the order they appear across messages and tool results.

      Counted separately from `document_index`; server-side web search results are not included in this count.

      minimum: 0

    - `required string Source`

    - `required long StartBlockIndex`

      0-based index of the first cited block in the source's `content` array.

      minimum: 0

    - `required string? Title`

### Text Delta

- `class TextDelta`

  - `JsonElement Type = "text_delta"`

  - `required string Text`

### Text Editor Code Execution Create Result Block

- `class TextEditorCodeExecutionCreateResultBlock`

  - `JsonElement Type = "text_editor_code_execution_create_result"`

  - `required bool IsFileUpdate`

### Text Editor Code Execution Create Result Block Param

- `class TextEditorCodeExecutionCreateResultBlockParam`

  - `JsonElement Type = "text_editor_code_execution_create_result"`

  - `required bool IsFileUpdate`

### Text Editor Code Execution Str Replace Result Block

- `class TextEditorCodeExecutionStrReplaceResultBlock`

  - `JsonElement Type = "text_editor_code_execution_str_replace_result"`

  - `required IReadOnlyList<string>? Lines`

  - `required long? NewLines`

  - `required long? NewStart`

  - `required long? OldLines`

  - `required long? OldStart`

### Text Editor Code Execution Str Replace Result Block Param

- `class TextEditorCodeExecutionStrReplaceResultBlockParam`

  - `JsonElement Type = "text_editor_code_execution_str_replace_result"`

  - `IReadOnlyList<string>? Lines`

  - `long? NewLines`

  - `long? NewStart`

  - `long? OldLines`

  - `long? OldStart`

### Text Editor Code Execution Tool Result Block

- `class TextEditorCodeExecutionToolResultBlock`

  - `JsonElement Type = "text_editor_code_execution_tool_result"`

  - `required Content Content`

    - `class TextEditorCodeExecutionToolResultError`

      - `JsonElement Type = "text_editor_code_execution_tool_result_error"`

      - `required TextEditorCodeExecutionToolResultErrorCode ErrorCode`

        - `InvalidToolInput("invalid_tool_input")`

        - `Unavailable("unavailable")`

        - `TooManyRequests("too_many_requests")`

        - `ExecutionTimeExceeded("execution_time_exceeded")`

        - `FileNotFound("file_not_found")`

      - `required string? ErrorMessage`

    - `class TextEditorCodeExecutionViewResultBlock`

      - `JsonElement Type = "text_editor_code_execution_view_result"`

      - `required string Content`

      - `required FileType FileType`

        - `Text("text")`

        - `Image("image")`

        - `Pdf("pdf")`

      - `required long? NumLines`

      - `required long? StartLine`

      - `required long? TotalLines`

    - `class TextEditorCodeExecutionCreateResultBlock`

      - `JsonElement Type = "text_editor_code_execution_create_result"`

      - `required bool IsFileUpdate`

    - `class TextEditorCodeExecutionStrReplaceResultBlock`

      - `JsonElement Type = "text_editor_code_execution_str_replace_result"`

      - `required IReadOnlyList<string>? Lines`

      - `required long? NewLines`

      - `required long? NewStart`

      - `required long? OldLines`

      - `required long? OldStart`

  - `required string ToolUseID`

    pattern: ^srvtoolu_[a-zA-Z0-9_]+$

### Text Editor Code Execution Tool Result Block Param

- `class TextEditorCodeExecutionToolResultBlockParam`

  - `JsonElement Type = "text_editor_code_execution_tool_result"`

  - `required Content Content`

    - `class TextEditorCodeExecutionToolResultErrorParam`

      - `JsonElement Type = "text_editor_code_execution_tool_result_error"`

      - `required TextEditorCodeExecutionToolResultErrorCode ErrorCode`

        - `InvalidToolInput("invalid_tool_input")`

        - `Unavailable("unavailable")`

        - `TooManyRequests("too_many_requests")`

        - `ExecutionTimeExceeded("execution_time_exceeded")`

        - `FileNotFound("file_not_found")`

      - `string? ErrorMessage`

    - `class TextEditorCodeExecutionViewResultBlockParam`

      - `JsonElement Type = "text_editor_code_execution_view_result"`

      - `required string Content`

      - `required FileType FileType`

        - `Text("text")`

        - `Image("image")`

        - `Pdf("pdf")`

      - `long? NumLines`

      - `long? StartLine`

      - `long? TotalLines`

    - `class TextEditorCodeExecutionCreateResultBlockParam`

      - `JsonElement Type = "text_editor_code_execution_create_result"`

      - `required bool IsFileUpdate`

    - `class TextEditorCodeExecutionStrReplaceResultBlockParam`

      - `JsonElement Type = "text_editor_code_execution_str_replace_result"`

      - `IReadOnlyList<string>? Lines`

      - `long? NewLines`

      - `long? NewStart`

      - `long? OldLines`

      - `long? OldStart`

  - `required string ToolUseID`

    pattern: ^srvtoolu_[a-zA-Z0-9_]+$

  - `CacheControlEphemeral? CacheControl`

    Create a cache control breakpoint at this content block.

    - `JsonElement Type = "ephemeral"`

    - `Ttl Ttl`

      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`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching?sdk_languages=csharp) for details.

      - `Ttl5m("5m")`

      - `Ttl1h("1h")`

### Text Editor Code Execution Tool Result Error

- `class TextEditorCodeExecutionToolResultError`

  - `JsonElement Type = "text_editor_code_execution_tool_result_error"`

  - `required TextEditorCodeExecutionToolResultErrorCode ErrorCode`

    - `InvalidToolInput("invalid_tool_input")`

    - `Unavailable("unavailable")`

    - `TooManyRequests("too_many_requests")`

    - `ExecutionTimeExceeded("execution_time_exceeded")`

    - `FileNotFound("file_not_found")`

  - `required string? ErrorMessage`

### Text Editor Code Execution Tool Result Error Code

- `enum TextEditorCodeExecutionToolResultErrorCode`

  - `InvalidToolInput("invalid_tool_input")`

  - `Unavailable("unavailable")`

  - `TooManyRequests("too_many_requests")`

  - `ExecutionTimeExceeded("execution_time_exceeded")`

  - `FileNotFound("file_not_found")`

### Text Editor Code Execution Tool Result Error Param

- `class TextEditorCodeExecutionToolResultErrorParam`

  - `JsonElement Type = "text_editor_code_execution_tool_result_error"`

  - `required TextEditorCodeExecutionToolResultErrorCode ErrorCode`

    - `InvalidToolInput("invalid_tool_input")`

    - `Unavailable("unavailable")`

    - `TooManyRequests("too_many_requests")`

    - `ExecutionTimeExceeded("execution_time_exceeded")`

    - `FileNotFound("file_not_found")`

  - `string? ErrorMessage`

### Text Editor Code Execution View Result Block

- `class TextEditorCodeExecutionViewResultBlock`

  - `JsonElement Type = "text_editor_code_execution_view_result"`

  - `required string Content`

  - `required FileType FileType`

    - `Text("text")`

    - `Image("image")`

    - `Pdf("pdf")`

  - `required long? NumLines`

  - `required long? StartLine`

  - `required long? TotalLines`

### Text Editor Code Execution View Result Block Param

- `class TextEditorCodeExecutionViewResultBlockParam`

  - `JsonElement Type = "text_editor_code_execution_view_result"`

  - `required string Content`

  - `required FileType FileType`

    - `Text("text")`

    - `Image("image")`

    - `Pdf("pdf")`

  - `long? NumLines`

  - `long? StartLine`

  - `long? TotalLines`

### Thinking Block

- `class ThinkingBlock`

  - `JsonElement Type = "thinking"`

  - `required string Signature`

    A value used to verify that this thinking block was generated by Claude when it is passed back to the API.

    This is an opaque field and should not be interpreted or parsed. When passing thinking blocks back to the API (required when using tools with extended thinking), pass them back exactly as received, with this field intact.

    See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking?sdk_languages=csharp) for details.

  - `required string Thinking`

    The text of Claude's thinking process for this block.

### Thinking Block Param

- `class ThinkingBlockParam`

  - `JsonElement Type = "thinking"`

  - `required string Signature`

    The `signature` value of this thinking block, exactly as returned by the API in a previous response. Used to verify that the block was generated by Claude.

    Thinking blocks must be passed back unmodified and in their original order; a modified block results in a 400 `invalid_request_error`.

  - `required string Thinking`

    The `thinking` text of this block as returned by the API.

### Thinking Config Adaptive

- `class ThinkingConfigAdaptive`

  - `JsonElement Type = "adaptive"`

  - `Display? Display`

    Controls how thinking content appears in the response. When set to `summarized`, thinking is returned normally. When set to `omitted`, thinking content is redacted but a signature is returned for multi-turn continuity. The default depends on the model; see [Controlling thinking display](https://platform.claude.com/docs/en/build-with-claude/thinking?sdk_languages=csharp#controlling-thinking-display).

    - `Summarized("summarized")`

    - `Omitted("omitted")`

### Thinking Config Between Tools

- `class ThinkingConfigBetweenTools`

  - `JsonElement Type = "between_tools"`

### Thinking Config Disabled

- `class ThinkingConfigDisabled`

  - `JsonElement Type = "disabled"`

### Thinking Config Enabled

- `class ThinkingConfigEnabled`

  - `JsonElement Type = "enabled"`

  - `required long BudgetTokens`

    Determines how many tokens Claude can use for its internal reasoning process. Larger budgets can enable more thorough analysis for complex problems, improving response quality.

    Must be ≥1024 and less than `max_tokens`.

    See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking?sdk_languages=csharp) for details.

    minimum: 1024

  - `Display? Display`

    Controls how thinking content appears in the response. When set to `summarized`, thinking is returned normally. When set to `omitted`, thinking content is redacted but a signature is returned for multi-turn continuity. The default depends on the model; see [Controlling thinking display](https://platform.claude.com/docs/en/build-with-claude/thinking?sdk_languages=csharp#controlling-thinking-display).

    - `Summarized("summarized")`

    - `Omitted("omitted")`

### Thinking Config Param

- `class ThinkingConfigParam: union`

  Configuration for Claude's thinking.

  With `{"type": "adaptive"}`, Claude decides when and how much to think. With `{"type": "enabled"}` (manual extended thinking), you set a `budget_tokens` of at least 1,024. Thinking tokens count toward your `max_tokens` limit.

  Which `type` values are accepted, and what happens when you omit `thinking`, depend on the model. See [thinking](https://platform.claude.com/docs/en/build-with-claude/thinking?sdk_languages=csharp#configuring-thinking) for each model's behavior.

  - `class ThinkingConfigEnabled`

    - `JsonElement Type = "enabled"`

    - `required long BudgetTokens`

      Determines how many tokens Claude can use for its internal reasoning process. Larger budgets can enable more thorough analysis for complex problems, improving response quality.

      Must be ≥1024 and less than `max_tokens`.

      See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking?sdk_languages=csharp) for details.

      minimum: 1024

    - `Display? Display`

      Controls how thinking content appears in the response. When set to `summarized`, thinking is returned normally. When set to `omitted`, thinking content is redacted but a signature is returned for multi-turn continuity. The default depends on the model; see [Controlling thinking display](https://platform.claude.com/docs/en/build-with-claude/thinking?sdk_languages=csharp#controlling-thinking-display).

      - `Summarized("summarized")`

      - `Omitted("omitted")`

  - `class ThinkingConfigDisabled`

    - `JsonElement Type = "disabled"`

  - `class ThinkingConfigBetweenTools`

    - `JsonElement Type = "between_tools"`

  - `class ThinkingConfigAdaptive`

    - `JsonElement Type = "adaptive"`

    - `Display? Display`

      Controls how thinking content appears in the response. When set to `summarized`, thinking is returned normally. When set to `omitted`, thinking content is redacted but a signature is returned for multi-turn continuity. The default depends on the model; see [Controlling thinking display](https://platform.claude.com/docs/en/build-with-claude/thinking?sdk_languages=csharp#controlling-thinking-display).

      - `Summarized("summarized")`

      - `Omitted("omitted")`

### Thinking Delta

- `class ThinkingDelta`

  - `JsonElement Type = "thinking_delta"`

  - `required string Thinking`

    The incremental `thinking` text for this content block. Concatenate the `thinking` values of successive `thinking_delta` events to assemble the block's full `thinking` value.

### Tool

- `class Tool`

  - `Type? Type`

  - `required InputSchema InputSchema`

    [JSON schema](https://json-schema.org/draft/2020-12) for this tool's input.

    This defines the shape of the `input` that your tool accepts and that the model will produce.

    - `JsonElement Type = "object"`

    - `IReadOnlyDictionary<string, JsonElement>? Properties`

    - `IReadOnlyList<string>? Required`

  - `required string Name`

    Name of the tool.

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

    minLength: 1, maxLength: 128, pattern: ^[a-zA-Z0-9_-]{1,128}$

  - `IReadOnlyList<AllowedCaller> AllowedCallers`

    - `Direct("direct")`

    - `CodeExecution20250825("code_execution_20250825")`

    - `CodeExecution20260120("code_execution_20260120")`

    - `CodeExecution20260521("code_execution_20260521")`

  - `CacheControlEphemeral? CacheControl`

    Create a cache control breakpoint at this content block.

    - `JsonElement Type = "ephemeral"`

    - `Ttl Ttl`

      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`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching?sdk_languages=csharp) for details.

      - `Ttl5m("5m")`

      - `Ttl1h("1h")`

  - `bool DeferLoading`

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

  - `string Description`

    Description of what this tool does.

    Tool descriptions should be as detailed as possible. The more information that the model has about what the tool is and how to use it, the better it will perform. You can use natural language descriptions to reinforce important aspects of the tool input JSON schema.

  - `bool? EagerInputStreaming`

    Enable eager input streaming for this tool. When true, tool input parameters will be streamed incrementally as they are generated, and types will be inferred on-the-fly rather than buffering the full JSON output. When false, streaming is disabled for this tool even if the fine-grained-tool-streaming beta is active. When null (default), uses the default behavior based on beta headers.

  - `IReadOnlyList<IReadOnlyDictionary<string, JsonElement>> InputExamples`

  - `bool Strict`

    When true, guarantees schema validation on tool names and inputs

### Tool Bash 20250124

- `class ToolBash20250124`

  - `JsonElement Type = "bash_20250124"`

  - `JsonElement Name = "bash"`

    Name of the tool.

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

  - `IReadOnlyList<AllowedCaller> AllowedCallers`

    - `Direct("direct")`

    - `CodeExecution20250825("code_execution_20250825")`

    - `CodeExecution20260120("code_execution_20260120")`

    - `CodeExecution20260521("code_execution_20260521")`

  - `CacheControlEphemeral? CacheControl`

    Create a cache control breakpoint at this content block.

    - `JsonElement Type = "ephemeral"`

    - `Ttl Ttl`

      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`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching?sdk_languages=csharp) for details.

      - `Ttl5m("5m")`

      - `Ttl1h("1h")`

  - `bool DeferLoading`

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

  - `IReadOnlyList<IReadOnlyDictionary<string, JsonElement>> InputExamples`

  - `bool Strict`

    When true, guarantees schema validation on tool names and inputs

### Tool Choice

- `class ToolChoice: union`

  How the model should use the provided tools. The model can use a specific tool, any available tool, decide by itself, or not use tools at all.

  - `class ToolChoiceAuto`

    The model will automatically decide whether to use tools.

    - `JsonElement Type = "auto"`

    - `bool DisableParallelToolUse`

      Whether to disable parallel tool use.

      Defaults to `false`. If set to `true`, the model will output at most one tool use.

  - `class ToolChoiceAny`

    The model will use any available tools.

    - `JsonElement Type = "any"`

    - `bool DisableParallelToolUse`

      Whether to disable parallel tool use.

      Defaults to `false`. If set to `true`, the model will output exactly one tool use.

  - `class ToolChoiceTool`

    The model will use the specified tool with `tool_choice.name`.

    - `JsonElement Type = "tool"`

    - `required string Name`

      The name of the tool to use.

    - `bool DisableParallelToolUse`

      Whether to disable parallel tool use.

      Defaults to `false`. If set to `true`, the model will output exactly one tool use.

  - `class ToolChoiceNone`

    The model will not be allowed to use tools.

    - `JsonElement Type = "none"`

### Tool Choice Any

- `class ToolChoiceAny`

  The model will use any available tools.

  - `JsonElement Type = "any"`

  - `bool DisableParallelToolUse`

    Whether to disable parallel tool use.

    Defaults to `false`. If set to `true`, the model will output exactly one tool use.

### Tool Choice Auto

- `class ToolChoiceAuto`

  The model will automatically decide whether to use tools.

  - `JsonElement Type = "auto"`

  - `bool DisableParallelToolUse`

    Whether to disable parallel tool use.

    Defaults to `false`. If set to `true`, the model will output at most one tool use.

### Tool Choice None

- `class ToolChoiceNone`

  The model will not be allowed to use tools.

  - `JsonElement Type = "none"`

### Tool Choice Tool

- `class ToolChoiceTool`

  The model will use the specified tool with `tool_choice.name`.

  - `JsonElement Type = "tool"`

  - `required string Name`

    The name of the tool to use.

  - `bool DisableParallelToolUse`

    Whether to disable parallel tool use.

    Defaults to `false`. If set to `true`, the model will output exactly one tool use.

### Tool Reference Block

- `class ToolReferenceBlock`

  - `JsonElement Type = "tool_reference"`

  - `required string ToolName`

    minLength: 1, maxLength: 256, pattern: ^[a-zA-Z0-9_-]{1,256}$

### Tool Reference Block Param

- `class ToolReferenceBlockParam`

  Tool reference block that can be included in tool_result content.

  - `JsonElement Type = "tool_reference"`

  - `required string ToolName`

    minLength: 1, maxLength: 256, pattern: ^[a-zA-Z0-9_-]{1,256}$

  - `CacheControlEphemeral? CacheControl`

    Create a cache control breakpoint at this content block.

    - `JsonElement Type = "ephemeral"`

    - `Ttl Ttl`

      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`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching?sdk_languages=csharp) for details.

      - `Ttl5m("5m")`

      - `Ttl1h("1h")`

### Tool Result Block Param

- `class ToolResultBlockParam`

  - `JsonElement Type = "tool_result"`

  - `required string ToolUseID`

    pattern: ^[a-zA-Z0-9_-]+$

  - `CacheControlEphemeral? CacheControl`

    Create a cache control breakpoint at this content block.

    - `JsonElement Type = "ephemeral"`

    - `Ttl Ttl`

      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`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching?sdk_languages=csharp) for details.

      - `Ttl5m("5m")`

      - `Ttl1h("1h")`

  - `Content Content`

    - `string`

    - `IReadOnlyList<Block>`

      - `class TextBlockParam`

        - `JsonElement Type = "text"`

        - `required string Text`

          minLength: 1

        - `CacheControlEphemeral? CacheControl`

          Create a cache control breakpoint at this content block.

        - `IReadOnlyList<TextCitationParam>? Citations`

          - `class CitationCharLocationParam`

            - `JsonElement Type = "char_location"`

            - `required string CitedText`

            - `required long DocumentIndex`

              minimum: 0

            - `required string? DocumentTitle`

              minLength: 1, maxLength: 500

            - `required long EndCharIndex`

            - `required long StartCharIndex`

              minimum: 0

          - `class CitationPageLocationParam`

            - `JsonElement Type = "page_location"`

            - `required string CitedText`

            - `required long DocumentIndex`

              minimum: 0

            - `required string? DocumentTitle`

              minLength: 1, maxLength: 500

            - `required long EndPageNumber`

            - `required long StartPageNumber`

              minimum: 1

          - `class CitationContentBlockLocationParam`

            - `JsonElement Type = "content_block_location"`

            - `required string CitedText`

              The full text of the cited block range, concatenated.

              Always equals the contents of `content[start_block_index:end_block_index]` joined together. The text block is the minimal citable unit; this field is never a substring of a single block. Not counted toward output tokens, and not counted toward input tokens when sent back in subsequent turns.

            - `required long DocumentIndex`

              minimum: 0

            - `required string? DocumentTitle`

              minLength: 1, maxLength: 500

            - `required long EndBlockIndex`

              Exclusive 0-based end index of the cited block range in the source's `content` array.

              Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`.

            - `required long StartBlockIndex`

              0-based index of the first cited block in the source's `content` array.

              minimum: 0

          - `class CitationWebSearchResultLocationParam`

            - `JsonElement Type = "web_search_result_location"`

            - `required string CitedText`

            - `required string EncryptedIndex`

            - `required string? Title`

              minLength: 1, maxLength: 512

            - `required string Url`

              minLength: 1

          - `class CitationSearchResultLocationParam`

            - `JsonElement Type = "search_result_location"`

            - `required string CitedText`

              The full text of the cited block range, concatenated.

              Always equals the contents of `content[start_block_index:end_block_index]` joined together. The text block is the minimal citable unit; this field is never a substring of a single block. Not counted toward output tokens, and not counted toward input tokens when sent back in subsequent turns.

            - `required long EndBlockIndex`

              Exclusive 0-based end index of the cited block range in the source's `content` array.

              Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`.

            - `required long SearchResultIndex`

              0-based index of the cited search result among all `search_result` content blocks in the request, in the order they appear across messages and tool results.

              Counted separately from `document_index`; server-side web search results are not included in this count.

              minimum: 0

            - `required string Source`

            - `required long StartBlockIndex`

              0-based index of the first cited block in the source's `content` array.

              minimum: 0

            - `required string? Title`

      - `class ImageBlockParam`

        - `JsonElement Type = "image"`

        - `required Source Source`

          - `class Base64ImageSource`

            - `JsonElement Type = "base64"`

            - `required string Data`

              format: byte

            - `required MediaType MediaType`

              - `ImageJpeg("image/jpeg")`

              - `ImagePng("image/png")`

              - `ImageGif("image/gif")`

              - `ImageWebP("image/webp")`

          - `class UrlImageSource`

            - `JsonElement Type = "url"`

            - `required string Url`

          - `class FileImageSource`

            - `JsonElement Type = "file"`

            - `required string FileID`

        - `CacheControlEphemeral? CacheControl`

          Create a cache control breakpoint at this content block.

        - `ImageTransformationsParam? Transformations`

          Configures the transformations the server applies to this image before the model observes it. Each key names a condition the server transforms images for; its value selects the transformation applied. Omitted keys keep their default behavior, and an empty object is equivalent to omitting the field.

          - `OversizedImage OversizedImage`

            What the server does when this image exceeds the model's maximum image size. `"downsize"` (the default) scales the image down to fit, which changes the dimensions the model observes without telling you. `"error"` instead rejects the request with a 400 error naming the image's dimensions and the largest dimensions that fit, so you can scale the image deliberately — your image is never silently scaled down.

            - `Downsize("downsize")`

            - `Error("error")`

      - `class SearchResultBlockParam`

        - `JsonElement Type = "search_result"`

        - `required IReadOnlyList<TextBlockParam> Content`

          - `JsonElement Type = "text"`

          - `required string Text`

            minLength: 1

          - `CacheControlEphemeral? CacheControl`

            Create a cache control breakpoint at this content block.

          - `IReadOnlyList<TextCitationParam>? Citations`

        - `required string Source`

        - `required string Title`

        - `CacheControlEphemeral? CacheControl`

          Create a cache control breakpoint at this content block.

        - `CitationsConfigParam Citations`

          - `bool Enabled`

      - `class DocumentBlockParam`

        - `JsonElement Type = "document"`

        - `required Source Source`

          - `class Base64PdfSource`

            - `JsonElement Type = "base64"`

            - `required string Data`

              format: byte

            - `JsonElement MediaType = "application/pdf"`

          - `class PlainTextSource`

            - `JsonElement Type = "text"`

            - `required string Data`

            - `JsonElement MediaType = "text/plain"`

          - `class ContentBlockSource`

            - `JsonElement Type = "content"`

            - `required Content Content`

              - `string`

              - `IReadOnlyList<ContentBlockSourceContent>`

                - `class TextBlockParam`

                - `class ImageBlockParam`

          - `class UrlPdfSource`

            - `JsonElement Type = "url"`

            - `required string Url`

          - `class FileDocumentSource`

            - `JsonElement Type = "file"`

            - `required string FileID`

        - `CacheControlEphemeral? CacheControl`

          Create a cache control breakpoint at this content block.

        - `CitationsConfigParam? Citations`

        - `string? Context`

          minLength: 1

        - `string? Title`

          minLength: 1, maxLength: 500

      - `class ToolReferenceBlockParam`

        Tool reference block that can be included in tool_result content.

        - `JsonElement Type = "tool_reference"`

        - `required string ToolName`

          minLength: 1, maxLength: 256, pattern: ^[a-zA-Z0-9_-]{1,256}$

        - `CacheControlEphemeral? CacheControl`

          Create a cache control breakpoint at this content block.

      - `class BrowserStateBlockParam`

        The caller's browser state after a browser toolset member call —
        the full inventory of open tabs, which tab is active, and any side
        effects (tabs opened, download state changes) the call produced.

        At most one per `tool_result`, only on a non-error result answering a
        browser toolset member `tool_use`. The server renders the
        model-visible text from it; the model never sees the raw fields.

        - `JsonElement Type = "browser_state"`

        - `required IReadOnlyList<BrowserStateTabEntry> Tabs`

          All tabs open in the browser after this call — the full inventory, not a delta. May be empty. Whenever non-empty, exactly one entry carries `active: true`.

          maxItems: 100

          - `required string TabID`

            The caller-assigned identifier for this tab, unique within the inventory.

            minLength: 1, maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

          - `required string Title`

            The title of the page the tab is showing. May be empty.

            maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

          - `required string Url`

            The URL of the page the tab is showing. May be empty.

            maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

          - `bool Active`

            Whether this tab is the active tab after this call. Whenever `tabs` is non-empty, exactly one entry is marked `active: true`.

        - `CacheControlEphemeral? CacheControl`

          Create a cache control breakpoint at this content block.

        - `IReadOnlyList<BrowserStateChange>? StateChanges`

          Tabs opened and download state changes during this call. "Nothing to report" is expressed by omitting the field, never by an empty list.

          minItems: 1, maxItems: 200

          - `class BrowserStateChangeTabOpened`

            A tab this call's execution opened that remains open at its end —
            the creation delta of the `tabs` inventory, not an event log.

            Carries only the `tab_id`; the tab's `title` and `url` live on its
            `tabs` entry, which must include the same `tab_id`. A tab opened
            during a failed call gets no deferred `tab_opened`; it simply appears
            in the next result's `tabs` inventory.

            - `JsonElement Type = "tab_opened"`

            - `required string TabID`

              The `tab_id` of the opened tab, present in `tabs`.

              minLength: 1, maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

          - `class BrowserStateChangeDownloadStarted`

            A file download that started during this call.

            - `JsonElement Type = "download_started"`

            - `required string DownloadID`

              The caller-assigned identifier for this download, stable across the state changes reporting it.

              minLength: 1, maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

            - `required string Url`

              The final post-redirect URL the download was served from.

              maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

          - `class BrowserStateChangeDownloadCompleted`

            A file download that finished during this call, reported with the
            same `download_id` as its `download_started` — or without a prior
            `download_started`, when the download finished during the call that
            started it (at most one state change per `download_id` per result).

            - `JsonElement Type = "download_completed"`

            - `required string DownloadID`

              The caller-assigned identifier for this download, stable across the state changes reporting it.

              minLength: 1, maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

            - `required string Url`

              The final post-redirect URL the download was served from.

              maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

            - `string? Path`

              Where the executor saved the file, on the executor's filesystem. Only included when another tool in the same environment can read the file at that path.

              maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

            - `long? SizeBytes`

              The completed download's size.

              minimum: 0

          - `class BrowserStateChangeDownloadFailed`

            A file download that failed — or was cancelled — during this call.

            - `JsonElement Type = "download_failed"`

            - `required string DownloadID`

              The caller-assigned identifier for this download, stable across the state changes reporting it.

              minLength: 1, maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

            - `required string Url`

              The final post-redirect URL the download was served from.

              maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

            - `string? Error`

              The failure or cancellation detail, when known.

              maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

  - `bool IsError`

  - `string? ToolsetName`

    For a toolset member tool_result, the toolset family of the paired tool_use.

    minLength: 1, maxLength: 64, pattern: ^[a-zA-Z0-9_-]+$

### Tool Search Tool Bm25 20251119

- `class ToolSearchToolBm25_20251119`

  - `required Type Type`

    - `ToolSearchToolBm25_20251119("tool_search_tool_bm25_20251119")`

    - `ToolSearchToolBm25("tool_search_tool_bm25")`

  - `JsonElement Name = "tool_search_tool_bm25"`

    Name of the tool.

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

  - `IReadOnlyList<AllowedCaller> AllowedCallers`

    - `Direct("direct")`

    - `CodeExecution20250825("code_execution_20250825")`

    - `CodeExecution20260120("code_execution_20260120")`

    - `CodeExecution20260521("code_execution_20260521")`

  - `CacheControlEphemeral? CacheControl`

    Create a cache control breakpoint at this content block.

    - `JsonElement Type = "ephemeral"`

    - `Ttl Ttl`

      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`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching?sdk_languages=csharp) for details.

      - `Ttl5m("5m")`

      - `Ttl1h("1h")`

  - `bool DeferLoading`

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

  - `bool Strict`

    When true, guarantees schema validation on tool names and inputs

### Tool Search Tool Regex 20251119

- `class ToolSearchToolRegex20251119`

  - `required Type Type`

    - `ToolSearchToolRegex20251119("tool_search_tool_regex_20251119")`

    - `ToolSearchToolRegex("tool_search_tool_regex")`

  - `JsonElement Name = "tool_search_tool_regex"`

    Name of the tool.

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

  - `IReadOnlyList<AllowedCaller> AllowedCallers`

    - `Direct("direct")`

    - `CodeExecution20250825("code_execution_20250825")`

    - `CodeExecution20260120("code_execution_20260120")`

    - `CodeExecution20260521("code_execution_20260521")`

  - `CacheControlEphemeral? CacheControl`

    Create a cache control breakpoint at this content block.

    - `JsonElement Type = "ephemeral"`

    - `Ttl Ttl`

      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`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching?sdk_languages=csharp) for details.

      - `Ttl5m("5m")`

      - `Ttl1h("1h")`

  - `bool DeferLoading`

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

  - `bool Strict`

    When true, guarantees schema validation on tool names and inputs

### Tool Search Tool Result Block

- `class ToolSearchToolResultBlock`

  - `JsonElement Type = "tool_search_tool_result"`

  - `required Content Content`

    - `class ToolSearchToolResultError`

      - `JsonElement Type = "tool_search_tool_result_error"`

      - `required ToolSearchToolResultErrorCode ErrorCode`

        - `InvalidToolInput("invalid_tool_input")`

        - `Unavailable("unavailable")`

        - `TooManyRequests("too_many_requests")`

        - `ExecutionTimeExceeded("execution_time_exceeded")`

      - `required string? ErrorMessage`

    - `class ToolSearchToolSearchResultBlock`

      - `JsonElement Type = "tool_search_tool_search_result"`

      - `required IReadOnlyList<ToolReferenceBlock> ToolReferences`

        - `JsonElement Type = "tool_reference"`

        - `required string ToolName`

          minLength: 1, maxLength: 256, pattern: ^[a-zA-Z0-9_-]{1,256}$

  - `required string ToolUseID`

    pattern: ^srvtoolu_[a-zA-Z0-9_]+$

### Tool Search Tool Result Block Param

- `class ToolSearchToolResultBlockParam`

  - `JsonElement Type = "tool_search_tool_result"`

  - `required Content Content`

    - `class ToolSearchToolResultErrorParam`

      - `JsonElement Type = "tool_search_tool_result_error"`

      - `required ToolSearchToolResultErrorCode ErrorCode`

        - `InvalidToolInput("invalid_tool_input")`

        - `Unavailable("unavailable")`

        - `TooManyRequests("too_many_requests")`

        - `ExecutionTimeExceeded("execution_time_exceeded")`

      - `string? ErrorMessage`

    - `class ToolSearchToolSearchResultBlockParam`

      - `JsonElement Type = "tool_search_tool_search_result"`

      - `required IReadOnlyList<ToolReferenceBlockParam> ToolReferences`

        - `JsonElement Type = "tool_reference"`

        - `required string ToolName`

          minLength: 1, maxLength: 256, pattern: ^[a-zA-Z0-9_-]{1,256}$

        - `CacheControlEphemeral? CacheControl`

          Create a cache control breakpoint at this content block.

          - `JsonElement Type = "ephemeral"`

          - `Ttl Ttl`

            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`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching?sdk_languages=csharp) for details.

            - `Ttl5m("5m")`

            - `Ttl1h("1h")`

  - `required string ToolUseID`

    pattern: ^srvtoolu_[a-zA-Z0-9_]+$

  - `CacheControlEphemeral? CacheControl`

    Create a cache control breakpoint at this content block.

### Tool Search Tool Result Error

- `class ToolSearchToolResultError`

  - `JsonElement Type = "tool_search_tool_result_error"`

  - `required ToolSearchToolResultErrorCode ErrorCode`

    - `InvalidToolInput("invalid_tool_input")`

    - `Unavailable("unavailable")`

    - `TooManyRequests("too_many_requests")`

    - `ExecutionTimeExceeded("execution_time_exceeded")`

  - `required string? ErrorMessage`

### Tool Search Tool Result Error Code

- `enum ToolSearchToolResultErrorCode`

  - `InvalidToolInput("invalid_tool_input")`

  - `Unavailable("unavailable")`

  - `TooManyRequests("too_many_requests")`

  - `ExecutionTimeExceeded("execution_time_exceeded")`

### Tool Search Tool Result Error Param

- `class ToolSearchToolResultErrorParam`

  - `JsonElement Type = "tool_search_tool_result_error"`

  - `required ToolSearchToolResultErrorCode ErrorCode`

    - `InvalidToolInput("invalid_tool_input")`

    - `Unavailable("unavailable")`

    - `TooManyRequests("too_many_requests")`

    - `ExecutionTimeExceeded("execution_time_exceeded")`

  - `string? ErrorMessage`

### Tool Search Tool Search Result Block

- `class ToolSearchToolSearchResultBlock`

  - `JsonElement Type = "tool_search_tool_search_result"`

  - `required IReadOnlyList<ToolReferenceBlock> ToolReferences`

    - `JsonElement Type = "tool_reference"`

    - `required string ToolName`

      minLength: 1, maxLength: 256, pattern: ^[a-zA-Z0-9_-]{1,256}$

### Tool Search Tool Search Result Block Param

- `class ToolSearchToolSearchResultBlockParam`

  - `JsonElement Type = "tool_search_tool_search_result"`

  - `required IReadOnlyList<ToolReferenceBlockParam> ToolReferences`

    - `JsonElement Type = "tool_reference"`

    - `required string ToolName`

      minLength: 1, maxLength: 256, pattern: ^[a-zA-Z0-9_-]{1,256}$

    - `CacheControlEphemeral? CacheControl`

      Create a cache control breakpoint at this content block.

      - `JsonElement Type = "ephemeral"`

      - `Ttl Ttl`

        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`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching?sdk_languages=csharp) for details.

        - `Ttl5m("5m")`

        - `Ttl1h("1h")`

### Tool Text Editor 20250124

- `class ToolTextEditor20250124`

  - `JsonElement Type = "text_editor_20250124"`

  - `JsonElement Name = "str_replace_editor"`

    Name of the tool.

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

  - `IReadOnlyList<AllowedCaller> AllowedCallers`

    - `Direct("direct")`

    - `CodeExecution20250825("code_execution_20250825")`

    - `CodeExecution20260120("code_execution_20260120")`

    - `CodeExecution20260521("code_execution_20260521")`

  - `CacheControlEphemeral? CacheControl`

    Create a cache control breakpoint at this content block.

    - `JsonElement Type = "ephemeral"`

    - `Ttl Ttl`

      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`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching?sdk_languages=csharp) for details.

      - `Ttl5m("5m")`

      - `Ttl1h("1h")`

  - `bool DeferLoading`

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

  - `IReadOnlyList<IReadOnlyDictionary<string, JsonElement>> InputExamples`

  - `bool Strict`

    When true, guarantees schema validation on tool names and inputs

### Tool Text Editor 20250429

- `class ToolTextEditor20250429`

  - `JsonElement Type = "text_editor_20250429"`

  - `JsonElement Name = "str_replace_based_edit_tool"`

    Name of the tool.

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

  - `IReadOnlyList<AllowedCaller> AllowedCallers`

    - `Direct("direct")`

    - `CodeExecution20250825("code_execution_20250825")`

    - `CodeExecution20260120("code_execution_20260120")`

    - `CodeExecution20260521("code_execution_20260521")`

  - `CacheControlEphemeral? CacheControl`

    Create a cache control breakpoint at this content block.

    - `JsonElement Type = "ephemeral"`

    - `Ttl Ttl`

      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`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching?sdk_languages=csharp) for details.

      - `Ttl5m("5m")`

      - `Ttl1h("1h")`

  - `bool DeferLoading`

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

  - `IReadOnlyList<IReadOnlyDictionary<string, JsonElement>> InputExamples`

  - `bool Strict`

    When true, guarantees schema validation on tool names and inputs

### Tool Text Editor 20250728

- `class ToolTextEditor20250728`

  - `JsonElement Type = "text_editor_20250728"`

  - `JsonElement Name = "str_replace_based_edit_tool"`

    Name of the tool.

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

  - `IReadOnlyList<AllowedCaller> AllowedCallers`

    - `Direct("direct")`

    - `CodeExecution20250825("code_execution_20250825")`

    - `CodeExecution20260120("code_execution_20260120")`

    - `CodeExecution20260521("code_execution_20260521")`

  - `CacheControlEphemeral? CacheControl`

    Create a cache control breakpoint at this content block.

    - `JsonElement Type = "ephemeral"`

    - `Ttl Ttl`

      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`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching?sdk_languages=csharp) for details.

      - `Ttl5m("5m")`

      - `Ttl1h("1h")`

  - `bool DeferLoading`

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

  - `IReadOnlyList<IReadOnlyDictionary<string, JsonElement>> InputExamples`

  - `long? MaxCharacters`

    Maximum number of characters to display when viewing a file. If not specified, defaults to displaying the full file.

    minimum: 1

  - `bool Strict`

    When true, guarantees schema validation on tool names and inputs

### Tool Union

- `class ToolUnion: union`

  - `class Tool`

    - `Type? Type`

    - `required InputSchema InputSchema`

      [JSON schema](https://json-schema.org/draft/2020-12) for this tool's input.

      This defines the shape of the `input` that your tool accepts and that the model will produce.

      - `JsonElement Type = "object"`

      - `IReadOnlyDictionary<string, JsonElement>? Properties`

      - `IReadOnlyList<string>? Required`

    - `required string Name`

      Name of the tool.

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

      minLength: 1, maxLength: 128, pattern: ^[a-zA-Z0-9_-]{1,128}$

    - `IReadOnlyList<AllowedCaller> AllowedCallers`

      - `Direct("direct")`

      - `CodeExecution20250825("code_execution_20250825")`

      - `CodeExecution20260120("code_execution_20260120")`

      - `CodeExecution20260521("code_execution_20260521")`

    - `CacheControlEphemeral? CacheControl`

      Create a cache control breakpoint at this content block.

      - `JsonElement Type = "ephemeral"`

      - `Ttl Ttl`

        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`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching?sdk_languages=csharp) for details.

        - `Ttl5m("5m")`

        - `Ttl1h("1h")`

    - `bool DeferLoading`

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

    - `string Description`

      Description of what this tool does.

      Tool descriptions should be as detailed as possible. The more information that the model has about what the tool is and how to use it, the better it will perform. You can use natural language descriptions to reinforce important aspects of the tool input JSON schema.

    - `bool? EagerInputStreaming`

      Enable eager input streaming for this tool. When true, tool input parameters will be streamed incrementally as they are generated, and types will be inferred on-the-fly rather than buffering the full JSON output. When false, streaming is disabled for this tool even if the fine-grained-tool-streaming beta is active. When null (default), uses the default behavior based on beta headers.

    - `IReadOnlyList<IReadOnlyDictionary<string, JsonElement>> InputExamples`

    - `bool Strict`

      When true, guarantees schema validation on tool names and inputs

  - `class ToolBash20250124`

    - `JsonElement Type = "bash_20250124"`

    - `JsonElement Name = "bash"`

      Name of the tool.

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

    - `IReadOnlyList<AllowedCaller> AllowedCallers`

      - `Direct("direct")`

      - `CodeExecution20250825("code_execution_20250825")`

      - `CodeExecution20260120("code_execution_20260120")`

      - `CodeExecution20260521("code_execution_20260521")`

    - `CacheControlEphemeral? CacheControl`

      Create a cache control breakpoint at this content block.

    - `bool DeferLoading`

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

    - `IReadOnlyList<IReadOnlyDictionary<string, JsonElement>> InputExamples`

    - `bool Strict`

      When true, guarantees schema validation on tool names and inputs

  - `class CodeExecutionTool20250522`

    - `JsonElement Type = "code_execution_20250522"`

    - `JsonElement Name = "code_execution"`

      Name of the tool.

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

    - `IReadOnlyList<AllowedCaller> AllowedCallers`

      - `Direct("direct")`

      - `CodeExecution20250825("code_execution_20250825")`

      - `CodeExecution20260120("code_execution_20260120")`

      - `CodeExecution20260521("code_execution_20260521")`

    - `CacheControlEphemeral? CacheControl`

      Create a cache control breakpoint at this content block.

    - `bool DeferLoading`

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

    - `bool Strict`

      When true, guarantees schema validation on tool names and inputs

  - `class CodeExecutionTool20250825`

    - `JsonElement Type = "code_execution_20250825"`

    - `JsonElement Name = "code_execution"`

      Name of the tool.

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

    - `IReadOnlyList<AllowedCaller> AllowedCallers`

      - `Direct("direct")`

      - `CodeExecution20250825("code_execution_20250825")`

      - `CodeExecution20260120("code_execution_20260120")`

      - `CodeExecution20260521("code_execution_20260521")`

    - `CacheControlEphemeral? CacheControl`

      Create a cache control breakpoint at this content block.

    - `bool DeferLoading`

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

    - `bool Strict`

      When true, guarantees schema validation on tool names and inputs

  - `class CodeExecutionTool20260120`

    A `tools` entry for the code execution tool, version `code_execution_20260120`. It adds REPL state persistence to version `code_execution_20250825`.

    REPL state persistence applies with programmatic tool calling. With it, the Python interpreter state, such as variable bindings, persists across requests that reuse the container.

    See the [code execution tool guide](https://platform.claude.com/docs/en/agents-and-tools/tool-use/code-execution-tool?sdk_languages=csharp#tool-versions) to learn what each tool version adds.

    - `JsonElement Type = "code_execution_20260120"`

    - `JsonElement Name = "code_execution"`

      Name of the tool.

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

    - `IReadOnlyList<AllowedCaller> AllowedCallers`

      - `Direct("direct")`

      - `CodeExecution20250825("code_execution_20250825")`

      - `CodeExecution20260120("code_execution_20260120")`

      - `CodeExecution20260521("code_execution_20260521")`

    - `CacheControlEphemeral? CacheControl`

      Create a cache control breakpoint at this content block.

    - `bool DeferLoading`

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

    - `bool Strict`

      When true, guarantees schema validation on tool names and inputs

  - `class CodeExecutionTool20260521`

    Code execution tool with REPL state persistence.

    - `JsonElement Type = "code_execution_20260521"`

    - `JsonElement Name = "code_execution"`

      Name of the tool.

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

    - `IReadOnlyList<AllowedCaller> AllowedCallers`

      - `Direct("direct")`

      - `CodeExecution20250825("code_execution_20250825")`

      - `CodeExecution20260120("code_execution_20260120")`

      - `CodeExecution20260521("code_execution_20260521")`

    - `CacheControlEphemeral? CacheControl`

      Create a cache control breakpoint at this content block.

    - `bool DeferLoading`

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

    - `bool Strict`

      When true, guarantees schema validation on tool names and inputs

  - `class BrowserToolset20260801`

    The browser toolset: a single `tools[]` entry (carrying no
    `name`) that declares the browser tool family. The model is served
    the family's tool with any members disabled via `configs` removed
    from its schema.

    - `JsonElement Type = "browser_toolset_20260801"`

    - `CacheControlEphemeral? CacheControl`

      Create a cache control breakpoint at this content block.

    - `BrowserToolsetConfigs? Configs`

      Sparse per-member overrides, keyed by member name. Absent, null, and {} are equivalent; a member's defaults apply wherever its key is absent.

      - `BrowserTypeConfig? Type`

        `type`'s config overrides.

        - `bool? DeferLoading`

          Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

        - `bool? Enabled`

          Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

      - `BrowserCloseTabConfig? CloseTab`

        `close_tab`'s config overrides.

        - `bool? DeferLoading`

          Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

        - `bool? Enabled`

          Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

      - `BrowserDoubleClickConfig? DoubleClick`

        `double_click`'s config overrides.

        - `bool? DeferLoading`

          Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

        - `bool? Enabled`

          Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

      - `BrowserFileUploadConfig? FileUpload`

        `file_upload`'s config overrides.

        - `bool? DeferLoading`

          Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

        - `bool? Enabled`

          Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

      - `BrowserFindConfig? Find`

        `find`'s config overrides.

        - `bool? DeferLoading`

          Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

        - `bool? Enabled`

          Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

      - `BrowserFormInputConfig? FormInput`

        `form_input`'s config overrides.

        - `bool? DeferLoading`

          Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

        - `bool? Enabled`

          Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

      - `BrowserGetPageTextConfig? GetPageText`

        `get_page_text`'s config overrides.

        - `bool? DeferLoading`

          Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

        - `bool? Enabled`

          Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

      - `BrowserHoldKeyConfig? HoldKey`

        `hold_key`'s config overrides.

        - `bool? DeferLoading`

          Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

        - `bool? Enabled`

          Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

      - `BrowserHoverConfig? Hover`

        `hover`'s config overrides.

        - `bool? DeferLoading`

          Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

        - `bool? Enabled`

          Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

      - `BrowserJavascriptExecConfig? JavascriptExec`

        `javascript_exec`'s config overrides.

        - `bool? DeferLoading`

          Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

        - `bool? Enabled`

          Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

      - `BrowserKeyConfig? Key`

        `key`'s config overrides.

        - `bool? DeferLoading`

          Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

        - `bool? Enabled`

          Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

      - `BrowserLeftClickConfig? LeftClick`

        `left_click`'s config overrides.

        - `bool? DeferLoading`

          Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

        - `bool? Enabled`

          Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

      - `BrowserLeftClickDragConfig? LeftClickDrag`

        `left_click_drag`'s config overrides.

        - `bool? DeferLoading`

          Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

        - `bool? Enabled`

          Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

      - `BrowserLeftMouseDownConfig? LeftMouseDown`

        `left_mouse_down`'s config overrides.

        - `bool? DeferLoading`

          Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

        - `bool? Enabled`

          Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

      - `BrowserLeftMouseUpConfig? LeftMouseUp`

        `left_mouse_up`'s config overrides.

        - `bool? DeferLoading`

          Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

        - `bool? Enabled`

          Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

      - `BrowserListTabsConfig? ListTabs`

        `list_tabs`'s config overrides.

        - `bool? DeferLoading`

          Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

        - `bool? Enabled`

          Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

      - `BrowserMiddleClickConfig? MiddleClick`

        `middle_click`'s config overrides.

        - `bool? DeferLoading`

          Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

        - `bool? Enabled`

          Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

      - `BrowserMouseMoveConfig? MouseMove`

        `mouse_move`'s config overrides.

        - `bool? DeferLoading`

          Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

        - `bool? Enabled`

          Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

      - `BrowserNavigateConfig? Navigate`

        `navigate`'s config overrides.

        - `bool? DeferLoading`

          Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

        - `bool? Enabled`

          Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

      - `BrowserNewTabConfig? NewTab`

        `new_tab`'s config overrides.

        - `bool? DeferLoading`

          Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

        - `bool? Enabled`

          Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

      - `BrowserReadConsoleConfig? ReadConsole`

        `read_console`'s config overrides.

        - `bool? DeferLoading`

          Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

        - `bool? Enabled`

          Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

      - `BrowserReadNetworkConfig? ReadNetwork`

        `read_network`'s config overrides.

        - `bool? DeferLoading`

          Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

        - `bool? Enabled`

          Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

      - `BrowserReadPageConfig? ReadPage`

        `read_page`'s config overrides.

        - `bool? DeferLoading`

          Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

        - `bool? Enabled`

          Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

      - `BrowserRightClickConfig? RightClick`

        `right_click`'s config overrides.

        - `bool? DeferLoading`

          Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

        - `bool? Enabled`

          Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

      - `BrowserScreenshotConfig? Screenshot`

        `screenshot`'s config overrides.

        - `bool? DeferLoading`

          Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

        - `bool? Enabled`

          Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

      - `BrowserScrollConfig? Scroll`

        `scroll`'s config overrides.

        - `bool? DeferLoading`

          Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

        - `bool? Enabled`

          Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

      - `BrowserScrollToConfig? ScrollTo`

        `scroll_to`'s config overrides.

        - `bool? DeferLoading`

          Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

        - `bool? Enabled`

          Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

      - `BrowserSwitchTabConfig? SwitchTab`

        `switch_tab`'s config overrides.

        - `bool? DeferLoading`

          Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

        - `bool? Enabled`

          Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

      - `BrowserTripleClickConfig? TripleClick`

        `triple_click`'s config overrides.

        - `bool? DeferLoading`

          Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

        - `bool? Enabled`

          Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

      - `BrowserWaitConfig? Wait`

        `wait`'s config overrides.

        - `bool? DeferLoading`

          Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

        - `bool? Enabled`

          Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

      - `BrowserZoomConfig? Zoom`

        `zoom`'s config overrides.

        - `bool? DeferLoading`

          Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

        - `bool? Enabled`

          Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

  - `class MemoryTool20250818`

    - `JsonElement Type = "memory_20250818"`

    - `JsonElement Name = "memory"`

      Name of the tool.

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

    - `IReadOnlyList<AllowedCaller> AllowedCallers`

      - `Direct("direct")`

      - `CodeExecution20250825("code_execution_20250825")`

      - `CodeExecution20260120("code_execution_20260120")`

      - `CodeExecution20260521("code_execution_20260521")`

    - `CacheControlEphemeral? CacheControl`

      Create a cache control breakpoint at this content block.

    - `bool DeferLoading`

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

    - `IReadOnlyList<IReadOnlyDictionary<string, JsonElement>> InputExamples`

    - `bool Strict`

      When true, guarantees schema validation on tool names and inputs

  - `class ComputerToolset20260801`

    The computer toolset: a single `tools[]` entry (carrying no
    `name`) that declares the computer tool family. The model is
    served the family's tool with any members disabled via `configs`
    removed from its schema. Every member is enabled by default, zoom
    included. The single-tool options `display_number` and
    `enable_zoom` are not fields of a toolset entry — it carries only
    `type`, `configs`, and `cache_control`; zoom is controlled
    via `configs.zoom.enabled`.

    - `JsonElement Type = "computer_toolset_20260801"`

    - `CacheControlEphemeral? CacheControl`

      Create a cache control breakpoint at this content block.

    - `ComputerToolsetConfigs? Configs`

      Sparse per-member overrides, keyed by member name. Absent, null, and {} are equivalent; a member's defaults apply wherever its key is absent.

      - `ComputerTypeConfig? Type`

        `type`'s config overrides.

        - `bool? DeferLoading`

          Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

        - `bool? Enabled`

          Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

      - `ComputerCursorPositionConfig? CursorPosition`

        `cursor_position`'s config overrides.

        - `bool? DeferLoading`

          Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

        - `bool? Enabled`

          Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

      - `ComputerDoubleClickConfig? DoubleClick`

        `double_click`'s config overrides.

        - `bool? DeferLoading`

          Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

        - `bool? Enabled`

          Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

      - `ComputerHoldKeyConfig? HoldKey`

        `hold_key`'s config overrides.

        - `bool? DeferLoading`

          Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

        - `bool? Enabled`

          Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

      - `ComputerKeyConfig? Key`

        `key`'s config overrides.

        - `bool? DeferLoading`

          Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

        - `bool? Enabled`

          Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

      - `ComputerLeftClickConfig? LeftClick`

        `left_click`'s config overrides.

        - `bool? DeferLoading`

          Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

        - `bool? Enabled`

          Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

      - `ComputerLeftClickDragConfig? LeftClickDrag`

        `left_click_drag`'s config overrides.

        - `bool? DeferLoading`

          Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

        - `bool? Enabled`

          Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

      - `ComputerLeftMouseDownConfig? LeftMouseDown`

        `left_mouse_down`'s config overrides.

        - `bool? DeferLoading`

          Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

        - `bool? Enabled`

          Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

      - `ComputerLeftMouseUpConfig? LeftMouseUp`

        `left_mouse_up`'s config overrides.

        - `bool? DeferLoading`

          Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

        - `bool? Enabled`

          Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

      - `ComputerMiddleClickConfig? MiddleClick`

        `middle_click`'s config overrides.

        - `bool? DeferLoading`

          Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

        - `bool? Enabled`

          Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

      - `ComputerMouseMoveConfig? MouseMove`

        `mouse_move`'s config overrides.

        - `bool? DeferLoading`

          Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

        - `bool? Enabled`

          Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

      - `ComputerRightClickConfig? RightClick`

        `right_click`'s config overrides.

        - `bool? DeferLoading`

          Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

        - `bool? Enabled`

          Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

      - `ComputerScreenshotConfig? Screenshot`

        `screenshot`'s config overrides.

        - `bool? DeferLoading`

          Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

        - `bool? Enabled`

          Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

      - `ComputerScrollConfig? Scroll`

        `scroll`'s config overrides.

        - `bool? DeferLoading`

          Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

        - `bool? Enabled`

          Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

      - `ComputerTripleClickConfig? TripleClick`

        `triple_click`'s config overrides.

        - `bool? DeferLoading`

          Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

        - `bool? Enabled`

          Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

      - `ComputerWaitConfig? Wait`

        `wait`'s config overrides.

        - `bool? DeferLoading`

          Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

        - `bool? Enabled`

          Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

      - `ComputerZoomConfig? Zoom`

        `zoom`'s config overrides.

        - `bool? DeferLoading`

          Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

        - `bool? Enabled`

          Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

  - `class ToolTextEditor20250124`

    - `JsonElement Type = "text_editor_20250124"`

    - `JsonElement Name = "str_replace_editor"`

      Name of the tool.

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

    - `IReadOnlyList<AllowedCaller> AllowedCallers`

      - `Direct("direct")`

      - `CodeExecution20250825("code_execution_20250825")`

      - `CodeExecution20260120("code_execution_20260120")`

      - `CodeExecution20260521("code_execution_20260521")`

    - `CacheControlEphemeral? CacheControl`

      Create a cache control breakpoint at this content block.

    - `bool DeferLoading`

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

    - `IReadOnlyList<IReadOnlyDictionary<string, JsonElement>> InputExamples`

    - `bool Strict`

      When true, guarantees schema validation on tool names and inputs

  - `class ToolTextEditor20250429`

    - `JsonElement Type = "text_editor_20250429"`

    - `JsonElement Name = "str_replace_based_edit_tool"`

      Name of the tool.

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

    - `IReadOnlyList<AllowedCaller> AllowedCallers`

      - `Direct("direct")`

      - `CodeExecution20250825("code_execution_20250825")`

      - `CodeExecution20260120("code_execution_20260120")`

      - `CodeExecution20260521("code_execution_20260521")`

    - `CacheControlEphemeral? CacheControl`

      Create a cache control breakpoint at this content block.

    - `bool DeferLoading`

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

    - `IReadOnlyList<IReadOnlyDictionary<string, JsonElement>> InputExamples`

    - `bool Strict`

      When true, guarantees schema validation on tool names and inputs

  - `class ToolTextEditor20250728`

    - `JsonElement Type = "text_editor_20250728"`

    - `JsonElement Name = "str_replace_based_edit_tool"`

      Name of the tool.

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

    - `IReadOnlyList<AllowedCaller> AllowedCallers`

      - `Direct("direct")`

      - `CodeExecution20250825("code_execution_20250825")`

      - `CodeExecution20260120("code_execution_20260120")`

      - `CodeExecution20260521("code_execution_20260521")`

    - `CacheControlEphemeral? CacheControl`

      Create a cache control breakpoint at this content block.

    - `bool DeferLoading`

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

    - `IReadOnlyList<IReadOnlyDictionary<string, JsonElement>> InputExamples`

    - `long? MaxCharacters`

      Maximum number of characters to display when viewing a file. If not specified, defaults to displaying the full file.

      minimum: 1

    - `bool Strict`

      When true, guarantees schema validation on tool names and inputs

  - `class WebSearchTool20250305`

    - `JsonElement Type = "web_search_20250305"`

    - `JsonElement Name = "web_search"`

      Name of the tool.

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

    - `IReadOnlyList<AllowedCaller> AllowedCallers`

      - `Direct("direct")`

      - `CodeExecution20250825("code_execution_20250825")`

      - `CodeExecution20260120("code_execution_20260120")`

      - `CodeExecution20260521("code_execution_20260521")`

    - `IReadOnlyList<string>? AllowedDomains`

      If provided, only these domains will be included in results. Cannot be used alongside `blocked_domains`.

    - `IReadOnlyList<string>? BlockedDomains`

      If provided, these domains will never appear in results. Cannot be used alongside `allowed_domains`.

    - `CacheControlEphemeral? CacheControl`

      Create a cache control breakpoint at this content block.

    - `bool DeferLoading`

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

    - `long? MaxUses`

      Maximum number of times the tool can be used in the API request.

      minimum: 1

    - `bool Strict`

      When true, guarantees schema validation on tool names and inputs

    - `UserLocation? UserLocation`

      Parameters for the user's location. Used to provide more relevant search results.

      - `JsonElement Type = "approximate"`

      - `string? City`

        The city of the user.

        minLength: 1, maxLength: 255

      - `string? Country`

        The two letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the user.

        minLength: 2, maxLength: 2

      - `string? Region`

        The region of the user.

        minLength: 1, maxLength: 255

      - `string? Timezone`

        The [IANA timezone](https://nodatime.org/TimeZones) of the user.

        minLength: 1, maxLength: 255

  - `class WebFetchTool20250910`

    - `JsonElement Type = "web_fetch_20250910"`

    - `JsonElement Name = "web_fetch"`

      Name of the tool.

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

    - `IReadOnlyList<AllowedCaller> AllowedCallers`

      - `Direct("direct")`

      - `CodeExecution20250825("code_execution_20250825")`

      - `CodeExecution20260120("code_execution_20260120")`

      - `CodeExecution20260521("code_execution_20260521")`

    - `IReadOnlyList<string>? AllowedDomains`

      List of domains to allow fetching from

    - `IReadOnlyList<string>? BlockedDomains`

      List of domains to block fetching from

    - `CacheControlEphemeral? CacheControl`

      Create a cache control breakpoint at this content block.

    - `CitationsConfigParam? Citations`

      Citations configuration for fetched documents. Citations are disabled by default.

      - `bool Enabled`

    - `bool DeferLoading`

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

    - `long? MaxContentTokens`

      Maximum number of tokens used by including web page text content in the context. The limit is approximate and does not apply to binary content such as PDFs.

      minimum: 1

    - `long? MaxUses`

      Maximum number of times the tool can be used in the API request.

      minimum: 1

    - `bool Strict`

      When true, guarantees schema validation on tool names and inputs

    - `WebFetchUrlSources? UrlSources`

      Which sources contribute to the set of URLs the tool may fetch. Omitted means every source.

      - `ClientToolResults ClientToolResults`

        Which client tools' results contribute fetchable URLs: "all", "none", or an only or except list of client tool names from tools[].

        - `class WebFetchUrlSourceAll`

          The `url_sources` variant under which a source contributes in
          full: every result of the tool filter's source, or all user input.

          - `JsonElement Type = "all"`

        - `class WebFetchUrlSourceNone`

          The `url_sources` variant under which a source contributes nothing:
          no result of the tool filter's source, or no user input.

          - `JsonElement Type = "none"`

        - `class WebFetchUrlSourceOnly`

          The tool filter variant under which only the named tools' results
          contribute.

          - `JsonElement Type = "only"`

          - `required IReadOnlyList<WebFetchUrlSourceToolReference> Tools`

            - `JsonElement Type = "tool_reference"`

            - `required string Name`

        - `class WebFetchUrlSourceExcept`

          The tool filter variant under which every result but the named
          tools' contributes.

          - `JsonElement Type = "except"`

          - `required IReadOnlyList<WebFetchUrlSourceToolReference> Tools`

            - `JsonElement Type = "tool_reference"`

            - `required string Name`

      - `ServerToolResults ServerToolResults`

        Which server tools' results contribute fetchable URLs: "all", "none", or an only or except list of server tool names from tools[]; only web_search and web_fetch results ever contribute.

        - `class WebFetchUrlSourceAll`

          The `url_sources` variant under which a source contributes in
          full: every result of the tool filter's source, or all user input.

        - `class WebFetchUrlSourceNone`

          The `url_sources` variant under which a source contributes nothing:
          no result of the tool filter's source, or no user input.

        - `class WebFetchUrlSourceOnly`

          The tool filter variant under which only the named tools' results
          contribute.

        - `class WebFetchUrlSourceExcept`

          The tool filter variant under which every result but the named
          tools' contributes.

      - `UserInput UserInput`

        Whether URLs in user messages are fetchable: "all" or "none".

        - `class WebFetchUrlSourceAll`

          The `url_sources` variant under which a source contributes in
          full: every result of the tool filter's source, or all user input.

        - `class WebFetchUrlSourceNone`

          The `url_sources` variant under which a source contributes nothing:
          no result of the tool filter's source, or no user input.

  - `class WebSearchTool20260209`

    - `JsonElement Type = "web_search_20260209"`

    - `JsonElement Name = "web_search"`

      Name of the tool.

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

    - `IReadOnlyList<AllowedCaller> AllowedCallers`

      - `Direct("direct")`

      - `CodeExecution20250825("code_execution_20250825")`

      - `CodeExecution20260120("code_execution_20260120")`

      - `CodeExecution20260521("code_execution_20260521")`

    - `IReadOnlyList<string>? AllowedDomains`

      If provided, only these domains will be included in results. Cannot be used alongside `blocked_domains`.

    - `IReadOnlyList<string>? BlockedDomains`

      If provided, these domains will never appear in results. Cannot be used alongside `allowed_domains`.

    - `CacheControlEphemeral? CacheControl`

      Create a cache control breakpoint at this content block.

    - `bool DeferLoading`

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

    - `long? MaxUses`

      Maximum number of times the tool can be used in the API request.

      minimum: 1

    - `bool Strict`

      When true, guarantees schema validation on tool names and inputs

    - `UserLocation? UserLocation`

      Parameters for the user's location. Used to provide more relevant search results.

  - `class WebFetchTool20260209`

    - `JsonElement Type = "web_fetch_20260209"`

    - `JsonElement Name = "web_fetch"`

      Name of the tool.

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

    - `IReadOnlyList<AllowedCaller> AllowedCallers`

      - `Direct("direct")`

      - `CodeExecution20250825("code_execution_20250825")`

      - `CodeExecution20260120("code_execution_20260120")`

      - `CodeExecution20260521("code_execution_20260521")`

    - `IReadOnlyList<string>? AllowedDomains`

      List of domains to allow fetching from

    - `IReadOnlyList<string>? BlockedDomains`

      List of domains to block fetching from

    - `CacheControlEphemeral? CacheControl`

      Create a cache control breakpoint at this content block.

    - `CitationsConfigParam? Citations`

      Citations configuration for fetched documents. Citations are disabled by default.

    - `bool DeferLoading`

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

    - `long? MaxContentTokens`

      Maximum number of tokens used by including web page text content in the context. The limit is approximate and does not apply to binary content such as PDFs.

      minimum: 1

    - `long? MaxUses`

      Maximum number of times the tool can be used in the API request.

      minimum: 1

    - `bool Strict`

      When true, guarantees schema validation on tool names and inputs

    - `WebFetchUrlSources? UrlSources`

      Which sources contribute to the set of URLs the tool may fetch. Omitted means every source.

  - `class WebFetchTool20260309`

    Web fetch tool with use_cache parameter for bypassing cached content.

    - `JsonElement Type = "web_fetch_20260309"`

    - `JsonElement Name = "web_fetch"`

      Name of the tool.

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

    - `IReadOnlyList<AllowedCaller> AllowedCallers`

      - `Direct("direct")`

      - `CodeExecution20250825("code_execution_20250825")`

      - `CodeExecution20260120("code_execution_20260120")`

      - `CodeExecution20260521("code_execution_20260521")`

    - `IReadOnlyList<string>? AllowedDomains`

      List of domains to allow fetching from

    - `IReadOnlyList<string>? BlockedDomains`

      List of domains to block fetching from

    - `CacheControlEphemeral? CacheControl`

      Create a cache control breakpoint at this content block.

    - `CitationsConfigParam? Citations`

      Citations configuration for fetched documents. Citations are disabled by default.

    - `bool DeferLoading`

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

    - `long? MaxContentTokens`

      Maximum number of tokens used by including web page text content in the context. The limit is approximate and does not apply to binary content such as PDFs.

      minimum: 1

    - `long? MaxUses`

      Maximum number of times the tool can be used in the API request.

      minimum: 1

    - `bool Strict`

      When true, guarantees schema validation on tool names and inputs

    - `WebFetchUrlSources? UrlSources`

      Which sources contribute to the set of URLs the tool may fetch. Omitted means every source.

    - `bool UseCache`

      Whether to use cached content. Set to false to bypass the cache and fetch fresh content. Only set to false when the user explicitly requests fresh content or when fetching rapidly-changing sources.

  - `class WebSearchTool20260318`

    - `JsonElement Type = "web_search_20260318"`

    - `JsonElement Name = "web_search"`

      Name of the tool.

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

    - `IReadOnlyList<AllowedCaller> AllowedCallers`

      - `Direct("direct")`

      - `CodeExecution20250825("code_execution_20250825")`

      - `CodeExecution20260120("code_execution_20260120")`

      - `CodeExecution20260521("code_execution_20260521")`

    - `IReadOnlyList<string>? AllowedDomains`

      If provided, only these domains will be included in results. Cannot be used alongside `blocked_domains`.

    - `IReadOnlyList<string>? BlockedDomains`

      If provided, these domains will never appear in results. Cannot be used alongside `allowed_domains`.

    - `CacheControlEphemeral? CacheControl`

      Create a cache control breakpoint at this content block.

    - `bool DeferLoading`

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

    - `long? MaxUses`

      Maximum number of times the tool can be used in the API request.

      minimum: 1

    - `ResponseInclusion ResponseInclusion`

      How this tool's result blocks appear in the API response when the result was consumed by a completed code_execution call in the same turn. 'full' returns the complete content (default). 'excluded' drops the nested server_tool_use and result block pair entirely. Results from direct calls, or from code_execution calls that paused before completing, are always returned in full so they can be sent back on the next turn.

      - `Full("full")`

      - `Excluded("excluded")`

    - `bool Strict`

      When true, guarantees schema validation on tool names and inputs

    - `UserLocation? UserLocation`

      Parameters for the user's location. Used to provide more relevant search results.

  - `class WebFetchTool20260318`

    - `JsonElement Type = "web_fetch_20260318"`

    - `JsonElement Name = "web_fetch"`

      Name of the tool.

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

    - `IReadOnlyList<AllowedCaller> AllowedCallers`

      - `Direct("direct")`

      - `CodeExecution20250825("code_execution_20250825")`

      - `CodeExecution20260120("code_execution_20260120")`

      - `CodeExecution20260521("code_execution_20260521")`

    - `IReadOnlyList<string>? AllowedDomains`

      List of domains to allow fetching from

    - `IReadOnlyList<string>? BlockedDomains`

      List of domains to block fetching from

    - `CacheControlEphemeral? CacheControl`

      Create a cache control breakpoint at this content block.

    - `CitationsConfigParam? Citations`

      Citations configuration for fetched documents. Citations are disabled by default.

    - `bool DeferLoading`

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

    - `long? MaxContentTokens`

      Maximum number of tokens used by including web page text content in the context. The limit is approximate and does not apply to binary content such as PDFs.

      minimum: 1

    - `long? MaxUses`

      Maximum number of times the tool can be used in the API request.

      minimum: 1

    - `ResponseInclusion ResponseInclusion`

      How this tool's result blocks appear in the API response when the result was consumed by a completed code_execution call in the same turn. 'full' returns the complete content (default). 'excluded' drops the nested server_tool_use and result block pair entirely. Results from direct calls, or from code_execution calls that paused before completing, are always returned in full so they can be sent back on the next turn.

      - `Full("full")`

      - `Excluded("excluded")`

    - `bool Strict`

      When true, guarantees schema validation on tool names and inputs

    - `WebFetchUrlSources? UrlSources`

      Which sources contribute to the set of URLs the tool may fetch. Omitted means every source.

    - `bool UseCache`

      Whether to use cached content. Set to false to bypass the cache and fetch fresh content. Only set to false when the user explicitly requests fresh content or when fetching rapidly-changing sources.

  - `class ToolSearchToolBm25_20251119`

    - `required Type Type`

      - `ToolSearchToolBm25_20251119("tool_search_tool_bm25_20251119")`

      - `ToolSearchToolBm25("tool_search_tool_bm25")`

    - `JsonElement Name = "tool_search_tool_bm25"`

      Name of the tool.

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

    - `IReadOnlyList<AllowedCaller> AllowedCallers`

      - `Direct("direct")`

      - `CodeExecution20250825("code_execution_20250825")`

      - `CodeExecution20260120("code_execution_20260120")`

      - `CodeExecution20260521("code_execution_20260521")`

    - `CacheControlEphemeral? CacheControl`

      Create a cache control breakpoint at this content block.

    - `bool DeferLoading`

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

    - `bool Strict`

      When true, guarantees schema validation on tool names and inputs

  - `class ToolSearchToolRegex20251119`

    - `required Type Type`

      - `ToolSearchToolRegex20251119("tool_search_tool_regex_20251119")`

      - `ToolSearchToolRegex("tool_search_tool_regex")`

    - `JsonElement Name = "tool_search_tool_regex"`

      Name of the tool.

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

    - `IReadOnlyList<AllowedCaller> AllowedCallers`

      - `Direct("direct")`

      - `CodeExecution20250825("code_execution_20250825")`

      - `CodeExecution20260120("code_execution_20260120")`

      - `CodeExecution20260521("code_execution_20260521")`

    - `CacheControlEphemeral? CacheControl`

      Create a cache control breakpoint at this content block.

    - `bool DeferLoading`

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

    - `bool Strict`

      When true, guarantees schema validation on tool names and inputs

### Tool Use Block

- `class ToolUseBlock`

  - `JsonElement Type = "tool_use"`

  - `required string ID`

    pattern: ^[a-zA-Z0-9_-]+$

  - `required Caller Caller`

    - `class DirectCaller`

      Tool invocation directly from the model.

      - `JsonElement Type = "direct"`

    - `class ServerToolCaller`

      Tool invocation generated by a server-side tool.

      - `JsonElement Type = "code_execution_20250825"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

    - `class ServerToolCaller20260120`

      - `JsonElement Type = "code_execution_20260120"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

  - `required IReadOnlyDictionary<string, JsonElement> Input`

  - `required string Name`

    minLength: 1

  - `string? ToolsetName`

    For a toolset member tool_use, the toolset family.

    minLength: 1, maxLength: 64, pattern: ^[a-zA-Z0-9_-]+$

### Tool Use Block Param

- `class ToolUseBlockParam`

  - `JsonElement Type = "tool_use"`

  - `required string ID`

    pattern: ^[a-zA-Z0-9_-]+$

  - `required IReadOnlyDictionary<string, JsonElement> Input`

  - `required string Name`

    minLength: 1, maxLength: 200

  - `CacheControlEphemeral? CacheControl`

    Create a cache control breakpoint at this content block.

    - `JsonElement Type = "ephemeral"`

    - `Ttl Ttl`

      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`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching?sdk_languages=csharp) for details.

      - `Ttl5m("5m")`

      - `Ttl1h("1h")`

  - `Caller Caller`

    - `class DirectCaller`

      Tool invocation directly from the model.

      - `JsonElement Type = "direct"`

    - `class ServerToolCaller`

      Tool invocation generated by a server-side tool.

      - `JsonElement Type = "code_execution_20250825"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

    - `class ServerToolCaller20260120`

      - `JsonElement Type = "code_execution_20260120"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

  - `string? ToolsetName`

    For a toolset member tool_use, the toolset family this member belongs to.

    minLength: 1, maxLength: 64, pattern: ^[a-zA-Z0-9_-]+$

### Tool Use Caller

- `class ToolUseCaller: union`

  Which party invoked the tool call: the model directly, or a server tool on its behalf.

  - `class DirectCaller`

    Tool invocation directly from the model.

    - `JsonElement Type = "direct"`

  - `class ServerToolCaller`

    Tool invocation generated by a server-side tool.

    - `JsonElement Type = "code_execution_20250825"`

    - `required string ToolID`

      pattern: ^srvtoolu_[a-zA-Z0-9_]+$

  - `class ServerToolCaller20260120`

    - `JsonElement Type = "code_execution_20260120"`

    - `required string ToolID`

      pattern: ^srvtoolu_[a-zA-Z0-9_]+$

### Toolset Tool Use Block

- `class ToolsetToolUseBlock: union`

  - `class BrowserToolUseBlock: union`

    - `class BrowserNavigateToolUseBlock`

      - `JsonElement Type = "tool_use"`

      - `required string ID`

        pattern: ^[a-zA-Z0-9_-]+$

      - `required ToolUseCaller Caller`

        Which party invoked the tool call: the model directly, or a server tool on its behalf.

        - `class DirectCaller`

          Tool invocation directly from the model.

          - `JsonElement Type = "direct"`

        - `class ServerToolCaller`

          Tool invocation generated by a server-side tool.

          - `JsonElement Type = "code_execution_20250825"`

          - `required string ToolID`

            pattern: ^srvtoolu_[a-zA-Z0-9_]+$

        - `class ServerToolCaller20260120`

          - `JsonElement Type = "code_execution_20260120"`

          - `required string ToolID`

            pattern: ^srvtoolu_[a-zA-Z0-9_]+$

      - `required BrowserNavigateInput Input`

        Navigate to a URL, or go back/forward/reload in history. The protocol may be
        omitted (defaults to https://).

        - `required string Url`

          The URL to navigate to, or "back" / "forward" / "reload" for history navigation.

        - `string? TabID`

          Tab to act on. Defaults to the active tab when omitted.

      - `JsonElement Name = "navigate"`

      - `JsonElement ToolsetName = "browser"`

    - `class BrowserListTabsToolUseBlock`

      - `JsonElement Type = "tool_use"`

      - `required string ID`

        pattern: ^[a-zA-Z0-9_-]+$

      - `required ToolUseCaller Caller`

        Which party invoked the tool call: the model directly, or a server tool on its behalf.

      - `required BrowserListTabsInput Input`

        List all open tabs with each tab's tab_id, title, and URL.

      - `JsonElement Name = "list_tabs"`

      - `JsonElement ToolsetName = "browser"`

    - `class BrowserNewTabToolUseBlock`

      - `JsonElement Type = "tool_use"`

      - `required string ID`

        pattern: ^[a-zA-Z0-9_-]+$

      - `required ToolUseCaller Caller`

        Which party invoked the tool call: the model directly, or a server tool on its behalf.

      - `required BrowserNewTabInput Input`

        Open a new empty tab and return its tab_id.

      - `JsonElement Name = "new_tab"`

      - `JsonElement ToolsetName = "browser"`

    - `class BrowserSwitchTabToolUseBlock`

      - `JsonElement Type = "tool_use"`

      - `required string ID`

        pattern: ^[a-zA-Z0-9_-]+$

      - `required ToolUseCaller Caller`

        Which party invoked the tool call: the model directly, or a server tool on its behalf.

      - `required BrowserSwitchTabInput Input`

        Make the tab with the given tab_id the active tab — the tab that actions without
        a tab_id apply to.

        - `required string TabID`

          The tab to switch to.

      - `JsonElement Name = "switch_tab"`

      - `JsonElement ToolsetName = "browser"`

    - `class BrowserCloseTabToolUseBlock`

      - `JsonElement Type = "tool_use"`

      - `required string ID`

        pattern: ^[a-zA-Z0-9_-]+$

      - `required ToolUseCaller Caller`

        Which party invoked the tool call: the model directly, or a server tool on its behalf.

      - `required BrowserCloseTabInput Input`

        Close the tab with the given tab_id.

        - `required string TabID`

          The tab to close.

      - `JsonElement Name = "close_tab"`

      - `JsonElement ToolsetName = "browser"`

    - `class BrowserReadPageToolUseBlock`

      - `JsonElement Type = "tool_use"`

      - `required string ID`

        pattern: ^[a-zA-Z0-9_-]+$

      - `required ToolUseCaller Caller`

        Which party invoked the tool call: the model directly, or a server tool on its behalf.

      - `required BrowserReadPageInput Input`

        Return a structured accessibility tree of the page (or the subtree rooted at
        `ref`), with element references like [ref_7] that can be used as targets on later
        actions. Output is capped at 50,000 characters — narrow with `ref` or a smaller
        `depth` when exceeded.

        - `long? Depth`

          Maximum tree depth. Default 15.

          minimum: 1

        - `BrowserReadPageFilter? Filter`

          Which elements to include. Omitted: every visible element. "interactive": interactive elements only. "all": additionally includes off-viewport elements.

          - `All("all")`

          - `Interactive("interactive")`

        - `string? Ref`

          Element reference to read a subtree from. Omit to read from the page root.

        - `string? TabID`

          Tab to act on. Defaults to the active tab when omitted.

      - `JsonElement Name = "read_page"`

      - `JsonElement ToolsetName = "browser"`

    - `class BrowserGetPageTextToolUseBlock`

      - `JsonElement Type = "tool_use"`

      - `required string ID`

        pattern: ^[a-zA-Z0-9_-]+$

      - `required ToolUseCaller Caller`

        Which party invoked the tool call: the model directly, or a server tool on its behalf.

      - `required BrowserGetPageTextInput Input`

        Return the page's visible text content as plain text, prioritizing article
        content. Suited to articles, documentation, and other text-heavy pages.

        - `string? TabID`

          Tab to act on. Defaults to the active tab when omitted.

      - `JsonElement Name = "get_page_text"`

      - `JsonElement ToolsetName = "browser"`

    - `class BrowserReadConsoleToolUseBlock`

      - `JsonElement Type = "tool_use"`

      - `required string ID`

        pattern: ^[a-zA-Z0-9_-]+$

      - `required ToolUseCaller Caller`

        Which party invoked the tool call: the model directly, or a server tool on its behalf.

      - `required BrowserReadConsoleInput Input`

        Return console output (log entries, errors, warnings) accumulated since the
        driver attached to the tab and since the last read, one line per entry. An empty
        result does not mean no traffic for a tab that predates attach.

        - `string? TabID`

          Tab to act on. Defaults to the active tab when omitted.

      - `JsonElement Name = "read_console"`

      - `JsonElement ToolsetName = "browser"`

    - `class BrowserReadNetworkToolUseBlock`

      - `JsonElement Type = "tool_use"`

      - `required string ID`

        pattern: ^[a-zA-Z0-9_-]+$

      - `required ToolUseCaller Caller`

        Which party invoked the tool call: the model directly, or a server tool on its behalf.

      - `required BrowserReadNetworkInput Input`

        Return the network requests (method, URL, status, MIME type, timing) recorded
        since the driver attached to the tab and since the last read, one line per entry.
        An empty result does not mean no traffic for a tab that predates attach.

        - `string? TabID`

          Tab to act on. Defaults to the active tab when omitted.

      - `JsonElement Name = "read_network"`

      - `JsonElement ToolsetName = "browser"`

    - `class BrowserFindToolUseBlock`

      - `JsonElement Type = "tool_use"`

      - `required string ID`

        pattern: ^[a-zA-Z0-9_-]+$

      - `required ToolUseCaller Caller`

        Which party invoked the tool call: the model directly, or a server tool on its behalf.

      - `required BrowserFindInput Input`

        Find elements matching a natural-language description (e.g. "search bar", "add to
        cart button") and return up to 20 matches with element references.

        - `required string Query`

          Natural-language description of the element(s) to find.

        - `string? TabID`

          Tab to act on. Defaults to the active tab when omitted.

      - `JsonElement Name = "find"`

      - `JsonElement ToolsetName = "browser"`

    - `class BrowserFormInputToolUseBlock`

      - `JsonElement Type = "tool_use"`

      - `required string ID`

        pattern: ^[a-zA-Z0-9_-]+$

      - `required ToolUseCaller Caller`

        Which party invoked the tool call: the model directly, or a server tool on its behalf.

      - `required BrowserFormInputInput Input`

        Set the value of a form element (input, textarea, select, checkbox). Use a
        boolean for checkboxes, an option value or text for selects.

        - `required BrowserRefTarget Target`

          An element on the page, identified by a reference from a prior `read_page` or
          `find` result. References are scoped to the tab that produced them and become
          stale after navigation or a major re-render.

          - `JsonElement Type = "ref"`

          - `required string Ref`

            An element reference (e.g. "ref_7") returned by a prior `read_page` or `find` result.

        - `required BrowserFormInputValue Value`

          The value to set.

          - `string`

          - `double`

          - `bool`

        - `string? TabID`

          Tab to act on. Defaults to the active tab when omitted.

      - `JsonElement Name = "form_input"`

      - `JsonElement ToolsetName = "browser"`

    - `class BrowserFileUploadToolUseBlock`

      - `JsonElement Type = "tool_use"`

      - `required string ID`

        pattern: ^[a-zA-Z0-9_-]+$

      - `required ToolUseCaller Caller`

        Which party invoked the tool call: the model directly, or a server tool on its behalf.

      - `required BrowserFileUploadInput Input`

        Set the value of a file-input element to one or more files. The target must be an
        element reference; at least one of paths or document_ids is required.

        - `required BrowserRefTarget Target`

          An element on the page, identified by a reference from a prior `read_page` or
          `find` result. References are scoped to the tab that produced them and become
          stale after navigation or a major re-render.

        - `IReadOnlyList<string>? DocumentIds`

          References to files the harness has staged, for deployments where the browser executor cannot read the caller's filesystem.

          minItems: 1

        - `IReadOnlyList<string>? Paths`

          File paths on the browser executor's filesystem.

          minItems: 1

        - `string? TabID`

          Tab to act on. Defaults to the active tab when omitted.

      - `JsonElement Name = "file_upload"`

      - `JsonElement ToolsetName = "browser"`

    - `class BrowserScrollToToolUseBlock`

      - `JsonElement Type = "tool_use"`

      - `required string ID`

        pattern: ^[a-zA-Z0-9_-]+$

      - `required ToolUseCaller Caller`

        Which party invoked the tool call: the model directly, or a server tool on its behalf.

      - `required BrowserScrollToInput Input`

        Scroll an element into view.

        - `required BrowserRefTarget Target`

          An element on the page, identified by a reference from a prior `read_page` or
          `find` result. References are scoped to the tab that produced them and become
          stale after navigation or a major re-render.

        - `string? TabID`

          Tab to act on. Defaults to the active tab when omitted.

      - `JsonElement Name = "scroll_to"`

      - `JsonElement ToolsetName = "browser"`

    - `class BrowserScreenshotToolUseBlock`

      - `JsonElement Type = "tool_use"`

      - `required string ID`

        pattern: ^[a-zA-Z0-9_-]+$

      - `required ToolUseCaller Caller`

        Which party invoked the tool call: the model directly, or a server tool on its behalf.

      - `required BrowserScreenshotInput Input`

        Capture the current browser viewport.

        - `string? TabID`

          Tab to act on. Defaults to the active tab when omitted.

      - `JsonElement Name = "screenshot"`

      - `JsonElement ToolsetName = "browser"`

    - `class BrowserZoomToolUseBlock`

      - `JsonElement Type = "tool_use"`

      - `required string ID`

        pattern: ^[a-zA-Z0-9_-]+$

      - `required ToolUseCaller Caller`

        Which party invoked the tool call: the model directly, or a server tool on its behalf.

      - `required BrowserZoomInput Input`

        Return a cropped screenshot of the given viewport region, scaled up for closer
        inspection — useful for small icons, buttons, or text. Coordinates are in the
        same viewport-pixel space as a full screenshot.

        - `required IReadOnlyList<long> Region`

          [x0, y0, x1, y1] in viewport pixels.

          minItems: 4, maxItems: 4

        - `string? TabID`

          Tab to act on. Defaults to the active tab when omitted.

      - `JsonElement Name = "zoom"`

      - `JsonElement ToolsetName = "browser"`

    - `class BrowserLeftClickToolUseBlock`

      - `JsonElement Type = "tool_use"`

      - `required string ID`

        pattern: ^[a-zA-Z0-9_-]+$

      - `required ToolUseCaller Caller`

        Which party invoked the tool call: the model directly, or a server tool on its behalf.

      - `required BrowserLeftClickInput Input`

        Left-click at a viewport coordinate or on an element by reference.

        - `required BrowserClickTarget Target`

          Where to act: either a viewport coordinate or an element reference.

          - `class BrowserCoordinateTarget`

            A point in the browser viewport, in viewport pixels (the same frame as a
            full-viewport screenshot).

            - `JsonElement Type = "coordinate"`

            - `required long X`

              Pixels from the left edge of the viewport.

              minimum: 0

            - `required long Y`

              Pixels from the top edge of the viewport.

              minimum: 0

          - `class BrowserRefTarget`

            An element on the page, identified by a reference from a prior `read_page` or
            `find` result. References are scoped to the tab that produced them and become
            stale after navigation or a major re-render.

        - `string? Modifiers`

          Optional modifier key chord to hold for the duration of this action (e.g. "shift", "ctrl+shift", "cmd+alt").

        - `string? TabID`

          Tab to act on. Defaults to the active tab when omitted.

      - `JsonElement Name = "left_click"`

      - `JsonElement ToolsetName = "browser"`

    - `class BrowserRightClickToolUseBlock`

      - `JsonElement Type = "tool_use"`

      - `required string ID`

        pattern: ^[a-zA-Z0-9_-]+$

      - `required ToolUseCaller Caller`

        Which party invoked the tool call: the model directly, or a server tool on its behalf.

      - `required BrowserRightClickInput Input`

        Right-click at a viewport coordinate or on an element by reference.

        - `required BrowserClickTarget Target`

          Where to act: either a viewport coordinate or an element reference.

        - `string? Modifiers`

          Optional modifier key chord to hold for the duration of this action (e.g. "shift", "ctrl+shift", "cmd+alt").

        - `string? TabID`

          Tab to act on. Defaults to the active tab when omitted.

      - `JsonElement Name = "right_click"`

      - `JsonElement ToolsetName = "browser"`

    - `class BrowserMiddleClickToolUseBlock`

      - `JsonElement Type = "tool_use"`

      - `required string ID`

        pattern: ^[a-zA-Z0-9_-]+$

      - `required ToolUseCaller Caller`

        Which party invoked the tool call: the model directly, or a server tool on its behalf.

      - `required BrowserMiddleClickInput Input`

        Middle-click at a viewport coordinate or on an element by reference.

        - `required BrowserClickTarget Target`

          Where to act: either a viewport coordinate or an element reference.

        - `string? Modifiers`

          Optional modifier key chord to hold for the duration of this action (e.g. "shift", "ctrl+shift", "cmd+alt").

        - `string? TabID`

          Tab to act on. Defaults to the active tab when omitted.

      - `JsonElement Name = "middle_click"`

      - `JsonElement ToolsetName = "browser"`

    - `class BrowserDoubleClickToolUseBlock`

      - `JsonElement Type = "tool_use"`

      - `required string ID`

        pattern: ^[a-zA-Z0-9_-]+$

      - `required ToolUseCaller Caller`

        Which party invoked the tool call: the model directly, or a server tool on its behalf.

      - `required BrowserDoubleClickInput Input`

        Double left-click at a viewport coordinate or on an element by reference.

        - `required BrowserClickTarget Target`

          Where to act: either a viewport coordinate or an element reference.

        - `string? Modifiers`

          Optional modifier key chord to hold for the duration of this action (e.g. "shift", "ctrl+shift", "cmd+alt").

        - `string? TabID`

          Tab to act on. Defaults to the active tab when omitted.

      - `JsonElement Name = "double_click"`

      - `JsonElement ToolsetName = "browser"`

    - `class BrowserTripleClickToolUseBlock`

      - `JsonElement Type = "tool_use"`

      - `required string ID`

        pattern: ^[a-zA-Z0-9_-]+$

      - `required ToolUseCaller Caller`

        Which party invoked the tool call: the model directly, or a server tool on its behalf.

      - `required BrowserTripleClickInput Input`

        Triple left-click at a viewport coordinate or on an element by reference
        (typically selects a line or paragraph).

        - `required BrowserClickTarget Target`

          Where to act: either a viewport coordinate or an element reference.

        - `string? Modifiers`

          Optional modifier key chord to hold for the duration of this action (e.g. "shift", "ctrl+shift", "cmd+alt").

        - `string? TabID`

          Tab to act on. Defaults to the active tab when omitted.

      - `JsonElement Name = "triple_click"`

      - `JsonElement ToolsetName = "browser"`

    - `class BrowserHoverToolUseBlock`

      - `JsonElement Type = "tool_use"`

      - `required string ID`

        pattern: ^[a-zA-Z0-9_-]+$

      - `required ToolUseCaller Caller`

        Which party invoked the tool call: the model directly, or a server tool on its behalf.

      - `required BrowserHoverInput Input`

        Move the cursor to a coordinate or element without clicking.

        - `required BrowserClickTarget Target`

          Where to act: either a viewport coordinate or an element reference.

        - `string? TabID`

          Tab to act on. Defaults to the active tab when omitted.

      - `JsonElement Name = "hover"`

      - `JsonElement ToolsetName = "browser"`

    - `class BrowserLeftClickDragToolUseBlock`

      - `JsonElement Type = "tool_use"`

      - `required string ID`

        pattern: ^[a-zA-Z0-9_-]+$

      - `required ToolUseCaller Caller`

        Which party invoked the tool call: the model directly, or a server tool on its behalf.

      - `required BrowserLeftClickDragInput Input`

        Press at `from`, drag to `target`, release. Both must be coordinate targets.

        - `required BrowserCoordinateTarget From`

          A point in the browser viewport, in viewport pixels (the same frame as a
          full-viewport screenshot).

        - `required BrowserCoordinateTarget Target`

          A point in the browser viewport, in viewport pixels (the same frame as a
          full-viewport screenshot).

        - `string? TabID`

          Tab to act on. Defaults to the active tab when omitted.

      - `JsonElement Name = "left_click_drag"`

      - `JsonElement ToolsetName = "browser"`

    - `class BrowserLeftMouseDownToolUseBlock`

      - `JsonElement Type = "tool_use"`

      - `required string ID`

        pattern: ^[a-zA-Z0-9_-]+$

      - `required ToolUseCaller Caller`

        Which party invoked the tool call: the model directly, or a server tool on its behalf.

      - `required BrowserLeftMouseDownInput Input`

        Press and hold the left mouse button at a viewport coordinate. Pair with
        left_mouse_up to perform a custom drag.

        - `required BrowserCoordinateTarget Target`

          A point in the browser viewport, in viewport pixels (the same frame as a
          full-viewport screenshot).

        - `string? TabID`

          Tab to act on. Defaults to the active tab when omitted.

      - `JsonElement Name = "left_mouse_down"`

      - `JsonElement ToolsetName = "browser"`

    - `class BrowserLeftMouseUpToolUseBlock`

      - `JsonElement Type = "tool_use"`

      - `required string ID`

        pattern: ^[a-zA-Z0-9_-]+$

      - `required ToolUseCaller Caller`

        Which party invoked the tool call: the model directly, or a server tool on its behalf.

      - `required BrowserLeftMouseUpInput Input`

        Release the left mouse button at a viewport coordinate.

        - `required BrowserCoordinateTarget Target`

          A point in the browser viewport, in viewport pixels (the same frame as a
          full-viewport screenshot).

        - `string? TabID`

          Tab to act on. Defaults to the active tab when omitted.

      - `JsonElement Name = "left_mouse_up"`

      - `JsonElement ToolsetName = "browser"`

    - `class BrowserMouseMoveToolUseBlock`

      - `JsonElement Type = "tool_use"`

      - `required string ID`

        pattern: ^[a-zA-Z0-9_-]+$

      - `required ToolUseCaller Caller`

        Which party invoked the tool call: the model directly, or a server tool on its behalf.

      - `required BrowserMouseMoveInput Input`

        Move the pointer to a viewport coordinate without clicking.

        - `required BrowserCoordinateTarget Target`

          A point in the browser viewport, in viewport pixels (the same frame as a
          full-viewport screenshot).

        - `string? TabID`

          Tab to act on. Defaults to the active tab when omitted.

      - `JsonElement Name = "mouse_move"`

      - `JsonElement ToolsetName = "browser"`

    - `class BrowserScrollToolUseBlock`

      - `JsonElement Type = "tool_use"`

      - `required string ID`

        pattern: ^[a-zA-Z0-9_-]+$

      - `required ToolUseCaller Caller`

        Which party invoked the tool call: the model directly, or a server tool on its behalf.

      - `required BrowserScrollInput Input`

        Scroll at a viewport position. `target` must be a coordinate target.

        - `required BrowserScrollDirection ScrollDirection`

          - `Up("up")`

          - `Down("down")`

          - `Left("left")`

          - `Right("right")`

        - `required BrowserCoordinateTarget Target`

          A point in the browser viewport, in viewport pixels (the same frame as a
          full-viewport screenshot).

        - `long? ScrollAmount`

          Scroll-wheel notches (1–10). Default 3.

          minimum: 1, maximum: 10

        - `string? TabID`

          Tab to act on. Defaults to the active tab when omitted.

      - `JsonElement Name = "scroll"`

      - `JsonElement ToolsetName = "browser"`

    - `class BrowserTypeToolUseBlock`

      - `JsonElement Type = "tool_use"`

      - `required string ID`

        pattern: ^[a-zA-Z0-9_-]+$

      - `required ToolUseCaller Caller`

        Which party invoked the tool call: the model directly, or a server tool on its behalf.

      - `required BrowserTypeInput Input`

        Type a literal string at the current focus.

        - `required string Text`

          The text to type.

        - `string? TabID`

          Tab to act on. Defaults to the active tab when omitted.

      - `JsonElement Name = "type"`

      - `JsonElement ToolsetName = "browser"`

    - `class BrowserKeyToolUseBlock`

      - `JsonElement Type = "tool_use"`

      - `required string ID`

        pattern: ^[a-zA-Z0-9_-]+$

      - `required ToolUseCaller Caller`

        Which party invoked the tool call: the model directly, or a server tool on its behalf.

      - `required BrowserKeyInput Input`

        Press a key or key chord. Use "+" to combine modifiers with a key (e.g. "ctrl+a",
        "cmd+shift+p") and space to sequence presses (e.g. "Backspace Backspace Delete").
        Common names like "Return", "Tab", "Escape", "BackSpace" are supported.

        - `required string Text`

          The key, chord, or space-separated sequence to press.

        - `long? Repeat`

          Number of times to repeat. Default 1.

          minimum: 1, maximum: 100

        - `string? TabID`

          Tab to act on. Defaults to the active tab when omitted.

      - `JsonElement Name = "key"`

      - `JsonElement ToolsetName = "browser"`

    - `class BrowserHoldKeyToolUseBlock`

      - `JsonElement Type = "tool_use"`

      - `required string ID`

        pattern: ^[a-zA-Z0-9_-]+$

      - `required ToolUseCaller Caller`

        Which party invoked the tool call: the model directly, or a server tool on its behalf.

      - `required BrowserHoldKeyInput Input`

        Hold a key or key chord down for a duration, then release it. Uses the same key
        names and "+" chord syntax as the key action.

        - `required double Duration`

          Seconds to hold the key down (maximum 30).

          minimum: 0, maximum: 30

        - `required string Text`

          The key or chord to hold.

        - `string? TabID`

          Tab to act on. Defaults to the active tab when omitted.

      - `JsonElement Name = "hold_key"`

      - `JsonElement ToolsetName = "browser"`

    - `class BrowserWaitToolUseBlock`

      - `JsonElement Type = "tool_use"`

      - `required string ID`

        pattern: ^[a-zA-Z0-9_-]+$

      - `required ToolUseCaller Caller`

        Which party invoked the tool call: the model directly, or a server tool on its behalf.

      - `required BrowserWaitInput Input`

        Pause for the given duration.

        - `required double Duration`

          Seconds to wait (maximum 30).

          minimum: 0, maximum: 30

        - `string? TabID`

          Tab to act on. Defaults to the active tab when omitted.

      - `JsonElement Name = "wait"`

      - `JsonElement ToolsetName = "browser"`

    - `class BrowserJavascriptExecToolUseBlock`

      - `JsonElement Type = "tool_use"`

      - `required string ID`

        pattern: ^[a-zA-Z0-9_-]+$

      - `required ToolUseCaller Caller`

        Which party invoked the tool call: the model directly, or a server tool on its behalf.

      - `required BrowserJavascriptExecInput Input`

        Execute JavaScript in the page context and return the value of the last
        expression. The code runs with access to the DOM, `window`, and page variables.
        Write the expression you want evaluated — do NOT use `return`.

        - `required string Text`

          JavaScript to execute in the page context.

        - `string? TabID`

          Tab to act on. Defaults to the active tab when omitted.

      - `JsonElement Name = "javascript_exec"`

      - `JsonElement ToolsetName = "browser"`

  - `class ComputerToolUseBlock: union`

    - `class ComputerKeyToolUseBlock`

      - `JsonElement Type = "tool_use"`

      - `required string ID`

        pattern: ^[a-zA-Z0-9_-]+$

      - `required ToolUseCaller Caller`

        Which party invoked the tool call: the model directly, or a server tool on its behalf.

      - `required ComputerKeyInput Input`

        Press a key or key-combination on the keyboard. Use "+" to combine modifiers with
        a key (e.g. "ctrl+s", "alt+Tab", "ctrl+shift+Escape"). Key names are
        case-insensitive; common names like "Return", "Tab", "Escape", "Up", "Down",
        "Left", "Right", "Home", "End", "Page_Up", "Page_Down", "Delete", "BackSpace" are
        supported.

        - `required string Text`

          The key or key-combination to press.

        - `long? Repeat`

          Number of times to repeat the key press. Default is 1.

          minimum: 1, maximum: 100

      - `JsonElement Name = "key"`

      - `JsonElement ToolsetName = "computer"`

    - `class ComputerHoldKeyToolUseBlock`

      - `JsonElement Type = "tool_use"`

      - `required string ID`

        pattern: ^[a-zA-Z0-9_-]+$

      - `required ToolUseCaller Caller`

        Which party invoked the tool call: the model directly, or a server tool on its behalf.

      - `required ComputerHoldKeyInput Input`

        Hold down a key or key-combination for a specified duration. Uses the same key
        syntax as `key`.

        - `required long Duration`

          Duration to hold the key, in seconds.

          maximum: 300

        - `required string Text`

          The key or key-combination to hold.

      - `JsonElement Name = "hold_key"`

      - `JsonElement ToolsetName = "computer"`

    - `class ComputerTypeToolUseBlock`

      - `JsonElement Type = "tool_use"`

      - `required string ID`

        pattern: ^[a-zA-Z0-9_-]+$

      - `required ToolUseCaller Caller`

        Which party invoked the tool call: the model directly, or a server tool on its behalf.

      - `required ComputerTypeInput Input`

        Type a string of text on the keyboard.

        - `required string Text`

          The text to type.

      - `JsonElement Name = "type"`

      - `JsonElement ToolsetName = "computer"`

    - `class ComputerCursorPositionToolUseBlock`

      - `JsonElement Type = "tool_use"`

      - `required string ID`

        pattern: ^[a-zA-Z0-9_-]+$

      - `required ToolUseCaller Caller`

        Which party invoked the tool call: the model directly, or a server tool on its behalf.

      - `required ComputerCursorPositionInput Input`

        Get the current (x, y) pixel coordinate of the cursor.

      - `JsonElement Name = "cursor_position"`

      - `JsonElement ToolsetName = "computer"`

    - `class ComputerMouseMoveToolUseBlock`

      - `JsonElement Type = "tool_use"`

      - `required string ID`

        pattern: ^[a-zA-Z0-9_-]+$

      - `required ToolUseCaller Caller`

        Which party invoked the tool call: the model directly, or a server tool on its behalf.

      - `required ComputerMouseMoveInput Input`

        Move the cursor to a specified (x, y) pixel coordinate. Use this ONLY to hover
        without clicking; otherwise use a click action directly.

        - `required IReadOnlyList<long> Coordinate`

          (x, y): x pixels from the left edge, y pixels from the top edge.

          minItems: 2, maxItems: 2

      - `JsonElement Name = "mouse_move"`

      - `JsonElement ToolsetName = "computer"`

    - `class ComputerLeftMouseDownToolUseBlock`

      - `JsonElement Type = "tool_use"`

      - `required string ID`

        pattern: ^[a-zA-Z0-9_-]+$

      - `required ToolUseCaller Caller`

        Which party invoked the tool call: the model directly, or a server tool on its behalf.

      - `required ComputerLeftMouseDownInput Input`

        Press and hold the left mouse button at the current cursor position.

      - `JsonElement Name = "left_mouse_down"`

      - `JsonElement ToolsetName = "computer"`

    - `class ComputerLeftMouseUpToolUseBlock`

      - `JsonElement Type = "tool_use"`

      - `required string ID`

        pattern: ^[a-zA-Z0-9_-]+$

      - `required ToolUseCaller Caller`

        Which party invoked the tool call: the model directly, or a server tool on its behalf.

      - `required ComputerLeftMouseUpInput Input`

        Release the left mouse button.

      - `JsonElement Name = "left_mouse_up"`

      - `JsonElement ToolsetName = "computer"`

    - `class ComputerLeftClickToolUseBlock`

      - `JsonElement Type = "tool_use"`

      - `required string ID`

        pattern: ^[a-zA-Z0-9_-]+$

      - `required ToolUseCaller Caller`

        Which party invoked the tool call: the model directly, or a server tool on its behalf.

      - `required ComputerLeftClickInput Input`

        Click the left mouse button at the specified (x, y) pixel coordinate, or the
        current cursor position if `coordinate` is omitted.

        - `IReadOnlyList<long>? Coordinate`

          (x, y): x pixels from the left edge, y pixels from the top edge.

          minItems: 2, maxItems: 2

        - `string? Text`

          Optional key combination to hold down during this action (e.g. "ctrl", "shift", "ctrl+shift").

      - `JsonElement Name = "left_click"`

      - `JsonElement ToolsetName = "computer"`

    - `class ComputerLeftClickDragToolUseBlock`

      - `JsonElement Type = "tool_use"`

      - `required string ID`

        pattern: ^[a-zA-Z0-9_-]+$

      - `required ToolUseCaller Caller`

        Which party invoked the tool call: the model directly, or a server tool on its behalf.

      - `required ComputerLeftClickDragInput Input`

        Click and drag the cursor from `start_coordinate` to `coordinate`.

        - `required IReadOnlyList<long> Coordinate`

          (x, y): x pixels from the left edge, y pixels from the top edge.

          minItems: 2, maxItems: 2

        - `required IReadOnlyList<long> StartCoordinate`

          (x, y): x pixels from the left edge, y pixels from the top edge.

          minItems: 2, maxItems: 2

        - `string? Text`

          Optional key combination to hold down during this action (e.g. "ctrl", "shift", "ctrl+shift").

      - `JsonElement Name = "left_click_drag"`

      - `JsonElement ToolsetName = "computer"`

    - `class ComputerRightClickToolUseBlock`

      - `JsonElement Type = "tool_use"`

      - `required string ID`

        pattern: ^[a-zA-Z0-9_-]+$

      - `required ToolUseCaller Caller`

        Which party invoked the tool call: the model directly, or a server tool on its behalf.

      - `required ComputerRightClickInput Input`

        Click the right mouse button at the specified (x, y) pixel coordinate, or the
        current cursor position if `coordinate` is omitted.

        - `IReadOnlyList<long>? Coordinate`

          (x, y): x pixels from the left edge, y pixels from the top edge.

          minItems: 2, maxItems: 2

        - `string? Text`

          Optional key combination to hold down during this action (e.g. "ctrl", "shift", "ctrl+shift").

      - `JsonElement Name = "right_click"`

      - `JsonElement ToolsetName = "computer"`

    - `class ComputerMiddleClickToolUseBlock`

      - `JsonElement Type = "tool_use"`

      - `required string ID`

        pattern: ^[a-zA-Z0-9_-]+$

      - `required ToolUseCaller Caller`

        Which party invoked the tool call: the model directly, or a server tool on its behalf.

      - `required ComputerMiddleClickInput Input`

        Click the middle mouse button at the specified (x, y) pixel coordinate, or the
        current cursor position if `coordinate` is omitted.

        - `IReadOnlyList<long>? Coordinate`

          (x, y): x pixels from the left edge, y pixels from the top edge.

          minItems: 2, maxItems: 2

        - `string? Text`

          Optional key combination to hold down during this action (e.g. "ctrl", "shift", "ctrl+shift").

      - `JsonElement Name = "middle_click"`

      - `JsonElement ToolsetName = "computer"`

    - `class ComputerDoubleClickToolUseBlock`

      - `JsonElement Type = "tool_use"`

      - `required string ID`

        pattern: ^[a-zA-Z0-9_-]+$

      - `required ToolUseCaller Caller`

        Which party invoked the tool call: the model directly, or a server tool on its behalf.

      - `required ComputerDoubleClickInput Input`

        Double-click the left mouse button at the specified (x, y) pixel coordinate, or
        the current cursor position if `coordinate` is omitted.

        - `IReadOnlyList<long>? Coordinate`

          (x, y): x pixels from the left edge, y pixels from the top edge.

          minItems: 2, maxItems: 2

        - `string? Text`

          Optional key combination to hold down during this action (e.g. "ctrl", "shift", "ctrl+shift").

      - `JsonElement Name = "double_click"`

      - `JsonElement ToolsetName = "computer"`

    - `class ComputerTripleClickToolUseBlock`

      - `JsonElement Type = "tool_use"`

      - `required string ID`

        pattern: ^[a-zA-Z0-9_-]+$

      - `required ToolUseCaller Caller`

        Which party invoked the tool call: the model directly, or a server tool on its behalf.

      - `required ComputerTripleClickInput Input`

        Triple-click the left mouse button at the specified (x, y) pixel coordinate, or
        the current cursor position if `coordinate` is omitted.

        - `IReadOnlyList<long>? Coordinate`

          (x, y): x pixels from the left edge, y pixels from the top edge.

          minItems: 2, maxItems: 2

        - `string? Text`

          Optional key combination to hold down during this action (e.g. "ctrl", "shift", "ctrl+shift").

      - `JsonElement Name = "triple_click"`

      - `JsonElement ToolsetName = "computer"`

    - `class ComputerScrollToolUseBlock`

      - `JsonElement Type = "tool_use"`

      - `required string ID`

        pattern: ^[a-zA-Z0-9_-]+$

      - `required ToolUseCaller Caller`

        Which party invoked the tool call: the model directly, or a server tool on its behalf.

      - `required ComputerScrollInput Input`

        Scroll the screen at the specified (x, y) pixel coordinate, or the current cursor
        position if `coordinate` is omitted. Do NOT use PageUp/PageDown to scroll.

        - `required long ScrollAmount`

          Number of 'clicks' of the scroll wheel.

        - `required ComputerScrollDirection ScrollDirection`

          - `Up("up")`

          - `Down("down")`

          - `Left("left")`

          - `Right("right")`

        - `IReadOnlyList<long>? Coordinate`

          (x, y): x pixels from the left edge, y pixels from the top edge.

          minItems: 2, maxItems: 2

        - `string? Text`

          Optional key combination to hold down during this action (e.g. "ctrl", "shift", "ctrl+shift").

      - `JsonElement Name = "scroll"`

      - `JsonElement ToolsetName = "computer"`

    - `class ComputerWaitToolUseBlock`

      - `JsonElement Type = "tool_use"`

      - `required string ID`

        pattern: ^[a-zA-Z0-9_-]+$

      - `required ToolUseCaller Caller`

        Which party invoked the tool call: the model directly, or a server tool on its behalf.

      - `required ComputerWaitInput Input`

        Wait for a specified duration.

        - `required long Duration`

          Duration to wait, in seconds.

          maximum: 300

      - `JsonElement Name = "wait"`

      - `JsonElement ToolsetName = "computer"`

    - `class ComputerScreenshotToolUseBlock`

      - `JsonElement Type = "tool_use"`

      - `required string ID`

        pattern: ^[a-zA-Z0-9_-]+$

      - `required ToolUseCaller Caller`

        Which party invoked the tool call: the model directly, or a server tool on its behalf.

      - `required ComputerScreenshotInput Input`

        Take a screenshot of the screen.

      - `JsonElement Name = "screenshot"`

      - `JsonElement ToolsetName = "computer"`

    - `class ComputerZoomToolUseBlock`

      - `JsonElement Type = "tool_use"`

      - `required string ID`

        pattern: ^[a-zA-Z0-9_-]+$

      - `required ToolUseCaller Caller`

        Which party invoked the tool call: the model directly, or a server tool on its behalf.

      - `required ComputerZoomInput Input`

        Take a screenshot of a rectangular region. Region coordinates are in the
        full-screenshot space (not physical display pixels). The crop is scaled up to
        fill the image budget so fine details become legible.

        - `required IReadOnlyList<long> Region`

          (x0, y0, x1, y1): The region to capture.

          minItems: 4, maxItems: 4

      - `JsonElement Name = "zoom"`

      - `JsonElement ToolsetName = "computer"`

  - `class ToolUseBlock`

    - `JsonElement Type = "tool_use"`

    - `required string ID`

      pattern: ^[a-zA-Z0-9_-]+$

    - `required Caller Caller`

      - `class DirectCaller`

        Tool invocation directly from the model.

      - `class ServerToolCaller`

        Tool invocation generated by a server-side tool.

      - `class ServerToolCaller20260120`

    - `required IReadOnlyDictionary<string, JsonElement> Input`

    - `required string Name`

      minLength: 1

    - `string? ToolsetName`

      For a toolset member tool_use, the toolset family.

      minLength: 1, maxLength: 64, pattern: ^[a-zA-Z0-9_-]+$

### URL Image Source

- `class UrlImageSource`

  - `JsonElement Type = "url"`

  - `required string Url`

### URL PDF Source

- `class UrlPdfSource`

  - `JsonElement Type = "url"`

  - `required string Url`

### Usage

- `class Usage`

  - `required CacheCreation? CacheCreation`

    Breakdown of cached tokens by TTL

    - `required long Ephemeral1hInputTokens`

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

      minimum: 0

    - `required long Ephemeral5mInputTokens`

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

      minimum: 0

  - `required long? CacheCreationInputTokens`

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

    minimum: 0

  - `required long? CacheReadInputTokens`

    The number of input tokens read from the cache.

    minimum: 0

  - `required string? InferenceGeo`

    The geographic region where inference was performed for this request.

  - `required long InputTokens`

    The number of input tokens which were used.

    minimum: 0

  - `required long OutputTokens`

    The number of output tokens which were used.

    minimum: 0

  - `required OutputTokensDetails? OutputTokensDetails`

    Breakdown of output tokens by category.

    `output_tokens` remains the inclusive, authoritative total used for billing.
    This object provides a read-only decomposition for observability — for example,
    how many of the billed output tokens were spent on internal reasoning that may
    have been summarized before being returned to you.

    - `required long ThinkingTokens`

      Number of output tokens the model generated as internal reasoning, including
      the thinking-block delimiter tokens.

      Reflects the raw reasoning the model produced, not the (possibly shorter)
      summarized thinking text returned in the response body. Computed by
      re-tokenizing the raw reasoning text, so it may differ from the model's exact
      generation count by a small number of tokens. Always ≤ `output_tokens`;
      `output_tokens - thinking_tokens` approximates the non-reasoning output.

      minimum: 0

  - `required ServerToolUsage? ServerToolUse`

    The number of server tool requests.

    - `required long WebFetchRequests`

      The number of web fetch tool requests.

      minimum: 0

    - `required long WebSearchRequests`

      The number of web search tool requests.

      minimum: 0

  - `required ServiceTier? ServiceTier`

    If the request used the priority, standard, or batch tier.

    - `Standard("standard")`

    - `Priority("priority")`

    - `Batch("batch")`

  - `required Speed? Speed`

    The inference speed mode used for this request.

    - `Standard("standard")`

    - `Fast("fast")`

### User Location

- `class UserLocation`

  - `JsonElement Type = "approximate"`

  - `string? City`

    The city of the user.

    minLength: 1, maxLength: 255

  - `string? Country`

    The two letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the user.

    minLength: 2, maxLength: 2

  - `string? Region`

    The region of the user.

    minLength: 1, maxLength: 255

  - `string? Timezone`

    The [IANA timezone](https://nodatime.org/TimeZones) of the user.

    minLength: 1, maxLength: 255

### User Message Param

- `class UserMessageParam`

  - `required MessageContentParam Content`

    - `string`

    - `IReadOnlyList<ContentBlockParam>`

      - `class TextBlockParam`

        - `JsonElement Type = "text"`

        - `required string Text`

          minLength: 1

        - `CacheControlEphemeral? CacheControl`

          Create a cache control breakpoint at this content block.

          - `JsonElement Type = "ephemeral"`

          - `Ttl Ttl`

            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`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching?sdk_languages=csharp) for details.

            - `Ttl5m("5m")`

            - `Ttl1h("1h")`

        - `IReadOnlyList<TextCitationParam>? Citations`

          - `class CitationCharLocationParam`

            - `JsonElement Type = "char_location"`

            - `required string CitedText`

            - `required long DocumentIndex`

              minimum: 0

            - `required string? DocumentTitle`

              minLength: 1, maxLength: 500

            - `required long EndCharIndex`

            - `required long StartCharIndex`

              minimum: 0

          - `class CitationPageLocationParam`

            - `JsonElement Type = "page_location"`

            - `required string CitedText`

            - `required long DocumentIndex`

              minimum: 0

            - `required string? DocumentTitle`

              minLength: 1, maxLength: 500

            - `required long EndPageNumber`

            - `required long StartPageNumber`

              minimum: 1

          - `class CitationContentBlockLocationParam`

            - `JsonElement Type = "content_block_location"`

            - `required string CitedText`

              The full text of the cited block range, concatenated.

              Always equals the contents of `content[start_block_index:end_block_index]` joined together. The text block is the minimal citable unit; this field is never a substring of a single block. Not counted toward output tokens, and not counted toward input tokens when sent back in subsequent turns.

            - `required long DocumentIndex`

              minimum: 0

            - `required string? DocumentTitle`

              minLength: 1, maxLength: 500

            - `required long EndBlockIndex`

              Exclusive 0-based end index of the cited block range in the source's `content` array.

              Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`.

            - `required long StartBlockIndex`

              0-based index of the first cited block in the source's `content` array.

              minimum: 0

          - `class CitationWebSearchResultLocationParam`

            - `JsonElement Type = "web_search_result_location"`

            - `required string CitedText`

            - `required string EncryptedIndex`

            - `required string? Title`

              minLength: 1, maxLength: 512

            - `required string Url`

              minLength: 1

          - `class CitationSearchResultLocationParam`

            - `JsonElement Type = "search_result_location"`

            - `required string CitedText`

              The full text of the cited block range, concatenated.

              Always equals the contents of `content[start_block_index:end_block_index]` joined together. The text block is the minimal citable unit; this field is never a substring of a single block. Not counted toward output tokens, and not counted toward input tokens when sent back in subsequent turns.

            - `required long EndBlockIndex`

              Exclusive 0-based end index of the cited block range in the source's `content` array.

              Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`.

            - `required long SearchResultIndex`

              0-based index of the cited search result among all `search_result` content blocks in the request, in the order they appear across messages and tool results.

              Counted separately from `document_index`; server-side web search results are not included in this count.

              minimum: 0

            - `required string Source`

            - `required long StartBlockIndex`

              0-based index of the first cited block in the source's `content` array.

              minimum: 0

            - `required string? Title`

      - `class ImageBlockParam`

        - `JsonElement Type = "image"`

        - `required Source Source`

          - `class Base64ImageSource`

            - `JsonElement Type = "base64"`

            - `required string Data`

              format: byte

            - `required MediaType MediaType`

              - `ImageJpeg("image/jpeg")`

              - `ImagePng("image/png")`

              - `ImageGif("image/gif")`

              - `ImageWebP("image/webp")`

          - `class UrlImageSource`

            - `JsonElement Type = "url"`

            - `required string Url`

          - `class FileImageSource`

            - `JsonElement Type = "file"`

            - `required string FileID`

        - `CacheControlEphemeral? CacheControl`

          Create a cache control breakpoint at this content block.

        - `ImageTransformationsParam? Transformations`

          Configures the transformations the server applies to this image before the model observes it. Each key names a condition the server transforms images for; its value selects the transformation applied. Omitted keys keep their default behavior, and an empty object is equivalent to omitting the field.

          - `OversizedImage OversizedImage`

            What the server does when this image exceeds the model's maximum image size. `"downsize"` (the default) scales the image down to fit, which changes the dimensions the model observes without telling you. `"error"` instead rejects the request with a 400 error naming the image's dimensions and the largest dimensions that fit, so you can scale the image deliberately — your image is never silently scaled down.

            - `Downsize("downsize")`

            - `Error("error")`

      - `class DocumentBlockParam`

        - `JsonElement Type = "document"`

        - `required Source Source`

          - `class Base64PdfSource`

            - `JsonElement Type = "base64"`

            - `required string Data`

              format: byte

            - `JsonElement MediaType = "application/pdf"`

          - `class PlainTextSource`

            - `JsonElement Type = "text"`

            - `required string Data`

            - `JsonElement MediaType = "text/plain"`

          - `class ContentBlockSource`

            - `JsonElement Type = "content"`

            - `required Content Content`

              - `string`

              - `IReadOnlyList<ContentBlockSourceContent>`

                - `class TextBlockParam`

                - `class ImageBlockParam`

          - `class UrlPdfSource`

            - `JsonElement Type = "url"`

            - `required string Url`

          - `class FileDocumentSource`

            - `JsonElement Type = "file"`

            - `required string FileID`

        - `CacheControlEphemeral? CacheControl`

          Create a cache control breakpoint at this content block.

        - `CitationsConfigParam? Citations`

          - `bool Enabled`

        - `string? Context`

          minLength: 1

        - `string? Title`

          minLength: 1, maxLength: 500

      - `class SearchResultBlockParam`

        - `JsonElement Type = "search_result"`

        - `required IReadOnlyList<TextBlockParam> Content`

          - `JsonElement Type = "text"`

          - `required string Text`

            minLength: 1

          - `CacheControlEphemeral? CacheControl`

            Create a cache control breakpoint at this content block.

          - `IReadOnlyList<TextCitationParam>? Citations`

        - `required string Source`

        - `required string Title`

        - `CacheControlEphemeral? CacheControl`

          Create a cache control breakpoint at this content block.

        - `CitationsConfigParam Citations`

      - `class ThinkingBlockParam`

        - `JsonElement Type = "thinking"`

        - `required string Signature`

          The `signature` value of this thinking block, exactly as returned by the API in a previous response. Used to verify that the block was generated by Claude.

          Thinking blocks must be passed back unmodified and in their original order; a modified block results in a 400 `invalid_request_error`.

        - `required string Thinking`

          The `thinking` text of this block as returned by the API.

      - `class RedactedThinkingBlockParam`

        - `JsonElement Type = "redacted_thinking"`

        - `required string Data`

          The `data` value of this redacted thinking block, exactly as returned by the API in a previous response. Opaque and encrypted; pass it back unchanged.

      - `class ToolUseBlockParam`

        - `JsonElement Type = "tool_use"`

        - `required string ID`

          pattern: ^[a-zA-Z0-9_-]+$

        - `required IReadOnlyDictionary<string, JsonElement> Input`

        - `required string Name`

          minLength: 1, maxLength: 200

        - `CacheControlEphemeral? CacheControl`

          Create a cache control breakpoint at this content block.

        - `Caller Caller`

          - `class DirectCaller`

            Tool invocation directly from the model.

            - `JsonElement Type = "direct"`

          - `class ServerToolCaller`

            Tool invocation generated by a server-side tool.

            - `JsonElement Type = "code_execution_20250825"`

            - `required string ToolID`

              pattern: ^srvtoolu_[a-zA-Z0-9_]+$

          - `class ServerToolCaller20260120`

            - `JsonElement Type = "code_execution_20260120"`

            - `required string ToolID`

              pattern: ^srvtoolu_[a-zA-Z0-9_]+$

        - `string? ToolsetName`

          For a toolset member tool_use, the toolset family this member belongs to.

          minLength: 1, maxLength: 64, pattern: ^[a-zA-Z0-9_-]+$

      - `class ToolResultBlockParam`

        - `JsonElement Type = "tool_result"`

        - `required string ToolUseID`

          pattern: ^[a-zA-Z0-9_-]+$

        - `CacheControlEphemeral? CacheControl`

          Create a cache control breakpoint at this content block.

        - `Content Content`

          - `string`

          - `IReadOnlyList<Block>`

            - `class TextBlockParam`

            - `class ImageBlockParam`

            - `class SearchResultBlockParam`

            - `class DocumentBlockParam`

            - `class ToolReferenceBlockParam`

              Tool reference block that can be included in tool_result content.

              - `JsonElement Type = "tool_reference"`

              - `required string ToolName`

                minLength: 1, maxLength: 256, pattern: ^[a-zA-Z0-9_-]{1,256}$

              - `CacheControlEphemeral? CacheControl`

                Create a cache control breakpoint at this content block.

            - `class BrowserStateBlockParam`

              The caller's browser state after a browser toolset member call —
              the full inventory of open tabs, which tab is active, and any side
              effects (tabs opened, download state changes) the call produced.

              At most one per `tool_result`, only on a non-error result answering a
              browser toolset member `tool_use`. The server renders the
              model-visible text from it; the model never sees the raw fields.

              - `JsonElement Type = "browser_state"`

              - `required IReadOnlyList<BrowserStateTabEntry> Tabs`

                All tabs open in the browser after this call — the full inventory, not a delta. May be empty. Whenever non-empty, exactly one entry carries `active: true`.

                maxItems: 100

                - `required string TabID`

                  The caller-assigned identifier for this tab, unique within the inventory.

                  minLength: 1, maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

                - `required string Title`

                  The title of the page the tab is showing. May be empty.

                  maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

                - `required string Url`

                  The URL of the page the tab is showing. May be empty.

                  maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

                - `bool Active`

                  Whether this tab is the active tab after this call. Whenever `tabs` is non-empty, exactly one entry is marked `active: true`.

              - `CacheControlEphemeral? CacheControl`

                Create a cache control breakpoint at this content block.

              - `IReadOnlyList<BrowserStateChange>? StateChanges`

                Tabs opened and download state changes during this call. "Nothing to report" is expressed by omitting the field, never by an empty list.

                minItems: 1, maxItems: 200

                - `class BrowserStateChangeTabOpened`

                  A tab this call's execution opened that remains open at its end —
                  the creation delta of the `tabs` inventory, not an event log.

                  Carries only the `tab_id`; the tab's `title` and `url` live on its
                  `tabs` entry, which must include the same `tab_id`. A tab opened
                  during a failed call gets no deferred `tab_opened`; it simply appears
                  in the next result's `tabs` inventory.

                  - `JsonElement Type = "tab_opened"`

                  - `required string TabID`

                    The `tab_id` of the opened tab, present in `tabs`.

                    minLength: 1, maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

                - `class BrowserStateChangeDownloadStarted`

                  A file download that started during this call.

                  - `JsonElement Type = "download_started"`

                  - `required string DownloadID`

                    The caller-assigned identifier for this download, stable across the state changes reporting it.

                    minLength: 1, maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

                  - `required string Url`

                    The final post-redirect URL the download was served from.

                    maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

                - `class BrowserStateChangeDownloadCompleted`

                  A file download that finished during this call, reported with the
                  same `download_id` as its `download_started` — or without a prior
                  `download_started`, when the download finished during the call that
                  started it (at most one state change per `download_id` per result).

                  - `JsonElement Type = "download_completed"`

                  - `required string DownloadID`

                    The caller-assigned identifier for this download, stable across the state changes reporting it.

                    minLength: 1, maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

                  - `required string Url`

                    The final post-redirect URL the download was served from.

                    maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

                  - `string? Path`

                    Where the executor saved the file, on the executor's filesystem. Only included when another tool in the same environment can read the file at that path.

                    maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

                  - `long? SizeBytes`

                    The completed download's size.

                    minimum: 0

                - `class BrowserStateChangeDownloadFailed`

                  A file download that failed — or was cancelled — during this call.

                  - `JsonElement Type = "download_failed"`

                  - `required string DownloadID`

                    The caller-assigned identifier for this download, stable across the state changes reporting it.

                    minLength: 1, maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

                  - `required string Url`

                    The final post-redirect URL the download was served from.

                    maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

                  - `string? Error`

                    The failure or cancellation detail, when known.

                    maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

        - `bool IsError`

        - `string? ToolsetName`

          For a toolset member tool_result, the toolset family of the paired tool_use.

          minLength: 1, maxLength: 64, pattern: ^[a-zA-Z0-9_-]+$

      - `class ServerToolUseBlockParam`

        - `JsonElement Type = "server_tool_use"`

        - `required string ID`

          pattern: ^srvtoolu_[a-zA-Z0-9_]+$

        - `required IReadOnlyDictionary<string, JsonElement> Input`

        - `required Name Name`

          - `WebSearch("web_search")`

          - `WebFetch("web_fetch")`

          - `CodeExecution("code_execution")`

          - `BashCodeExecution("bash_code_execution")`

          - `TextEditorCodeExecution("text_editor_code_execution")`

          - `ToolSearchToolRegex("tool_search_tool_regex")`

          - `ToolSearchToolBm25("tool_search_tool_bm25")`

        - `CacheControlEphemeral? CacheControl`

          Create a cache control breakpoint at this content block.

        - `Caller Caller`

          - `class DirectCaller`

            Tool invocation directly from the model.

          - `class ServerToolCaller`

            Tool invocation generated by a server-side tool.

          - `class ServerToolCaller20260120`

      - `class WebSearchToolResultBlockParam`

        - `JsonElement Type = "web_search_tool_result"`

        - `required WebSearchToolResultBlockParamContent Content`

          - `IReadOnlyList<WebSearchResultBlockParam>`

            - `JsonElement Type = "web_search_result"`

            - `required string EncryptedContent`

            - `required string Title`

            - `required string Url`

            - `string? PageAge`

          - `class WebSearchToolRequestError`

            - `JsonElement Type = "web_search_tool_result_error"`

            - `required WebSearchToolResultErrorCode ErrorCode`

              - `InvalidToolInput("invalid_tool_input")`

              - `Unavailable("unavailable")`

              - `MaxUsesExceeded("max_uses_exceeded")`

              - `TooManyRequests("too_many_requests")`

              - `QueryTooLong("query_too_long")`

              - `RequestTooLarge("request_too_large")`

        - `required string ToolUseID`

          pattern: ^srvtoolu_[a-zA-Z0-9_]+$

        - `CacheControlEphemeral? CacheControl`

          Create a cache control breakpoint at this content block.

        - `Caller Caller`

          - `class DirectCaller`

            Tool invocation directly from the model.

          - `class ServerToolCaller`

            Tool invocation generated by a server-side tool.

          - `class ServerToolCaller20260120`

      - `class WebFetchToolResultBlockParam`

        - `JsonElement Type = "web_fetch_tool_result"`

        - `required Content Content`

          - `class WebFetchToolResultErrorBlockParam`

            - `JsonElement Type = "web_fetch_tool_result_error"`

            - `required WebFetchToolResultErrorCode ErrorCode`

              - `InvalidToolInput("invalid_tool_input")`

              - `UrlTooLong("url_too_long")`

              - `UrlNotAllowed("url_not_allowed")`

              - `UrlNotInPriorContext("url_not_in_prior_context")`

              - `UrlNotAccessible("url_not_accessible")`

              - `UnsupportedContentType("unsupported_content_type")`

              - `TooManyRequests("too_many_requests")`

              - `MaxUsesExceeded("max_uses_exceeded")`

              - `Unavailable("unavailable")`

              - `ContentTooLarge("content_too_large")`

          - `class WebFetchBlockParam`

            - `JsonElement Type = "web_fetch_result"`

            - `required DocumentBlockParam Content`

            - `required string Url`

              Fetched content URL

            - `string? RetrievedAt`

              ISO 8601 timestamp when the content was retrieved

        - `required string ToolUseID`

          pattern: ^srvtoolu_[a-zA-Z0-9_]+$

        - `CacheControlEphemeral? CacheControl`

          Create a cache control breakpoint at this content block.

        - `Caller Caller`

          - `class DirectCaller`

            Tool invocation directly from the model.

          - `class ServerToolCaller`

            Tool invocation generated by a server-side tool.

          - `class ServerToolCaller20260120`

      - `class CodeExecutionToolResultBlockParam`

        - `JsonElement Type = "code_execution_tool_result"`

        - `required CodeExecutionToolResultBlockParamContent Content`

          - `class CodeExecutionToolResultErrorParam`

            - `JsonElement Type = "code_execution_tool_result_error"`

            - `required CodeExecutionToolResultErrorCode ErrorCode`

              - `InvalidToolInput("invalid_tool_input")`

              - `Unavailable("unavailable")`

              - `TooManyRequests("too_many_requests")`

              - `ExecutionTimeExceeded("execution_time_exceeded")`

          - `class CodeExecutionResultBlockParam`

            - `JsonElement Type = "code_execution_result"`

            - `required IReadOnlyList<CodeExecutionOutputBlockParam> Content`

              - `JsonElement Type = "code_execution_output"`

              - `required string FileID`

            - `required long ReturnCode`

            - `required string Stderr`

            - `required string Stdout`

          - `class EncryptedCodeExecutionResultBlockParam`

            The output and exit code of Python code that Claude ran with the code execution tool, with standard output in encrypted form, sent back in a later request.

            - `JsonElement Type = "encrypted_code_execution_result"`

            - `required IReadOnlyList<CodeExecutionOutputBlockParam> Content`

              - `JsonElement Type = "code_execution_output"`

              - `required string FileID`

            - `required string EncryptedStdout`

            - `required long ReturnCode`

            - `required string Stderr`

        - `required string ToolUseID`

          pattern: ^srvtoolu_[a-zA-Z0-9_]+$

        - `CacheControlEphemeral? CacheControl`

          Create a cache control breakpoint at this content block.

      - `class BashCodeExecutionToolResultBlockParam`

        - `JsonElement Type = "bash_code_execution_tool_result"`

        - `required Content Content`

          - `class BashCodeExecutionToolResultErrorParam`

            - `JsonElement Type = "bash_code_execution_tool_result_error"`

            - `required BashCodeExecutionToolResultErrorCode ErrorCode`

              - `InvalidToolInput("invalid_tool_input")`

              - `Unavailable("unavailable")`

              - `TooManyRequests("too_many_requests")`

              - `ExecutionTimeExceeded("execution_time_exceeded")`

              - `OutputFileTooLarge("output_file_too_large")`

          - `class BashCodeExecutionResultBlockParam`

            - `JsonElement Type = "bash_code_execution_result"`

            - `required IReadOnlyList<BashCodeExecutionOutputBlockParam> Content`

              - `JsonElement Type = "bash_code_execution_output"`

              - `required string FileID`

            - `required long ReturnCode`

            - `required string Stderr`

            - `required string Stdout`

        - `required string ToolUseID`

          pattern: ^srvtoolu_[a-zA-Z0-9_]+$

        - `CacheControlEphemeral? CacheControl`

          Create a cache control breakpoint at this content block.

      - `class TextEditorCodeExecutionToolResultBlockParam`

        - `JsonElement Type = "text_editor_code_execution_tool_result"`

        - `required Content Content`

          - `class TextEditorCodeExecutionToolResultErrorParam`

            - `JsonElement Type = "text_editor_code_execution_tool_result_error"`

            - `required TextEditorCodeExecutionToolResultErrorCode ErrorCode`

              - `InvalidToolInput("invalid_tool_input")`

              - `Unavailable("unavailable")`

              - `TooManyRequests("too_many_requests")`

              - `ExecutionTimeExceeded("execution_time_exceeded")`

              - `FileNotFound("file_not_found")`

            - `string? ErrorMessage`

          - `class TextEditorCodeExecutionViewResultBlockParam`

            - `JsonElement Type = "text_editor_code_execution_view_result"`

            - `required string Content`

            - `required FileType FileType`

              - `Text("text")`

              - `Image("image")`

              - `Pdf("pdf")`

            - `long? NumLines`

            - `long? StartLine`

            - `long? TotalLines`

          - `class TextEditorCodeExecutionCreateResultBlockParam`

            - `JsonElement Type = "text_editor_code_execution_create_result"`

            - `required bool IsFileUpdate`

          - `class TextEditorCodeExecutionStrReplaceResultBlockParam`

            - `JsonElement Type = "text_editor_code_execution_str_replace_result"`

            - `IReadOnlyList<string>? Lines`

            - `long? NewLines`

            - `long? NewStart`

            - `long? OldLines`

            - `long? OldStart`

        - `required string ToolUseID`

          pattern: ^srvtoolu_[a-zA-Z0-9_]+$

        - `CacheControlEphemeral? CacheControl`

          Create a cache control breakpoint at this content block.

      - `class ToolSearchToolResultBlockParam`

        - `JsonElement Type = "tool_search_tool_result"`

        - `required Content Content`

          - `class ToolSearchToolResultErrorParam`

            - `JsonElement Type = "tool_search_tool_result_error"`

            - `required ToolSearchToolResultErrorCode ErrorCode`

              - `InvalidToolInput("invalid_tool_input")`

              - `Unavailable("unavailable")`

              - `TooManyRequests("too_many_requests")`

              - `ExecutionTimeExceeded("execution_time_exceeded")`

            - `string? ErrorMessage`

          - `class ToolSearchToolSearchResultBlockParam`

            - `JsonElement Type = "tool_search_tool_search_result"`

            - `required IReadOnlyList<ToolReferenceBlockParam> ToolReferences`

              - `JsonElement Type = "tool_reference"`

              - `required string ToolName`

                minLength: 1, maxLength: 256, pattern: ^[a-zA-Z0-9_-]{1,256}$

              - `CacheControlEphemeral? CacheControl`

                Create a cache control breakpoint at this content block.

        - `required string ToolUseID`

          pattern: ^srvtoolu_[a-zA-Z0-9_]+$

        - `CacheControlEphemeral? CacheControl`

          Create a cache control breakpoint at this content block.

      - `class ContainerUploadBlockParam`

        A content block that represents a file to be uploaded to the container
        Files uploaded via this block will be available in the container's input directory.

        - `JsonElement Type = "container_upload"`

        - `required string FileID`

        - `CacheControlEphemeral? CacheControl`

          Create a cache control breakpoint at this content block.

  - `JsonElement Role = "user"`

### Web Fetch Block

- `class WebFetchBlock`

  - `JsonElement Type = "web_fetch_result"`

  - `required DocumentBlock Content`

    - `JsonElement Type = "document"`

    - `required CitationsConfig? Citations`

      Citation configuration for the document

      - `required bool Enabled`

    - `required Source Source`

      - `class Base64PdfSource`

        - `JsonElement Type = "base64"`

        - `required string Data`

          format: byte

        - `JsonElement MediaType = "application/pdf"`

      - `class PlainTextSource`

        - `JsonElement Type = "text"`

        - `required string Data`

        - `JsonElement MediaType = "text/plain"`

    - `required string? Title`

      The title of the document

  - `required string? RetrievedAt`

    ISO 8601 timestamp when the content was retrieved

  - `required string Url`

    Fetched content URL

### Web Fetch Block Param

- `class WebFetchBlockParam`

  - `JsonElement Type = "web_fetch_result"`

  - `required DocumentBlockParam Content`

    - `JsonElement Type = "document"`

    - `required Source Source`

      - `class Base64PdfSource`

        - `JsonElement Type = "base64"`

        - `required string Data`

          format: byte

        - `JsonElement MediaType = "application/pdf"`

      - `class PlainTextSource`

        - `JsonElement Type = "text"`

        - `required string Data`

        - `JsonElement MediaType = "text/plain"`

      - `class ContentBlockSource`

        - `JsonElement Type = "content"`

        - `required Content Content`

          - `string`

          - `IReadOnlyList<ContentBlockSourceContent>`

            - `class TextBlockParam`

              - `JsonElement Type = "text"`

              - `required string Text`

                minLength: 1

              - `CacheControlEphemeral? CacheControl`

                Create a cache control breakpoint at this content block.

                - `JsonElement Type = "ephemeral"`

                - `Ttl Ttl`

                  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`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching?sdk_languages=csharp) for details.

                  - `Ttl5m("5m")`

                  - `Ttl1h("1h")`

              - `IReadOnlyList<TextCitationParam>? Citations`

                - `class CitationCharLocationParam`

                  - `JsonElement Type = "char_location"`

                  - `required string CitedText`

                  - `required long DocumentIndex`

                    minimum: 0

                  - `required string? DocumentTitle`

                    minLength: 1, maxLength: 500

                  - `required long EndCharIndex`

                  - `required long StartCharIndex`

                    minimum: 0

                - `class CitationPageLocationParam`

                  - `JsonElement Type = "page_location"`

                  - `required string CitedText`

                  - `required long DocumentIndex`

                    minimum: 0

                  - `required string? DocumentTitle`

                    minLength: 1, maxLength: 500

                  - `required long EndPageNumber`

                  - `required long StartPageNumber`

                    minimum: 1

                - `class CitationContentBlockLocationParam`

                  - `JsonElement Type = "content_block_location"`

                  - `required string CitedText`

                    The full text of the cited block range, concatenated.

                    Always equals the contents of `content[start_block_index:end_block_index]` joined together. The text block is the minimal citable unit; this field is never a substring of a single block. Not counted toward output tokens, and not counted toward input tokens when sent back in subsequent turns.

                  - `required long DocumentIndex`

                    minimum: 0

                  - `required string? DocumentTitle`

                    minLength: 1, maxLength: 500

                  - `required long EndBlockIndex`

                    Exclusive 0-based end index of the cited block range in the source's `content` array.

                    Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`.

                  - `required long StartBlockIndex`

                    0-based index of the first cited block in the source's `content` array.

                    minimum: 0

                - `class CitationWebSearchResultLocationParam`

                  - `JsonElement Type = "web_search_result_location"`

                  - `required string CitedText`

                  - `required string EncryptedIndex`

                  - `required string? Title`

                    minLength: 1, maxLength: 512

                  - `required string Url`

                    minLength: 1

                - `class CitationSearchResultLocationParam`

                  - `JsonElement Type = "search_result_location"`

                  - `required string CitedText`

                    The full text of the cited block range, concatenated.

                    Always equals the contents of `content[start_block_index:end_block_index]` joined together. The text block is the minimal citable unit; this field is never a substring of a single block. Not counted toward output tokens, and not counted toward input tokens when sent back in subsequent turns.

                  - `required long EndBlockIndex`

                    Exclusive 0-based end index of the cited block range in the source's `content` array.

                    Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`.

                  - `required long SearchResultIndex`

                    0-based index of the cited search result among all `search_result` content blocks in the request, in the order they appear across messages and tool results.

                    Counted separately from `document_index`; server-side web search results are not included in this count.

                    minimum: 0

                  - `required string Source`

                  - `required long StartBlockIndex`

                    0-based index of the first cited block in the source's `content` array.

                    minimum: 0

                  - `required string? Title`

            - `class ImageBlockParam`

              - `JsonElement Type = "image"`

              - `required Source Source`

                - `class Base64ImageSource`

                  - `JsonElement Type = "base64"`

                  - `required string Data`

                    format: byte

                  - `required MediaType MediaType`

                    - `ImageJpeg("image/jpeg")`

                    - `ImagePng("image/png")`

                    - `ImageGif("image/gif")`

                    - `ImageWebP("image/webp")`

                - `class UrlImageSource`

                  - `JsonElement Type = "url"`

                  - `required string Url`

                - `class FileImageSource`

                  - `JsonElement Type = "file"`

                  - `required string FileID`

              - `CacheControlEphemeral? CacheControl`

                Create a cache control breakpoint at this content block.

              - `ImageTransformationsParam? Transformations`

                Configures the transformations the server applies to this image before the model observes it. Each key names a condition the server transforms images for; its value selects the transformation applied. Omitted keys keep their default behavior, and an empty object is equivalent to omitting the field.

                - `OversizedImage OversizedImage`

                  What the server does when this image exceeds the model's maximum image size. `"downsize"` (the default) scales the image down to fit, which changes the dimensions the model observes without telling you. `"error"` instead rejects the request with a 400 error naming the image's dimensions and the largest dimensions that fit, so you can scale the image deliberately — your image is never silently scaled down.

                  - `Downsize("downsize")`

                  - `Error("error")`

      - `class UrlPdfSource`

        - `JsonElement Type = "url"`

        - `required string Url`

      - `class FileDocumentSource`

        - `JsonElement Type = "file"`

        - `required string FileID`

    - `CacheControlEphemeral? CacheControl`

      Create a cache control breakpoint at this content block.

    - `CitationsConfigParam? Citations`

      - `bool Enabled`

    - `string? Context`

      minLength: 1

    - `string? Title`

      minLength: 1, maxLength: 500

  - `required string Url`

    Fetched content URL

  - `string? RetrievedAt`

    ISO 8601 timestamp when the content was retrieved

### Web Fetch Tool 20250910

- `class WebFetchTool20250910`

  - `JsonElement Type = "web_fetch_20250910"`

  - `JsonElement Name = "web_fetch"`

    Name of the tool.

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

  - `IReadOnlyList<AllowedCaller> AllowedCallers`

    - `Direct("direct")`

    - `CodeExecution20250825("code_execution_20250825")`

    - `CodeExecution20260120("code_execution_20260120")`

    - `CodeExecution20260521("code_execution_20260521")`

  - `IReadOnlyList<string>? AllowedDomains`

    List of domains to allow fetching from

  - `IReadOnlyList<string>? BlockedDomains`

    List of domains to block fetching from

  - `CacheControlEphemeral? CacheControl`

    Create a cache control breakpoint at this content block.

    - `JsonElement Type = "ephemeral"`

    - `Ttl Ttl`

      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`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching?sdk_languages=csharp) for details.

      - `Ttl5m("5m")`

      - `Ttl1h("1h")`

  - `CitationsConfigParam? Citations`

    Citations configuration for fetched documents. Citations are disabled by default.

    - `bool Enabled`

  - `bool DeferLoading`

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

  - `long? MaxContentTokens`

    Maximum number of tokens used by including web page text content in the context. The limit is approximate and does not apply to binary content such as PDFs.

    minimum: 1

  - `long? MaxUses`

    Maximum number of times the tool can be used in the API request.

    minimum: 1

  - `bool Strict`

    When true, guarantees schema validation on tool names and inputs

  - `WebFetchUrlSources? UrlSources`

    Which sources contribute to the set of URLs the tool may fetch. Omitted means every source.

    - `ClientToolResults ClientToolResults`

      Which client tools' results contribute fetchable URLs: "all", "none", or an only or except list of client tool names from tools[].

      - `class WebFetchUrlSourceAll`

        The `url_sources` variant under which a source contributes in
        full: every result of the tool filter's source, or all user input.

        - `JsonElement Type = "all"`

      - `class WebFetchUrlSourceNone`

        The `url_sources` variant under which a source contributes nothing:
        no result of the tool filter's source, or no user input.

        - `JsonElement Type = "none"`

      - `class WebFetchUrlSourceOnly`

        The tool filter variant under which only the named tools' results
        contribute.

        - `JsonElement Type = "only"`

        - `required IReadOnlyList<WebFetchUrlSourceToolReference> Tools`

          - `JsonElement Type = "tool_reference"`

          - `required string Name`

      - `class WebFetchUrlSourceExcept`

        The tool filter variant under which every result but the named
        tools' contributes.

        - `JsonElement Type = "except"`

        - `required IReadOnlyList<WebFetchUrlSourceToolReference> Tools`

          - `JsonElement Type = "tool_reference"`

          - `required string Name`

    - `ServerToolResults ServerToolResults`

      Which server tools' results contribute fetchable URLs: "all", "none", or an only or except list of server tool names from tools[]; only web_search and web_fetch results ever contribute.

      - `class WebFetchUrlSourceAll`

        The `url_sources` variant under which a source contributes in
        full: every result of the tool filter's source, or all user input.

      - `class WebFetchUrlSourceNone`

        The `url_sources` variant under which a source contributes nothing:
        no result of the tool filter's source, or no user input.

      - `class WebFetchUrlSourceOnly`

        The tool filter variant under which only the named tools' results
        contribute.

      - `class WebFetchUrlSourceExcept`

        The tool filter variant under which every result but the named
        tools' contributes.

    - `UserInput UserInput`

      Whether URLs in user messages are fetchable: "all" or "none".

      - `class WebFetchUrlSourceAll`

        The `url_sources` variant under which a source contributes in
        full: every result of the tool filter's source, or all user input.

      - `class WebFetchUrlSourceNone`

        The `url_sources` variant under which a source contributes nothing:
        no result of the tool filter's source, or no user input.

### Web Fetch Tool 20260209

- `class WebFetchTool20260209`

  - `JsonElement Type = "web_fetch_20260209"`

  - `JsonElement Name = "web_fetch"`

    Name of the tool.

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

  - `IReadOnlyList<AllowedCaller> AllowedCallers`

    - `Direct("direct")`

    - `CodeExecution20250825("code_execution_20250825")`

    - `CodeExecution20260120("code_execution_20260120")`

    - `CodeExecution20260521("code_execution_20260521")`

  - `IReadOnlyList<string>? AllowedDomains`

    List of domains to allow fetching from

  - `IReadOnlyList<string>? BlockedDomains`

    List of domains to block fetching from

  - `CacheControlEphemeral? CacheControl`

    Create a cache control breakpoint at this content block.

    - `JsonElement Type = "ephemeral"`

    - `Ttl Ttl`

      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`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching?sdk_languages=csharp) for details.

      - `Ttl5m("5m")`

      - `Ttl1h("1h")`

  - `CitationsConfigParam? Citations`

    Citations configuration for fetched documents. Citations are disabled by default.

    - `bool Enabled`

  - `bool DeferLoading`

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

  - `long? MaxContentTokens`

    Maximum number of tokens used by including web page text content in the context. The limit is approximate and does not apply to binary content such as PDFs.

    minimum: 1

  - `long? MaxUses`

    Maximum number of times the tool can be used in the API request.

    minimum: 1

  - `bool Strict`

    When true, guarantees schema validation on tool names and inputs

  - `WebFetchUrlSources? UrlSources`

    Which sources contribute to the set of URLs the tool may fetch. Omitted means every source.

    - `ClientToolResults ClientToolResults`

      Which client tools' results contribute fetchable URLs: "all", "none", or an only or except list of client tool names from tools[].

      - `class WebFetchUrlSourceAll`

        The `url_sources` variant under which a source contributes in
        full: every result of the tool filter's source, or all user input.

        - `JsonElement Type = "all"`

      - `class WebFetchUrlSourceNone`

        The `url_sources` variant under which a source contributes nothing:
        no result of the tool filter's source, or no user input.

        - `JsonElement Type = "none"`

      - `class WebFetchUrlSourceOnly`

        The tool filter variant under which only the named tools' results
        contribute.

        - `JsonElement Type = "only"`

        - `required IReadOnlyList<WebFetchUrlSourceToolReference> Tools`

          - `JsonElement Type = "tool_reference"`

          - `required string Name`

      - `class WebFetchUrlSourceExcept`

        The tool filter variant under which every result but the named
        tools' contributes.

        - `JsonElement Type = "except"`

        - `required IReadOnlyList<WebFetchUrlSourceToolReference> Tools`

          - `JsonElement Type = "tool_reference"`

          - `required string Name`

    - `ServerToolResults ServerToolResults`

      Which server tools' results contribute fetchable URLs: "all", "none", or an only or except list of server tool names from tools[]; only web_search and web_fetch results ever contribute.

      - `class WebFetchUrlSourceAll`

        The `url_sources` variant under which a source contributes in
        full: every result of the tool filter's source, or all user input.

      - `class WebFetchUrlSourceNone`

        The `url_sources` variant under which a source contributes nothing:
        no result of the tool filter's source, or no user input.

      - `class WebFetchUrlSourceOnly`

        The tool filter variant under which only the named tools' results
        contribute.

      - `class WebFetchUrlSourceExcept`

        The tool filter variant under which every result but the named
        tools' contributes.

    - `UserInput UserInput`

      Whether URLs in user messages are fetchable: "all" or "none".

      - `class WebFetchUrlSourceAll`

        The `url_sources` variant under which a source contributes in
        full: every result of the tool filter's source, or all user input.

      - `class WebFetchUrlSourceNone`

        The `url_sources` variant under which a source contributes nothing:
        no result of the tool filter's source, or no user input.

### Web Fetch Tool 20260309

- `class WebFetchTool20260309`

  Web fetch tool with use_cache parameter for bypassing cached content.

  - `JsonElement Type = "web_fetch_20260309"`

  - `JsonElement Name = "web_fetch"`

    Name of the tool.

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

  - `IReadOnlyList<AllowedCaller> AllowedCallers`

    - `Direct("direct")`

    - `CodeExecution20250825("code_execution_20250825")`

    - `CodeExecution20260120("code_execution_20260120")`

    - `CodeExecution20260521("code_execution_20260521")`

  - `IReadOnlyList<string>? AllowedDomains`

    List of domains to allow fetching from

  - `IReadOnlyList<string>? BlockedDomains`

    List of domains to block fetching from

  - `CacheControlEphemeral? CacheControl`

    Create a cache control breakpoint at this content block.

    - `JsonElement Type = "ephemeral"`

    - `Ttl Ttl`

      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`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching?sdk_languages=csharp) for details.

      - `Ttl5m("5m")`

      - `Ttl1h("1h")`

  - `CitationsConfigParam? Citations`

    Citations configuration for fetched documents. Citations are disabled by default.

    - `bool Enabled`

  - `bool DeferLoading`

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

  - `long? MaxContentTokens`

    Maximum number of tokens used by including web page text content in the context. The limit is approximate and does not apply to binary content such as PDFs.

    minimum: 1

  - `long? MaxUses`

    Maximum number of times the tool can be used in the API request.

    minimum: 1

  - `bool Strict`

    When true, guarantees schema validation on tool names and inputs

  - `WebFetchUrlSources? UrlSources`

    Which sources contribute to the set of URLs the tool may fetch. Omitted means every source.

    - `ClientToolResults ClientToolResults`

      Which client tools' results contribute fetchable URLs: "all", "none", or an only or except list of client tool names from tools[].

      - `class WebFetchUrlSourceAll`

        The `url_sources` variant under which a source contributes in
        full: every result of the tool filter's source, or all user input.

        - `JsonElement Type = "all"`

      - `class WebFetchUrlSourceNone`

        The `url_sources` variant under which a source contributes nothing:
        no result of the tool filter's source, or no user input.

        - `JsonElement Type = "none"`

      - `class WebFetchUrlSourceOnly`

        The tool filter variant under which only the named tools' results
        contribute.

        - `JsonElement Type = "only"`

        - `required IReadOnlyList<WebFetchUrlSourceToolReference> Tools`

          - `JsonElement Type = "tool_reference"`

          - `required string Name`

      - `class WebFetchUrlSourceExcept`

        The tool filter variant under which every result but the named
        tools' contributes.

        - `JsonElement Type = "except"`

        - `required IReadOnlyList<WebFetchUrlSourceToolReference> Tools`

          - `JsonElement Type = "tool_reference"`

          - `required string Name`

    - `ServerToolResults ServerToolResults`

      Which server tools' results contribute fetchable URLs: "all", "none", or an only or except list of server tool names from tools[]; only web_search and web_fetch results ever contribute.

      - `class WebFetchUrlSourceAll`

        The `url_sources` variant under which a source contributes in
        full: every result of the tool filter's source, or all user input.

      - `class WebFetchUrlSourceNone`

        The `url_sources` variant under which a source contributes nothing:
        no result of the tool filter's source, or no user input.

      - `class WebFetchUrlSourceOnly`

        The tool filter variant under which only the named tools' results
        contribute.

      - `class WebFetchUrlSourceExcept`

        The tool filter variant under which every result but the named
        tools' contributes.

    - `UserInput UserInput`

      Whether URLs in user messages are fetchable: "all" or "none".

      - `class WebFetchUrlSourceAll`

        The `url_sources` variant under which a source contributes in
        full: every result of the tool filter's source, or all user input.

      - `class WebFetchUrlSourceNone`

        The `url_sources` variant under which a source contributes nothing:
        no result of the tool filter's source, or no user input.

  - `bool UseCache`

    Whether to use cached content. Set to false to bypass the cache and fetch fresh content. Only set to false when the user explicitly requests fresh content or when fetching rapidly-changing sources.

### Web Fetch Tool 20260318

- `class WebFetchTool20260318`

  - `JsonElement Type = "web_fetch_20260318"`

  - `JsonElement Name = "web_fetch"`

    Name of the tool.

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

  - `IReadOnlyList<AllowedCaller> AllowedCallers`

    - `Direct("direct")`

    - `CodeExecution20250825("code_execution_20250825")`

    - `CodeExecution20260120("code_execution_20260120")`

    - `CodeExecution20260521("code_execution_20260521")`

  - `IReadOnlyList<string>? AllowedDomains`

    List of domains to allow fetching from

  - `IReadOnlyList<string>? BlockedDomains`

    List of domains to block fetching from

  - `CacheControlEphemeral? CacheControl`

    Create a cache control breakpoint at this content block.

    - `JsonElement Type = "ephemeral"`

    - `Ttl Ttl`

      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`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching?sdk_languages=csharp) for details.

      - `Ttl5m("5m")`

      - `Ttl1h("1h")`

  - `CitationsConfigParam? Citations`

    Citations configuration for fetched documents. Citations are disabled by default.

    - `bool Enabled`

  - `bool DeferLoading`

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

  - `long? MaxContentTokens`

    Maximum number of tokens used by including web page text content in the context. The limit is approximate and does not apply to binary content such as PDFs.

    minimum: 1

  - `long? MaxUses`

    Maximum number of times the tool can be used in the API request.

    minimum: 1

  - `ResponseInclusion ResponseInclusion`

    How this tool's result blocks appear in the API response when the result was consumed by a completed code_execution call in the same turn. 'full' returns the complete content (default). 'excluded' drops the nested server_tool_use and result block pair entirely. Results from direct calls, or from code_execution calls that paused before completing, are always returned in full so they can be sent back on the next turn.

    - `Full("full")`

    - `Excluded("excluded")`

  - `bool Strict`

    When true, guarantees schema validation on tool names and inputs

  - `WebFetchUrlSources? UrlSources`

    Which sources contribute to the set of URLs the tool may fetch. Omitted means every source.

    - `ClientToolResults ClientToolResults`

      Which client tools' results contribute fetchable URLs: "all", "none", or an only or except list of client tool names from tools[].

      - `class WebFetchUrlSourceAll`

        The `url_sources` variant under which a source contributes in
        full: every result of the tool filter's source, or all user input.

        - `JsonElement Type = "all"`

      - `class WebFetchUrlSourceNone`

        The `url_sources` variant under which a source contributes nothing:
        no result of the tool filter's source, or no user input.

        - `JsonElement Type = "none"`

      - `class WebFetchUrlSourceOnly`

        The tool filter variant under which only the named tools' results
        contribute.

        - `JsonElement Type = "only"`

        - `required IReadOnlyList<WebFetchUrlSourceToolReference> Tools`

          - `JsonElement Type = "tool_reference"`

          - `required string Name`

      - `class WebFetchUrlSourceExcept`

        The tool filter variant under which every result but the named
        tools' contributes.

        - `JsonElement Type = "except"`

        - `required IReadOnlyList<WebFetchUrlSourceToolReference> Tools`

          - `JsonElement Type = "tool_reference"`

          - `required string Name`

    - `ServerToolResults ServerToolResults`

      Which server tools' results contribute fetchable URLs: "all", "none", or an only or except list of server tool names from tools[]; only web_search and web_fetch results ever contribute.

      - `class WebFetchUrlSourceAll`

        The `url_sources` variant under which a source contributes in
        full: every result of the tool filter's source, or all user input.

      - `class WebFetchUrlSourceNone`

        The `url_sources` variant under which a source contributes nothing:
        no result of the tool filter's source, or no user input.

      - `class WebFetchUrlSourceOnly`

        The tool filter variant under which only the named tools' results
        contribute.

      - `class WebFetchUrlSourceExcept`

        The tool filter variant under which every result but the named
        tools' contributes.

    - `UserInput UserInput`

      Whether URLs in user messages are fetchable: "all" or "none".

      - `class WebFetchUrlSourceAll`

        The `url_sources` variant under which a source contributes in
        full: every result of the tool filter's source, or all user input.

      - `class WebFetchUrlSourceNone`

        The `url_sources` variant under which a source contributes nothing:
        no result of the tool filter's source, or no user input.

  - `bool UseCache`

    Whether to use cached content. Set to false to bypass the cache and fetch fresh content. Only set to false when the user explicitly requests fresh content or when fetching rapidly-changing sources.

### Web Fetch Tool Result Block

- `class WebFetchToolResultBlock`

  - `JsonElement Type = "web_fetch_tool_result"`

  - `required Caller Caller`

    - `class DirectCaller`

      Tool invocation directly from the model.

      - `JsonElement Type = "direct"`

    - `class ServerToolCaller`

      Tool invocation generated by a server-side tool.

      - `JsonElement Type = "code_execution_20250825"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

    - `class ServerToolCaller20260120`

      - `JsonElement Type = "code_execution_20260120"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

  - `required Content Content`

    - `class WebFetchToolResultErrorBlock`

      - `JsonElement Type = "web_fetch_tool_result_error"`

      - `required WebFetchToolResultErrorCode ErrorCode`

        - `InvalidToolInput("invalid_tool_input")`

        - `UrlTooLong("url_too_long")`

        - `UrlNotAllowed("url_not_allowed")`

        - `UrlNotInPriorContext("url_not_in_prior_context")`

        - `UrlNotAccessible("url_not_accessible")`

        - `UnsupportedContentType("unsupported_content_type")`

        - `TooManyRequests("too_many_requests")`

        - `MaxUsesExceeded("max_uses_exceeded")`

        - `Unavailable("unavailable")`

        - `ContentTooLarge("content_too_large")`

    - `class WebFetchBlock`

      - `JsonElement Type = "web_fetch_result"`

      - `required DocumentBlock Content`

        - `JsonElement Type = "document"`

        - `required CitationsConfig? Citations`

          Citation configuration for the document

          - `required bool Enabled`

        - `required Source Source`

          - `class Base64PdfSource`

            - `JsonElement Type = "base64"`

            - `required string Data`

              format: byte

            - `JsonElement MediaType = "application/pdf"`

          - `class PlainTextSource`

            - `JsonElement Type = "text"`

            - `required string Data`

            - `JsonElement MediaType = "text/plain"`

        - `required string? Title`

          The title of the document

      - `required string? RetrievedAt`

        ISO 8601 timestamp when the content was retrieved

      - `required string Url`

        Fetched content URL

  - `required string ToolUseID`

    pattern: ^srvtoolu_[a-zA-Z0-9_]+$

### Web Fetch Tool Result Block Param

- `class WebFetchToolResultBlockParam`

  - `JsonElement Type = "web_fetch_tool_result"`

  - `required Content Content`

    - `class WebFetchToolResultErrorBlockParam`

      - `JsonElement Type = "web_fetch_tool_result_error"`

      - `required WebFetchToolResultErrorCode ErrorCode`

        - `InvalidToolInput("invalid_tool_input")`

        - `UrlTooLong("url_too_long")`

        - `UrlNotAllowed("url_not_allowed")`

        - `UrlNotInPriorContext("url_not_in_prior_context")`

        - `UrlNotAccessible("url_not_accessible")`

        - `UnsupportedContentType("unsupported_content_type")`

        - `TooManyRequests("too_many_requests")`

        - `MaxUsesExceeded("max_uses_exceeded")`

        - `Unavailable("unavailable")`

        - `ContentTooLarge("content_too_large")`

    - `class WebFetchBlockParam`

      - `JsonElement Type = "web_fetch_result"`

      - `required DocumentBlockParam Content`

        - `JsonElement Type = "document"`

        - `required Source Source`

          - `class Base64PdfSource`

            - `JsonElement Type = "base64"`

            - `required string Data`

              format: byte

            - `JsonElement MediaType = "application/pdf"`

          - `class PlainTextSource`

            - `JsonElement Type = "text"`

            - `required string Data`

            - `JsonElement MediaType = "text/plain"`

          - `class ContentBlockSource`

            - `JsonElement Type = "content"`

            - `required Content Content`

              - `string`

              - `IReadOnlyList<ContentBlockSourceContent>`

                - `class TextBlockParam`

                  - `JsonElement Type = "text"`

                  - `required string Text`

                    minLength: 1

                  - `CacheControlEphemeral? CacheControl`

                    Create a cache control breakpoint at this content block.

                    - `JsonElement Type = "ephemeral"`

                    - `Ttl Ttl`

                      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`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching?sdk_languages=csharp) for details.

                      - `Ttl5m("5m")`

                      - `Ttl1h("1h")`

                  - `IReadOnlyList<TextCitationParam>? Citations`

                    - `class CitationCharLocationParam`

                      - `JsonElement Type = "char_location"`

                      - `required string CitedText`

                      - `required long DocumentIndex`

                        minimum: 0

                      - `required string? DocumentTitle`

                        minLength: 1, maxLength: 500

                      - `required long EndCharIndex`

                      - `required long StartCharIndex`

                        minimum: 0

                    - `class CitationPageLocationParam`

                      - `JsonElement Type = "page_location"`

                      - `required string CitedText`

                      - `required long DocumentIndex`

                        minimum: 0

                      - `required string? DocumentTitle`

                        minLength: 1, maxLength: 500

                      - `required long EndPageNumber`

                      - `required long StartPageNumber`

                        minimum: 1

                    - `class CitationContentBlockLocationParam`

                      - `JsonElement Type = "content_block_location"`

                      - `required string CitedText`

                        The full text of the cited block range, concatenated.

                        Always equals the contents of `content[start_block_index:end_block_index]` joined together. The text block is the minimal citable unit; this field is never a substring of a single block. Not counted toward output tokens, and not counted toward input tokens when sent back in subsequent turns.

                      - `required long DocumentIndex`

                        minimum: 0

                      - `required string? DocumentTitle`

                        minLength: 1, maxLength: 500

                      - `required long EndBlockIndex`

                        Exclusive 0-based end index of the cited block range in the source's `content` array.

                        Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`.

                      - `required long StartBlockIndex`

                        0-based index of the first cited block in the source's `content` array.

                        minimum: 0

                    - `class CitationWebSearchResultLocationParam`

                      - `JsonElement Type = "web_search_result_location"`

                      - `required string CitedText`

                      - `required string EncryptedIndex`

                      - `required string? Title`

                        minLength: 1, maxLength: 512

                      - `required string Url`

                        minLength: 1

                    - `class CitationSearchResultLocationParam`

                      - `JsonElement Type = "search_result_location"`

                      - `required string CitedText`

                        The full text of the cited block range, concatenated.

                        Always equals the contents of `content[start_block_index:end_block_index]` joined together. The text block is the minimal citable unit; this field is never a substring of a single block. Not counted toward output tokens, and not counted toward input tokens when sent back in subsequent turns.

                      - `required long EndBlockIndex`

                        Exclusive 0-based end index of the cited block range in the source's `content` array.

                        Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`.

                      - `required long SearchResultIndex`

                        0-based index of the cited search result among all `search_result` content blocks in the request, in the order they appear across messages and tool results.

                        Counted separately from `document_index`; server-side web search results are not included in this count.

                        minimum: 0

                      - `required string Source`

                      - `required long StartBlockIndex`

                        0-based index of the first cited block in the source's `content` array.

                        minimum: 0

                      - `required string? Title`

                - `class ImageBlockParam`

                  - `JsonElement Type = "image"`

                  - `required Source Source`

                    - `class Base64ImageSource`

                      - `JsonElement Type = "base64"`

                      - `required string Data`

                        format: byte

                      - `required MediaType MediaType`

                        - `ImageJpeg("image/jpeg")`

                        - `ImagePng("image/png")`

                        - `ImageGif("image/gif")`

                        - `ImageWebP("image/webp")`

                    - `class UrlImageSource`

                      - `JsonElement Type = "url"`

                      - `required string Url`

                    - `class FileImageSource`

                      - `JsonElement Type = "file"`

                      - `required string FileID`

                  - `CacheControlEphemeral? CacheControl`

                    Create a cache control breakpoint at this content block.

                  - `ImageTransformationsParam? Transformations`

                    Configures the transformations the server applies to this image before the model observes it. Each key names a condition the server transforms images for; its value selects the transformation applied. Omitted keys keep their default behavior, and an empty object is equivalent to omitting the field.

                    - `OversizedImage OversizedImage`

                      What the server does when this image exceeds the model's maximum image size. `"downsize"` (the default) scales the image down to fit, which changes the dimensions the model observes without telling you. `"error"` instead rejects the request with a 400 error naming the image's dimensions and the largest dimensions that fit, so you can scale the image deliberately — your image is never silently scaled down.

                      - `Downsize("downsize")`

                      - `Error("error")`

          - `class UrlPdfSource`

            - `JsonElement Type = "url"`

            - `required string Url`

          - `class FileDocumentSource`

            - `JsonElement Type = "file"`

            - `required string FileID`

        - `CacheControlEphemeral? CacheControl`

          Create a cache control breakpoint at this content block.

        - `CitationsConfigParam? Citations`

          - `bool Enabled`

        - `string? Context`

          minLength: 1

        - `string? Title`

          minLength: 1, maxLength: 500

      - `required string Url`

        Fetched content URL

      - `string? RetrievedAt`

        ISO 8601 timestamp when the content was retrieved

  - `required string ToolUseID`

    pattern: ^srvtoolu_[a-zA-Z0-9_]+$

  - `CacheControlEphemeral? CacheControl`

    Create a cache control breakpoint at this content block.

  - `Caller Caller`

    - `class DirectCaller`

      Tool invocation directly from the model.

      - `JsonElement Type = "direct"`

    - `class ServerToolCaller`

      Tool invocation generated by a server-side tool.

      - `JsonElement Type = "code_execution_20250825"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

    - `class ServerToolCaller20260120`

      - `JsonElement Type = "code_execution_20260120"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

### Web Fetch Tool Result Error Block

- `class WebFetchToolResultErrorBlock`

  - `JsonElement Type = "web_fetch_tool_result_error"`

  - `required WebFetchToolResultErrorCode ErrorCode`

    - `InvalidToolInput("invalid_tool_input")`

    - `UrlTooLong("url_too_long")`

    - `UrlNotAllowed("url_not_allowed")`

    - `UrlNotInPriorContext("url_not_in_prior_context")`

    - `UrlNotAccessible("url_not_accessible")`

    - `UnsupportedContentType("unsupported_content_type")`

    - `TooManyRequests("too_many_requests")`

    - `MaxUsesExceeded("max_uses_exceeded")`

    - `Unavailable("unavailable")`

    - `ContentTooLarge("content_too_large")`

### Web Fetch Tool Result Error Block Param

- `class WebFetchToolResultErrorBlockParam`

  - `JsonElement Type = "web_fetch_tool_result_error"`

  - `required WebFetchToolResultErrorCode ErrorCode`

    - `InvalidToolInput("invalid_tool_input")`

    - `UrlTooLong("url_too_long")`

    - `UrlNotAllowed("url_not_allowed")`

    - `UrlNotInPriorContext("url_not_in_prior_context")`

    - `UrlNotAccessible("url_not_accessible")`

    - `UnsupportedContentType("unsupported_content_type")`

    - `TooManyRequests("too_many_requests")`

    - `MaxUsesExceeded("max_uses_exceeded")`

    - `Unavailable("unavailable")`

    - `ContentTooLarge("content_too_large")`

### Web Fetch Tool Result Error Code

- `enum WebFetchToolResultErrorCode`

  - `InvalidToolInput("invalid_tool_input")`

  - `UrlTooLong("url_too_long")`

  - `UrlNotAllowed("url_not_allowed")`

  - `UrlNotInPriorContext("url_not_in_prior_context")`

  - `UrlNotAccessible("url_not_accessible")`

  - `UnsupportedContentType("unsupported_content_type")`

  - `TooManyRequests("too_many_requests")`

  - `MaxUsesExceeded("max_uses_exceeded")`

  - `Unavailable("unavailable")`

  - `ContentTooLarge("content_too_large")`

### Web Fetch URL Source All

- `class WebFetchUrlSourceAll`

  The `url_sources` variant under which a source contributes in
  full: every result of the tool filter's source, or all user input.

  - `JsonElement Type = "all"`

### Web Fetch URL Source Except

- `class WebFetchUrlSourceExcept`

  The tool filter variant under which every result but the named
  tools' contributes.

  - `JsonElement Type = "except"`

  - `required IReadOnlyList<WebFetchUrlSourceToolReference> Tools`

    - `JsonElement Type = "tool_reference"`

    - `required string Name`

### Web Fetch URL Source None

- `class WebFetchUrlSourceNone`

  The `url_sources` variant under which a source contributes nothing:
  no result of the tool filter's source, or no user input.

  - `JsonElement Type = "none"`

### Web Fetch URL Source Only

- `class WebFetchUrlSourceOnly`

  The tool filter variant under which only the named tools' results
  contribute.

  - `JsonElement Type = "only"`

  - `required IReadOnlyList<WebFetchUrlSourceToolReference> Tools`

    - `JsonElement Type = "tool_reference"`

    - `required string Name`

### Web Fetch URL Source Tool Reference

- `class WebFetchUrlSourceToolReference`

  One entry of a tool filter's `tools`: it must name a tool declared
  in this request's `tools[]`.

  - `JsonElement Type = "tool_reference"`

  - `required string Name`

### Web Fetch URL Sources

- `class WebFetchUrlSources`

  Which sources contribute to the set of URLs web fetch may fetch.

  Each key is a tagged variant: `user_input` is `all` or `none`; the
  two tool filters are `all`, `none`, `only` (only the named tools'
  results) or `except` (every result but the named tools'). A named tool
  must be declared in this request's `tools[]`.

  - `ClientToolResults ClientToolResults`

    Which client tools' results contribute fetchable URLs: "all", "none", or an only or except list of client tool names from tools[].

    - `class WebFetchUrlSourceAll`

      The `url_sources` variant under which a source contributes in
      full: every result of the tool filter's source, or all user input.

      - `JsonElement Type = "all"`

    - `class WebFetchUrlSourceNone`

      The `url_sources` variant under which a source contributes nothing:
      no result of the tool filter's source, or no user input.

      - `JsonElement Type = "none"`

    - `class WebFetchUrlSourceOnly`

      The tool filter variant under which only the named tools' results
      contribute.

      - `JsonElement Type = "only"`

      - `required IReadOnlyList<WebFetchUrlSourceToolReference> Tools`

        - `JsonElement Type = "tool_reference"`

        - `required string Name`

    - `class WebFetchUrlSourceExcept`

      The tool filter variant under which every result but the named
      tools' contributes.

      - `JsonElement Type = "except"`

      - `required IReadOnlyList<WebFetchUrlSourceToolReference> Tools`

        - `JsonElement Type = "tool_reference"`

        - `required string Name`

  - `ServerToolResults ServerToolResults`

    Which server tools' results contribute fetchable URLs: "all", "none", or an only or except list of server tool names from tools[]; only web_search and web_fetch results ever contribute.

    - `class WebFetchUrlSourceAll`

      The `url_sources` variant under which a source contributes in
      full: every result of the tool filter's source, or all user input.

    - `class WebFetchUrlSourceNone`

      The `url_sources` variant under which a source contributes nothing:
      no result of the tool filter's source, or no user input.

    - `class WebFetchUrlSourceOnly`

      The tool filter variant under which only the named tools' results
      contribute.

    - `class WebFetchUrlSourceExcept`

      The tool filter variant under which every result but the named
      tools' contributes.

  - `UserInput UserInput`

    Whether URLs in user messages are fetchable: "all" or "none".

    - `class WebFetchUrlSourceAll`

      The `url_sources` variant under which a source contributes in
      full: every result of the tool filter's source, or all user input.

    - `class WebFetchUrlSourceNone`

      The `url_sources` variant under which a source contributes nothing:
      no result of the tool filter's source, or no user input.

### Web Search Result Block

- `class WebSearchResultBlock`

  - `JsonElement Type = "web_search_result"`

  - `required string EncryptedContent`

  - `required string? PageAge`

  - `required string Title`

  - `required string Url`

### Web Search Result Block Param

- `class WebSearchResultBlockParam`

  - `JsonElement Type = "web_search_result"`

  - `required string EncryptedContent`

  - `required string Title`

  - `required string Url`

  - `string? PageAge`

### Web Search Tool 20250305

- `class WebSearchTool20250305`

  - `JsonElement Type = "web_search_20250305"`

  - `JsonElement Name = "web_search"`

    Name of the tool.

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

  - `IReadOnlyList<AllowedCaller> AllowedCallers`

    - `Direct("direct")`

    - `CodeExecution20250825("code_execution_20250825")`

    - `CodeExecution20260120("code_execution_20260120")`

    - `CodeExecution20260521("code_execution_20260521")`

  - `IReadOnlyList<string>? AllowedDomains`

    If provided, only these domains will be included in results. Cannot be used alongside `blocked_domains`.

  - `IReadOnlyList<string>? BlockedDomains`

    If provided, these domains will never appear in results. Cannot be used alongside `allowed_domains`.

  - `CacheControlEphemeral? CacheControl`

    Create a cache control breakpoint at this content block.

    - `JsonElement Type = "ephemeral"`

    - `Ttl Ttl`

      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`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching?sdk_languages=csharp) for details.

      - `Ttl5m("5m")`

      - `Ttl1h("1h")`

  - `bool DeferLoading`

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

  - `long? MaxUses`

    Maximum number of times the tool can be used in the API request.

    minimum: 1

  - `bool Strict`

    When true, guarantees schema validation on tool names and inputs

  - `UserLocation? UserLocation`

    Parameters for the user's location. Used to provide more relevant search results.

    - `JsonElement Type = "approximate"`

    - `string? City`

      The city of the user.

      minLength: 1, maxLength: 255

    - `string? Country`

      The two letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the user.

      minLength: 2, maxLength: 2

    - `string? Region`

      The region of the user.

      minLength: 1, maxLength: 255

    - `string? Timezone`

      The [IANA timezone](https://nodatime.org/TimeZones) of the user.

      minLength: 1, maxLength: 255

### Web Search Tool 20260209

- `class WebSearchTool20260209`

  - `JsonElement Type = "web_search_20260209"`

  - `JsonElement Name = "web_search"`

    Name of the tool.

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

  - `IReadOnlyList<AllowedCaller> AllowedCallers`

    - `Direct("direct")`

    - `CodeExecution20250825("code_execution_20250825")`

    - `CodeExecution20260120("code_execution_20260120")`

    - `CodeExecution20260521("code_execution_20260521")`

  - `IReadOnlyList<string>? AllowedDomains`

    If provided, only these domains will be included in results. Cannot be used alongside `blocked_domains`.

  - `IReadOnlyList<string>? BlockedDomains`

    If provided, these domains will never appear in results. Cannot be used alongside `allowed_domains`.

  - `CacheControlEphemeral? CacheControl`

    Create a cache control breakpoint at this content block.

    - `JsonElement Type = "ephemeral"`

    - `Ttl Ttl`

      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`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching?sdk_languages=csharp) for details.

      - `Ttl5m("5m")`

      - `Ttl1h("1h")`

  - `bool DeferLoading`

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

  - `long? MaxUses`

    Maximum number of times the tool can be used in the API request.

    minimum: 1

  - `bool Strict`

    When true, guarantees schema validation on tool names and inputs

  - `UserLocation? UserLocation`

    Parameters for the user's location. Used to provide more relevant search results.

    - `JsonElement Type = "approximate"`

    - `string? City`

      The city of the user.

      minLength: 1, maxLength: 255

    - `string? Country`

      The two letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the user.

      minLength: 2, maxLength: 2

    - `string? Region`

      The region of the user.

      minLength: 1, maxLength: 255

    - `string? Timezone`

      The [IANA timezone](https://nodatime.org/TimeZones) of the user.

      minLength: 1, maxLength: 255

### Web Search Tool 20260318

- `class WebSearchTool20260318`

  - `JsonElement Type = "web_search_20260318"`

  - `JsonElement Name = "web_search"`

    Name of the tool.

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

  - `IReadOnlyList<AllowedCaller> AllowedCallers`

    - `Direct("direct")`

    - `CodeExecution20250825("code_execution_20250825")`

    - `CodeExecution20260120("code_execution_20260120")`

    - `CodeExecution20260521("code_execution_20260521")`

  - `IReadOnlyList<string>? AllowedDomains`

    If provided, only these domains will be included in results. Cannot be used alongside `blocked_domains`.

  - `IReadOnlyList<string>? BlockedDomains`

    If provided, these domains will never appear in results. Cannot be used alongside `allowed_domains`.

  - `CacheControlEphemeral? CacheControl`

    Create a cache control breakpoint at this content block.

    - `JsonElement Type = "ephemeral"`

    - `Ttl Ttl`

      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`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching?sdk_languages=csharp) for details.

      - `Ttl5m("5m")`

      - `Ttl1h("1h")`

  - `bool DeferLoading`

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

  - `long? MaxUses`

    Maximum number of times the tool can be used in the API request.

    minimum: 1

  - `ResponseInclusion ResponseInclusion`

    How this tool's result blocks appear in the API response when the result was consumed by a completed code_execution call in the same turn. 'full' returns the complete content (default). 'excluded' drops the nested server_tool_use and result block pair entirely. Results from direct calls, or from code_execution calls that paused before completing, are always returned in full so they can be sent back on the next turn.

    - `Full("full")`

    - `Excluded("excluded")`

  - `bool Strict`

    When true, guarantees schema validation on tool names and inputs

  - `UserLocation? UserLocation`

    Parameters for the user's location. Used to provide more relevant search results.

    - `JsonElement Type = "approximate"`

    - `string? City`

      The city of the user.

      minLength: 1, maxLength: 255

    - `string? Country`

      The two letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the user.

      minLength: 2, maxLength: 2

    - `string? Region`

      The region of the user.

      minLength: 1, maxLength: 255

    - `string? Timezone`

      The [IANA timezone](https://nodatime.org/TimeZones) of the user.

      minLength: 1, maxLength: 255

### Web Search Tool Request Error

- `class WebSearchToolRequestError`

  - `JsonElement Type = "web_search_tool_result_error"`

  - `required WebSearchToolResultErrorCode ErrorCode`

    - `InvalidToolInput("invalid_tool_input")`

    - `Unavailable("unavailable")`

    - `MaxUsesExceeded("max_uses_exceeded")`

    - `TooManyRequests("too_many_requests")`

    - `QueryTooLong("query_too_long")`

    - `RequestTooLarge("request_too_large")`

### Web Search Tool Result Block

- `class WebSearchToolResultBlock`

  - `JsonElement Type = "web_search_tool_result"`

  - `required Caller Caller`

    - `class DirectCaller`

      Tool invocation directly from the model.

      - `JsonElement Type = "direct"`

    - `class ServerToolCaller`

      Tool invocation generated by a server-side tool.

      - `JsonElement Type = "code_execution_20250825"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

    - `class ServerToolCaller20260120`

      - `JsonElement Type = "code_execution_20260120"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

  - `required WebSearchToolResultBlockContent Content`

    - `class WebSearchToolResultError`

      - `JsonElement Type = "web_search_tool_result_error"`

      - `required WebSearchToolResultErrorCode ErrorCode`

        - `InvalidToolInput("invalid_tool_input")`

        - `Unavailable("unavailable")`

        - `MaxUsesExceeded("max_uses_exceeded")`

        - `TooManyRequests("too_many_requests")`

        - `QueryTooLong("query_too_long")`

        - `RequestTooLarge("request_too_large")`

    - `IReadOnlyList<WebSearchResultBlock>`

      - `JsonElement Type = "web_search_result"`

      - `required string EncryptedContent`

      - `required string? PageAge`

      - `required string Title`

      - `required string Url`

  - `required string ToolUseID`

    pattern: ^srvtoolu_[a-zA-Z0-9_]+$

### Web Search Tool Result Block Content

- `class WebSearchToolResultBlockContent: union`

  - `class WebSearchToolResultError`

    - `JsonElement Type = "web_search_tool_result_error"`

    - `required WebSearchToolResultErrorCode ErrorCode`

      - `InvalidToolInput("invalid_tool_input")`

      - `Unavailable("unavailable")`

      - `MaxUsesExceeded("max_uses_exceeded")`

      - `TooManyRequests("too_many_requests")`

      - `QueryTooLong("query_too_long")`

      - `RequestTooLarge("request_too_large")`

  - `IReadOnlyList<WebSearchResultBlock>`

    - `JsonElement Type = "web_search_result"`

    - `required string EncryptedContent`

    - `required string? PageAge`

    - `required string Title`

    - `required string Url`

### Web Search Tool Result Block Param

- `class WebSearchToolResultBlockParam`

  - `JsonElement Type = "web_search_tool_result"`

  - `required WebSearchToolResultBlockParamContent Content`

    - `IReadOnlyList<WebSearchResultBlockParam>`

      - `JsonElement Type = "web_search_result"`

      - `required string EncryptedContent`

      - `required string Title`

      - `required string Url`

      - `string? PageAge`

    - `class WebSearchToolRequestError`

      - `JsonElement Type = "web_search_tool_result_error"`

      - `required WebSearchToolResultErrorCode ErrorCode`

        - `InvalidToolInput("invalid_tool_input")`

        - `Unavailable("unavailable")`

        - `MaxUsesExceeded("max_uses_exceeded")`

        - `TooManyRequests("too_many_requests")`

        - `QueryTooLong("query_too_long")`

        - `RequestTooLarge("request_too_large")`

  - `required string ToolUseID`

    pattern: ^srvtoolu_[a-zA-Z0-9_]+$

  - `CacheControlEphemeral? CacheControl`

    Create a cache control breakpoint at this content block.

    - `JsonElement Type = "ephemeral"`

    - `Ttl Ttl`

      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`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching?sdk_languages=csharp) for details.

      - `Ttl5m("5m")`

      - `Ttl1h("1h")`

  - `Caller Caller`

    - `class DirectCaller`

      Tool invocation directly from the model.

      - `JsonElement Type = "direct"`

    - `class ServerToolCaller`

      Tool invocation generated by a server-side tool.

      - `JsonElement Type = "code_execution_20250825"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

    - `class ServerToolCaller20260120`

      - `JsonElement Type = "code_execution_20260120"`

      - `required string ToolID`

        pattern: ^srvtoolu_[a-zA-Z0-9_]+$

### Web Search Tool Result Block Param Content

- `class WebSearchToolResultBlockParamContent: union`

  - `IReadOnlyList<WebSearchResultBlockParam>`

    - `JsonElement Type = "web_search_result"`

    - `required string EncryptedContent`

    - `required string Title`

    - `required string Url`

    - `string? PageAge`

  - `class WebSearchToolRequestError`

    - `JsonElement Type = "web_search_tool_result_error"`

    - `required WebSearchToolResultErrorCode ErrorCode`

      - `InvalidToolInput("invalid_tool_input")`

      - `Unavailable("unavailable")`

      - `MaxUsesExceeded("max_uses_exceeded")`

      - `TooManyRequests("too_many_requests")`

      - `QueryTooLong("query_too_long")`

      - `RequestTooLarge("request_too_large")`

### Web Search Tool Result Error

- `class WebSearchToolResultError`

  - `JsonElement Type = "web_search_tool_result_error"`

  - `required WebSearchToolResultErrorCode ErrorCode`

    - `InvalidToolInput("invalid_tool_input")`

    - `Unavailable("unavailable")`

    - `MaxUsesExceeded("max_uses_exceeded")`

    - `TooManyRequests("too_many_requests")`

    - `QueryTooLong("query_too_long")`

    - `RequestTooLarge("request_too_large")`

### Web Search Tool Result Error Code

- `enum WebSearchToolResultErrorCode`

  - `InvalidToolInput("invalid_tool_input")`

  - `Unavailable("unavailable")`

  - `MaxUsesExceeded("max_uses_exceeded")`

  - `TooManyRequests("too_many_requests")`

  - `QueryTooLong("query_too_long")`

  - `RequestTooLarge("request_too_large")`

## Messages › Batches

### Create a Message Batch

`MessageBatch Messages.Batches.Create(parameters, cancellationToken = default)`

**POST** `/v1/messages/batches`

Send a batch of Message creation requests.

The Message Batches API can be used to process multiple Messages API requests at once. Once a Message Batch is created, it begins processing immediately. Batches can take up to 24 hours to complete.

Learn more about the Message Batches API in our [user guide](https://platform.claude.com/docs/en/build-with-claude/batch-processing?sdk_languages=csharp)

#### Parameters

- `BatchCreateParams parameters`

  - `required IReadOnlyList<Request> requests`

    List of requests for prompt completion. Each is an individual request to create a Message.

    minItems: 1, maxItems: 100000

    - `required string CustomID`

      Developer-provided ID created for each request in a Message Batch. Useful for matching results to requests, as results may be given out of request order.

      Must be unique for each request within the Message Batch.

      minLength: 1, maxLength: 64, pattern: ^[a-zA-Z0-9_-]{1,64}$

    - `required Params Params`

      Messages API creation parameters for the individual request.

      See the [Messages API reference](https://platform.claude.com/docs/en/api/messages?sdk_languages=csharp) for full documentation on available parameters.

      - `required long MaxTokens`

        The maximum number of tokens to generate before stopping.

        Note that our models may stop _before_ reaching this maximum. This parameter only specifies the absolute maximum number of tokens to generate.

        Set to `0` to populate the [prompt cache](https://platform.claude.com/docs/en/build-with-claude/prompt-caching?sdk_languages=csharp#pre-warming-the-cache) without generating a response.

        Different models have different maximum values for this parameter.  See [models](https://platform.claude.com/docs/en/about-claude/models/overview?sdk_languages=csharp) for details.

        minimum: 0

      - `required IReadOnlyList<MessageParam> Messages`

        Input messages.

        Our models are trained to operate on alternating `user` and `assistant` conversational turns. When creating a new `Message`, you specify the prior conversational turns with the `messages` parameter, and the model then generates the next `Message` in the conversation. Consecutive `user` or `assistant` turns in your request will be combined into a single turn.

        Each input message must be an object with a `role` and `content`. You can specify a single `user`-role message, or you can include multiple `user` and `assistant` messages.

        If the final message uses the `assistant` role, the response content will continue immediately from the content in that message. This can be used to constrain part of the model's response. This is called prefill. On models that don't support prefill, creating a message that ends with a partial `assistant` response returns a 400 error. See [Prefill not supported](https://platform.claude.com/docs/en/api/errors?sdk_languages=csharp#prefill-not-supported).

        Example with a single `user` message:

        ```json
        [{"role": "user", "content": "Hello, Claude"}]
        ```

        Example with multiple conversational turns:

        ```json
        [
          {"role": "user", "content": "Hello there."},
          {"role": "assistant", "content": "Hi, I'm Claude. How can I help you?"},
          {"role": "user", "content": "Can you explain LLMs in plain English?"},
        ]
        ```

        Example with a partially-filled response from Claude, for models that support prefill:

        ```json
        [
          {"role": "user", "content": "What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun"},
          {"role": "assistant", "content": "The best answer is ("},
        ]
        ```

        Each input message `content` may be either a single `string` or an array of content blocks, where each block has a specific `type`. Using a `string` for `content` is shorthand for an array of one content block of type `"text"`. The following input messages are equivalent:

        ```json
        {"role": "user", "content": "Hello, Claude"}
        ```

        ```json
        {"role": "user", "content": [{"type": "text", "text": "Hello, Claude"}]}
        ```

        See [input examples](https://platform.claude.com/docs/en/build-with-claude/working-with-messages?sdk_languages=csharp).

        Note that if you want to include a [system prompt](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices?sdk_languages=csharp#give-claude-a-role), you can use the top-level `system` parameter.

        There is a limit of 100,000 messages in a single request.

        - `class UserMessageParam`

          - `required MessageContentParam Content`

            - `string`

            - `IReadOnlyList<ContentBlockParam>`

              - `class TextBlockParam`

                - `JsonElement Type = "text"`

                - `required string Text`

                  minLength: 1

                - `CacheControlEphemeral? CacheControl`

                  Create a cache control breakpoint at this content block.

                  - `JsonElement Type = "ephemeral"`

                  - `Ttl Ttl`

                    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`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching?sdk_languages=csharp) for details.

                    - `Ttl5m("5m")`

                    - `Ttl1h("1h")`

                - `IReadOnlyList<TextCitationParam>? Citations`

                  - `class CitationCharLocationParam`

                    - `JsonElement Type = "char_location"`

                    - `required string CitedText`

                    - `required long DocumentIndex`

                      minimum: 0

                    - `required string? DocumentTitle`

                      minLength: 1, maxLength: 500

                    - `required long EndCharIndex`

                    - `required long StartCharIndex`

                      minimum: 0

                  - `class CitationPageLocationParam`

                    - `JsonElement Type = "page_location"`

                    - `required string CitedText`

                    - `required long DocumentIndex`

                      minimum: 0

                    - `required string? DocumentTitle`

                      minLength: 1, maxLength: 500

                    - `required long EndPageNumber`

                    - `required long StartPageNumber`

                      minimum: 1

                  - `class CitationContentBlockLocationParam`

                    - `JsonElement Type = "content_block_location"`

                    - `required string CitedText`

                      The full text of the cited block range, concatenated.

                      Always equals the contents of `content[start_block_index:end_block_index]` joined together. The text block is the minimal citable unit; this field is never a substring of a single block. Not counted toward output tokens, and not counted toward input tokens when sent back in subsequent turns.

                    - `required long DocumentIndex`

                      minimum: 0

                    - `required string? DocumentTitle`

                      minLength: 1, maxLength: 500

                    - `required long EndBlockIndex`

                      Exclusive 0-based end index of the cited block range in the source's `content` array.

                      Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`.

                    - `required long StartBlockIndex`

                      0-based index of the first cited block in the source's `content` array.

                      minimum: 0

                  - `class CitationWebSearchResultLocationParam`

                    - `JsonElement Type = "web_search_result_location"`

                    - `required string CitedText`

                    - `required string EncryptedIndex`

                    - `required string? Title`

                      minLength: 1, maxLength: 512

                    - `required string Url`

                      minLength: 1

                  - `class CitationSearchResultLocationParam`

                    - `JsonElement Type = "search_result_location"`

                    - `required string CitedText`

                      The full text of the cited block range, concatenated.

                      Always equals the contents of `content[start_block_index:end_block_index]` joined together. The text block is the minimal citable unit; this field is never a substring of a single block. Not counted toward output tokens, and not counted toward input tokens when sent back in subsequent turns.

                    - `required long EndBlockIndex`

                      Exclusive 0-based end index of the cited block range in the source's `content` array.

                      Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`.

                    - `required long SearchResultIndex`

                      0-based index of the cited search result among all `search_result` content blocks in the request, in the order they appear across messages and tool results.

                      Counted separately from `document_index`; server-side web search results are not included in this count.

                      minimum: 0

                    - `required string Source`

                    - `required long StartBlockIndex`

                      0-based index of the first cited block in the source's `content` array.

                      minimum: 0

                    - `required string? Title`

              - `class ImageBlockParam`

                - `JsonElement Type = "image"`

                - `required Source Source`

                  - `class Base64ImageSource`

                    - `JsonElement Type = "base64"`

                    - `required string Data`

                      format: byte

                    - `required MediaType MediaType`

                      - `ImageJpeg("image/jpeg")`

                      - `ImagePng("image/png")`

                      - `ImageGif("image/gif")`

                      - `ImageWebP("image/webp")`

                  - `class UrlImageSource`

                    - `JsonElement Type = "url"`

                    - `required string Url`

                  - `class FileImageSource`

                    - `JsonElement Type = "file"`

                    - `required string FileID`

                - `CacheControlEphemeral? CacheControl`

                  Create a cache control breakpoint at this content block.

                - `ImageTransformationsParam? Transformations`

                  Configures the transformations the server applies to this image before the model observes it. Each key names a condition the server transforms images for; its value selects the transformation applied. Omitted keys keep their default behavior, and an empty object is equivalent to omitting the field.

                  - `OversizedImage OversizedImage`

                    What the server does when this image exceeds the model's maximum image size. `"downsize"` (the default) scales the image down to fit, which changes the dimensions the model observes without telling you. `"error"` instead rejects the request with a 400 error naming the image's dimensions and the largest dimensions that fit, so you can scale the image deliberately — your image is never silently scaled down.

                    - `Downsize("downsize")`

                    - `Error("error")`

              - `class DocumentBlockParam`

                - `JsonElement Type = "document"`

                - `required Source Source`

                  - `class Base64PdfSource`

                    - `JsonElement Type = "base64"`

                    - `required string Data`

                      format: byte

                    - `JsonElement MediaType = "application/pdf"`

                  - `class PlainTextSource`

                    - `JsonElement Type = "text"`

                    - `required string Data`

                    - `JsonElement MediaType = "text/plain"`

                  - `class ContentBlockSource`

                    - `JsonElement Type = "content"`

                    - `required Content Content`

                      - `string`

                      - `IReadOnlyList<ContentBlockSourceContent>`

                        - `class TextBlockParam`

                        - `class ImageBlockParam`

                  - `class UrlPdfSource`

                    - `JsonElement Type = "url"`

                    - `required string Url`

                  - `class FileDocumentSource`

                    - `JsonElement Type = "file"`

                    - `required string FileID`

                - `CacheControlEphemeral? CacheControl`

                  Create a cache control breakpoint at this content block.

                - `CitationsConfigParam? Citations`

                  - `bool Enabled`

                - `string? Context`

                  minLength: 1

                - `string? Title`

                  minLength: 1, maxLength: 500

              - `class SearchResultBlockParam`

                - `JsonElement Type = "search_result"`

                - `required IReadOnlyList<TextBlockParam> Content`

                  - `JsonElement Type = "text"`

                  - `required string Text`

                    minLength: 1

                  - `CacheControlEphemeral? CacheControl`

                    Create a cache control breakpoint at this content block.

                  - `IReadOnlyList<TextCitationParam>? Citations`

                - `required string Source`

                - `required string Title`

                - `CacheControlEphemeral? CacheControl`

                  Create a cache control breakpoint at this content block.

                - `CitationsConfigParam Citations`

              - `class ThinkingBlockParam`

                - `JsonElement Type = "thinking"`

                - `required string Signature`

                  The `signature` value of this thinking block, exactly as returned by the API in a previous response. Used to verify that the block was generated by Claude.

                  Thinking blocks must be passed back unmodified and in their original order; a modified block results in a 400 `invalid_request_error`.

                - `required string Thinking`

                  The `thinking` text of this block as returned by the API.

              - `class RedactedThinkingBlockParam`

                - `JsonElement Type = "redacted_thinking"`

                - `required string Data`

                  The `data` value of this redacted thinking block, exactly as returned by the API in a previous response. Opaque and encrypted; pass it back unchanged.

              - `class ToolUseBlockParam`

                - `JsonElement Type = "tool_use"`

                - `required string ID`

                  pattern: ^[a-zA-Z0-9_-]+$

                - `required IReadOnlyDictionary<string, JsonElement> Input`

                - `required string Name`

                  minLength: 1, maxLength: 200

                - `CacheControlEphemeral? CacheControl`

                  Create a cache control breakpoint at this content block.

                - `Caller Caller`

                  - `class DirectCaller`

                    Tool invocation directly from the model.

                    - `JsonElement Type = "direct"`

                  - `class ServerToolCaller`

                    Tool invocation generated by a server-side tool.

                    - `JsonElement Type = "code_execution_20250825"`

                    - `required string ToolID`

                      pattern: ^srvtoolu_[a-zA-Z0-9_]+$

                  - `class ServerToolCaller20260120`

                    - `JsonElement Type = "code_execution_20260120"`

                    - `required string ToolID`

                      pattern: ^srvtoolu_[a-zA-Z0-9_]+$

                - `string? ToolsetName`

                  For a toolset member tool_use, the toolset family this member belongs to.

                  minLength: 1, maxLength: 64, pattern: ^[a-zA-Z0-9_-]+$

              - `class ToolResultBlockParam`

                - `JsonElement Type = "tool_result"`

                - `required string ToolUseID`

                  pattern: ^[a-zA-Z0-9_-]+$

                - `CacheControlEphemeral? CacheControl`

                  Create a cache control breakpoint at this content block.

                - `Content Content`

                  - `string`

                  - `IReadOnlyList<Block>`

                    - `class TextBlockParam`

                    - `class ImageBlockParam`

                    - `class SearchResultBlockParam`

                    - `class DocumentBlockParam`

                    - `class ToolReferenceBlockParam`

                      Tool reference block that can be included in tool_result content.

                      - `JsonElement Type = "tool_reference"`

                      - `required string ToolName`

                        minLength: 1, maxLength: 256, pattern: ^[a-zA-Z0-9_-]{1,256}$

                      - `CacheControlEphemeral? CacheControl`

                        Create a cache control breakpoint at this content block.

                    - `class BrowserStateBlockParam`

                      The caller's browser state after a browser toolset member call —
                      the full inventory of open tabs, which tab is active, and any side
                      effects (tabs opened, download state changes) the call produced.

                      At most one per `tool_result`, only on a non-error result answering a
                      browser toolset member `tool_use`. The server renders the
                      model-visible text from it; the model never sees the raw fields.

                      - `JsonElement Type = "browser_state"`

                      - `required IReadOnlyList<BrowserStateTabEntry> Tabs`

                        All tabs open in the browser after this call — the full inventory, not a delta. May be empty. Whenever non-empty, exactly one entry carries `active: true`.

                        maxItems: 100

                        - `required string TabID`

                          The caller-assigned identifier for this tab, unique within the inventory.

                          minLength: 1, maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

                        - `required string Title`

                          The title of the page the tab is showing. May be empty.

                          maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

                        - `required string Url`

                          The URL of the page the tab is showing. May be empty.

                          maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

                        - `bool Active`

                          Whether this tab is the active tab after this call. Whenever `tabs` is non-empty, exactly one entry is marked `active: true`.

                      - `CacheControlEphemeral? CacheControl`

                        Create a cache control breakpoint at this content block.

                      - `IReadOnlyList<BrowserStateChange>? StateChanges`

                        Tabs opened and download state changes during this call. "Nothing to report" is expressed by omitting the field, never by an empty list.

                        minItems: 1, maxItems: 200

                        - `class BrowserStateChangeTabOpened`

                          A tab this call's execution opened that remains open at its end —
                          the creation delta of the `tabs` inventory, not an event log.

                          Carries only the `tab_id`; the tab's `title` and `url` live on its
                          `tabs` entry, which must include the same `tab_id`. A tab opened
                          during a failed call gets no deferred `tab_opened`; it simply appears
                          in the next result's `tabs` inventory.

                          - `JsonElement Type = "tab_opened"`

                          - `required string TabID`

                            The `tab_id` of the opened tab, present in `tabs`.

                            minLength: 1, maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

                        - `class BrowserStateChangeDownloadStarted`

                          A file download that started during this call.

                          - `JsonElement Type = "download_started"`

                          - `required string DownloadID`

                            The caller-assigned identifier for this download, stable across the state changes reporting it.

                            minLength: 1, maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

                          - `required string Url`

                            The final post-redirect URL the download was served from.

                            maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

                        - `class BrowserStateChangeDownloadCompleted`

                          A file download that finished during this call, reported with the
                          same `download_id` as its `download_started` — or without a prior
                          `download_started`, when the download finished during the call that
                          started it (at most one state change per `download_id` per result).

                          - `JsonElement Type = "download_completed"`

                          - `required string DownloadID`

                            The caller-assigned identifier for this download, stable across the state changes reporting it.

                            minLength: 1, maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

                          - `required string Url`

                            The final post-redirect URL the download was served from.

                            maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

                          - `string? Path`

                            Where the executor saved the file, on the executor's filesystem. Only included when another tool in the same environment can read the file at that path.

                            maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

                          - `long? SizeBytes`

                            The completed download's size.

                            minimum: 0

                        - `class BrowserStateChangeDownloadFailed`

                          A file download that failed — or was cancelled — during this call.

                          - `JsonElement Type = "download_failed"`

                          - `required string DownloadID`

                            The caller-assigned identifier for this download, stable across the state changes reporting it.

                            minLength: 1, maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

                          - `required string Url`

                            The final post-redirect URL the download was served from.

                            maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

                          - `string? Error`

                            The failure or cancellation detail, when known.

                            maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$

                - `bool IsError`

                - `string? ToolsetName`

                  For a toolset member tool_result, the toolset family of the paired tool_use.

                  minLength: 1, maxLength: 64, pattern: ^[a-zA-Z0-9_-]+$

              - `class ServerToolUseBlockParam`

                - `JsonElement Type = "server_tool_use"`

                - `required string ID`

                  pattern: ^srvtoolu_[a-zA-Z0-9_]+$

                - `required IReadOnlyDictionary<string, JsonElement> Input`

                - `required Name Name`

                  - `WebSearch("web_search")`

                  - `WebFetch("web_fetch")`

                  - `CodeExecution("code_execution")`

                  - `BashCodeExecution("bash_code_execution")`

                  - `TextEditorCodeExecution("text_editor_code_execution")`

                  - `ToolSearchToolRegex("tool_search_tool_regex")`

                  - `ToolSearchToolBm25("tool_search_tool_bm25")`

                - `CacheControlEphemeral? CacheControl`

                  Create a cache control breakpoint at this content block.

                - `Caller Caller`

                  - `class DirectCaller`

                    Tool invocation directly from the model.

                  - `class ServerToolCaller`

                    Tool invocation generated by a server-side tool.

                  - `class ServerToolCaller20260120`

              - `class WebSearchToolResultBlockParam`

                - `JsonElement Type = "web_search_tool_result"`

                - `required WebSearchToolResultBlockParamContent Content`

                  - `IReadOnlyList<WebSearchResultBlockParam>`

                    - `JsonElement Type = "web_search_result"`

                    - `required string EncryptedContent`

                    - `required string Title`

                    - `required string Url`

                    - `string? PageAge`

                  - `class WebSearchToolRequestError`

                    - `JsonElement Type = "web_search_tool_result_error"`

                    - `required WebSearchToolResultErrorCode ErrorCode`

                      - `InvalidToolInput("invalid_tool_input")`

                      - `Unavailable("unavailable")`

                      - `MaxUsesExceeded("max_uses_exceeded")`

                      - `TooManyRequests("too_many_requests")`

                      - `QueryTooLong("query_too_long")`

                      - `RequestTooLarge("request_too_large")`

                - `required string ToolUseID`

                  pattern: ^srvtoolu_[a-zA-Z0-9_]+$

                - `CacheControlEphemeral? CacheControl`

                  Create a cache control breakpoint at this content block.

                - `Caller Caller`

                  - `class DirectCaller`

                    Tool invocation directly from the model.

                  - `class ServerToolCaller`

                    Tool invocation generated by a server-side tool.

                  - `class ServerToolCaller20260120`

              - `class WebFetchToolResultBlockParam`

                - `JsonElement Type = "web_fetch_tool_result"`

                - `required Content Content`

                  - `class WebFetchToolResultErrorBlockParam`

                    - `JsonElement Type = "web_fetch_tool_result_error"`

                    - `required WebFetchToolResultErrorCode ErrorCode`

                      - `InvalidToolInput("invalid_tool_input")`

                      - `UrlTooLong("url_too_long")`

                      - `UrlNotAllowed("url_not_allowed")`

                      - `UrlNotInPriorContext("url_not_in_prior_context")`

                      - `UrlNotAccessible("url_not_accessible")`

                      - `UnsupportedContentType("unsupported_content_type")`

                      - `TooManyRequests("too_many_requests")`

                      - `MaxUsesExceeded("max_uses_exceeded")`

                      - `Unavailable("unavailable")`

                      - `ContentTooLarge("content_too_large")`

                  - `class WebFetchBlockParam`

                    - `JsonElement Type = "web_fetch_result"`

                    - `required DocumentBlockParam Content`

                    - `required string Url`

                      Fetched content URL

                    - `string? RetrievedAt`

                      ISO 8601 timestamp when the content was retrieved

                - `required string ToolUseID`

                  pattern: ^srvtoolu_[a-zA-Z0-9_]+$

                - `CacheControlEphemeral? CacheControl`

                  Create a cache control breakpoint at this content block.

                - `Caller Caller`

                  - `class DirectCaller`

                    Tool invocation directly from the model.

                  - `class ServerToolCaller`

                    Tool invocation generated by a server-side tool.

                  - `class ServerToolCaller20260120`

              - `class CodeExecutionToolResultBlockParam`

                - `JsonElement Type = "code_execution_tool_result"`

                - `required CodeExecutionToolResultBlockParamContent Content`

                  - `class CodeExecutionToolResultErrorParam`

                    - `JsonElement Type = "code_execution_tool_result_error"`

                    - `required CodeExecutionToolResultErrorCode ErrorCode`

                      - `InvalidToolInput("invalid_tool_input")`

                      - `Unavailable("unavailable")`

                      - `TooManyRequests("too_many_requests")`

                      - `ExecutionTimeExceeded("execution_time_exceeded")`

                  - `class CodeExecutionResultBlockParam`

                    - `JsonElement Type = "code_execution_result"`

                    - `required IReadOnlyList<CodeExecutionOutputBlockParam> Content`

                      - `JsonElement Type = "code_execution_output"`

                      - `required string FileID`

                    - `required long ReturnCode`

                    - `required string Stderr`

                    - `required string Stdout`

                  - `class EncryptedCodeExecutionResultBlockParam`

                    The output and exit code of Python code that Claude ran with the code execution tool, with standard output in encrypted form, sent back in a later request.

                    - `JsonElement Type = "encrypted_code_execution_result"`

                    - `required IReadOnlyList<CodeExecutionOutputBlockParam> Content`

                      - `JsonElement Type = "code_execution_output"`

                      - `required string FileID`

                    - `required string EncryptedStdout`

                    - `required long ReturnCode`

                    - `required string Stderr`

                - `required string ToolUseID`

                  pattern: ^srvtoolu_[a-zA-Z0-9_]+$

                - `CacheControlEphemeral? CacheControl`

                  Create a cache control breakpoint at this content block.

              - `class BashCodeExecutionToolResultBlockParam`

                - `JsonElement Type = "bash_code_execution_tool_result"`

                - `required Content Content`

                  - `class BashCodeExecutionToolResultErrorParam`

                    - `JsonElement Type = "bash_code_execution_tool_result_error"`

                    - `required BashCodeExecutionToolResultErrorCode ErrorCode`

                      - `InvalidToolInput("invalid_tool_input")`

                      - `Unavailable("unavailable")`

                      - `TooManyRequests("too_many_requests")`

                      - `ExecutionTimeExceeded("execution_time_exceeded")`

                      - `OutputFileTooLarge("output_file_too_large")`

                  - `class BashCodeExecutionResultBlockParam`

                    - `JsonElement Type = "bash_code_execution_result"`

                    - `required IReadOnlyList<BashCodeExecutionOutputBlockParam> Content`

                      - `JsonElement Type = "bash_code_execution_output"`

                      - `required string FileID`

                    - `required long ReturnCode`

                    - `required string Stderr`

                    - `required string Stdout`

                - `required string ToolUseID`

                  pattern: ^srvtoolu_[a-zA-Z0-9_]+$

                - `CacheControlEphemeral? CacheControl`

                  Create a cache control breakpoint at this content block.

              - `class TextEditorCodeExecutionToolResultBlockParam`

                - `JsonElement Type = "text_editor_code_execution_tool_result"`

                - `required Content Content`

                  - `class TextEditorCodeExecutionToolResultErrorParam`

                    - `JsonElement Type = "text_editor_code_execution_tool_result_error"`

                    - `required TextEditorCodeExecutionToolResultErrorCode ErrorCode`

                      - `InvalidToolInput("invalid_tool_input")`

                      - `Unavailable("unavailable")`

                      - `TooManyRequests("too_many_requests")`

                      - `ExecutionTimeExceeded("execution_time_exceeded")`

                      - `FileNotFound("file_not_found")`

                    - `string? ErrorMessage`

                  - `class TextEditorCodeExecutionViewResultBlockParam`

                    - `JsonElement Type = "text_editor_code_execution_view_result"`

                    - `required string Content`

                    - `required FileType FileType`

                      - `Text("text")`

                      - `Image("image")`

                      - `Pdf("pdf")`

                    - `long? NumLines`

                    - `long? StartLine`

                    - `long? TotalLines`

                  - `class TextEditorCodeExecutionCreateResultBlockParam`

                    - `JsonElement Type = "text_editor_code_execution_create_result"`

                    - `required bool IsFileUpdate`

                  - `class TextEditorCodeExecutionStrReplaceResultBlockParam`

                    - `JsonElement Type = "text_editor_code_execution_str_replace_result"`

                    - `IReadOnlyList<string>? Lines`

                    - `long? NewLines`

                    - `long? NewStart`

                    - `long? OldLines`

                    - `long? OldStart`

                - `required string ToolUseID`

                  pattern: ^srvtoolu_[a-zA-Z0-9_]+$

                - `CacheControlEphemeral? CacheControl`

                  Create a cache control breakpoint at this content block.

              - `class ToolSearchToolResultBlockParam`

                - `JsonElement Type = "tool_search_tool_result"`

                - `required Content Content`

                  - `class ToolSearchToolResultErrorParam`

                    - `JsonElement Type = "tool_search_tool_result_error"`

                    - `required ToolSearchToolResultErrorCode ErrorCode`

                      - `InvalidToolInput("invalid_tool_input")`

                      - `Unavailable("unavailable")`

                      - `TooManyRequests("too_many_requests")`

                      - `ExecutionTimeExceeded("execution_time_exceeded")`

                    - `string? ErrorMessage`

                  - `class ToolSearchToolSearchResultBlockParam`

                    - `JsonElement Type = "tool_search_tool_search_result"`

                    - `required IReadOnlyList<ToolReferenceBlockParam> ToolReferences`

                      - `JsonElement Type = "tool_reference"`

                      - `required string ToolName`

                        minLength: 1, maxLength: 256, pattern: ^[a-zA-Z0-9_-]{1,256}$

                      - `CacheControlEphemeral? CacheControl`

                        Create a cache control breakpoint at this content block.

                - `required string ToolUseID`

                  pattern: ^srvtoolu_[a-zA-Z0-9_]+$

                - `CacheControlEphemeral? CacheControl`

                  Create a cache control breakpoint at this content block.

              - `class ContainerUploadBlockParam`

                A content block that represents a file to be uploaded to the container
                Files uploaded via this block will be available in the container's input directory.

                - `JsonElement Type = "container_upload"`

                - `required string FileID`

                - `CacheControlEphemeral? CacheControl`

                  Create a cache control breakpoint at this content block.

          - `JsonElement Role = "user"`

        - `class AssistantMessageParam`

          - `required MessageContentParam Content`

          - `JsonElement Role = "assistant"`

        - `class SystemMessageParam`

          - `required Content Content`

            - `string`

            - `IReadOnlyList<TextBlockParam>`

              - `JsonElement Type = "text"`

              - `required string Text`

                minLength: 1

              - `CacheControlEphemeral? CacheControl`

                Create a cache control breakpoint at this content block.

              - `IReadOnlyList<TextCitationParam>? Citations`

          - `JsonElement Role = "system"`

      - `required Model Model`

        The model that will complete your prompt.

        See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options.

        - `ClaudeHaiku5_5("claude-haiku-5-5")`

          Fastest model for high-volume, real-time tasks

        - `ClaudeSonnet5_5("claude-sonnet-5-5")`

          Efficient model for coding and agents

        - `ClaudeFable5_1("claude-fable-5-1")`

          Frontier intelligence for ambitious tasks across coding, scientific discovery, and enterprise workflows

        - `ClaudeOpus5_5("claude-opus-5-5")`

          Powerful intelligence for coding, knowledge work, and long-running agents

        - `ClaudeMythos5_1("claude-mythos-5-1")`

          Our most capable model for cybersecurity and biology research, available through trusted access programs

        - `ClaudeSonnet5("claude-sonnet-5")`

          Efficient model for coding and agents

        - `ClaudeFable5("claude-fable-5")`

          Next generation of intelligence for the hardest knowledge work and coding problems

        - `ClaudeMythos5("claude-mythos-5")`

          Most capable model for cybersecurity and biology research

        - `ClaudeOpus5("claude-opus-5")`

          Powerful intelligence for long-running agents and coding

        - `ClaudeOpus4_8("claude-opus-4-8")`

          Powerful intelligence for long-running agents and coding

        - `ClaudeOpus4_7("claude-opus-4-7")`

          Powerful intelligence for long-running agents and coding

        - `ClaudeOpus4_6("claude-opus-4-6")`

          Powerful intelligence for long-running agents and coding

        - `ClaudeSonnet4_6("claude-sonnet-4-6")`

          Best combination of speed and intelligence

        - `ClaudeHaiku4_5("claude-haiku-4-5")`

        - `ClaudeHaiku4_5_20251001("claude-haiku-4-5-20251001")`

        - `ClaudeOpus4_5("claude-opus-4-5")`

          Powerful intelligence for long-running agents and coding

        - `ClaudeOpus4_5_20251101("claude-opus-4-5-20251101")`

          Powerful intelligence for long-running agents and coding

        - `ClaudeMythosPreview("claude-mythos-preview")`

          **Deprecated**: Will reach end-of-life on June 30, 2026. Please migrate to claude-mythos-5. Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for more information.

          New class of intelligence, strongest in coding and cybersecurity

        - `ClaudeSonnet4_5("claude-sonnet-4-5")`

          **Deprecated**: Will reach end-of-life on November 30, 2026. Please migrate to claude-sonnet-5-5. Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for more information.

          High-performance model for agents and coding

        - `ClaudeSonnet4_5_20250929("claude-sonnet-4-5-20250929")`

          **Deprecated**: Will reach end-of-life on November 30, 2026. Please migrate to claude-sonnet-5-5. Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for more information.

          High-performance model for agents and coding

      - `CacheControlEphemeral? CacheControl`

        Top-level cache control automatically applies a cache_control marker to the last cacheable block in the request.

      - `MessageCreateParamsContainer? Container`

        Container identifier for reuse across requests.

        - `class ContainerParams`

          Container parameters with skills to be loaded.

          - `string? ID`

            Container id

          - `IReadOnlyList<SkillParams>? Skills`

            List of skills to load in the container

            maxItems: 20

            - `required SkillParamsType Type`

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

              - `Anthropic("anthropic")`

              - `Custom("custom")`

            - `required string SkillID`

              Skill ID

              minLength: 1, maxLength: 64

            - `string Version`

              Skill version or 'latest' for most recent version

              minLength: 1, maxLength: 64

        - `string`

      - `DiagnosticsParam? Diagnostics`

        Request-level diagnostics. Supply `previous_message_id` to have the response include `diagnostics.cache_miss_reason` explaining any prompt-cache divergence from that prior request.

        - `string? PreviousMessageID`

          The `id` (`msg_...`) from this client's previous /v1/messages response. The server compares that request's prompt fingerprint against this one and returns `diagnostics.cache_miss_reason` when the prompt-cache prefix could not be reused. Pass `null` on the first turn to opt in without a prior message to compare.

          maxLength: 256

      - `string? InferenceGeo`

        Specifies the geographic region for inference processing. If not specified, the workspace's `default_inference_geo` is used.

      - `Metadata Metadata`

        An object describing metadata about the request.

        - `string? UserID`

          An external identifier for the user who is associated with the request.

          This should be a uuid, hash value, or other opaque identifier. Anthropic may use this id to help detect abuse. Do not include any identifying information such as name, email address, or phone number.

          maxLength: 512

      - `OutputConfig OutputConfig`

        Configuration options for the model's output, such as the output format.

        - `Effort? Effort`

          How much effort the model should put into its response. Higher effort levels may result in more thorough analysis but take longer.

          Valid values are `low`, `medium`, `high`, `xhigh`, or `max`.

          - `Low("low")`

          - `Medium("medium")`

          - `High("high")`

          - `Xhigh("xhigh")`

          - `Max("max")`

        - `JsonOutputFormat? Format`

          A schema to specify Claude's output format in responses. See [structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs?sdk_languages=csharp)

          - `JsonElement Type = "json_schema"`

          - `required IReadOnlyDictionary<string, JsonElement> Schema`

            The JSON schema of the format

      - `ServiceTier ServiceTier`

        Determines whether to use priority capacity (if available) or standard capacity for this request.

        Anthropic offers different levels of service for your API requests. See [service-tiers](https://platform.claude.com/docs/en/api/service-tiers?sdk_languages=csharp) for details.

        - `Auto("auto")`

        - `StandardOnly("standard_only")`

      - `Speed? Speed`

        The inference speed mode for this request. `"fast"` enables high output-tokens-per-second inference.

        Some models require the `fast-mode-2026-02-01` beta header for any `speed` value. See [fast mode](https://platform.claude.com/docs/en/build-with-claude/fast-mode?sdk_languages=csharp) for which models.

        - `Standard("standard")`

        - `Fast("fast")`

      - `IReadOnlyList<string> StopSequences`

        Custom text sequences that will cause the model to stop generating.

        Our models will normally stop when they have naturally completed their turn, which will result in a response `stop_reason` of `"end_turn"`.

        If you want the model to stop generating when it encounters custom strings of text, you can use the `stop_sequences` parameter. If the model encounters one of the custom sequences, the response `stop_reason` value will be `"stop_sequence"` and the response `stop_sequence` value will contain the matched stop sequence.

      - `bool Stream`

        Whether to incrementally stream the response using server-sent events. When `true`, SDKs return a raw event stream.

        In the TypeScript, Python and Ruby SDKs, the recommended way to stream is `messages.stream()`. It sets `stream` for you and accumulates the events into the final message. See [Streaming with SDKs](https://platform.claude.com/docs/en/build-with-claude/streaming?sdk_languages=csharp#streaming-with-sdks) for an example in each language.

      - `System System`

        System prompt.

        A system prompt is a way of providing context and instructions to Claude, such as specifying a particular goal or role. See our [guide to system prompts](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices?sdk_languages=csharp#give-claude-a-role).

        - `string`

        - `IReadOnlyList<TextBlockParam>`

          - `JsonElement Type = "text"`

          - `required string Text`

            minLength: 1

          - `CacheControlEphemeral? CacheControl`

            Create a cache control breakpoint at this content block.

          - `IReadOnlyList<TextCitationParam>? Citations`

      - `ThinkingConfigParam Thinking`

        Configuration for Claude's thinking.

        With `{"type": "adaptive"}`, Claude decides when and how much to think. With `{"type": "enabled"}` (manual extended thinking), you set a `budget_tokens` of at least 1,024. Thinking tokens count toward your `max_tokens` limit.

        Which `type` values are accepted, and what happens when you omit `thinking`, depend on the model. See [thinking](https://platform.claude.com/docs/en/build-with-claude/thinking?sdk_languages=csharp#configuring-thinking) for each model's behavior.

        - `class ThinkingConfigEnabled`

          - `JsonElement Type = "enabled"`

          - `required long BudgetTokens`

            Determines how many tokens Claude can use for its internal reasoning process. Larger budgets can enable more thorough analysis for complex problems, improving response quality.

            Must be ≥1024 and less than `max_tokens`.

            See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking?sdk_languages=csharp) for details.

            minimum: 1024

          - `Display? Display`

            Controls how thinking content appears in the response. When set to `summarized`, thinking is returned normally. When set to `omitted`, thinking content is redacted but a signature is returned for multi-turn continuity. The default depends on the model; see [Controlling thinking display](https://platform.claude.com/docs/en/build-with-claude/thinking?sdk_languages=csharp#controlling-thinking-display).

            - `Summarized("summarized")`

            - `Omitted("omitted")`

        - `class ThinkingConfigDisabled`

          - `JsonElement Type = "disabled"`

        - `class ThinkingConfigBetweenTools`

          - `JsonElement Type = "between_tools"`

        - `class ThinkingConfigAdaptive`

          - `JsonElement Type = "adaptive"`

          - `Display? Display`

            Controls how thinking content appears in the response. When set to `summarized`, thinking is returned normally. When set to `omitted`, thinking content is redacted but a signature is returned for multi-turn continuity. The default depends on the model; see [Controlling thinking display](https://platform.claude.com/docs/en/build-with-claude/thinking?sdk_languages=csharp#controlling-thinking-display).

            - `Summarized("summarized")`

            - `Omitted("omitted")`

      - `ToolChoice ToolChoice`

        How the model should use the provided tools. The model can use a specific tool, any available tool, decide by itself, or not use tools at all.

        - `class ToolChoiceAuto`

          The model will automatically decide whether to use tools.

          - `JsonElement Type = "auto"`

          - `bool DisableParallelToolUse`

            Whether to disable parallel tool use.

            Defaults to `false`. If set to `true`, the model will output at most one tool use.

        - `class ToolChoiceAny`

          The model will use any available tools.

          - `JsonElement Type = "any"`

          - `bool DisableParallelToolUse`

            Whether to disable parallel tool use.

            Defaults to `false`. If set to `true`, the model will output exactly one tool use.

        - `class ToolChoiceTool`

          The model will use the specified tool with `tool_choice.name`.

          - `JsonElement Type = "tool"`

          - `required string Name`

            The name of the tool to use.

          - `bool DisableParallelToolUse`

            Whether to disable parallel tool use.

            Defaults to `false`. If set to `true`, the model will output exactly one tool use.

        - `class ToolChoiceNone`

          The model will not be allowed to use tools.

          - `JsonElement Type = "none"`

      - `IReadOnlyList<ToolUnion> Tools`

        Definitions of tools that the model may use.

        If you include `tools` in your API request, the model may return `tool_use` content blocks that represent the model's use of those tools. You can then run those tools using the tool input generated by the model and then optionally return results back to the model using `tool_result` content blocks.

        There are two types of tools: **client tools** and **server tools**. The behavior described below applies to client tools. For [server tools](https://platform.claude.com/docs/en/agents-and-tools/tool-use/server-tools?sdk_languages=csharp), see their individual documentation as each has its own behavior (e.g., the [web search tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-search-tool?sdk_languages=csharp)).

        Each tool definition includes:

        * `name`: Name of the tool.
        * `description`: Optional, but strongly-recommended description of the tool.
        * `input_schema`: [JSON schema](https://json-schema.org/draft/2020-12) for the tool `input` shape that the model will produce in `tool_use` output content blocks.

        For example, if you defined `tools` as:

        ```json
        [
          {
            "name": "get_stock_price",
            "description": "Get the current stock price for a given ticker symbol.",
            "input_schema": {
              "type": "object",
              "properties": {
                "ticker": {
                  "type": "string",
                  "description": "The stock ticker symbol, e.g. AAPL for Apple Inc."
                }
              },
              "required": ["ticker"]
            }
          }
        ]
        ```

        And then asked the model "What's the S&P 500 at today?", the model might produce `tool_use` content blocks in the response like this:

        ```json
        [
          {
            "type": "tool_use",
            "id": "toolu_01D7FLrfh4GYq7yT1ULFeyMV",
            "name": "get_stock_price",
            "input": { "ticker": "^GSPC" }
          }
        ]
        ```

        You might then run your `get_stock_price` tool with `{"ticker": "^GSPC"}` as an input, and return the following back to the model in a subsequent `user` message:

        ```json
        [
          {
            "type": "tool_result",
            "tool_use_id": "toolu_01D7FLrfh4GYq7yT1ULFeyMV",
            "content": "259.75 USD"
          }
        ]
        ```

        Tools can be used for workflows that include running client-side tools and functions, or more generally whenever you want the model to produce a particular JSON structure of output.

        See our [guide](https://platform.claude.com/docs/en/agents-and-tools/tool-use/overview?sdk_languages=csharp) for more details.

        - `class Tool`

          - `Type? Type`

          - `required InputSchema InputSchema`

            [JSON schema](https://json-schema.org/draft/2020-12) for this tool's input.

            This defines the shape of the `input` that your tool accepts and that the model will produce.

            - `JsonElement Type = "object"`

            - `IReadOnlyDictionary<string, JsonElement>? Properties`

            - `IReadOnlyList<string>? Required`

          - `required string Name`

            Name of the tool.

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

            minLength: 1, maxLength: 128, pattern: ^[a-zA-Z0-9_-]{1,128}$

          - `IReadOnlyList<AllowedCaller> AllowedCallers`

            - `Direct("direct")`

            - `CodeExecution20250825("code_execution_20250825")`

            - `CodeExecution20260120("code_execution_20260120")`

            - `CodeExecution20260521("code_execution_20260521")`

          - `CacheControlEphemeral? CacheControl`

            Create a cache control breakpoint at this content block.

          - `bool DeferLoading`

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

          - `string Description`

            Description of what this tool does.

            Tool descriptions should be as detailed as possible. The more information that the model has about what the tool is and how to use it, the better it will perform. You can use natural language descriptions to reinforce important aspects of the tool input JSON schema.

          - `bool? EagerInputStreaming`

            Enable eager input streaming for this tool. When true, tool input parameters will be streamed incrementally as they are generated, and types will be inferred on-the-fly rather than buffering the full JSON output. When false, streaming is disabled for this tool even if the fine-grained-tool-streaming beta is active. When null (default), uses the default behavior based on beta headers.

          - `IReadOnlyList<IReadOnlyDictionary<string, JsonElement>> InputExamples`

          - `bool Strict`

            When true, guarantees schema validation on tool names and inputs

        - `class ToolBash20250124`

          - `JsonElement Type = "bash_20250124"`

          - `JsonElement Name = "bash"`

            Name of the tool.

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

          - `IReadOnlyList<AllowedCaller> AllowedCallers`

            - `Direct("direct")`

            - `CodeExecution20250825("code_execution_20250825")`

            - `CodeExecution20260120("code_execution_20260120")`

            - `CodeExecution20260521("code_execution_20260521")`

          - `CacheControlEphemeral? CacheControl`

            Create a cache control breakpoint at this content block.

          - `bool DeferLoading`

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

          - `IReadOnlyList<IReadOnlyDictionary<string, JsonElement>> InputExamples`

          - `bool Strict`

            When true, guarantees schema validation on tool names and inputs

        - `class CodeExecutionTool20250522`

          - `JsonElement Type = "code_execution_20250522"`

          - `JsonElement Name = "code_execution"`

            Name of the tool.

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

          - `IReadOnlyList<AllowedCaller> AllowedCallers`

            - `Direct("direct")`

            - `CodeExecution20250825("code_execution_20250825")`

            - `CodeExecution20260120("code_execution_20260120")`

            - `CodeExecution20260521("code_execution_20260521")`

          - `CacheControlEphemeral? CacheControl`

            Create a cache control breakpoint at this content block.

          - `bool DeferLoading`

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

          - `bool Strict`

            When true, guarantees schema validation on tool names and inputs

        - `class CodeExecutionTool20250825`

          - `JsonElement Type = "code_execution_20250825"`

          - `JsonElement Name = "code_execution"`

            Name of the tool.

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

          - `IReadOnlyList<AllowedCaller> AllowedCallers`

            - `Direct("direct")`

            - `CodeExecution20250825("code_execution_20250825")`

            - `CodeExecution20260120("code_execution_20260120")`

            - `CodeExecution20260521("code_execution_20260521")`

          - `CacheControlEphemeral? CacheControl`

            Create a cache control breakpoint at this content block.

          - `bool DeferLoading`

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

          - `bool Strict`

            When true, guarantees schema validation on tool names and inputs

        - `class CodeExecutionTool20260120`

          A `tools` entry for the code execution tool, version `code_execution_20260120`. It adds REPL state persistence to version `code_execution_20250825`.

          REPL state persistence applies with programmatic tool calling. With it, the Python interpreter state, such as variable bindings, persists across requests that reuse the container.

          See the [code execution tool guide](https://platform.claude.com/docs/en/agents-and-tools/tool-use/code-execution-tool?sdk_languages=csharp#tool-versions) to learn what each tool version adds.

          - `JsonElement Type = "code_execution_20260120"`

          - `JsonElement Name = "code_execution"`

            Name of the tool.

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

          - `IReadOnlyList<AllowedCaller> AllowedCallers`

            - `Direct("direct")`

            - `CodeExecution20250825("code_execution_20250825")`

            - `CodeExecution20260120("code_execution_20260120")`

            - `CodeExecution20260521("code_execution_20260521")`

          - `CacheControlEphemeral? CacheControl`

            Create a cache control breakpoint at this content block.

          - `bool DeferLoading`

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

          - `bool Strict`

            When true, guarantees schema validation on tool names and inputs

        - `class CodeExecutionTool20260521`

          Code execution tool with REPL state persistence.

          - `JsonElement Type = "code_execution_20260521"`

          - `JsonElement Name = "code_execution"`

            Name of the tool.

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

          - `IReadOnlyList<AllowedCaller> AllowedCallers`

            - `Direct("direct")`

            - `CodeExecution20250825("code_execution_20250825")`

            - `CodeExecution20260120("code_execution_20260120")`

            - `CodeExecution20260521("code_execution_20260521")`

          - `CacheControlEphemeral? CacheControl`

            Create a cache control breakpoint at this content block.

          - `bool DeferLoading`

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

          - `bool Strict`

            When true, guarantees schema validation on tool names and inputs

        - `class BrowserToolset20260801`

          The browser toolset: a single `tools[]` entry (carrying no
          `name`) that declares the browser tool family. The model is served
          the family's tool with any members disabled via `configs` removed
          from its schema.

          - `JsonElement Type = "browser_toolset_20260801"`

          - `CacheControlEphemeral? CacheControl`

            Create a cache control breakpoint at this content block.

          - `BrowserToolsetConfigs? Configs`

            Sparse per-member overrides, keyed by member name. Absent, null, and {} are equivalent; a member's defaults apply wherever its key is absent.

            - `BrowserTypeConfig? Type`

              `type`'s config overrides.

              - `bool? DeferLoading`

                Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

              - `bool? Enabled`

                Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

            - `BrowserCloseTabConfig? CloseTab`

              `close_tab`'s config overrides.

              - `bool? DeferLoading`

                Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

              - `bool? Enabled`

                Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

            - `BrowserDoubleClickConfig? DoubleClick`

              `double_click`'s config overrides.

              - `bool? DeferLoading`

                Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

              - `bool? Enabled`

                Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

            - `BrowserFileUploadConfig? FileUpload`

              `file_upload`'s config overrides.

              - `bool? DeferLoading`

                Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

              - `bool? Enabled`

                Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

            - `BrowserFindConfig? Find`

              `find`'s config overrides.

              - `bool? DeferLoading`

                Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

              - `bool? Enabled`

                Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

            - `BrowserFormInputConfig? FormInput`

              `form_input`'s config overrides.

              - `bool? DeferLoading`

                Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

              - `bool? Enabled`

                Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

            - `BrowserGetPageTextConfig? GetPageText`

              `get_page_text`'s config overrides.

              - `bool? DeferLoading`

                Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

              - `bool? Enabled`

                Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

            - `BrowserHoldKeyConfig? HoldKey`

              `hold_key`'s config overrides.

              - `bool? DeferLoading`

                Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

              - `bool? Enabled`

                Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

            - `BrowserHoverConfig? Hover`

              `hover`'s config overrides.

              - `bool? DeferLoading`

                Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

              - `bool? Enabled`

                Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

            - `BrowserJavascriptExecConfig? JavascriptExec`

              `javascript_exec`'s config overrides.

              - `bool? DeferLoading`

                Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

              - `bool? Enabled`

                Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

            - `BrowserKeyConfig? Key`

              `key`'s config overrides.

              - `bool? DeferLoading`

                Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

              - `bool? Enabled`

                Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

            - `BrowserLeftClickConfig? LeftClick`

              `left_click`'s config overrides.

              - `bool? DeferLoading`

                Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

              - `bool? Enabled`

                Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

            - `BrowserLeftClickDragConfig? LeftClickDrag`

              `left_click_drag`'s config overrides.

              - `bool? DeferLoading`

                Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

              - `bool? Enabled`

                Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

            - `BrowserLeftMouseDownConfig? LeftMouseDown`

              `left_mouse_down`'s config overrides.

              - `bool? DeferLoading`

                Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

              - `bool? Enabled`

                Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

            - `BrowserLeftMouseUpConfig? LeftMouseUp`

              `left_mouse_up`'s config overrides.

              - `bool? DeferLoading`

                Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

              - `bool? Enabled`

                Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

            - `BrowserListTabsConfig? ListTabs`

              `list_tabs`'s config overrides.

              - `bool? DeferLoading`

                Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

              - `bool? Enabled`

                Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

            - `BrowserMiddleClickConfig? MiddleClick`

              `middle_click`'s config overrides.

              - `bool? DeferLoading`

                Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

              - `bool? Enabled`

                Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

            - `BrowserMouseMoveConfig? MouseMove`

              `mouse_move`'s config overrides.

              - `bool? DeferLoading`

                Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

              - `bool? Enabled`

                Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

            - `BrowserNavigateConfig? Navigate`

              `navigate`'s config overrides.

              - `bool? DeferLoading`

                Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

              - `bool? Enabled`

                Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

            - `BrowserNewTabConfig? NewTab`

              `new_tab`'s config overrides.

              - `bool? DeferLoading`

                Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

              - `bool? Enabled`

                Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

            - `BrowserReadConsoleConfig? ReadConsole`

              `read_console`'s config overrides.

              - `bool? DeferLoading`

                Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

              - `bool? Enabled`

                Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

            - `BrowserReadNetworkConfig? ReadNetwork`

              `read_network`'s config overrides.

              - `bool? DeferLoading`

                Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

              - `bool? Enabled`

                Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

            - `BrowserReadPageConfig? ReadPage`

              `read_page`'s config overrides.

              - `bool? DeferLoading`

                Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

              - `bool? Enabled`

                Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

            - `BrowserRightClickConfig? RightClick`

              `right_click`'s config overrides.

              - `bool? DeferLoading`

                Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

              - `bool? Enabled`

                Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

            - `BrowserScreenshotConfig? Screenshot`

              `screenshot`'s config overrides.

              - `bool? DeferLoading`

                Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

              - `bool? Enabled`

                Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

            - `BrowserScrollConfig? Scroll`

              `scroll`'s config overrides.

              - `bool? DeferLoading`

                Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

              - `bool? Enabled`

                Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

            - `BrowserScrollToConfig? ScrollTo`

              `scroll_to`'s config overrides.

              - `bool? DeferLoading`

                Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

              - `bool? Enabled`

                Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

            - `BrowserSwitchTabConfig? SwitchTab`

              `switch_tab`'s config overrides.

              - `bool? DeferLoading`

                Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

              - `bool? Enabled`

                Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

            - `BrowserTripleClickConfig? TripleClick`

              `triple_click`'s config overrides.

              - `bool? DeferLoading`

                Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

              - `bool? Enabled`

                Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

            - `BrowserWaitConfig? Wait`

              `wait`'s config overrides.

              - `bool? DeferLoading`

                Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

              - `bool? Enabled`

                Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

            - `BrowserZoomConfig? Zoom`

              `zoom`'s config overrides.

              - `bool? DeferLoading`

                Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

              - `bool? Enabled`

                Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

        - `class MemoryTool20250818`

          - `JsonElement Type = "memory_20250818"`

          - `JsonElement Name = "memory"`

            Name of the tool.

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

          - `IReadOnlyList<AllowedCaller> AllowedCallers`

            - `Direct("direct")`

            - `CodeExecution20250825("code_execution_20250825")`

            - `CodeExecution20260120("code_execution_20260120")`

            - `CodeExecution20260521("code_execution_20260521")`

          - `CacheControlEphemeral? CacheControl`

            Create a cache control breakpoint at this content block.

          - `bool DeferLoading`

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

          - `IReadOnlyList<IReadOnlyDictionary<string, JsonElement>> InputExamples`

          - `bool Strict`

            When true, guarantees schema validation on tool names and inputs

        - `class ComputerToolset20260801`

          The computer toolset: a single `tools[]` entry (carrying no
          `name`) that declares the computer tool family. The model is
          served the family's tool with any members disabled via `configs`
          removed from its schema. Every member is enabled by default, zoom
          included. The single-tool options `display_number` and
          `enable_zoom` are not fields of a toolset entry — it carries only
          `type`, `configs`, and `cache_control`; zoom is controlled
          via `configs.zoom.enabled`.

          - `JsonElement Type = "computer_toolset_20260801"`

          - `CacheControlEphemeral? CacheControl`

            Create a cache control breakpoint at this content block.

          - `ComputerToolsetConfigs? Configs`

            Sparse per-member overrides, keyed by member name. Absent, null, and {} are equivalent; a member's defaults apply wherever its key is absent.

            - `ComputerTypeConfig? Type`

              `type`'s config overrides.

              - `bool? DeferLoading`

                Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

              - `bool? Enabled`

                Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

            - `ComputerCursorPositionConfig? CursorPosition`

              `cursor_position`'s config overrides.

              - `bool? DeferLoading`

                Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

              - `bool? Enabled`

                Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

            - `ComputerDoubleClickConfig? DoubleClick`

              `double_click`'s config overrides.

              - `bool? DeferLoading`

                Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

              - `bool? Enabled`

                Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

            - `ComputerHoldKeyConfig? HoldKey`

              `hold_key`'s config overrides.

              - `bool? DeferLoading`

                Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

              - `bool? Enabled`

                Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

            - `ComputerKeyConfig? Key`

              `key`'s config overrides.

              - `bool? DeferLoading`

                Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

              - `bool? Enabled`

                Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

            - `ComputerLeftClickConfig? LeftClick`

              `left_click`'s config overrides.

              - `bool? DeferLoading`

                Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

              - `bool? Enabled`

                Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

            - `ComputerLeftClickDragConfig? LeftClickDrag`

              `left_click_drag`'s config overrides.

              - `bool? DeferLoading`

                Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

              - `bool? Enabled`

                Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

            - `ComputerLeftMouseDownConfig? LeftMouseDown`

              `left_mouse_down`'s config overrides.

              - `bool? DeferLoading`

                Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

              - `bool? Enabled`

                Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

            - `ComputerLeftMouseUpConfig? LeftMouseUp`

              `left_mouse_up`'s config overrides.

              - `bool? DeferLoading`

                Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

              - `bool? Enabled`

                Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

            - `ComputerMiddleClickConfig? MiddleClick`

              `middle_click`'s config overrides.

              - `bool? DeferLoading`

                Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

              - `bool? Enabled`

                Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

            - `ComputerMouseMoveConfig? MouseMove`

              `mouse_move`'s config overrides.

              - `bool? DeferLoading`

                Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

              - `bool? Enabled`

                Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

            - `ComputerRightClickConfig? RightClick`

              `right_click`'s config overrides.

              - `bool? DeferLoading`

                Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

              - `bool? Enabled`

                Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

            - `ComputerScreenshotConfig? Screenshot`

              `screenshot`'s config overrides.

              - `bool? DeferLoading`

                Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

              - `bool? Enabled`

                Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

            - `ComputerScrollConfig? Scroll`

              `scroll`'s config overrides.

              - `bool? DeferLoading`

                Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

              - `bool? Enabled`

                Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

            - `ComputerTripleClickConfig? TripleClick`

              `triple_click`'s config overrides.

              - `bool? DeferLoading`

                Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

              - `bool? Enabled`

                Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

            - `ComputerWaitConfig? Wait`

              `wait`'s config overrides.

              - `bool? DeferLoading`

                Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

              - `bool? Enabled`

                Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

            - `ComputerZoomConfig? Zoom`

              `zoom`'s config overrides.

              - `bool? DeferLoading`

                Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

              - `bool? Enabled`

                Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

        - `class ToolTextEditor20250124`

          - `JsonElement Type = "text_editor_20250124"`

          - `JsonElement Name = "str_replace_editor"`

            Name of the tool.

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

          - `IReadOnlyList<AllowedCaller> AllowedCallers`

            - `Direct("direct")`

            - `CodeExecution20250825("code_execution_20250825")`

            - `CodeExecution20260120("code_execution_20260120")`

            - `CodeExecution20260521("code_execution_20260521")`

          - `CacheControlEphemeral? CacheControl`

            Create a cache control breakpoint at this content block.

          - `bool DeferLoading`

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

          - `IReadOnlyList<IReadOnlyDictionary<string, JsonElement>> InputExamples`

          - `bool Strict`

            When true, guarantees schema validation on tool names and inputs

        - `class ToolTextEditor20250429`

          - `JsonElement Type = "text_editor_20250429"`

          - `JsonElement Name = "str_replace_based_edit_tool"`

            Name of the tool.

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

          - `IReadOnlyList<AllowedCaller> AllowedCallers`

            - `Direct("direct")`

            - `CodeExecution20250825("code_execution_20250825")`

            - `CodeExecution20260120("code_execution_20260120")`

            - `CodeExecution20260521("code_execution_20260521")`

          - `CacheControlEphemeral? CacheControl`

            Create a cache control breakpoint at this content block.

          - `bool DeferLoading`

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

          - `IReadOnlyList<IReadOnlyDictionary<string, JsonElement>> InputExamples`

          - `bool Strict`

            When true, guarantees schema validation on tool names and inputs

        - `class ToolTextEditor20250728`

          - `JsonElement Type = "text_editor_20250728"`

          - `JsonElement Name = "str_replace_based_edit_tool"`

            Name of the tool.

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

          - `IReadOnlyList<AllowedCaller> AllowedCallers`

            - `Direct("direct")`

            - `CodeExecution20250825("code_execution_20250825")`

            - `CodeExecution20260120("code_execution_20260120")`

            - `CodeExecution20260521("code_execution_20260521")`

          - `CacheControlEphemeral? CacheControl`

            Create a cache control breakpoint at this content block.

          - `bool DeferLoading`

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

          - `IReadOnlyList<IReadOnlyDictionary<string, JsonElement>> InputExamples`

          - `long? MaxCharacters`

            Maximum number of characters to display when viewing a file. If not specified, defaults to displaying the full file.

            minimum: 1

          - `bool Strict`

            When true, guarantees schema validation on tool names and inputs

        - `class WebSearchTool20250305`

          - `JsonElement Type = "web_search_20250305"`

          - `JsonElement Name = "web_search"`

            Name of the tool.

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

          - `IReadOnlyList<AllowedCaller> AllowedCallers`

            - `Direct("direct")`

            - `CodeExecution20250825("code_execution_20250825")`

            - `CodeExecution20260120("code_execution_20260120")`

            - `CodeExecution20260521("code_execution_20260521")`

          - `IReadOnlyList<string>? AllowedDomains`

            If provided, only these domains will be included in results. Cannot be used alongside `blocked_domains`.

          - `IReadOnlyList<string>? BlockedDomains`

            If provided, these domains will never appear in results. Cannot be used alongside `allowed_domains`.

          - `CacheControlEphemeral? CacheControl`

            Create a cache control breakpoint at this content block.

          - `bool DeferLoading`

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

          - `long? MaxUses`

            Maximum number of times the tool can be used in the API request.

            minimum: 1

          - `bool Strict`

            When true, guarantees schema validation on tool names and inputs

          - `UserLocation? UserLocation`

            Parameters for the user's location. Used to provide more relevant search results.

            - `JsonElement Type = "approximate"`

            - `string? City`

              The city of the user.

              minLength: 1, maxLength: 255

            - `string? Country`

              The two letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the user.

              minLength: 2, maxLength: 2

            - `string? Region`

              The region of the user.

              minLength: 1, maxLength: 255

            - `string? Timezone`

              The [IANA timezone](https://nodatime.org/TimeZones) of the user.

              minLength: 1, maxLength: 255

        - `class WebFetchTool20250910`

          - `JsonElement Type = "web_fetch_20250910"`

          - `JsonElement Name = "web_fetch"`

            Name of the tool.

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

          - `IReadOnlyList<AllowedCaller> AllowedCallers`

            - `Direct("direct")`

            - `CodeExecution20250825("code_execution_20250825")`

            - `CodeExecution20260120("code_execution_20260120")`

            - `CodeExecution20260521("code_execution_20260521")`

          - `IReadOnlyList<string>? AllowedDomains`

            List of domains to allow fetching from

          - `IReadOnlyList<string>? BlockedDomains`

            List of domains to block fetching from

          - `CacheControlEphemeral? CacheControl`

            Create a cache control breakpoint at this content block.

          - `CitationsConfigParam? Citations`

            Citations configuration for fetched documents. Citations are disabled by default.

          - `bool DeferLoading`

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

          - `long? MaxContentTokens`

            Maximum number of tokens used by including web page text content in the context. The limit is approximate and does not apply to binary content such as PDFs.

            minimum: 1

          - `long? MaxUses`

            Maximum number of times the tool can be used in the API request.

            minimum: 1

          - `bool Strict`

            When true, guarantees schema validation on tool names and inputs

          - `WebFetchUrlSources? UrlSources`

            Which sources contribute to the set of URLs the tool may fetch. Omitted means every source.

            - `ClientToolResults ClientToolResults`

              Which client tools' results contribute fetchable URLs: "all", "none", or an only or except list of client tool names from tools[].

              - `class WebFetchUrlSourceAll`

                The `url_sources` variant under which a source contributes in
                full: every result of the tool filter's source, or all user input.

                - `JsonElement Type = "all"`

              - `class WebFetchUrlSourceNone`

                The `url_sources` variant under which a source contributes nothing:
                no result of the tool filter's source, or no user input.

                - `JsonElement Type = "none"`

              - `class WebFetchUrlSourceOnly`

                The tool filter variant under which only the named tools' results
                contribute.

                - `JsonElement Type = "only"`

                - `required IReadOnlyList<WebFetchUrlSourceToolReference> Tools`

                  - `JsonElement Type = "tool_reference"`

                  - `required string Name`

              - `class WebFetchUrlSourceExcept`

                The tool filter variant under which every result but the named
                tools' contributes.

                - `JsonElement Type = "except"`

                - `required IReadOnlyList<WebFetchUrlSourceToolReference> Tools`

                  - `JsonElement Type = "tool_reference"`

                  - `required string Name`

            - `ServerToolResults ServerToolResults`

              Which server tools' results contribute fetchable URLs: "all", "none", or an only or except list of server tool names from tools[]; only web_search and web_fetch results ever contribute.

              - `class WebFetchUrlSourceAll`

                The `url_sources` variant under which a source contributes in
                full: every result of the tool filter's source, or all user input.

              - `class WebFetchUrlSourceNone`

                The `url_sources` variant under which a source contributes nothing:
                no result of the tool filter's source, or no user input.

              - `class WebFetchUrlSourceOnly`

                The tool filter variant under which only the named tools' results
                contribute.

              - `class WebFetchUrlSourceExcept`

                The tool filter variant under which every result but the named
                tools' contributes.

            - `UserInput UserInput`

              Whether URLs in user messages are fetchable: "all" or "none".

              - `class WebFetchUrlSourceAll`

                The `url_sources` variant under which a source contributes in
                full: every result of the tool filter's source, or all user input.

              - `class WebFetchUrlSourceNone`

                The `url_sources` variant under which a source contributes nothing:
                no result of the tool filter's source, or no user input.

        - `class WebSearchTool20260209`

          - `JsonElement Type = "web_search_20260209"`

          - `JsonElement Name = "web_search"`

            Name of the tool.

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

          - `IReadOnlyList<AllowedCaller> AllowedCallers`

            - `Direct("direct")`

            - `CodeExecution20250825("code_execution_20250825")`

            - `CodeExecution20260120("code_execution_20260120")`

            - `CodeExecution20260521("code_execution_20260521")`

          - `IReadOnlyList<string>? AllowedDomains`

            If provided, only these domains will be included in results. Cannot be used alongside `blocked_domains`.

          - `IReadOnlyList<string>? BlockedDomains`

            If provided, these domains will never appear in results. Cannot be used alongside `allowed_domains`.

          - `CacheControlEphemeral? CacheControl`

            Create a cache control breakpoint at this content block.

          - `bool DeferLoading`

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

          - `long? MaxUses`

            Maximum number of times the tool can be used in the API request.

            minimum: 1

          - `bool Strict`

            When true, guarantees schema validation on tool names and inputs

          - `UserLocation? UserLocation`

            Parameters for the user's location. Used to provide more relevant search results.

        - `class WebFetchTool20260209`

          - `JsonElement Type = "web_fetch_20260209"`

          - `JsonElement Name = "web_fetch"`

            Name of the tool.

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

          - `IReadOnlyList<AllowedCaller> AllowedCallers`

            - `Direct("direct")`

            - `CodeExecution20250825("code_execution_20250825")`

            - `CodeExecution20260120("code_execution_20260120")`

            - `CodeExecution20260521("code_execution_20260521")`

          - `IReadOnlyList<string>? AllowedDomains`

            List of domains to allow fetching from

          - `IReadOnlyList<string>? BlockedDomains`

            List of domains to block fetching from

          - `CacheControlEphemeral? CacheControl`

            Create a cache control breakpoint at this content block.

          - `CitationsConfigParam? Citations`

            Citations configuration for fetched documents. Citations are disabled by default.

          - `bool DeferLoading`

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

          - `long? MaxContentTokens`

            Maximum number of tokens used by including web page text content in the context. The limit is approximate and does not apply to binary content such as PDFs.

            minimum: 1

          - `long? MaxUses`

            Maximum number of times the tool can be used in the API request.

            minimum: 1

          - `bool Strict`

            When true, guarantees schema validation on tool names and inputs

          - `WebFetchUrlSources? UrlSources`

            Which sources contribute to the set of URLs the tool may fetch. Omitted means every source.

        - `class WebFetchTool20260309`

          Web fetch tool with use_cache parameter for bypassing cached content.

          - `JsonElement Type = "web_fetch_20260309"`

          - `JsonElement Name = "web_fetch"`

            Name of the tool.

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

          - `IReadOnlyList<AllowedCaller> AllowedCallers`

            - `Direct("direct")`

            - `CodeExecution20250825("code_execution_20250825")`

            - `CodeExecution20260120("code_execution_20260120")`

            - `CodeExecution20260521("code_execution_20260521")`

          - `IReadOnlyList<string>? AllowedDomains`

            List of domains to allow fetching from

          - `IReadOnlyList<string>? BlockedDomains`

            List of domains to block fetching from

          - `CacheControlEphemeral? CacheControl`

            Create a cache control breakpoint at this content block.

          - `CitationsConfigParam? Citations`

            Citations configuration for fetched documents. Citations are disabled by default.

          - `bool DeferLoading`

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

          - `long? MaxContentTokens`

            Maximum number of tokens used by including web page text content in the context. The limit is approximate and does not apply to binary content such as PDFs.

            minimum: 1

          - `long? MaxUses`

            Maximum number of times the tool can be used in the API request.

            minimum: 1

          - `bool Strict`

            When true, guarantees schema validation on tool names and inputs

          - `WebFetchUrlSources? UrlSources`

            Which sources contribute to the set of URLs the tool may fetch. Omitted means every source.

          - `bool UseCache`

            Whether to use cached content. Set to false to bypass the cache and fetch fresh content. Only set to false when the user explicitly requests fresh content or when fetching rapidly-changing sources.

        - `class WebSearchTool20260318`

          - `JsonElement Type = "web_search_20260318"`

          - `JsonElement Name = "web_search"`

            Name of the tool.

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

          - `IReadOnlyList<AllowedCaller> AllowedCallers`

            - `Direct("direct")`

            - `CodeExecution20250825("code_execution_20250825")`

            - `CodeExecution20260120("code_execution_20260120")`

            - `CodeExecution20260521("code_execution_20260521")`

          - `IReadOnlyList<string>? AllowedDomains`

            If provided, only these domains will be included in results. Cannot be used alongside `blocked_domains`.

          - `IReadOnlyList<string>? BlockedDomains`

            If provided, these domains will never appear in results. Cannot be used alongside `allowed_domains`.

          - `CacheControlEphemeral? CacheControl`

            Create a cache control breakpoint at this content block.

          - `bool DeferLoading`

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

          - `long? MaxUses`

            Maximum number of times the tool can be used in the API request.

            minimum: 1

          - `ResponseInclusion ResponseInclusion`

            How this tool's result blocks appear in the API response when the result was consumed by a completed code_execution call in the same turn. 'full' returns the complete content (default). 'excluded' drops the nested server_tool_use and result block pair entirely. Results from direct calls, or from code_execution calls that paused before completing, are always returned in full so they can be sent back on the next turn.

            - `Full("full")`

            - `Excluded("excluded")`

          - `bool Strict`

            When true, guarantees schema validation on tool names and inputs

          - `UserLocation? UserLocation`

            Parameters for the user's location. Used to provide more relevant search results.

        - `class WebFetchTool20260318`

          - `JsonElement Type = "web_fetch_20260318"`

          - `JsonElement Name = "web_fetch"`

            Name of the tool.

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

          - `IReadOnlyList<AllowedCaller> AllowedCallers`

            - `Direct("direct")`

            - `CodeExecution20250825("code_execution_20250825")`

            - `CodeExecution20260120("code_execution_20260120")`

            - `CodeExecution20260521("code_execution_20260521")`

          - `IReadOnlyList<string>? AllowedDomains`

            List of domains to allow fetching from

          - `IReadOnlyList<string>? BlockedDomains`

            List of domains to block fetching from

          - `CacheControlEphemeral? CacheControl`

            Create a cache control breakpoint at this content block.

          - `CitationsConfigParam? Citations`

            Citations configuration for fetched documents. Citations are disabled by default.

          - `bool DeferLoading`

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

          - `long? MaxContentTokens`

            Maximum number of tokens used by including web page text content in the context. The limit is approximate and does not apply to binary content such as PDFs.

            minimum: 1

          - `long? MaxUses`

            Maximum number of times the tool can be used in the API request.

            minimum: 1

          - `ResponseInclusion ResponseInclusion`

            How this tool's result blocks appear in the API response when the result was consumed by a completed code_execution call in the same turn. 'full' returns the complete content (default). 'excluded' drops the nested server_tool_use and result block pair entirely. Results from direct calls, or from code_execution calls that paused before completing, are always returned in full so they can be sent back on the next turn.

            - `Full("full")`

            - `Excluded("excluded")`

          - `bool Strict`

            When true, guarantees schema validation on tool names and inputs

          - `WebFetchUrlSources? UrlSources`

            Which sources contribute to the set of URLs the tool may fetch. Omitted means every source.

          - `bool UseCache`

            Whether to use cached content. Set to false to bypass the cache and fetch fresh content. Only set to false when the user explicitly requests fresh content or when fetching rapidly-changing sources.

        - `class ToolSearchToolBm25_20251119`

          - `required Type Type`

            - `ToolSearchToolBm25_20251119("tool_search_tool_bm25_20251119")`

            - `ToolSearchToolBm25("tool_search_tool_bm25")`

          - `JsonElement Name = "tool_search_tool_bm25"`

            Name of the tool.

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

          - `IReadOnlyList<AllowedCaller> AllowedCallers`

            - `Direct("direct")`

            - `CodeExecution20250825("code_execution_20250825")`

            - `CodeExecution20260120("code_execution_20260120")`

            - `CodeExecution20260521("code_execution_20260521")`

          - `CacheControlEphemeral? CacheControl`

            Create a cache control breakpoint at this content block.

          - `bool DeferLoading`

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

          - `bool Strict`

            When true, guarantees schema validation on tool names and inputs

        - `class ToolSearchToolRegex20251119`

          - `required Type Type`

            - `ToolSearchToolRegex20251119("tool_search_tool_regex_20251119")`

            - `ToolSearchToolRegex("tool_search_tool_regex")`

          - `JsonElement Name = "tool_search_tool_regex"`

            Name of the tool.

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

          - `IReadOnlyList<AllowedCaller> AllowedCallers`

            - `Direct("direct")`

            - `CodeExecution20250825("code_execution_20250825")`

            - `CodeExecution20260120("code_execution_20260120")`

            - `CodeExecution20260521("code_execution_20260521")`

          - `CacheControlEphemeral? CacheControl`

            Create a cache control breakpoint at this content block.

          - `bool DeferLoading`

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

          - `bool Strict`

            When true, guarantees schema validation on tool names and inputs

  - `string userProfileID` (header parameter)

    The user profile ID to attribute the requests in this batch to. Use when acting on behalf of a party other than your organization. Applies to every request in the batch; an individual request whose `user_profile_id` body field conflicts with this header is errored.

  - `string workspaceID` (header parameter)

    Optional header to select the Workspace for this request. The value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).

    Only needed for credentials that can act on more than one Workspace. A credential that belongs to a specific Workspace may omit it; if sent, it must match that Workspace.

#### Returns

- `class MessageBatch`

  - `JsonElement Type = "message_batch"`

    Object type.

    For Message Batches, this is always `"message_batch"`.

  - `required string ID`

    Unique object identifier.

    The format and length of IDs may change over time.

  - `required DateTimeOffset? ArchivedAt`

    RFC 3339 datetime string representing the time at which the Message Batch was archived and its results became unavailable.

    format: date-time

  - `required DateTimeOffset? CancelInitiatedAt`

    RFC 3339 datetime string representing the time at which cancellation was initiated for the Message Batch. Specified only if cancellation was initiated.

    format: date-time

  - `required DateTimeOffset CreatedAt`

    RFC 3339 datetime string representing the time at which the Message Batch was created.

    format: date-time

  - `required DateTimeOffset? EndedAt`

    RFC 3339 datetime string representing the time at which processing for the Message Batch ended. Specified only once processing ends.

    Processing ends when every request in a Message Batch has either succeeded, errored, canceled, or expired.

    format: date-time

  - `required DateTimeOffset ExpiresAt`

    RFC 3339 datetime string representing the time at which the Message Batch will expire and end processing, which is 24 hours after creation.

    format: date-time

  - `required ProcessingStatus ProcessingStatus`

    Processing status of the Message Batch.

    - `InProgress("in_progress")`

    - `Canceling("canceling")`

    - `Ended("ended")`

  - `required MessageBatchRequestCounts RequestCounts`

    Tallies requests within the Message Batch, categorized by their status.

    Requests start as `processing` and move to one of the other statuses only once processing of the entire batch ends. The sum of all values always matches the total number of requests in the batch.

    - `required long Canceled`

      Number of requests in the Message Batch that have been canceled.

      This is zero until processing of the entire Message Batch has ended.

    - `required long Errored`

      Number of requests in the Message Batch that encountered an error.

      This is zero until processing of the entire Message Batch has ended.

    - `required long Expired`

      Number of requests in the Message Batch that have expired.

      This is zero until processing of the entire Message Batch has ended.

    - `required long Processing`

      Number of requests in the Message Batch that are processing.

    - `required long Succeeded`

      Number of requests in the Message Batch that have completed successfully.

      This is zero until processing of the entire Message Batch has ended.

  - `required string? ResultsUrl`

    URL to a `.jsonl` file containing the results of the Message Batch requests. Specified only once processing ends.

    Results in the file are not guaranteed to be in the same order as requests. Use the `custom_id` field to match results to requests.

#### Example

```csharp
using System;
using System.Collections.Generic;
using System.Text.Json;
using Messages = Anthropic.Models.Messages;
using Anthropic.Models.Messages.Batches;

BatchCreateParams parameters = new()
{
    Requests =
    [
        new()
        {
            CustomID = "my-custom-id-1",
            Params = new()
            {
                MaxTokens = 1024,
                Messages =
                [
                    new Messages::UserMessageParam("Hello, world")
                ],
                Model = Messages::Model.ClaudeOpus5_5,
                CacheControl = new() { Ttl = Messages::Ttl.Ttl5m },
                Container = new Messages::ContainerParams()
                {
                    ID = "id",
                    Skills =
                    [
                        new()
                        {
                            SkillID = "pdf",
                            Type = Messages::SkillParamsType.Anthropic,
                            Version = "latest",
                        },
                    ],
                },
                Diagnostics = new()
                {
                    PreviousMessageID = "previous_message_id"
                },
                InferenceGeo = "inference_geo",
                Metadata = new()
                {
                    UserID = "13803d75-b4b5-4c3e-b2a2-6f21399b021b"
                },
                OutputConfig = new()
                {
                    Effort = Messages::Effort.Low,
                    Format = new()
                    {
                        Schema = new Dictionary<string, JsonElement>()
                        {
                            { "foo", JsonSerializer.SerializeToElement("bar") }
                        },
                    },
                },
                ServiceTier = ServiceTier.Auto,
                Speed = Speed.Standard,
                StopSequences =
                [
                    "string"
                ],
                Stream = false,
                System = new(

                    [
                        new Messages::TextBlockParam()
                        {
                            Text = "Today's date is 2024-06-01.",
                            CacheControl = new() { Ttl = Messages::Ttl.Ttl5m },
                            Citations =
                            [
                                new Messages::CitationCharLocationParam()
                                {
                                    CitedText = "The grass is green. The sky is blue.",
                                    DocumentIndex = 0,
                                    DocumentTitle = "x",
                                    EndCharIndex = 0,
                                    StartCharIndex = 0,
                                },
                            ],
                        },
                    ]
                ),
                Thinking = new Messages::ThinkingConfigAdaptive()
                {
                    Display = Messages::Display.Summarized
                },
                ToolChoice = new Messages::ToolChoiceAuto()
                {
                    DisableParallelToolUse = true
                },
                Tools =
                [
                    new Messages::Tool()
                    {
                        InputSchema = new()
                        {
                            Properties = new Dictionary<string, JsonElement>()
                            {
                                { "location", JsonSerializer.SerializeToElement("bar") },
                                { "unit", JsonSerializer.SerializeToElement("bar") },
                            },
                            Required =
                            [
                                "location"
                            ],
                        },
                        Name = "name",
                        AllowedCallers =
                        [
                            Messages::ToolAllowedCaller.Direct
                        ],
                        CacheControl = new() { Ttl = Messages::Ttl.Ttl5m },
                        DeferLoading = true,
                        Description = "Get the current weather in a given location",
                        EagerInputStreaming = true,
                        InputExamples =
                        [
                            new Dictionary<string, JsonElement>()
                            {
                                { "foo", JsonSerializer.SerializeToElement("bar") },
                            },
                        ],
                        Strict = true,
                        Type = Messages::Type.Custom,
                    },
                ],
            },
        },
    ],
};

var messageBatch = await client.Messages.Batches.Create(parameters);

Console.WriteLine(messageBatch);
```

##### Response (200)

```json
{
  "id": "msgbatch_013Zva2CMHLNnXjNJJKqJ2EF",
  "archived_at": "2024-08-20T18:37:24.100435Z",
  "cancel_initiated_at": "2024-08-20T18:37:24.100435Z",
  "created_at": "2024-08-20T18:37:24.100435Z",
  "ended_at": "2024-08-20T18:37:24.100435Z",
  "expires_at": "2024-08-20T18:37:24.100435Z",
  "processing_status": "in_progress",
  "request_counts": {
    "canceled": 10,
    "errored": 30,
    "expired": 10,
    "processing": 100,
    "succeeded": 50
  },
  "results_url": "https://api.anthropic.com/v1/messages/batches/msgbatch_013Zva2CMHLNnXjNJJKqJ2EF/results",
  "type": "message_batch"
}
```

### Retrieve a Message Batch

`MessageBatch Messages.Batches.Retrieve(parameters, cancellationToken = default)`

**GET** `/v1/messages/batches/{message_batch_id}`

This endpoint is idempotent and can be used to poll for Message Batch completion. To access the results of a Message Batch, make a request to the `results_url` field in the response.

Learn more about the Message Batches API in our [user guide](https://platform.claude.com/docs/en/build-with-claude/batch-processing?sdk_languages=csharp)

#### Parameters

- `BatchRetrieveParams parameters`

  - `required string messageBatchID` (path parameter)

    ID of the Message Batch.

  - `string workspaceID` (header parameter)

    Optional header to select the Workspace for this request. The value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).

    Only needed for credentials that can act on more than one Workspace. A credential that belongs to a specific Workspace may omit it; if sent, it must match that Workspace.

#### Returns

- `class MessageBatch`

  - `JsonElement Type = "message_batch"`

    Object type.

    For Message Batches, this is always `"message_batch"`.

  - `required string ID`

    Unique object identifier.

    The format and length of IDs may change over time.

  - `required DateTimeOffset? ArchivedAt`

    RFC 3339 datetime string representing the time at which the Message Batch was archived and its results became unavailable.

    format: date-time

  - `required DateTimeOffset? CancelInitiatedAt`

    RFC 3339 datetime string representing the time at which cancellation was initiated for the Message Batch. Specified only if cancellation was initiated.

    format: date-time

  - `required DateTimeOffset CreatedAt`

    RFC 3339 datetime string representing the time at which the Message Batch was created.

    format: date-time

  - `required DateTimeOffset? EndedAt`

    RFC 3339 datetime string representing the time at which processing for the Message Batch ended. Specified only once processing ends.

    Processing ends when every request in a Message Batch has either succeeded, errored, canceled, or expired.

    format: date-time

  - `required DateTimeOffset ExpiresAt`

    RFC 3339 datetime string representing the time at which the Message Batch will expire and end processing, which is 24 hours after creation.

    format: date-time

  - `required ProcessingStatus ProcessingStatus`

    Processing status of the Message Batch.

    - `InProgress("in_progress")`

    - `Canceling("canceling")`

    - `Ended("ended")`

  - `required MessageBatchRequestCounts RequestCounts`

    Tallies requests within the Message Batch, categorized by their status.

    Requests start as `processing` and move to one of the other statuses only once processing of the entire batch ends. The sum of all values always matches the total number of requests in the batch.

    - `required long Canceled`

      Number of requests in the Message Batch that have been canceled.

      This is zero until processing of the entire Message Batch has ended.

    - `required long Errored`

      Number of requests in the Message Batch that encountered an error.

      This is zero until processing of the entire Message Batch has ended.

    - `required long Expired`

      Number of requests in the Message Batch that have expired.

      This is zero until processing of the entire Message Batch has ended.

    - `required long Processing`

      Number of requests in the Message Batch that are processing.

    - `required long Succeeded`

      Number of requests in the Message Batch that have completed successfully.

      This is zero until processing of the entire Message Batch has ended.

  - `required string? ResultsUrl`

    URL to a `.jsonl` file containing the results of the Message Batch requests. Specified only once processing ends.

    Results in the file are not guaranteed to be in the same order as requests. Use the `custom_id` field to match results to requests.

#### Example

```csharp
using System;
using Anthropic.Models.Messages.Batches;

BatchRetrieveParams parameters = new() { MessageBatchID = "message_batch_id" };

var messageBatch = await client.Messages.Batches.Retrieve(parameters);

Console.WriteLine(messageBatch);
```

##### Response (200)

```json
{
  "id": "msgbatch_013Zva2CMHLNnXjNJJKqJ2EF",
  "archived_at": "2024-08-20T18:37:24.100435Z",
  "cancel_initiated_at": "2024-08-20T18:37:24.100435Z",
  "created_at": "2024-08-20T18:37:24.100435Z",
  "ended_at": "2024-08-20T18:37:24.100435Z",
  "expires_at": "2024-08-20T18:37:24.100435Z",
  "processing_status": "in_progress",
  "request_counts": {
    "canceled": 10,
    "errored": 30,
    "expired": 10,
    "processing": 100,
    "succeeded": 50
  },
  "results_url": "https://api.anthropic.com/v1/messages/batches/msgbatch_013Zva2CMHLNnXjNJJKqJ2EF/results",
  "type": "message_batch"
}
```

### List Message Batches

`BatchListPage Messages.Batches.List(parameters, cancellationToken = default)`

**GET** `/v1/messages/batches`

List all Message Batches within a Workspace. Most recently created batches are returned first.

Learn more about the Message Batches API in our [user guide](https://platform.claude.com/docs/en/build-with-claude/batch-processing?sdk_languages=csharp)

#### Parameters

- `BatchListParams parameters`

  - `string afterID` (query parameter)

    ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately after this object.

  - `string beforeID` (query parameter)

    ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately before this object.

  - `long limit` (query parameter)

    Number of items to return per page.

    Defaults to `20`. Ranges from `1` to `1000`.

    minimum: 1, maximum: 1000

  - `string workspaceID` (header parameter)

    Optional header to select the Workspace for this request. The value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).

    Only needed for credentials that can act on more than one Workspace. A credential that belongs to a specific Workspace may omit it; if sent, it must match that Workspace.

#### Returns

- `class MessageBatch`

  - `JsonElement Type = "message_batch"`

    Object type.

    For Message Batches, this is always `"message_batch"`.

  - `required string ID`

    Unique object identifier.

    The format and length of IDs may change over time.

  - `required DateTimeOffset? ArchivedAt`

    RFC 3339 datetime string representing the time at which the Message Batch was archived and its results became unavailable.

    format: date-time

  - `required DateTimeOffset? CancelInitiatedAt`

    RFC 3339 datetime string representing the time at which cancellation was initiated for the Message Batch. Specified only if cancellation was initiated.

    format: date-time

  - `required DateTimeOffset CreatedAt`

    RFC 3339 datetime string representing the time at which the Message Batch was created.

    format: date-time

  - `required DateTimeOffset? EndedAt`

    RFC 3339 datetime string representing the time at which processing for the Message Batch ended. Specified only once processing ends.

    Processing ends when every request in a Message Batch has either succeeded, errored, canceled, or expired.

    format: date-time

  - `required DateTimeOffset ExpiresAt`

    RFC 3339 datetime string representing the time at which the Message Batch will expire and end processing, which is 24 hours after creation.

    format: date-time

  - `required ProcessingStatus ProcessingStatus`

    Processing status of the Message Batch.

    - `InProgress("in_progress")`

    - `Canceling("canceling")`

    - `Ended("ended")`

  - `required MessageBatchRequestCounts RequestCounts`

    Tallies requests within the Message Batch, categorized by their status.

    Requests start as `processing` and move to one of the other statuses only once processing of the entire batch ends. The sum of all values always matches the total number of requests in the batch.

    - `required long Canceled`

      Number of requests in the Message Batch that have been canceled.

      This is zero until processing of the entire Message Batch has ended.

    - `required long Errored`

      Number of requests in the Message Batch that encountered an error.

      This is zero until processing of the entire Message Batch has ended.

    - `required long Expired`

      Number of requests in the Message Batch that have expired.

      This is zero until processing of the entire Message Batch has ended.

    - `required long Processing`

      Number of requests in the Message Batch that are processing.

    - `required long Succeeded`

      Number of requests in the Message Batch that have completed successfully.

      This is zero until processing of the entire Message Batch has ended.

  - `required string? ResultsUrl`

    URL to a `.jsonl` file containing the results of the Message Batch requests. Specified only once processing ends.

    Results in the file are not guaranteed to be in the same order as requests. Use the `custom_id` field to match results to requests.

#### Example

```csharp
using System;
using Anthropic.Models.Messages.Batches;

BatchListParams parameters = new();

var page = await client.Messages.Batches.List(parameters);
await foreach (var item in page.Paginate())
{
    Console.WriteLine(item);
}
```

##### Response (200)

```json
{
  "data": [
    {
      "id": "msgbatch_013Zva2CMHLNnXjNJJKqJ2EF",
      "archived_at": "2024-08-20T18:37:24.100435Z",
      "cancel_initiated_at": "2024-08-20T18:37:24.100435Z",
      "created_at": "2024-08-20T18:37:24.100435Z",
      "ended_at": "2024-08-20T18:37:24.100435Z",
      "expires_at": "2024-08-20T18:37:24.100435Z",
      "processing_status": "in_progress",
      "request_counts": {
        "canceled": 10,
        "errored": 30,
        "expired": 10,
        "processing": 100,
        "succeeded": 50
      },
      "results_url": "https://api.anthropic.com/v1/messages/batches/msgbatch_013Zva2CMHLNnXjNJJKqJ2EF/results",
      "type": "message_batch"
    }
  ],
  "first_id": "first_id",
  "has_more": true,
  "last_id": "last_id"
}
```

### Cancel a Message Batch

`MessageBatch Messages.Batches.Cancel(parameters, cancellationToken = default)`

**POST** `/v1/messages/batches/{message_batch_id}/cancel`

Batches may be canceled any time before processing ends. Once cancellation is initiated, the batch enters a `canceling` state, at which time the system may complete any in-progress, non-interruptible requests before finalizing cancellation.

The number of canceled requests is specified in `request_counts`. To determine which requests were canceled, check the individual results within the batch. Note that cancellation may not result in any canceled requests if they were non-interruptible.

Learn more about the Message Batches API in our [user guide](https://platform.claude.com/docs/en/build-with-claude/batch-processing?sdk_languages=csharp)

#### Parameters

- `BatchCancelParams parameters`

  - `required string messageBatchID` (path parameter)

    ID of the Message Batch.

  - `string workspaceID` (header parameter)

    Optional header to select the Workspace for this request. The value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).

    Only needed for credentials that can act on more than one Workspace. A credential that belongs to a specific Workspace may omit it; if sent, it must match that Workspace.

#### Returns

- `class MessageBatch`

  - `JsonElement Type = "message_batch"`

    Object type.

    For Message Batches, this is always `"message_batch"`.

  - `required string ID`

    Unique object identifier.

    The format and length of IDs may change over time.

  - `required DateTimeOffset? ArchivedAt`

    RFC 3339 datetime string representing the time at which the Message Batch was archived and its results became unavailable.

    format: date-time

  - `required DateTimeOffset? CancelInitiatedAt`

    RFC 3339 datetime string representing the time at which cancellation was initiated for the Message Batch. Specified only if cancellation was initiated.

    format: date-time

  - `required DateTimeOffset CreatedAt`

    RFC 3339 datetime string representing the time at which the Message Batch was created.

    format: date-time

  - `required DateTimeOffset? EndedAt`

    RFC 3339 datetime string representing the time at which processing for the Message Batch ended. Specified only once processing ends.

    Processing ends when every request in a Message Batch has either succeeded, errored, canceled, or expired.

    format: date-time

  - `required DateTimeOffset ExpiresAt`

    RFC 3339 datetime string representing the time at which the Message Batch will expire and end processing, which is 24 hours after creation.

    format: date-time

  - `required ProcessingStatus ProcessingStatus`

    Processing status of the Message Batch.

    - `InProgress("in_progress")`

    - `Canceling("canceling")`

    - `Ended("ended")`

  - `required MessageBatchRequestCounts RequestCounts`

    Tallies requests within the Message Batch, categorized by their status.

    Requests start as `processing` and move to one of the other statuses only once processing of the entire batch ends. The sum of all values always matches the total number of requests in the batch.

    - `required long Canceled`

      Number of requests in the Message Batch that have been canceled.

      This is zero until processing of the entire Message Batch has ended.

    - `required long Errored`

      Number of requests in the Message Batch that encountered an error.

      This is zero until processing of the entire Message Batch has ended.

    - `required long Expired`

      Number of requests in the Message Batch that have expired.

      This is zero until processing of the entire Message Batch has ended.

    - `required long Processing`

      Number of requests in the Message Batch that are processing.

    - `required long Succeeded`

      Number of requests in the Message Batch that have completed successfully.

      This is zero until processing of the entire Message Batch has ended.

  - `required string? ResultsUrl`

    URL to a `.jsonl` file containing the results of the Message Batch requests. Specified only once processing ends.

    Results in the file are not guaranteed to be in the same order as requests. Use the `custom_id` field to match results to requests.

#### Example

```csharp
using System;
using Anthropic.Models.Messages.Batches;

BatchCancelParams parameters = new() { MessageBatchID = "message_batch_id" };

var messageBatch = await client.Messages.Batches.Cancel(parameters);

Console.WriteLine(messageBatch);
```

##### Response (200)

```json
{
  "id": "msgbatch_013Zva2CMHLNnXjNJJKqJ2EF",
  "archived_at": "2024-08-20T18:37:24.100435Z",
  "cancel_initiated_at": "2024-08-20T18:37:24.100435Z",
  "created_at": "2024-08-20T18:37:24.100435Z",
  "ended_at": "2024-08-20T18:37:24.100435Z",
  "expires_at": "2024-08-20T18:37:24.100435Z",
  "processing_status": "in_progress",
  "request_counts": {
    "canceled": 10,
    "errored": 30,
    "expired": 10,
    "processing": 100,
    "succeeded": 50
  },
  "results_url": "https://api.anthropic.com/v1/messages/batches/msgbatch_013Zva2CMHLNnXjNJJKqJ2EF/results",
  "type": "message_batch"
}
```

### Delete a Message Batch

`DeletedMessageBatch Messages.Batches.Delete(parameters, cancellationToken = default)`

**DELETE** `/v1/messages/batches/{message_batch_id}`

Delete a Message Batch.

Message Batches can only be deleted once they've finished processing. If you'd like to delete an in-progress batch, you must first cancel it.

Learn more about the Message Batches API in our [user guide](https://platform.claude.com/docs/en/build-with-claude/batch-processing?sdk_languages=csharp)

#### Parameters

- `BatchDeleteParams parameters`

  - `required string messageBatchID` (path parameter)

    ID of the Message Batch.

  - `string workspaceID` (header parameter)

    Optional header to select the Workspace for this request. The value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).

    Only needed for credentials that can act on more than one Workspace. A credential that belongs to a specific Workspace may omit it; if sent, it must match that Workspace.

#### Returns

- `class DeletedMessageBatch`

  - `JsonElement Type = "message_batch_deleted"`

    Deleted object type.

    For Message Batches, this is always `"message_batch_deleted"`.

  - `required string ID`

    ID of the Message Batch.

#### Example

```csharp
using System;
using Anthropic.Models.Messages.Batches;

BatchDeleteParams parameters = new() { MessageBatchID = "message_batch_id" };

var deletedMessageBatch = await client.Messages.Batches.Delete(parameters);

Console.WriteLine(deletedMessageBatch);
```

##### Response (200)

```json
{
  "id": "msgbatch_013Zva2CMHLNnXjNJJKqJ2EF",
  "type": "message_batch_deleted"
}
```

### Retrieve Message Batch results

`IAsyncEnumerable<MessageBatchIndividualResponse> Messages.Batches.ResultsStreaming(parameters, cancellationToken = default)`

**GET** `/v1/messages/batches/{message_batch_id}/results`

Streams the results of a Message Batch as a `.jsonl` file.

Each line in the file is a JSON object containing the result of a single request in the Message Batch. Results are not guaranteed to be in the same order as requests. Use the `custom_id` field to match results to requests.

Learn more about the Message Batches API in our [user guide](https://platform.claude.com/docs/en/build-with-claude/batch-processing?sdk_languages=csharp)

#### Parameters

- `BatchResultsParams parameters`

  - `required string messageBatchID` (path parameter)

    ID of the Message Batch.

  - `string workspaceID` (header parameter)

    Optional header to select the Workspace for this request. The value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).

    Only needed for credentials that can act on more than one Workspace. A credential that belongs to a specific Workspace may omit it; if sent, it must match that Workspace.

#### Returns

- `class MessageBatchIndividualResponse`

  This is a single line in the response `.jsonl` file and does not represent the response as a whole.

  - `required string CustomID`

    Developer-provided ID created for each request in a Message Batch. Useful for matching results to requests, as results may be given out of request order.

    Must be unique for each request within the Message Batch.

  - `required MessageBatchResult Result`

    Processing result for this request.

    Contains a Message output if processing was successful, an error response if processing failed, or the reason why processing was not attempted, such as cancellation or expiration.

    - `class MessageBatchSucceededResult`

      - `JsonElement Type = "succeeded"`

      - `required Message Message`

        - `JsonElement Type = "message"`

          Object type.

          For Messages, this is always `"message"`.

        - `required string ID`

          Unique object identifier.

          The format and length of IDs may change over time.

        - `required Container? Container`

          Information about the container used in this request.

          This will be non-null if a container tool (e.g. code execution) was used.

          - `required string ID`

            Identifier for the container used in this request

          - `required DateTimeOffset ExpiresAt`

            The time at which the container will expire.

            format: date-time

          - `required IReadOnlyList<ContainerSkill>? Skills`

            Skills loaded in the container

            - `required ContainerSkillType Type`

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

              - `Anthropic("anthropic")`

              - `Custom("custom")`

            - `required string SkillID`

              Skill ID

              minLength: 1, maxLength: 64

            - `required string Version`

              The resolved version: a skill version ID for custom skills.

              minLength: 1, maxLength: 64

        - `required IReadOnlyList<ContentBlock> Content`

          Content generated by the model.

          This is an array of content blocks, each of which has a `type` that determines its shape.

          Example:

          ```json
          [{"type": "text", "text": "Hi, I'm Claude."}]
          ```

          If the request input `messages` ended with an `assistant` turn, then the response `content` will continue directly from that last turn. You can use this to constrain the model's output.

          For example, if the input `messages` were:

          ```json
          [
            {"role": "user", "content": "What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun"},
            {"role": "assistant", "content": "The best answer is ("}
          ]
          ```

          Then the response `content` might be:

          ```json
          [{"type": "text", "text": "B)"}]
          ```

          - `class TextBlock`

            - `JsonElement Type = "text"`

            - `required IReadOnlyList<TextCitation>? Citations`

              Citations supporting the text block.

              The type of citation returned will depend on the type of document being cited. Citing a PDF results in `page_location`, plain text results in `char_location`, and content document results in `content_block_location`.

              - `class CitationCharLocation`

                - `JsonElement Type = "char_location"`

                - `required string CitedText`

                - `required long DocumentIndex`

                  minimum: 0

                - `required string? DocumentTitle`

                - `required long EndCharIndex`

                - `required string? FileID`

                - `required long StartCharIndex`

                  minimum: 0

              - `class CitationPageLocation`

                - `JsonElement Type = "page_location"`

                - `required string CitedText`

                - `required long DocumentIndex`

                  minimum: 0

                - `required string? DocumentTitle`

                - `required long EndPageNumber`

                - `required string? FileID`

                - `required long StartPageNumber`

                  minimum: 1

              - `class CitationContentBlockLocation`

                - `JsonElement Type = "content_block_location"`

                - `required string CitedText`

                  The full text of the cited block range, concatenated.

                  Always equals the contents of `content[start_block_index:end_block_index]` joined together. The text block is the minimal citable unit; this field is never a substring of a single block. Not counted toward output tokens, and not counted toward input tokens when sent back in subsequent turns.

                - `required long DocumentIndex`

                  minimum: 0

                - `required string? DocumentTitle`

                - `required long EndBlockIndex`

                  Exclusive 0-based end index of the cited block range in the source's `content` array.

                  Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`.

                - `required string? FileID`

                - `required long StartBlockIndex`

                  0-based index of the first cited block in the source's `content` array.

                  minimum: 0

              - `class CitationsWebSearchResultLocation`

                - `JsonElement Type = "web_search_result_location"`

                - `required string CitedText`

                - `required string EncryptedIndex`

                - `required string? Title`

                  maxLength: 512

                - `required string Url`

              - `class CitationsSearchResultLocation`

                - `JsonElement Type = "search_result_location"`

                - `required string CitedText`

                  The full text of the cited block range, concatenated.

                  Always equals the contents of `content[start_block_index:end_block_index]` joined together. The text block is the minimal citable unit; this field is never a substring of a single block. Not counted toward output tokens, and not counted toward input tokens when sent back in subsequent turns.

                - `required long EndBlockIndex`

                  Exclusive 0-based end index of the cited block range in the source's `content` array.

                  Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`.

                - `required long SearchResultIndex`

                  0-based index of the cited search result among all `search_result` content blocks in the request, in the order they appear across messages and tool results.

                  Counted separately from `document_index`; server-side web search results are not included in this count.

                  minimum: 0

                - `required string Source`

                - `required long StartBlockIndex`

                  0-based index of the first cited block in the source's `content` array.

                  minimum: 0

                - `required string? Title`

            - `required string Text`

          - `class ThinkingBlock`

            - `JsonElement Type = "thinking"`

            - `required string Signature`

              A value used to verify that this thinking block was generated by Claude when it is passed back to the API.

              This is an opaque field and should not be interpreted or parsed. When passing thinking blocks back to the API (required when using tools with extended thinking), pass them back exactly as received, with this field intact.

              See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking?sdk_languages=csharp) for details.

            - `required string Thinking`

              The text of Claude's thinking process for this block.

          - `class RedactedThinkingBlock`

            - `JsonElement Type = "redacted_thinking"`

            - `required string Data`

              The contents of this redacted thinking block, returned when portions of the model's thinking were safety-redacted. This field is opaque and encrypted, with no readable content.

              Pass `redacted_thinking` blocks back to the API unchanged when continuing a multi-turn conversation.

              See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking?sdk_languages=csharp#redacted-thinking-blocks) for details.

          - `class ToolUseBlock`

            - `JsonElement Type = "tool_use"`

            - `required string ID`

              pattern: ^[a-zA-Z0-9_-]+$

            - `required Caller Caller`

              - `class DirectCaller`

                Tool invocation directly from the model.

                - `JsonElement Type = "direct"`

              - `class ServerToolCaller`

                Tool invocation generated by a server-side tool.

                - `JsonElement Type = "code_execution_20250825"`

                - `required string ToolID`

                  pattern: ^srvtoolu_[a-zA-Z0-9_]+$

              - `class ServerToolCaller20260120`

                - `JsonElement Type = "code_execution_20260120"`

                - `required string ToolID`

                  pattern: ^srvtoolu_[a-zA-Z0-9_]+$

            - `required IReadOnlyDictionary<string, JsonElement> Input`

            - `required string Name`

              minLength: 1

            - `string? ToolsetName`

              For a toolset member tool_use, the toolset family.

              minLength: 1, maxLength: 64, pattern: ^[a-zA-Z0-9_-]+$

          - `class ServerToolUseBlock`

            - `JsonElement Type = "server_tool_use"`

            - `required string ID`

              pattern: ^srvtoolu_[a-zA-Z0-9_]+$

            - `required Caller Caller`

              - `class DirectCaller`

                Tool invocation directly from the model.

              - `class ServerToolCaller`

                Tool invocation generated by a server-side tool.

              - `class ServerToolCaller20260120`

            - `required IReadOnlyDictionary<string, JsonElement> Input`

            - `required Name Name`

              - `WebSearch("web_search")`

              - `WebFetch("web_fetch")`

              - `CodeExecution("code_execution")`

              - `BashCodeExecution("bash_code_execution")`

              - `TextEditorCodeExecution("text_editor_code_execution")`

              - `ToolSearchToolRegex("tool_search_tool_regex")`

              - `ToolSearchToolBm25("tool_search_tool_bm25")`

          - `class WebSearchToolResultBlock`

            - `JsonElement Type = "web_search_tool_result"`

            - `required Caller Caller`

              - `class DirectCaller`

                Tool invocation directly from the model.

              - `class ServerToolCaller`

                Tool invocation generated by a server-side tool.

              - `class ServerToolCaller20260120`

            - `required WebSearchToolResultBlockContent Content`

              - `class WebSearchToolResultError`

                - `JsonElement Type = "web_search_tool_result_error"`

                - `required WebSearchToolResultErrorCode ErrorCode`

                  - `InvalidToolInput("invalid_tool_input")`

                  - `Unavailable("unavailable")`

                  - `MaxUsesExceeded("max_uses_exceeded")`

                  - `TooManyRequests("too_many_requests")`

                  - `QueryTooLong("query_too_long")`

                  - `RequestTooLarge("request_too_large")`

              - `IReadOnlyList<WebSearchResultBlock>`

                - `JsonElement Type = "web_search_result"`

                - `required string EncryptedContent`

                - `required string? PageAge`

                - `required string Title`

                - `required string Url`

            - `required string ToolUseID`

              pattern: ^srvtoolu_[a-zA-Z0-9_]+$

          - `class WebFetchToolResultBlock`

            - `JsonElement Type = "web_fetch_tool_result"`

            - `required Caller Caller`

              - `class DirectCaller`

                Tool invocation directly from the model.

              - `class ServerToolCaller`

                Tool invocation generated by a server-side tool.

              - `class ServerToolCaller20260120`

            - `required Content Content`

              - `class WebFetchToolResultErrorBlock`

                - `JsonElement Type = "web_fetch_tool_result_error"`

                - `required WebFetchToolResultErrorCode ErrorCode`

                  - `InvalidToolInput("invalid_tool_input")`

                  - `UrlTooLong("url_too_long")`

                  - `UrlNotAllowed("url_not_allowed")`

                  - `UrlNotInPriorContext("url_not_in_prior_context")`

                  - `UrlNotAccessible("url_not_accessible")`

                  - `UnsupportedContentType("unsupported_content_type")`

                  - `TooManyRequests("too_many_requests")`

                  - `MaxUsesExceeded("max_uses_exceeded")`

                  - `Unavailable("unavailable")`

                  - `ContentTooLarge("content_too_large")`

              - `class WebFetchBlock`

                - `JsonElement Type = "web_fetch_result"`

                - `required DocumentBlock Content`

                  - `JsonElement Type = "document"`

                  - `required CitationsConfig? Citations`

                    Citation configuration for the document

                    - `required bool Enabled`

                  - `required Source Source`

                    - `class Base64PdfSource`

                      - `JsonElement Type = "base64"`

                      - `required string Data`

                        format: byte

                      - `JsonElement MediaType = "application/pdf"`

                    - `class PlainTextSource`

                      - `JsonElement Type = "text"`

                      - `required string Data`

                      - `JsonElement MediaType = "text/plain"`

                  - `required string? Title`

                    The title of the document

                - `required string? RetrievedAt`

                  ISO 8601 timestamp when the content was retrieved

                - `required string Url`

                  Fetched content URL

            - `required string ToolUseID`

              pattern: ^srvtoolu_[a-zA-Z0-9_]+$

          - `class CodeExecutionToolResultBlock`

            - `JsonElement Type = "code_execution_tool_result"`

            - `required CodeExecutionToolResultBlockContent Content`

              - `class CodeExecutionToolResultError`

                - `JsonElement Type = "code_execution_tool_result_error"`

                - `required CodeExecutionToolResultErrorCode ErrorCode`

                  - `InvalidToolInput("invalid_tool_input")`

                  - `Unavailable("unavailable")`

                  - `TooManyRequests("too_many_requests")`

                  - `ExecutionTimeExceeded("execution_time_exceeded")`

              - `class CodeExecutionResultBlock`

                - `JsonElement Type = "code_execution_result"`

                - `required IReadOnlyList<CodeExecutionOutputBlock> Content`

                  - `JsonElement Type = "code_execution_output"`

                  - `required string FileID`

                - `required long ReturnCode`

                - `required string Stderr`

                - `required string Stdout`

              - `class EncryptedCodeExecutionResultBlock`

                The output and exit code of Python code that Claude ran with the code execution tool, with standard output in encrypted form.

                The API returns this block in place of `code_execution_result` when the code called the web search tool.

                See the [programmatic tool calling guide](https://platform.claude.com/docs/en/agents-and-tools/tool-use/programmatic-tool-calling?sdk_languages=csharp) to learn more about programmatic tool calling.

                - `JsonElement Type = "encrypted_code_execution_result"`

                - `required IReadOnlyList<CodeExecutionOutputBlock> Content`

                  - `JsonElement Type = "code_execution_output"`

                  - `required string FileID`

                - `required string EncryptedStdout`

                - `required long ReturnCode`

                - `required string Stderr`

            - `required string ToolUseID`

              pattern: ^srvtoolu_[a-zA-Z0-9_]+$

          - `class BashCodeExecutionToolResultBlock`

            - `JsonElement Type = "bash_code_execution_tool_result"`

            - `required Content Content`

              - `class BashCodeExecutionToolResultError`

                - `JsonElement Type = "bash_code_execution_tool_result_error"`

                - `required BashCodeExecutionToolResultErrorCode ErrorCode`

                  - `InvalidToolInput("invalid_tool_input")`

                  - `Unavailable("unavailable")`

                  - `TooManyRequests("too_many_requests")`

                  - `ExecutionTimeExceeded("execution_time_exceeded")`

                  - `OutputFileTooLarge("output_file_too_large")`

              - `class BashCodeExecutionResultBlock`

                - `JsonElement Type = "bash_code_execution_result"`

                - `required IReadOnlyList<BashCodeExecutionOutputBlock> Content`

                  - `JsonElement Type = "bash_code_execution_output"`

                  - `required string FileID`

                - `required long ReturnCode`

                - `required string Stderr`

                - `required string Stdout`

            - `required string ToolUseID`

              pattern: ^srvtoolu_[a-zA-Z0-9_]+$

          - `class TextEditorCodeExecutionToolResultBlock`

            - `JsonElement Type = "text_editor_code_execution_tool_result"`

            - `required Content Content`

              - `class TextEditorCodeExecutionToolResultError`

                - `JsonElement Type = "text_editor_code_execution_tool_result_error"`

                - `required TextEditorCodeExecutionToolResultErrorCode ErrorCode`

                  - `InvalidToolInput("invalid_tool_input")`

                  - `Unavailable("unavailable")`

                  - `TooManyRequests("too_many_requests")`

                  - `ExecutionTimeExceeded("execution_time_exceeded")`

                  - `FileNotFound("file_not_found")`

                - `required string? ErrorMessage`

              - `class TextEditorCodeExecutionViewResultBlock`

                - `JsonElement Type = "text_editor_code_execution_view_result"`

                - `required string Content`

                - `required FileType FileType`

                  - `Text("text")`

                  - `Image("image")`

                  - `Pdf("pdf")`

                - `required long? NumLines`

                - `required long? StartLine`

                - `required long? TotalLines`

              - `class TextEditorCodeExecutionCreateResultBlock`

                - `JsonElement Type = "text_editor_code_execution_create_result"`

                - `required bool IsFileUpdate`

              - `class TextEditorCodeExecutionStrReplaceResultBlock`

                - `JsonElement Type = "text_editor_code_execution_str_replace_result"`

                - `required IReadOnlyList<string>? Lines`

                - `required long? NewLines`

                - `required long? NewStart`

                - `required long? OldLines`

                - `required long? OldStart`

            - `required string ToolUseID`

              pattern: ^srvtoolu_[a-zA-Z0-9_]+$

          - `class ToolSearchToolResultBlock`

            - `JsonElement Type = "tool_search_tool_result"`

            - `required Content Content`

              - `class ToolSearchToolResultError`

                - `JsonElement Type = "tool_search_tool_result_error"`

                - `required ToolSearchToolResultErrorCode ErrorCode`

                  - `InvalidToolInput("invalid_tool_input")`

                  - `Unavailable("unavailable")`

                  - `TooManyRequests("too_many_requests")`

                  - `ExecutionTimeExceeded("execution_time_exceeded")`

                - `required string? ErrorMessage`

              - `class ToolSearchToolSearchResultBlock`

                - `JsonElement Type = "tool_search_tool_search_result"`

                - `required IReadOnlyList<ToolReferenceBlock> ToolReferences`

                  - `JsonElement Type = "tool_reference"`

                  - `required string ToolName`

                    minLength: 1, maxLength: 256, pattern: ^[a-zA-Z0-9_-]{1,256}$

            - `required string ToolUseID`

              pattern: ^srvtoolu_[a-zA-Z0-9_]+$

          - `class ContainerUploadBlock`

            Response model for a file uploaded to the container.

            - `JsonElement Type = "container_upload"`

            - `required string FileID`

        - `required Diagnostics? Diagnostics`

          Request-level diagnostics. `null` when the request did not supply `diagnostics`, or when it did and no prompt-cache divergence was detected.

          - `required CacheMissReason? CacheMissReason`

            Explains why the prompt cache could not fully reuse the prefix from the request identified by `diagnostics.previous_message_id`. `null` means diagnosis is still pending — the response was serialized before the background comparison completed.

            - `class CacheMissModelChanged`

              A `cache_miss_reason` for a request whose `model` or `speed` differs from the previous request's.

              See the [cache diagnostics guide](https://platform.claude.com/docs/en/build-with-claude/cache-diagnostics?sdk_languages=csharp#cache-miss-reason-types) to learn what to change for each reason.

              - `JsonElement Type = "model_changed"`

              - `required long CacheMissedInputTokens`

                Approximate number of input tokens that would have been read from cache had the prefix matched the previous request.

            - `class CacheMissSystemChanged`

              A `cache_miss_reason` for a request whose `system` differs from the previous request's.

              See the [cache diagnostics guide](https://platform.claude.com/docs/en/build-with-claude/cache-diagnostics?sdk_languages=csharp#cache-miss-reason-types) to learn what to change for each reason.

              - `JsonElement Type = "system_changed"`

              - `required long CacheMissedInputTokens`

                Approximate number of input tokens that would have been read from cache had the prefix matched the previous request.

            - `class CacheMissToolsChanged`

              A `cache_miss_reason` for a request whose `tools` differ from the previous request's, for example because tools were added, removed, or reordered.

              See the [cache diagnostics guide](https://platform.claude.com/docs/en/build-with-claude/cache-diagnostics?sdk_languages=csharp#cache-miss-reason-types) to learn what to change for each reason.

              - `JsonElement Type = "tools_changed"`

              - `required long CacheMissedInputTokens`

                Approximate number of input tokens that would have been read from cache had the prefix matched the previous request.

            - `class CacheMissMessagesChanged`

              A `cache_miss_reason` for a request whose `messages` differ from the previous request's in an earlier entry, instead of only having entries appended. The `model`, `system`, and `tools` match.

              See the [cache diagnostics guide](https://platform.claude.com/docs/en/build-with-claude/cache-diagnostics?sdk_languages=csharp#cache-miss-reason-types) to learn what to change for each reason.

              - `JsonElement Type = "messages_changed"`

              - `required long CacheMissedInputTokens`

                Approximate number of input tokens that would have been read from cache had the prefix matched the previous request.

            - `class CacheMissPreviousMessageNotFound`

              A `cache_miss_reason` for when the API doesn't have a stored record of the request that `diagnostics.previous_message_id` references.

              This doesn't mean that this request changed.

              See the [cache diagnostics guide](https://platform.claude.com/docs/en/build-with-claude/cache-diagnostics?sdk_languages=csharp#cache-miss-reason-types) to learn what to change for each reason.

              - `JsonElement Type = "previous_message_not_found"`

            - `class CacheMissUnavailable`

              A `cache_miss_reason` for when the API can't give a diagnosis. The request itself was processed normally.

              This includes a request whose `model`, `system`, and `tools` match the previous request's but whose other prompt-affecting parameters, such as `thinking` or `tool_choice`, differ.

              See the [cache diagnostics guide](https://platform.claude.com/docs/en/build-with-claude/cache-diagnostics?sdk_languages=csharp#cache-miss-reason-types) to learn what to change for each reason.

              - `JsonElement Type = "unavailable"`

        - `required Model Model`

          The model that will complete your prompt.

          See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options.

          - `ClaudeHaiku5_5("claude-haiku-5-5")`

            Fastest model for high-volume, real-time tasks

          - `ClaudeSonnet5_5("claude-sonnet-5-5")`

            Efficient model for coding and agents

          - `ClaudeFable5_1("claude-fable-5-1")`

            Frontier intelligence for ambitious tasks across coding, scientific discovery, and enterprise workflows

          - `ClaudeOpus5_5("claude-opus-5-5")`

            Powerful intelligence for coding, knowledge work, and long-running agents

          - `ClaudeMythos5_1("claude-mythos-5-1")`

            Our most capable model for cybersecurity and biology research, available through trusted access programs

          - `ClaudeSonnet5("claude-sonnet-5")`

            Efficient model for coding and agents

          - `ClaudeFable5("claude-fable-5")`

            Next generation of intelligence for the hardest knowledge work and coding problems

          - `ClaudeMythos5("claude-mythos-5")`

            Most capable model for cybersecurity and biology research

          - `ClaudeOpus5("claude-opus-5")`

            Powerful intelligence for long-running agents and coding

          - `ClaudeOpus4_8("claude-opus-4-8")`

            Powerful intelligence for long-running agents and coding

          - `ClaudeOpus4_7("claude-opus-4-7")`

            Powerful intelligence for long-running agents and coding

          - `ClaudeOpus4_6("claude-opus-4-6")`

            Powerful intelligence for long-running agents and coding

          - `ClaudeSonnet4_6("claude-sonnet-4-6")`

            Best combination of speed and intelligence

          - `ClaudeHaiku4_5("claude-haiku-4-5")`

          - `ClaudeHaiku4_5_20251001("claude-haiku-4-5-20251001")`

          - `ClaudeOpus4_5("claude-opus-4-5")`

            Powerful intelligence for long-running agents and coding

          - `ClaudeOpus4_5_20251101("claude-opus-4-5-20251101")`

            Powerful intelligence for long-running agents and coding

          - `ClaudeMythosPreview("claude-mythos-preview")`

            **Deprecated**: Will reach end-of-life on June 30, 2026. Please migrate to claude-mythos-5. Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for more information.

            New class of intelligence, strongest in coding and cybersecurity

          - `ClaudeSonnet4_5("claude-sonnet-4-5")`

            **Deprecated**: Will reach end-of-life on November 30, 2026. Please migrate to claude-sonnet-5-5. Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for more information.

            High-performance model for agents and coding

          - `ClaudeSonnet4_5_20250929("claude-sonnet-4-5-20250929")`

            **Deprecated**: Will reach end-of-life on November 30, 2026. Please migrate to claude-sonnet-5-5. Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for more information.

            High-performance model for agents and coding

        - `JsonElement Role = "assistant"`

          Conversational role of the generated message.

          This will always be `"assistant"`.

        - `required RefusalStopDetails? StopDetails`

          Structured information about why model output stopped.

          This is `null` when the `stop_reason` has no additional detail to report.

          - `JsonElement Type = "refusal"`

          - `required Category? Category`

            The policy category that triggered the refusal.

            `null` when the refusal doesn't map to a named category.

            - `Cyber("cyber")`

              The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category.

            - `Bio("bio")`

              The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category.

            - `FrontierLlm("frontier_llm")`

              The request could assist the development of competing AI models, which is restricted under [Anthropic's commercial terms](https://www.anthropic.com/legal/commercial-terms). Benign machine learning work can also trigger this category.

            - `ReasoningExtraction("reasoning_extraction")`

              The request asks the model to reproduce its internal reasoning in the response text. To get reasoning in a structured form instead, use [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking?sdk_languages=csharp).

            - `GeneralHarms("general_harms")`

              The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category.

          - `required string? Explanation`

            Human-readable explanation of the refusal.

            This text is not guaranteed to be stable. `null` when no explanation is available for the category.

        - `required StopReason? StopReason`

          The reason that we stopped.

          This may be one the following values:

          * `"end_turn"`: the model reached a natural stopping point
          * `"max_tokens"`: we exceeded the requested `max_tokens` or the model's maximum
          * `"stop_sequence"`: one of your provided custom `stop_sequences` was generated
          * `"tool_use"`: the model invoked one or more tools
          * `"pause_turn"`: we paused a long-running turn. You may provide the response back as-is in a subsequent request to let the model continue.
          * `"refusal"`: when streaming classifiers intervene to handle potential policy violations
          * `"model_context_window_exceeded"`: we exceeded the model's context window

          In non-streaming mode this value is always non-null. In streaming mode, it is null in the `message_start` event and non-null otherwise.

          - `EndTurn("end_turn")`

          - `MaxTokens("max_tokens")`

          - `StopSequence("stop_sequence")`

          - `ToolUse("tool_use")`

          - `PauseTurn("pause_turn")`

          - `Refusal("refusal")`

          - `ModelContextWindowExceeded("model_context_window_exceeded")`

        - `required string? StopSequence`

          Which custom stop sequence was generated, if any.

          This value will be a non-null string if one of your custom stop sequences was generated.

        - `required Usage Usage`

          Billing and rate-limit usage.

          Anthropic's API bills and rate-limits by token counts, as tokens represent the underlying cost to our systems.

          Under the hood, the API transforms requests into a format suitable for the model. The model's output then goes through a parsing stage before becoming an API response. As a result, the token counts in `usage` will not match one-to-one with the exact visible content of an API request or response.

          For example, `output_tokens` will be non-zero, even for an empty string response from Claude.

          Total input tokens in a request is the summation of `input_tokens`, `cache_creation_input_tokens`, and `cache_read_input_tokens`.

          - `required CacheCreation? CacheCreation`

            Breakdown of cached tokens by TTL

            - `required long Ephemeral1hInputTokens`

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

              minimum: 0

            - `required long Ephemeral5mInputTokens`

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

              minimum: 0

          - `required long? CacheCreationInputTokens`

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

            minimum: 0

          - `required long? CacheReadInputTokens`

            The number of input tokens read from the cache.

            minimum: 0

          - `required string? InferenceGeo`

            The geographic region where inference was performed for this request.

          - `required long InputTokens`

            The number of input tokens which were used.

            minimum: 0

          - `required long OutputTokens`

            The number of output tokens which were used.

            minimum: 0

          - `required OutputTokensDetails? OutputTokensDetails`

            Breakdown of output tokens by category.

            `output_tokens` remains the inclusive, authoritative total used for billing.
            This object provides a read-only decomposition for observability — for example,
            how many of the billed output tokens were spent on internal reasoning that may
            have been summarized before being returned to you.

            - `required long ThinkingTokens`

              Number of output tokens the model generated as internal reasoning, including
              the thinking-block delimiter tokens.

              Reflects the raw reasoning the model produced, not the (possibly shorter)
              summarized thinking text returned in the response body. Computed by
              re-tokenizing the raw reasoning text, so it may differ from the model's exact
              generation count by a small number of tokens. Always ≤ `output_tokens`;
              `output_tokens - thinking_tokens` approximates the non-reasoning output.

              minimum: 0

          - `required ServerToolUsage? ServerToolUse`

            The number of server tool requests.

            - `required long WebFetchRequests`

              The number of web fetch tool requests.

              minimum: 0

            - `required long WebSearchRequests`

              The number of web search tool requests.

              minimum: 0

          - `required ServiceTier? ServiceTier`

            If the request used the priority, standard, or batch tier.

            - `Standard("standard")`

            - `Priority("priority")`

            - `Batch("batch")`

          - `required Speed? Speed`

            The inference speed mode used for this request.

            - `Standard("standard")`

            - `Fast("fast")`

    - `class MessageBatchErroredResult`

      - `JsonElement Type = "errored"`

      - `required ErrorResponse Error`

        - `JsonElement Type = "error"`

        - `required ErrorObject Error`

          - `class InvalidRequestError`

            - `JsonElement Type = "invalid_request_error"`

            - `required string Message`

          - `class AuthenticationError`

            - `JsonElement Type = "authentication_error"`

            - `required string Message`

          - `class BillingError`

            - `JsonElement Type = "billing_error"`

            - `required string Message`

          - `class PermissionError`

            - `JsonElement Type = "permission_error"`

            - `required string Message`

          - `class NotFoundError`

            - `JsonElement Type = "not_found_error"`

            - `required string Message`

          - `class RateLimitError`

            - `JsonElement Type = "rate_limit_error"`

            - `required string Message`

          - `class GatewayTimeoutError`

            - `JsonElement Type = "timeout_error"`

            - `required string Message`

          - `class ApiErrorObject`

            - `JsonElement Type = "api_error"`

            - `required string Message`

          - `class OverloadedError`

            - `JsonElement Type = "overloaded_error"`

            - `required string Message`

        - `required string? RequestID`

    - `class MessageBatchCanceledResult`

      - `JsonElement Type = "canceled"`

    - `class MessageBatchExpiredResult`

      - `JsonElement Type = "expired"`

#### Example

```csharp
using System;
using Anthropic.Models.Messages.Batches;

BatchResultsParams parameters = new() { MessageBatchID = "message_batch_id" };

await foreach (var messageBatchIndividualResponse in client.Messages.Batches.ResultsStreaming(parameters))
{
    Console.WriteLine(messageBatchIndividualResponse);
}
```
