> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dreamto.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a message

> 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)



## OpenAPI

````yaml /openapi/en/anthropic-messages.json post /v1/messages
openapi: 3.1.0
info:
  title: Anthropic Messages
  version: v1
  description: >-
    Call Claude models with the Anthropic Messages protocol: chat, streaming,
    image input, tool use, adaptive thinking and prompt caching.
servers:
  - url: https://api.dreamto.ai
security:
  - apiKeyAuth: []
  - bearerAuth: []
tags:
  - name: Messages
paths:
  /v1/messages:
    post:
      tags:
        - Messages
      summary: Create a message
      description: >-
        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)
      operationId: createMessage
      parameters:
        - name: anthropic-version
          in: header
          required: false
          description: >-
            The version of the Claude API you want to use.


            Read more about versioning and our version history
            [here](https://platform.claude.com/docs/en/api/versioning).
          schema:
            type: string
          example: '2023-06-01'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateMessageRequest'
            examples:
              Basic message:
                summary: Basic message
                description: '`max_tokens` is required: the most tokens to generate.'
                value:
                  model: claude-sonnet-5-5
                  max_tokens: 1024
                  messages:
                    - role: user
                      content: Explain quantum computing in three sentences.
              System prompt and multi-turn conversation:
                summary: System prompt and multi-turn conversation
                description: >-
                  The system prompt goes in the top-level `system`; `messages`
                  alternates `user` and `assistant` turns.
                value:
                  model: claude-sonnet-5-5
                  max_tokens: 1024
                  system: You are a concise, professional assistant.
                  messages:
                    - role: user
                      content: Suggest a name for a coffee shop.
                    - role: assistant
                      content: How about "Morning Light Coffee"?
                    - role: user
                      content: Now add a tagline for that name.
              Streaming:
                summary: Streaming
                description: >-
                  With `stream: true` the API returns SSE events:
                  `message_start`, `content_block_delta` … `message_stop`.
                value:
                  model: claude-sonnet-5-5
                  max_tokens: 1024
                  stream: true
                  messages:
                    - role: user
                      content: Write a four-line poem about autumn.
              Image input:
                summary: Image input
                description: >-
                  Pass an image in an `image` content block; `source` is a URL
                  or Base64 data.
                value:
                  model: claude-sonnet-5-5
                  max_tokens: 1024
                  messages:
                    - role: user
                      content:
                        - type: image
                          source:
                            type: url
                            url: https://your-cdn.example.com/photo.jpg
                        - type: text
                          text: What is in this image?
              Tool use:
                summary: Tool use
                description: >-
                  The model returns a `tool_use` block (`stop_reason` is
                  `tool_use`) when it needs outside data; send the result back
                  in a `tool_result` block.
                value:
                  model: claude-sonnet-5-5
                  max_tokens: 1024
                  tools:
                    - name: get_weather
                      description: Get the current weather for a city
                      input_schema:
                        type: object
                        properties:
                          city:
                            type: string
                            description: City name, e.g. Hangzhou
                          unit:
                            type: string
                            enum:
                              - celsius
                              - fahrenheit
                        required:
                          - city
                  messages:
                    - role: user
                      content: What's the weather like in Hangzhou today?
              Adaptive thinking:
                summary: Adaptive thinking
                description: >-
                  `thinking.type: adaptive` lets the model decide how much to
                  think; `output_config.effort` steers it.
                value:
                  model: claude-opus-5-5
                  max_tokens: 4096
                  thinking:
                    type: adaptive
                  output_config:
                    effort: high
                  messages:
                    - role: user
                      content: >-
                        Prove that among any five integers there are three whose
                        sum is divisible by 3.
      responses:
        '200':
          description: >-
            A Message object for a non-streaming request; with `stream: true`,
            server-sent events (`text/event-stream`), each a
            `RawMessageStreamEvent`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Message'
            text/event-stream:
              schema:
                $ref: '#/components/schemas/RawMessageStreamEvent'
        '400':
          description: >-
            Invalid request: malformed JSON, a missing required field, or a
            parameter the chosen model does not support. Fix it as `message`
            says and retry.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayError'
              examples:
                example:
                  value:
                    error:
                      code: invalid_request
                      http_status: 400
                      message: Invalid request.
                      request_id: req_3f9a1c2b7d4e5f60718293a4
                      type: invalid_request_error
        '401':
          description: The API Key is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayError'
              examples:
                example:
                  value:
                    error:
                      code: unauthorized
                      http_status: 401
                      message: Unauthorized.
                      request_id: req_3f9a1c2b7d4e5f60718293a4
                      type: authentication_error
        '402':
          description: Insufficient balance; top up and retry.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayError'
              examples:
                example:
                  value:
                    error:
                      code: insufficient_balance
                      http_status: 402
                      message: Insufficient balance.
                      request_id: req_3f9a1c2b7d4e5f60718293a4
                      type: insufficient_balance_error
        '403':
          description: This API Key is not allowed to use the model.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayError'
              examples:
                example:
                  value:
                    error:
                      code: forbidden
                      http_status: 403
                      message: Access denied.
                      request_id: req_3f9a1c2b7d4e5f60718293a4
                      type: permission_error
        '404':
          description: The model does not exist or is not available.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayError'
              examples:
                example:
                  value:
                    error:
                      code: not_found
                      http_status: 404
                      message: The requested model was not found.
                      request_id: req_3f9a1c2b7d4e5f60718293a4
                      type: invalid_request_error
        '429':
          description: Rate limit exceeded; back off and retry.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayError'
              examples:
                example:
                  value:
                    error:
                      code: rate_limit_exceeded
                      http_status: 429
                      message: Rate limit exceeded. Please try again later.
                      request_id: req_3f9a1c2b7d4e5f60718293a4
                      type: rate_limit_error
        '500':
          description: Internal error; retry later.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayError'
              examples:
                example:
                  value:
                    error:
                      code: api_error
                      http_status: 500
                      message: Internal server error.
                      request_id: req_3f9a1c2b7d4e5f60718293a4
                      type: api_error
        '503':
          description: Service temporarily unavailable or timed out; retry later.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayError'
              examples:
                example:
                  value:
                    error:
                      code: service_unavailable
                      http_status: 503
                      message: Service temporarily unavailable. Please try again later.
                      request_id: req_3f9a1c2b7d4e5f60718293a4
                      type: api_error
components:
  schemas:
    CreateMessageRequest:
      type: object
      properties:
        max_tokens:
          type: number
          description: >-
            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#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)
            for details.
          minimum: 0
        messages:
          type: array
          items:
            $ref: '#/components/schemas/MessageParam'
          description: >-
            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#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).


            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#give-claude-a-role),
            you can use the top-level `system` parameter.


            There is a limit of 100,000 messages in a single request.
        model:
          type: string
          description: >-
            ID of the model to use, for example `claude-sonnet-5-5`. See
            [Models](/en/llm/anthropic-messages) for the available models.
          example: claude-sonnet-5-5
        cache_control:
          anyOf:
            - $ref: '#/components/schemas/CacheControlEphemeral'
            - type: 'null'
          description: >-
            Top-level cache control automatically applies a cache_control marker
            to the last cacheable block in the request.
        container:
          anyOf:
            - $ref: '#/components/schemas/MessageCreateParamsContainer'
            - type: 'null'
          description: Container identifier for reuse across requests.
        diagnostics:
          anyOf:
            - $ref: '#/components/schemas/DiagnosticsParam'
            - type: 'null'
          description: >-
            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.
        inference_geo:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            Specifies the geographic region for inference processing. If not
            specified, the workspace's `default_inference_geo` is used.
        metadata:
          allOf:
            - $ref: '#/components/schemas/Metadata'
          description: An object describing metadata about the request.
        output_config:
          allOf:
            - $ref: '#/components/schemas/OutputConfig'
          description: >-
            Configuration options for the model's output, such as the output
            format.
        service_tier:
          type: string
          enum:
            - auto
            - standard_only
          description: >-
            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)
            for details.
        speed:
          anyOf:
            - type: string
              enum:
                - standard
                - fast
            - type: 'null'
          description: >-
            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)
            for which models.
        stop_sequences:
          type: array
          items:
            type: string
          description: >-
            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.
        stream:
          type: boolean
          description: >-
            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#streaming-with-sdks)
            for an example in each language.
        system:
          anyOf:
            - type: string
            - type: array
              items:
                $ref: '#/components/schemas/TextBlockParam'
          description: >-
            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#give-claude-a-role).
        thinking:
          allOf:
            - $ref: '#/components/schemas/ThinkingConfigParam'
          description: >-
            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#configuring-thinking)
            for each model's behavior.
        tool_choice:
          allOf:
            - $ref: '#/components/schemas/ToolChoice'
          description: >-
            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.
        tools:
          type: array
          items:
            $ref: '#/components/schemas/ToolUnion'
          description: >-
            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),
            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)).


            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)
            for more details.
      required:
        - max_tokens
        - messages
        - model
    Message:
      type: object
      properties:
        type:
          type: string
          const: message
          description: |-
            Object type.

            For Messages, this is always `"message"`.
        id:
          type: string
          description: |-
            Unique object identifier.

            The format and length of IDs may change over time.
        container:
          anyOf:
            - $ref: '#/components/schemas/Container'
            - type: 'null'
          description: >-
            Information about the container used in this request.


            This will be non-null if a container tool (e.g. code execution) was
            used.
        content:
          type: array
          items:
            $ref: '#/components/schemas/ContentBlock'
          description: >-
            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)"}]

            ```
        diagnostics:
          anyOf:
            - $ref: '#/components/schemas/Diagnostics'
            - type: 'null'
          description: >-
            Request-level diagnostics. `null` when the request did not supply
            `diagnostics`, or when it did and no prompt-cache divergence was
            detected.
        model:
          allOf:
            - $ref: '#/components/schemas/Model'
          description: >-
            The model that will complete your prompt.


            See [models](https://docs.anthropic.com/en/docs/models-overview) for
            additional details and options.
        role:
          type: string
          const: assistant
          description: |-
            Conversational role of the generated message.

            This will always be `"assistant"`.
        stop_details:
          anyOf:
            - $ref: '#/components/schemas/RefusalStopDetails'
            - type: 'null'
          description: >-
            Structured information about why model output stopped.


            This is `null` when the `stop_reason` has no additional detail to
            report.
        stop_reason:
          anyOf:
            - $ref: '#/components/schemas/StopReason'
            - type: 'null'
          description: >-
            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.
        stop_sequence:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            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.
        usage:
          allOf:
            - $ref: '#/components/schemas/Usage'
          description: >-
            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:
        - type
        - id
        - container
        - content
        - diagnostics
        - model
        - role
        - stop_details
        - stop_reason
        - stop_sequence
        - usage
    RawMessageStreamEvent:
      anyOf:
        - $ref: '#/components/schemas/RawMessageStartEvent'
        - $ref: '#/components/schemas/RawMessageDeltaEvent'
        - $ref: '#/components/schemas/RawMessageStopEvent'
        - $ref: '#/components/schemas/RawContentBlockStartEvent'
        - $ref: '#/components/schemas/RawContentBlockDeltaEvent'
        - $ref: '#/components/schemas/RawContentBlockStopEvent'
    GatewayError:
      type: object
      description: Error response.
      properties:
        error:
          type: object
          description: Error details.
          properties:
            code:
              type: string
              description: >-
                Error code, for example `invalid_request`, `unauthorized`,
                `insufficient_balance` or `rate_limit_exceeded`. In a few
                parameter errors returned by the model side directly it is the
                numeric status code.
            http_status:
              type: integer
              description: >-
                Same as the HTTP status code of the response; a few errors
                returned by the model side directly omit it.
            message:
              type: string
              description: >-
                Error description. Branch on the status code and `code`, not on
                this text.
            request_id:
              type: string
              description: >-
                ID of this request, also returned in the `X-Request-Id` header;
                include it when reporting a problem. A few errors omit it, so
                prefer the header.
            type:
              type: string
              description: >-
                Error category, for example `invalid_request_error`,
                `authentication_error`, `rate_limit_error` or `api_error`; a few
                errors omit it.
          required:
            - code
            - message
      required:
        - error
    MessageParam:
      anyOf:
        - $ref: '#/components/schemas/UserMessageParam'
        - $ref: '#/components/schemas/AssistantMessageParam'
        - $ref: '#/components/schemas/SystemMessageParam'
    CacheControlEphemeral:
      type: object
      properties:
        type:
          type: string
          const: ephemeral
        ttl:
          type: string
          enum:
            - 5m
            - 1h
          description: >-
            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)
            for details.
      required:
        - type
    MessageCreateParamsContainer:
      anyOf:
        - $ref: '#/components/schemas/ContainerParams'
        - type: string
    DiagnosticsParam:
      type: object
      properties:
        previous_message_id:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            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
    Metadata:
      type: object
      properties:
        user_id:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            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:
      type: object
      properties:
        effort:
          anyOf:
            - type: string
              enum:
                - low
                - medium
                - high
                - xhigh
                - max
            - type: 'null'
          description: >-
            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`.
        format:
          anyOf:
            - $ref: '#/components/schemas/JSONOutputFormat'
            - type: 'null'
          description: >-
            A schema to specify Claude's output format in responses. See
            [structured
            outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs)
    TextBlockParam:
      type: object
      properties:
        type:
          type: string
          const: text
        text:
          type: string
          minLength: 1
        cache_control:
          anyOf:
            - $ref: '#/components/schemas/CacheControlEphemeral'
            - type: 'null'
          description: Create a cache control breakpoint at this content block.
        citations:
          anyOf:
            - type: array
              items:
                $ref: '#/components/schemas/TextCitationParam'
            - type: 'null'
      required:
        - type
        - text
    ThinkingConfigParam:
      anyOf:
        - $ref: '#/components/schemas/ThinkingConfigEnabled'
        - $ref: '#/components/schemas/ThinkingConfigDisabled'
        - $ref: '#/components/schemas/ThinkingConfigBetweenTools'
        - $ref: '#/components/schemas/ThinkingConfigAdaptive'
    ToolChoice:
      anyOf:
        - $ref: '#/components/schemas/ToolChoiceAuto'
        - $ref: '#/components/schemas/ToolChoiceAny'
        - $ref: '#/components/schemas/ToolChoiceTool'
        - $ref: '#/components/schemas/ToolChoiceNone'
    ToolUnion:
      anyOf:
        - $ref: '#/components/schemas/Tool'
        - $ref: '#/components/schemas/ToolBash20250124'
        - $ref: '#/components/schemas/CodeExecutionTool20250522'
        - $ref: '#/components/schemas/CodeExecutionTool20250825'
        - $ref: '#/components/schemas/CodeExecutionTool20260120'
        - $ref: '#/components/schemas/CodeExecutionTool20260521'
        - $ref: '#/components/schemas/BrowserToolset20260801'
        - $ref: '#/components/schemas/MemoryTool20250818'
        - $ref: '#/components/schemas/ComputerToolset20260801'
        - $ref: '#/components/schemas/ToolTextEditor20250124'
        - $ref: '#/components/schemas/ToolTextEditor20250429'
        - $ref: '#/components/schemas/ToolTextEditor20250728'
        - $ref: '#/components/schemas/WebSearchTool20250305'
        - $ref: '#/components/schemas/WebFetchTool20250910'
        - $ref: '#/components/schemas/WebSearchTool20260209'
        - $ref: '#/components/schemas/WebFetchTool20260209'
        - $ref: '#/components/schemas/WebFetchTool20260309'
        - $ref: '#/components/schemas/WebSearchTool20260318'
        - $ref: '#/components/schemas/WebFetchTool20260318'
        - $ref: '#/components/schemas/ToolSearchToolBm25_20251119'
        - $ref: '#/components/schemas/ToolSearchToolRegex20251119'
    Container:
      type: object
      properties:
        id:
          type: string
          description: Identifier for the container used in this request
        expires_at:
          type: string
          description: The time at which the container will expire.
          format: date-time
        skills:
          anyOf:
            - type: array
              items:
                $ref: '#/components/schemas/ContainerSkill'
            - type: 'null'
          description: Skills loaded in the container
      required:
        - id
        - expires_at
        - skills
    ContentBlock:
      anyOf:
        - $ref: '#/components/schemas/TextBlock'
        - $ref: '#/components/schemas/ThinkingBlock'
        - $ref: '#/components/schemas/RedactedThinkingBlock'
        - $ref: '#/components/schemas/ToolUseBlock'
        - $ref: '#/components/schemas/ServerToolUseBlock'
        - $ref: '#/components/schemas/WebSearchToolResultBlock'
        - $ref: '#/components/schemas/WebFetchToolResultBlock'
        - $ref: '#/components/schemas/CodeExecutionToolResultBlock'
        - $ref: '#/components/schemas/BashCodeExecutionToolResultBlock'
        - $ref: '#/components/schemas/TextEditorCodeExecutionToolResultBlock'
        - $ref: '#/components/schemas/ToolSearchToolResultBlock'
        - $ref: '#/components/schemas/ContainerUploadBlock'
    Diagnostics:
      type: object
      properties:
        cache_miss_reason:
          anyOf:
            - $ref: '#/components/schemas/CacheMissReason'
            - type: 'null'
          description: >-
            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.
      required:
        - cache_miss_reason
    Model:
      anyOf:
        - type: string
          const: claude-fable-5-2
          description: >-
            Built for the most ambitious work in coding, enterprise workflows,
            and the sciences
        - type: string
          const: claude-haiku-5-5
          description: Fastest model for high-volume, real-time tasks
        - type: string
          const: claude-sonnet-5-5
          description: Efficient model for coding and agents
        - type: string
          const: claude-opus-5-5
          description: >-
            Powerful intelligence for coding, knowledge work, and long-running
            agents
        - type: string
    RefusalStopDetails:
      type: object
      properties:
        type:
          type: string
          const: refusal
        category:
          anyOf:
            - type: string
              enum:
                - cyber
                - bio
                - frontier_llm
                - reasoning_extraction
                - general_harms
              description: >-
                **Allowed values:**

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

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

                - `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.

                - `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).

                - `general_harms`: The request could be related to an area that
                was determined as harmful. Benign work might sometimes trigger
                this category.
            - type: 'null'
          description: |-
            The policy category that triggered the refusal.

            `null` when the refusal doesn't map to a named category.
        explanation:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            Human-readable explanation of the refusal.


            This text is not guaranteed to be stable. `null` when no explanation
            is available for the category.
      required:
        - type
        - category
        - explanation
    StopReason:
      type: string
      enum:
        - end_turn
        - max_tokens
        - stop_sequence
        - tool_use
        - pause_turn
        - refusal
        - model_context_window_exceeded
    Usage:
      type: object
      properties:
        cache_creation:
          anyOf:
            - $ref: '#/components/schemas/CacheCreation'
            - type: 'null'
          description: Breakdown of cached tokens by TTL
        cache_creation_input_tokens:
          anyOf:
            - type: number
            - type: 'null'
          description: The number of input tokens used to create the cache entry.
          minimum: 0
        cache_read_input_tokens:
          anyOf:
            - type: number
            - type: 'null'
          description: The number of input tokens read from the cache.
          minimum: 0
        inference_geo:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            The geographic region where inference was performed for this
            request.
        input_tokens:
          type: number
          description: The number of input tokens which were used.
          minimum: 0
        output_tokens:
          type: number
          description: The number of output tokens which were used.
          minimum: 0
        output_tokens_details:
          anyOf:
            - $ref: '#/components/schemas/OutputTokensDetails'
            - type: 'null'
          description: >-
            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.
        server_tool_use:
          anyOf:
            - $ref: '#/components/schemas/ServerToolUsage'
            - type: 'null'
          description: The number of server tool requests.
        service_tier:
          anyOf:
            - type: string
              enum:
                - standard
                - priority
                - batch
            - type: 'null'
          description: If the request used the priority, standard, or batch tier.
        speed:
          anyOf:
            - type: string
              enum:
                - standard
                - fast
            - type: 'null'
          description: The inference speed mode used for this request.
      required:
        - cache_creation
        - cache_creation_input_tokens
        - cache_read_input_tokens
        - inference_geo
        - input_tokens
        - output_tokens
        - output_tokens_details
        - server_tool_use
        - service_tier
        - speed
    RawMessageStartEvent:
      type: object
      properties:
        type:
          type: string
          const: message_start
        message:
          $ref: '#/components/schemas/Message'
      required:
        - type
        - message
    RawMessageDeltaEvent:
      type: object
      properties:
        type:
          type: string
          const: message_delta
        delta:
          type: object
          properties:
            container:
              anyOf:
                - $ref: '#/components/schemas/Container'
                - type: 'null'
              description: >-
                Information about the container used in this request.


                This will be non-null if a container tool (e.g. code execution)
                was used.
            stop_details:
              anyOf:
                - $ref: '#/components/schemas/RefusalStopDetails'
                - type: 'null'
              description: >-
                Structured information about why model output stopped.


                This is `null` when the `stop_reason` has no additional detail
                to report.
            stop_reason:
              anyOf:
                - $ref: '#/components/schemas/StopReason'
                - type: 'null'
            stop_sequence:
              anyOf:
                - type: string
                - type: 'null'
          required:
            - container
            - stop_details
            - stop_reason
            - stop_sequence
        usage:
          allOf:
            - $ref: '#/components/schemas/MessageDeltaUsage'
          description: >-
            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:
        - type
        - delta
        - usage
    RawMessageStopEvent:
      type: object
      properties:
        type:
          type: string
          const: message_stop
      required:
        - type
    RawContentBlockStartEvent:
      type: object
      properties:
        type:
          type: string
          const: content_block_start
        content_block:
          anyOf:
            - $ref: '#/components/schemas/TextBlock'
            - $ref: '#/components/schemas/ThinkingBlock'
            - $ref: '#/components/schemas/RedactedThinkingBlock'
            - $ref: '#/components/schemas/ToolUseBlock'
            - $ref: '#/components/schemas/ServerToolUseBlock'
            - $ref: '#/components/schemas/WebSearchToolResultBlock'
            - $ref: '#/components/schemas/WebFetchToolResultBlock'
            - $ref: '#/components/schemas/CodeExecutionToolResultBlock'
            - $ref: '#/components/schemas/BashCodeExecutionToolResultBlock'
            - $ref: '#/components/schemas/TextEditorCodeExecutionToolResultBlock'
            - $ref: '#/components/schemas/ToolSearchToolResultBlock'
            - $ref: '#/components/schemas/ContainerUploadBlock'
        index:
          type: number
      required:
        - type
        - content_block
        - index
    RawContentBlockDeltaEvent:
      type: object
      properties:
        type:
          type: string
          const: content_block_delta
        delta:
          $ref: '#/components/schemas/RawContentBlockDelta'
        index:
          type: number
      required:
        - type
        - delta
        - index
    RawContentBlockStopEvent:
      type: object
      properties:
        type:
          type: string
          const: content_block_stop
        index:
          type: number
      required:
        - type
        - index
    UserMessageParam:
      type: object
      properties:
        content:
          $ref: '#/components/schemas/MessageContentParam'
        role:
          type: string
          const: user
      required:
        - content
        - role
    AssistantMessageParam:
      type: object
      properties:
        content:
          $ref: '#/components/schemas/MessageContentParam'
        role:
          type: string
          const: assistant
      required:
        - content
        - role
    SystemMessageParam:
      type: object
      properties:
        content:
          anyOf:
            - type: string
            - $ref: '#/components/schemas/Blocks'
        role:
          type: string
          const: system
      required:
        - content
        - role
    ContainerParams:
      type: object
      properties:
        id:
          anyOf:
            - type: string
            - type: 'null'
          description: Container id
        skills:
          anyOf:
            - type: array
              items:
                $ref: '#/components/schemas/SkillParams'
            - type: 'null'
          description: List of skills to load in the container
          maxItems: 20
      description: Container parameters with skills to be loaded.
    JSONOutputFormat:
      type: object
      properties:
        type:
          type: string
          const: json_schema
        schema:
          type: object
          additionalProperties: true
          description: The JSON schema of the format
      required:
        - type
        - schema
    TextCitationParam:
      anyOf:
        - $ref: '#/components/schemas/CitationCharLocationParam'
        - $ref: '#/components/schemas/CitationPageLocationParam'
        - $ref: '#/components/schemas/CitationContentBlockLocationParam'
        - $ref: '#/components/schemas/CitationWebSearchResultLocationParam'
        - $ref: '#/components/schemas/CitationSearchResultLocationParam'
    ThinkingConfigEnabled:
      type: object
      properties:
        type:
          type: string
          const: enabled
        budget_tokens:
          type: number
          description: >-
            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)
            for details.
          minimum: 1024
        display:
          anyOf:
            - type: string
              enum:
                - summarized
                - omitted
            - type: 'null'
          description: >-
            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#controlling-thinking-display).
      required:
        - type
        - budget_tokens
    ThinkingConfigDisabled:
      type: object
      properties:
        type:
          type: string
          const: disabled
      required:
        - type
    ThinkingConfigBetweenTools:
      type: object
      properties:
        type:
          type: string
          const: between_tools
      required:
        - type
    ThinkingConfigAdaptive:
      type: object
      properties:
        type:
          type: string
          const: adaptive
        display:
          anyOf:
            - type: string
              enum:
                - summarized
                - omitted
            - type: 'null'
          description: >-
            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#controlling-thinking-display).
      required:
        - type
    ToolChoiceAuto:
      type: object
      properties:
        type:
          type: string
          const: auto
        disable_parallel_tool_use:
          type: boolean
          description: >-
            Whether to disable parallel tool use.


            Defaults to `false`. If set to `true`, the model will output at most
            one tool use.
      required:
        - type
      description: The model will automatically decide whether to use tools.
    ToolChoiceAny:
      type: object
      properties:
        type:
          type: string
          const: any
        disable_parallel_tool_use:
          type: boolean
          description: >-
            Whether to disable parallel tool use.


            Defaults to `false`. If set to `true`, the model will output exactly
            one tool use.
      required:
        - type
      description: The model will use any available tools.
    ToolChoiceTool:
      type: object
      properties:
        type:
          type: string
          const: tool
        name:
          type: string
          description: The name of the tool to use.
        disable_parallel_tool_use:
          type: boolean
          description: >-
            Whether to disable parallel tool use.


            Defaults to `false`. If set to `true`, the model will output exactly
            one tool use.
      required:
        - type
        - name
      description: The model will use the specified tool with `tool_choice.name`.
    ToolChoiceNone:
      type: object
      properties:
        type:
          type: string
          const: none
      required:
        - type
      description: The model will not be allowed to use tools.
    Tool:
      type: object
      properties:
        type:
          anyOf:
            - type: string
              const: custom
            - type: 'null'
        input_schema:
          type: object
          properties:
            type:
              type: string
              const: object
            properties:
              anyOf:
                - type: object
                  additionalProperties: true
                - type: 'null'
            required:
              anyOf:
                - type: array
                  items:
                    type: string
                - type: 'null'
          required:
            - type
          description: >-
            [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.
        name:
          type: string
          description: >-
            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}$
        allowed_callers:
          type: array
          items:
            type: string
            enum:
              - direct
              - code_execution_20250825
              - code_execution_20260120
              - code_execution_20260521
        cache_control:
          anyOf:
            - $ref: '#/components/schemas/CacheControlEphemeral'
            - type: 'null'
          description: Create a cache control breakpoint at this content block.
        defer_loading:
          type: boolean
          description: >-
            If true, tool will not be included in initial system prompt. Only
            loaded when returned via tool_reference from tool search.
        description:
          type: 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.
        eager_input_streaming:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            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.
        input_examples:
          type: array
          items:
            type: object
            additionalProperties: true
        strict:
          type: boolean
          description: When true, guarantees schema validation on tool names and inputs
      required:
        - input_schema
        - name
    ToolBash20250124:
      type: object
      properties:
        type:
          type: string
          const: bash_20250124
        name:
          type: string
          const: bash
          description: >-
            Name of the tool.


            This is how the tool will be called by the model and in `tool_use`
            blocks.
        allowed_callers:
          type: array
          items:
            type: string
            enum:
              - direct
              - code_execution_20250825
              - code_execution_20260120
              - code_execution_20260521
        cache_control:
          anyOf:
            - $ref: '#/components/schemas/CacheControlEphemeral'
            - type: 'null'
          description: Create a cache control breakpoint at this content block.
        defer_loading:
          type: boolean
          description: >-
            If true, tool will not be included in initial system prompt. Only
            loaded when returned via tool_reference from tool search.
        input_examples:
          type: array
          items:
            type: object
            additionalProperties: true
        strict:
          type: boolean
          description: When true, guarantees schema validation on tool names and inputs
      required:
        - type
        - name
    CodeExecutionTool20250522:
      type: object
      properties:
        type:
          type: string
          const: code_execution_20250522
        name:
          type: string
          const: code_execution
          description: >-
            Name of the tool.


            This is how the tool will be called by the model and in `tool_use`
            blocks.
        allowed_callers:
          type: array
          items:
            type: string
            enum:
              - direct
              - code_execution_20250825
              - code_execution_20260120
              - code_execution_20260521
        cache_control:
          anyOf:
            - $ref: '#/components/schemas/CacheControlEphemeral'
            - type: 'null'
          description: Create a cache control breakpoint at this content block.
        defer_loading:
          type: boolean
          description: >-
            If true, tool will not be included in initial system prompt. Only
            loaded when returned via tool_reference from tool search.
        strict:
          type: boolean
          description: When true, guarantees schema validation on tool names and inputs
      required:
        - type
        - name
    CodeExecutionTool20250825:
      type: object
      properties:
        type:
          type: string
          const: code_execution_20250825
        name:
          type: string
          const: code_execution
          description: >-
            Name of the tool.


            This is how the tool will be called by the model and in `tool_use`
            blocks.
        allowed_callers:
          type: array
          items:
            type: string
            enum:
              - direct
              - code_execution_20250825
              - code_execution_20260120
              - code_execution_20260521
        cache_control:
          anyOf:
            - $ref: '#/components/schemas/CacheControlEphemeral'
            - type: 'null'
          description: Create a cache control breakpoint at this content block.
        defer_loading:
          type: boolean
          description: >-
            If true, tool will not be included in initial system prompt. Only
            loaded when returned via tool_reference from tool search.
        strict:
          type: boolean
          description: When true, guarantees schema validation on tool names and inputs
      required:
        - type
        - name
    CodeExecutionTool20260120:
      type: object
      properties:
        type:
          type: string
          const: code_execution_20260120
        name:
          type: string
          const: code_execution
          description: >-
            Name of the tool.


            This is how the tool will be called by the model and in `tool_use`
            blocks.
        allowed_callers:
          type: array
          items:
            type: string
            enum:
              - direct
              - code_execution_20250825
              - code_execution_20260120
              - code_execution_20260521
        cache_control:
          anyOf:
            - $ref: '#/components/schemas/CacheControlEphemeral'
            - type: 'null'
          description: Create a cache control breakpoint at this content block.
        defer_loading:
          type: boolean
          description: >-
            If true, tool will not be included in initial system prompt. Only
            loaded when returned via tool_reference from tool search.
        strict:
          type: boolean
          description: When true, guarantees schema validation on tool names and inputs
      required:
        - type
        - name
      description: >-
        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#tool-versions)
        to learn what each tool version adds.
    CodeExecutionTool20260521:
      type: object
      properties:
        type:
          type: string
          const: code_execution_20260521
        name:
          type: string
          const: code_execution
          description: >-
            Name of the tool.


            This is how the tool will be called by the model and in `tool_use`
            blocks.
        allowed_callers:
          type: array
          items:
            type: string
            enum:
              - direct
              - code_execution_20250825
              - code_execution_20260120
              - code_execution_20260521
        cache_control:
          anyOf:
            - $ref: '#/components/schemas/CacheControlEphemeral'
            - type: 'null'
          description: Create a cache control breakpoint at this content block.
        defer_loading:
          type: boolean
          description: >-
            If true, tool will not be included in initial system prompt. Only
            loaded when returned via tool_reference from tool search.
        strict:
          type: boolean
          description: When true, guarantees schema validation on tool names and inputs
      required:
        - type
        - name
      description: Code execution tool with REPL state persistence.
    BrowserToolset20260801:
      type: object
      properties:
        type:
          type: string
          const: browser_toolset_20260801
        cache_control:
          anyOf:
            - $ref: '#/components/schemas/CacheControlEphemeral'
            - type: 'null'
          description: Create a cache control breakpoint at this content block.
        configs:
          anyOf:
            - $ref: '#/components/schemas/BrowserToolsetConfigs'
            - type: 'null'
          description: >-
            Sparse per-member overrides, keyed by member name. Absent, null, and
            {} are equivalent; a member's defaults apply wherever its key is
            absent.
      required:
        - type
      description: |-
        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.
    MemoryTool20250818:
      type: object
      properties:
        type:
          type: string
          const: memory_20250818
        name:
          type: string
          const: memory
          description: >-
            Name of the tool.


            This is how the tool will be called by the model and in `tool_use`
            blocks.
        allowed_callers:
          type: array
          items:
            type: string
            enum:
              - direct
              - code_execution_20250825
              - code_execution_20260120
              - code_execution_20260521
        cache_control:
          anyOf:
            - $ref: '#/components/schemas/CacheControlEphemeral'
            - type: 'null'
          description: Create a cache control breakpoint at this content block.
        defer_loading:
          type: boolean
          description: >-
            If true, tool will not be included in initial system prompt. Only
            loaded when returned via tool_reference from tool search.
        input_examples:
          type: array
          items:
            type: object
            additionalProperties: true
        strict:
          type: boolean
          description: When true, guarantees schema validation on tool names and inputs
      required:
        - type
        - name
    ComputerToolset20260801:
      type: object
      properties:
        type:
          type: string
          const: computer_toolset_20260801
        cache_control:
          anyOf:
            - $ref: '#/components/schemas/CacheControlEphemeral'
            - type: 'null'
          description: Create a cache control breakpoint at this content block.
        configs:
          anyOf:
            - $ref: '#/components/schemas/ComputerToolsetConfigs'
            - type: 'null'
          description: >-
            Sparse per-member overrides, keyed by member name. Absent, null, and
            {} are equivalent; a member's defaults apply wherever its key is
            absent.
      required:
        - type
      description: |-
        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`.
    ToolTextEditor20250124:
      type: object
      properties:
        type:
          type: string
          const: text_editor_20250124
        name:
          type: string
          const: str_replace_editor
          description: >-
            Name of the tool.


            This is how the tool will be called by the model and in `tool_use`
            blocks.
        allowed_callers:
          type: array
          items:
            type: string
            enum:
              - direct
              - code_execution_20250825
              - code_execution_20260120
              - code_execution_20260521
        cache_control:
          anyOf:
            - $ref: '#/components/schemas/CacheControlEphemeral'
            - type: 'null'
          description: Create a cache control breakpoint at this content block.
        defer_loading:
          type: boolean
          description: >-
            If true, tool will not be included in initial system prompt. Only
            loaded when returned via tool_reference from tool search.
        input_examples:
          type: array
          items:
            type: object
            additionalProperties: true
        strict:
          type: boolean
          description: When true, guarantees schema validation on tool names and inputs
      required:
        - type
        - name
    ToolTextEditor20250429:
      type: object
      properties:
        type:
          type: string
          const: text_editor_20250429
        name:
          type: string
          const: str_replace_based_edit_tool
          description: >-
            Name of the tool.


            This is how the tool will be called by the model and in `tool_use`
            blocks.
        allowed_callers:
          type: array
          items:
            type: string
            enum:
              - direct
              - code_execution_20250825
              - code_execution_20260120
              - code_execution_20260521
        cache_control:
          anyOf:
            - $ref: '#/components/schemas/CacheControlEphemeral'
            - type: 'null'
          description: Create a cache control breakpoint at this content block.
        defer_loading:
          type: boolean
          description: >-
            If true, tool will not be included in initial system prompt. Only
            loaded when returned via tool_reference from tool search.
        input_examples:
          type: array
          items:
            type: object
            additionalProperties: true
        strict:
          type: boolean
          description: When true, guarantees schema validation on tool names and inputs
      required:
        - type
        - name
    ToolTextEditor20250728:
      type: object
      properties:
        type:
          type: string
          const: text_editor_20250728
        name:
          type: string
          const: str_replace_based_edit_tool
          description: >-
            Name of the tool.


            This is how the tool will be called by the model and in `tool_use`
            blocks.
        allowed_callers:
          type: array
          items:
            type: string
            enum:
              - direct
              - code_execution_20250825
              - code_execution_20260120
              - code_execution_20260521
        cache_control:
          anyOf:
            - $ref: '#/components/schemas/CacheControlEphemeral'
            - type: 'null'
          description: Create a cache control breakpoint at this content block.
        defer_loading:
          type: boolean
          description: >-
            If true, tool will not be included in initial system prompt. Only
            loaded when returned via tool_reference from tool search.
        input_examples:
          type: array
          items:
            type: object
            additionalProperties: true
        max_characters:
          anyOf:
            - type: number
            - type: 'null'
          description: >-
            Maximum number of characters to display when viewing a file. If not
            specified, defaults to displaying the full file.
          minimum: 1
        strict:
          type: boolean
          description: When true, guarantees schema validation on tool names and inputs
      required:
        - type
        - name
    WebSearchTool20250305:
      type: object
      properties:
        type:
          type: string
          const: web_search_20250305
        name:
          type: string
          const: web_search
          description: >-
            Name of the tool.


            This is how the tool will be called by the model and in `tool_use`
            blocks.
        allowed_callers:
          type: array
          items:
            type: string
            enum:
              - direct
              - code_execution_20250825
              - code_execution_20260120
              - code_execution_20260521
        allowed_domains:
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: >-
            If provided, only these domains will be included in results. Cannot
            be used alongside `blocked_domains`.
        blocked_domains:
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: >-
            If provided, these domains will never appear in results. Cannot be
            used alongside `allowed_domains`.
        cache_control:
          anyOf:
            - $ref: '#/components/schemas/CacheControlEphemeral'
            - type: 'null'
          description: Create a cache control breakpoint at this content block.
        defer_loading:
          type: boolean
          description: >-
            If true, tool will not be included in initial system prompt. Only
            loaded when returned via tool_reference from tool search.
        max_uses:
          anyOf:
            - type: number
            - type: 'null'
          description: Maximum number of times the tool can be used in the API request.
          minimum: 1
        strict:
          type: boolean
          description: When true, guarantees schema validation on tool names and inputs
        user_location:
          anyOf:
            - $ref: '#/components/schemas/UserLocation'
            - type: 'null'
          description: >-
            Parameters for the user's location. Used to provide more relevant
            search results.
      required:
        - type
        - name
    WebFetchTool20250910:
      type: object
      properties:
        type:
          type: string
          const: web_fetch_20250910
        name:
          type: string
          const: web_fetch
          description: >-
            Name of the tool.


            This is how the tool will be called by the model and in `tool_use`
            blocks.
        allowed_callers:
          type: array
          items:
            type: string
            enum:
              - direct
              - code_execution_20250825
              - code_execution_20260120
              - code_execution_20260521
        allowed_domains:
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: List of domains to allow fetching from
        blocked_domains:
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: List of domains to block fetching from
        cache_control:
          anyOf:
            - $ref: '#/components/schemas/CacheControlEphemeral'
            - type: 'null'
          description: Create a cache control breakpoint at this content block.
        citations:
          anyOf:
            - $ref: '#/components/schemas/CitationsConfigParam'
            - type: 'null'
          description: >-
            Citations configuration for fetched documents. Citations are
            disabled by default.
        defer_loading:
          type: boolean
          description: >-
            If true, tool will not be included in initial system prompt. Only
            loaded when returned via tool_reference from tool search.
        max_content_tokens:
          anyOf:
            - type: number
            - type: 'null'
          description: >-
            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
        max_uses:
          anyOf:
            - type: number
            - type: 'null'
          description: Maximum number of times the tool can be used in the API request.
          minimum: 1
        strict:
          type: boolean
          description: When true, guarantees schema validation on tool names and inputs
        url_sources:
          anyOf:
            - $ref: '#/components/schemas/WebFetchURLSources'
            - type: 'null'
          description: >-
            Which sources contribute to the set of URLs the tool may fetch.
            Omitted means every source.
      required:
        - type
        - name
    WebSearchTool20260209:
      type: object
      properties:
        type:
          type: string
          const: web_search_20260209
        name:
          type: string
          const: web_search
          description: >-
            Name of the tool.


            This is how the tool will be called by the model and in `tool_use`
            blocks.
        allowed_callers:
          type: array
          items:
            type: string
            enum:
              - direct
              - code_execution_20250825
              - code_execution_20260120
              - code_execution_20260521
        allowed_domains:
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: >-
            If provided, only these domains will be included in results. Cannot
            be used alongside `blocked_domains`.
        blocked_domains:
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: >-
            If provided, these domains will never appear in results. Cannot be
            used alongside `allowed_domains`.
        cache_control:
          anyOf:
            - $ref: '#/components/schemas/CacheControlEphemeral'
            - type: 'null'
          description: Create a cache control breakpoint at this content block.
        defer_loading:
          type: boolean
          description: >-
            If true, tool will not be included in initial system prompt. Only
            loaded when returned via tool_reference from tool search.
        max_uses:
          anyOf:
            - type: number
            - type: 'null'
          description: Maximum number of times the tool can be used in the API request.
          minimum: 1
        strict:
          type: boolean
          description: When true, guarantees schema validation on tool names and inputs
        user_location:
          anyOf:
            - $ref: '#/components/schemas/UserLocation'
            - type: 'null'
          description: >-
            Parameters for the user's location. Used to provide more relevant
            search results.
      required:
        - type
        - name
    WebFetchTool20260209:
      type: object
      properties:
        type:
          type: string
          const: web_fetch_20260209
        name:
          type: string
          const: web_fetch
          description: >-
            Name of the tool.


            This is how the tool will be called by the model and in `tool_use`
            blocks.
        allowed_callers:
          type: array
          items:
            type: string
            enum:
              - direct
              - code_execution_20250825
              - code_execution_20260120
              - code_execution_20260521
        allowed_domains:
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: List of domains to allow fetching from
        blocked_domains:
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: List of domains to block fetching from
        cache_control:
          anyOf:
            - $ref: '#/components/schemas/CacheControlEphemeral'
            - type: 'null'
          description: Create a cache control breakpoint at this content block.
        citations:
          anyOf:
            - $ref: '#/components/schemas/CitationsConfigParam'
            - type: 'null'
          description: >-
            Citations configuration for fetched documents. Citations are
            disabled by default.
        defer_loading:
          type: boolean
          description: >-
            If true, tool will not be included in initial system prompt. Only
            loaded when returned via tool_reference from tool search.
        max_content_tokens:
          anyOf:
            - type: number
            - type: 'null'
          description: >-
            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
        max_uses:
          anyOf:
            - type: number
            - type: 'null'
          description: Maximum number of times the tool can be used in the API request.
          minimum: 1
        strict:
          type: boolean
          description: When true, guarantees schema validation on tool names and inputs
        url_sources:
          anyOf:
            - $ref: '#/components/schemas/WebFetchURLSources'
            - type: 'null'
          description: >-
            Which sources contribute to the set of URLs the tool may fetch.
            Omitted means every source.
      required:
        - type
        - name
    WebFetchTool20260309:
      type: object
      properties:
        type:
          type: string
          const: web_fetch_20260309
        name:
          type: string
          const: web_fetch
          description: >-
            Name of the tool.


            This is how the tool will be called by the model and in `tool_use`
            blocks.
        allowed_callers:
          type: array
          items:
            type: string
            enum:
              - direct
              - code_execution_20250825
              - code_execution_20260120
              - code_execution_20260521
        allowed_domains:
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: List of domains to allow fetching from
        blocked_domains:
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: List of domains to block fetching from
        cache_control:
          anyOf:
            - $ref: '#/components/schemas/CacheControlEphemeral'
            - type: 'null'
          description: Create a cache control breakpoint at this content block.
        citations:
          anyOf:
            - $ref: '#/components/schemas/CitationsConfigParam'
            - type: 'null'
          description: >-
            Citations configuration for fetched documents. Citations are
            disabled by default.
        defer_loading:
          type: boolean
          description: >-
            If true, tool will not be included in initial system prompt. Only
            loaded when returned via tool_reference from tool search.
        max_content_tokens:
          anyOf:
            - type: number
            - type: 'null'
          description: >-
            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
        max_uses:
          anyOf:
            - type: number
            - type: 'null'
          description: Maximum number of times the tool can be used in the API request.
          minimum: 1
        strict:
          type: boolean
          description: When true, guarantees schema validation on tool names and inputs
        url_sources:
          anyOf:
            - $ref: '#/components/schemas/WebFetchURLSources'
            - type: 'null'
          description: >-
            Which sources contribute to the set of URLs the tool may fetch.
            Omitted means every source.
        use_cache:
          type: boolean
          description: >-
            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.
      required:
        - type
        - name
      description: Web fetch tool with use_cache parameter for bypassing cached content.
    WebSearchTool20260318:
      type: object
      properties:
        type:
          type: string
          const: web_search_20260318
        name:
          type: string
          const: web_search
          description: >-
            Name of the tool.


            This is how the tool will be called by the model and in `tool_use`
            blocks.
        allowed_callers:
          type: array
          items:
            type: string
            enum:
              - direct
              - code_execution_20250825
              - code_execution_20260120
              - code_execution_20260521
        allowed_domains:
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: >-
            If provided, only these domains will be included in results. Cannot
            be used alongside `blocked_domains`.
        blocked_domains:
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: >-
            If provided, these domains will never appear in results. Cannot be
            used alongside `allowed_domains`.
        cache_control:
          anyOf:
            - $ref: '#/components/schemas/CacheControlEphemeral'
            - type: 'null'
          description: Create a cache control breakpoint at this content block.
        defer_loading:
          type: boolean
          description: >-
            If true, tool will not be included in initial system prompt. Only
            loaded when returned via tool_reference from tool search.
        max_uses:
          anyOf:
            - type: number
            - type: 'null'
          description: Maximum number of times the tool can be used in the API request.
          minimum: 1
        response_inclusion:
          type: string
          enum:
            - full
            - excluded
          description: >-
            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.
        strict:
          type: boolean
          description: When true, guarantees schema validation on tool names and inputs
        user_location:
          anyOf:
            - $ref: '#/components/schemas/UserLocation'
            - type: 'null'
          description: >-
            Parameters for the user's location. Used to provide more relevant
            search results.
      required:
        - type
        - name
    WebFetchTool20260318:
      type: object
      properties:
        type:
          type: string
          const: web_fetch_20260318
        name:
          type: string
          const: web_fetch
          description: >-
            Name of the tool.


            This is how the tool will be called by the model and in `tool_use`
            blocks.
        allowed_callers:
          type: array
          items:
            type: string
            enum:
              - direct
              - code_execution_20250825
              - code_execution_20260120
              - code_execution_20260521
        allowed_domains:
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: List of domains to allow fetching from
        blocked_domains:
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: List of domains to block fetching from
        cache_control:
          anyOf:
            - $ref: '#/components/schemas/CacheControlEphemeral'
            - type: 'null'
          description: Create a cache control breakpoint at this content block.
        citations:
          anyOf:
            - $ref: '#/components/schemas/CitationsConfigParam'
            - type: 'null'
          description: >-
            Citations configuration for fetched documents. Citations are
            disabled by default.
        defer_loading:
          type: boolean
          description: >-
            If true, tool will not be included in initial system prompt. Only
            loaded when returned via tool_reference from tool search.
        max_content_tokens:
          anyOf:
            - type: number
            - type: 'null'
          description: >-
            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
        max_uses:
          anyOf:
            - type: number
            - type: 'null'
          description: Maximum number of times the tool can be used in the API request.
          minimum: 1
        response_inclusion:
          type: string
          enum:
            - full
            - excluded
          description: >-
            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.
        strict:
          type: boolean
          description: When true, guarantees schema validation on tool names and inputs
        url_sources:
          anyOf:
            - $ref: '#/components/schemas/WebFetchURLSources'
            - type: 'null'
          description: >-
            Which sources contribute to the set of URLs the tool may fetch.
            Omitted means every source.
        use_cache:
          type: boolean
          description: >-
            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.
      required:
        - type
        - name
    ToolSearchToolBm25_20251119:
      type: object
      properties:
        type:
          type: string
          enum:
            - tool_search_tool_bm25_20251119
            - tool_search_tool_bm25
        name:
          type: string
          const: tool_search_tool_bm25
          description: >-
            Name of the tool.


            This is how the tool will be called by the model and in `tool_use`
            blocks.
        allowed_callers:
          type: array
          items:
            type: string
            enum:
              - direct
              - code_execution_20250825
              - code_execution_20260120
              - code_execution_20260521
        cache_control:
          anyOf:
            - $ref: '#/components/schemas/CacheControlEphemeral'
            - type: 'null'
          description: Create a cache control breakpoint at this content block.
        defer_loading:
          type: boolean
          description: >-
            If true, tool will not be included in initial system prompt. Only
            loaded when returned via tool_reference from tool search.
        strict:
          type: boolean
          description: When true, guarantees schema validation on tool names and inputs
      required:
        - type
        - name
    ToolSearchToolRegex20251119:
      type: object
      properties:
        type:
          type: string
          enum:
            - tool_search_tool_regex_20251119
            - tool_search_tool_regex
        name:
          type: string
          const: tool_search_tool_regex
          description: >-
            Name of the tool.


            This is how the tool will be called by the model and in `tool_use`
            blocks.
        allowed_callers:
          type: array
          items:
            type: string
            enum:
              - direct
              - code_execution_20250825
              - code_execution_20260120
              - code_execution_20260521
        cache_control:
          anyOf:
            - $ref: '#/components/schemas/CacheControlEphemeral'
            - type: 'null'
          description: Create a cache control breakpoint at this content block.
        defer_loading:
          type: boolean
          description: >-
            If true, tool will not be included in initial system prompt. Only
            loaded when returned via tool_reference from tool search.
        strict:
          type: boolean
          description: When true, guarantees schema validation on tool names and inputs
      required:
        - type
        - name
    ContainerSkill:
      type: object
      properties:
        type:
          type: string
          enum:
            - anthropic
            - custom
          description: >-
            Type of skill - either 'anthropic' (built-in) or 'custom'
            (user-defined)
        skill_id:
          type: string
          description: Skill ID
          minLength: 1
          maxLength: 64
        version:
          type: string
          description: 'The resolved version: a skill version ID for custom skills.'
          minLength: 1
          maxLength: 64
      required:
        - type
        - skill_id
        - version
    TextBlock:
      type: object
      properties:
        type:
          type: string
          const: text
        citations:
          anyOf:
            - type: array
              items:
                $ref: '#/components/schemas/TextCitation'
            - type: 'null'
          description: >-
            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`.
        text:
          type: string
      required:
        - type
        - citations
        - text
    ThinkingBlock:
      type: object
      properties:
        type:
          type: string
          const: thinking
        signature:
          type: string
          description: >-
            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)
            for details.
        thinking:
          type: string
          description: The text of Claude's thinking process for this block.
      required:
        - type
        - signature
        - thinking
    RedactedThinkingBlock:
      type: object
      properties:
        type:
          type: string
          const: redacted_thinking
        data:
          type: string
          description: >-
            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#redacted-thinking-blocks)
            for details.
      required:
        - type
        - data
    ToolUseBlock:
      type: object
      properties:
        type:
          type: string
          const: tool_use
        id:
          type: string
          pattern: ^[a-zA-Z0-9_-]+$
        caller:
          anyOf:
            - $ref: '#/components/schemas/DirectCaller'
            - $ref: '#/components/schemas/ServerToolCaller'
            - $ref: '#/components/schemas/ServerToolCaller20260120'
          default: '{"type":"direct"}'
        input:
          type: object
          additionalProperties: true
        name:
          type: string
          minLength: 1
        toolset_name:
          anyOf:
            - type: string
            - type: 'null'
          description: For a toolset member tool_use, the toolset family.
          minLength: 1
          maxLength: 64
          pattern: ^[a-zA-Z0-9_-]+$
      required:
        - type
        - id
        - caller
        - input
        - name
    ServerToolUseBlock:
      type: object
      properties:
        type:
          type: string
          const: server_tool_use
        id:
          type: string
          pattern: ^srvtoolu_[a-zA-Z0-9_]+$
        caller:
          anyOf:
            - $ref: '#/components/schemas/DirectCaller'
            - $ref: '#/components/schemas/ServerToolCaller'
            - $ref: '#/components/schemas/ServerToolCaller20260120'
          default: '{"type":"direct"}'
        input:
          type: object
          additionalProperties: true
        name:
          type: string
          enum:
            - web_search
            - web_fetch
            - code_execution
            - bash_code_execution
            - text_editor_code_execution
            - tool_search_tool_regex
            - tool_search_tool_bm25
      required:
        - type
        - id
        - caller
        - input
        - name
    WebSearchToolResultBlock:
      type: object
      properties:
        type:
          type: string
          const: web_search_tool_result
        caller:
          anyOf:
            - $ref: '#/components/schemas/DirectCaller'
            - $ref: '#/components/schemas/ServerToolCaller'
            - $ref: '#/components/schemas/ServerToolCaller20260120'
          default: '{"type":"direct"}'
        content:
          $ref: '#/components/schemas/WebSearchToolResultBlockContent'
        tool_use_id:
          type: string
          pattern: ^srvtoolu_[a-zA-Z0-9_]+$
      required:
        - type
        - caller
        - content
        - tool_use_id
    WebFetchToolResultBlock:
      type: object
      properties:
        type:
          type: string
          const: web_fetch_tool_result
        caller:
          anyOf:
            - $ref: '#/components/schemas/DirectCaller'
            - $ref: '#/components/schemas/ServerToolCaller'
            - $ref: '#/components/schemas/ServerToolCaller20260120'
          default: '{"type":"direct"}'
        content:
          anyOf:
            - $ref: '#/components/schemas/WebFetchToolResultErrorBlock'
            - $ref: '#/components/schemas/WebFetchBlock'
        tool_use_id:
          type: string
          pattern: ^srvtoolu_[a-zA-Z0-9_]+$
      required:
        - type
        - caller
        - content
        - tool_use_id
    CodeExecutionToolResultBlock:
      type: object
      properties:
        type:
          type: string
          const: code_execution_tool_result
        content:
          $ref: '#/components/schemas/CodeExecutionToolResultBlockContent'
        tool_use_id:
          type: string
          pattern: ^srvtoolu_[a-zA-Z0-9_]+$
      required:
        - type
        - content
        - tool_use_id
    BashCodeExecutionToolResultBlock:
      type: object
      properties:
        type:
          type: string
          const: bash_code_execution_tool_result
        content:
          anyOf:
            - $ref: '#/components/schemas/BashCodeExecutionToolResultError'
            - $ref: '#/components/schemas/BashCodeExecutionResultBlock'
        tool_use_id:
          type: string
          pattern: ^srvtoolu_[a-zA-Z0-9_]+$
      required:
        - type
        - content
        - tool_use_id
    TextEditorCodeExecutionToolResultBlock:
      type: object
      properties:
        type:
          type: string
          const: text_editor_code_execution_tool_result
        content:
          anyOf:
            - $ref: '#/components/schemas/TextEditorCodeExecutionToolResultError'
            - $ref: '#/components/schemas/TextEditorCodeExecutionViewResultBlock'
            - $ref: '#/components/schemas/TextEditorCodeExecutionCreateResultBlock'
            - $ref: >-
                #/components/schemas/TextEditorCodeExecutionStrReplaceResultBlock
        tool_use_id:
          type: string
          pattern: ^srvtoolu_[a-zA-Z0-9_]+$
      required:
        - type
        - content
        - tool_use_id
    ToolSearchToolResultBlock:
      type: object
      properties:
        type:
          type: string
          const: tool_search_tool_result
        content:
          anyOf:
            - $ref: '#/components/schemas/ToolSearchToolResultError'
            - $ref: '#/components/schemas/ToolSearchToolSearchResultBlock'
        tool_use_id:
          type: string
          pattern: ^srvtoolu_[a-zA-Z0-9_]+$
      required:
        - type
        - content
        - tool_use_id
    ContainerUploadBlock:
      type: object
      properties:
        type:
          type: string
          const: container_upload
        file_id:
          type: string
      required:
        - type
        - file_id
      description: Response model for a file uploaded to the container.
    CacheMissReason:
      anyOf:
        - $ref: '#/components/schemas/CacheMissModelChanged'
        - $ref: '#/components/schemas/CacheMissSystemChanged'
        - $ref: '#/components/schemas/CacheMissToolsChanged'
        - $ref: '#/components/schemas/CacheMissMessagesChanged'
        - $ref: '#/components/schemas/CacheMissPreviousMessageNotFound'
        - $ref: '#/components/schemas/CacheMissUnavailable'
    CacheCreation:
      type: object
      properties:
        ephemeral_1h_input_tokens:
          type: number
          description: The number of input tokens used to create the 1 hour cache entry.
          default: 0
          minimum: 0
        ephemeral_5m_input_tokens:
          type: number
          description: The number of input tokens used to create the 5 minute cache entry.
          default: 0
          minimum: 0
      required:
        - ephemeral_1h_input_tokens
        - ephemeral_5m_input_tokens
    OutputTokensDetails:
      type: object
      properties:
        thinking_tokens:
          type: number
          description: >-
            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. 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.
          default: 0
          minimum: 0
      required:
        - thinking_tokens
    ServerToolUsage:
      type: object
      properties:
        web_fetch_requests:
          type: number
          description: The number of web fetch tool requests.
          default: 0
          minimum: 0
        web_search_requests:
          type: number
          description: The number of web search tool requests.
          default: 0
          minimum: 0
      required:
        - web_fetch_requests
        - web_search_requests
    MessageDeltaUsage:
      type: object
      properties:
        cache_creation_input_tokens:
          anyOf:
            - type: number
            - type: 'null'
          description: >-
            The cumulative number of input tokens used to create the cache
            entry.
          minimum: 0
        cache_read_input_tokens:
          anyOf:
            - type: number
            - type: 'null'
          description: The cumulative number of input tokens read from the cache.
          minimum: 0
        input_tokens:
          anyOf:
            - type: number
            - type: 'null'
          description: The cumulative number of input tokens which were used.
          minimum: 0
        output_tokens:
          type: number
          description: The cumulative number of output tokens which were used.
        output_tokens_details:
          anyOf:
            - $ref: '#/components/schemas/OutputTokensDetails'
            - type: 'null'
          description: >-
            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.
        server_tool_use:
          anyOf:
            - $ref: '#/components/schemas/ServerToolUsage'
            - type: 'null'
          description: The number of server tool requests.
      required:
        - cache_creation_input_tokens
        - cache_read_input_tokens
        - input_tokens
        - output_tokens
        - output_tokens_details
        - server_tool_use
    RawContentBlockDelta:
      anyOf:
        - $ref: '#/components/schemas/TextDelta'
        - $ref: '#/components/schemas/InputJSONDelta'
        - $ref: '#/components/schemas/CitationsDelta'
        - $ref: '#/components/schemas/ThinkingDelta'
        - $ref: '#/components/schemas/SignatureDelta'
    MessageContentParam:
      anyOf:
        - type: string
        - type: array
          items:
            $ref: '#/components/schemas/ContentBlockParam'
    Blocks:
      type: array
      items:
        $ref: '#/components/schemas/TextBlockParam'
    SkillParams:
      type: object
      properties:
        type:
          type: string
          enum:
            - anthropic
            - custom
          description: >-
            Type of skill - either 'anthropic' (built-in) or 'custom'
            (user-defined)
        skill_id:
          type: string
          description: Skill ID
          minLength: 1
          maxLength: 64
        version:
          type: string
          description: Skill version or 'latest' for most recent version
          minLength: 1
          maxLength: 64
      required:
        - type
        - skill_id
    CitationCharLocationParam:
      type: object
      properties:
        type:
          type: string
          const: char_location
        cited_text:
          type: string
        document_index:
          type: number
          minimum: 0
        document_title:
          anyOf:
            - type: string
            - type: 'null'
          minLength: 1
          maxLength: 500
        end_char_index:
          type: number
        start_char_index:
          type: number
          minimum: 0
      required:
        - type
        - cited_text
        - document_index
        - document_title
        - end_char_index
        - start_char_index
    CitationPageLocationParam:
      type: object
      properties:
        type:
          type: string
          const: page_location
        cited_text:
          type: string
        document_index:
          type: number
          minimum: 0
        document_title:
          anyOf:
            - type: string
            - type: 'null'
          minLength: 1
          maxLength: 500
        end_page_number:
          type: number
        start_page_number:
          type: number
          minimum: 1
      required:
        - type
        - cited_text
        - document_index
        - document_title
        - end_page_number
        - start_page_number
    CitationContentBlockLocationParam:
      type: object
      properties:
        type:
          type: string
          const: content_block_location
        cited_text:
          type: string
          description: >-
            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.
        document_index:
          type: number
          minimum: 0
        document_title:
          anyOf:
            - type: string
            - type: 'null'
          minLength: 1
          maxLength: 500
        end_block_index:
          type: number
          description: >-
            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`.
        start_block_index:
          type: number
          description: >-
            0-based index of the first cited block in the source's `content`
            array.
          minimum: 0
      required:
        - type
        - cited_text
        - document_index
        - document_title
        - end_block_index
        - start_block_index
    CitationWebSearchResultLocationParam:
      type: object
      properties:
        type:
          type: string
          const: web_search_result_location
        cited_text:
          type: string
        encrypted_index:
          type: string
        title:
          anyOf:
            - type: string
            - type: 'null'
          minLength: 1
          maxLength: 512
        url:
          type: string
          minLength: 1
      required:
        - type
        - cited_text
        - encrypted_index
        - title
        - url
    CitationSearchResultLocationParam:
      type: object
      properties:
        type:
          type: string
          const: search_result_location
        cited_text:
          type: string
          description: >-
            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.
        end_block_index:
          type: number
          description: >-
            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`.
        search_result_index:
          type: number
          description: >-
            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
        source:
          type: string
        start_block_index:
          type: number
          description: >-
            0-based index of the first cited block in the source's `content`
            array.
          minimum: 0
        title:
          anyOf:
            - type: string
            - type: 'null'
      required:
        - type
        - cited_text
        - end_block_index
        - search_result_index
        - source
        - start_block_index
        - title
    BrowserToolsetConfigs:
      type: object
      properties:
        type:
          anyOf:
            - $ref: '#/components/schemas/BrowserTypeConfig'
            - type: 'null'
          description: '`type`''s config overrides.'
        close_tab:
          anyOf:
            - $ref: '#/components/schemas/BrowserCloseTabConfig'
            - type: 'null'
          description: '`close_tab`''s config overrides.'
        double_click:
          anyOf:
            - $ref: '#/components/schemas/BrowserDoubleClickConfig'
            - type: 'null'
          description: '`double_click`''s config overrides.'
        file_upload:
          anyOf:
            - $ref: '#/components/schemas/BrowserFileUploadConfig'
            - type: 'null'
          description: '`file_upload`''s config overrides.'
        find:
          anyOf:
            - $ref: '#/components/schemas/BrowserFindConfig'
            - type: 'null'
          description: '`find`''s config overrides.'
        form_input:
          anyOf:
            - $ref: '#/components/schemas/BrowserFormInputConfig'
            - type: 'null'
          description: '`form_input`''s config overrides.'
        get_page_text:
          anyOf:
            - $ref: '#/components/schemas/BrowserGetPageTextConfig'
            - type: 'null'
          description: '`get_page_text`''s config overrides.'
        hold_key:
          anyOf:
            - $ref: '#/components/schemas/BrowserHoldKeyConfig'
            - type: 'null'
          description: '`hold_key`''s config overrides.'
        hover:
          anyOf:
            - $ref: '#/components/schemas/BrowserHoverConfig'
            - type: 'null'
          description: '`hover`''s config overrides.'
        javascript_exec:
          anyOf:
            - $ref: '#/components/schemas/BrowserJavascriptExecConfig'
            - type: 'null'
          description: '`javascript_exec`''s config overrides.'
        key:
          anyOf:
            - $ref: '#/components/schemas/BrowserKeyConfig'
            - type: 'null'
          description: '`key`''s config overrides.'
        left_click:
          anyOf:
            - $ref: '#/components/schemas/BrowserLeftClickConfig'
            - type: 'null'
          description: '`left_click`''s config overrides.'
        left_click_drag:
          anyOf:
            - $ref: '#/components/schemas/BrowserLeftClickDragConfig'
            - type: 'null'
          description: '`left_click_drag`''s config overrides.'
        left_mouse_down:
          anyOf:
            - $ref: '#/components/schemas/BrowserLeftMouseDownConfig'
            - type: 'null'
          description: '`left_mouse_down`''s config overrides.'
        left_mouse_up:
          anyOf:
            - $ref: '#/components/schemas/BrowserLeftMouseUpConfig'
            - type: 'null'
          description: '`left_mouse_up`''s config overrides.'
        list_tabs:
          anyOf:
            - $ref: '#/components/schemas/BrowserListTabsConfig'
            - type: 'null'
          description: '`list_tabs`''s config overrides.'
        middle_click:
          anyOf:
            - $ref: '#/components/schemas/BrowserMiddleClickConfig'
            - type: 'null'
          description: '`middle_click`''s config overrides.'
        mouse_move:
          anyOf:
            - $ref: '#/components/schemas/BrowserMouseMoveConfig'
            - type: 'null'
          description: '`mouse_move`''s config overrides.'
        navigate:
          anyOf:
            - $ref: '#/components/schemas/BrowserNavigateConfig'
            - type: 'null'
          description: '`navigate`''s config overrides.'
        new_tab:
          anyOf:
            - $ref: '#/components/schemas/BrowserNewTabConfig'
            - type: 'null'
          description: '`new_tab`''s config overrides.'
        read_console:
          anyOf:
            - $ref: '#/components/schemas/BrowserReadConsoleConfig'
            - type: 'null'
          description: '`read_console`''s config overrides.'
        read_network:
          anyOf:
            - $ref: '#/components/schemas/BrowserReadNetworkConfig'
            - type: 'null'
          description: '`read_network`''s config overrides.'
        read_page:
          anyOf:
            - $ref: '#/components/schemas/BrowserReadPageConfig'
            - type: 'null'
          description: '`read_page`''s config overrides.'
        right_click:
          anyOf:
            - $ref: '#/components/schemas/BrowserRightClickConfig'
            - type: 'null'
          description: '`right_click`''s config overrides.'
        screenshot:
          anyOf:
            - $ref: '#/components/schemas/BrowserScreenshotConfig'
            - type: 'null'
          description: '`screenshot`''s config overrides.'
        scroll:
          anyOf:
            - $ref: '#/components/schemas/BrowserScrollConfig'
            - type: 'null'
          description: '`scroll`''s config overrides.'
        scroll_to:
          anyOf:
            - $ref: '#/components/schemas/BrowserScrollToConfig'
            - type: 'null'
          description: '`scroll_to`''s config overrides.'
        switch_tab:
          anyOf:
            - $ref: '#/components/schemas/BrowserSwitchTabConfig'
            - type: 'null'
          description: '`switch_tab`''s config overrides.'
        triple_click:
          anyOf:
            - $ref: '#/components/schemas/BrowserTripleClickConfig'
            - type: 'null'
          description: '`triple_click`''s config overrides.'
        wait:
          anyOf:
            - $ref: '#/components/schemas/BrowserWaitConfig'
            - type: 'null'
          description: '`wait`''s config overrides.'
        zoom:
          anyOf:
            - $ref: '#/components/schemas/BrowserZoomConfig'
            - type: 'null'
          description: '`zoom`''s config overrides.'
    ComputerToolsetConfigs:
      type: object
      properties:
        type:
          anyOf:
            - $ref: '#/components/schemas/ComputerTypeConfig'
            - type: 'null'
          description: '`type`''s config overrides.'
        cursor_position:
          anyOf:
            - $ref: '#/components/schemas/ComputerCursorPositionConfig'
            - type: 'null'
          description: '`cursor_position`''s config overrides.'
        double_click:
          anyOf:
            - $ref: '#/components/schemas/ComputerDoubleClickConfig'
            - type: 'null'
          description: '`double_click`''s config overrides.'
        hold_key:
          anyOf:
            - $ref: '#/components/schemas/ComputerHoldKeyConfig'
            - type: 'null'
          description: '`hold_key`''s config overrides.'
        key:
          anyOf:
            - $ref: '#/components/schemas/ComputerKeyConfig'
            - type: 'null'
          description: '`key`''s config overrides.'
        left_click:
          anyOf:
            - $ref: '#/components/schemas/ComputerLeftClickConfig'
            - type: 'null'
          description: '`left_click`''s config overrides.'
        left_click_drag:
          anyOf:
            - $ref: '#/components/schemas/ComputerLeftClickDragConfig'
            - type: 'null'
          description: '`left_click_drag`''s config overrides.'
        left_mouse_down:
          anyOf:
            - $ref: '#/components/schemas/ComputerLeftMouseDownConfig'
            - type: 'null'
          description: '`left_mouse_down`''s config overrides.'
        left_mouse_up:
          anyOf:
            - $ref: '#/components/schemas/ComputerLeftMouseUpConfig'
            - type: 'null'
          description: '`left_mouse_up`''s config overrides.'
        middle_click:
          anyOf:
            - $ref: '#/components/schemas/ComputerMiddleClickConfig'
            - type: 'null'
          description: '`middle_click`''s config overrides.'
        mouse_move:
          anyOf:
            - $ref: '#/components/schemas/ComputerMouseMoveConfig'
            - type: 'null'
          description: '`mouse_move`''s config overrides.'
        right_click:
          anyOf:
            - $ref: '#/components/schemas/ComputerRightClickConfig'
            - type: 'null'
          description: '`right_click`''s config overrides.'
        screenshot:
          anyOf:
            - $ref: '#/components/schemas/ComputerScreenshotConfig'
            - type: 'null'
          description: '`screenshot`''s config overrides.'
        scroll:
          anyOf:
            - $ref: '#/components/schemas/ComputerScrollConfig'
            - type: 'null'
          description: '`scroll`''s config overrides.'
        triple_click:
          anyOf:
            - $ref: '#/components/schemas/ComputerTripleClickConfig'
            - type: 'null'
          description: '`triple_click`''s config overrides.'
        wait:
          anyOf:
            - $ref: '#/components/schemas/ComputerWaitConfig'
            - type: 'null'
          description: '`wait`''s config overrides.'
        zoom:
          anyOf:
            - $ref: '#/components/schemas/ComputerZoomConfig'
            - type: 'null'
          description: '`zoom`''s config overrides.'
    UserLocation:
      type: object
      properties:
        type:
          type: string
          const: approximate
        city:
          anyOf:
            - type: string
            - type: 'null'
          description: The city of the user.
          minLength: 1
          maxLength: 255
        country:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            The two letter [ISO country
            code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the user.
          minLength: 2
          maxLength: 2
        region:
          anyOf:
            - type: string
            - type: 'null'
          description: The region of the user.
          minLength: 1
          maxLength: 255
        timezone:
          anyOf:
            - type: string
            - type: 'null'
          description: The [IANA timezone](https://nodatime.org/TimeZones) of the user.
          minLength: 1
          maxLength: 255
      required:
        - type
    CitationsConfigParam:
      type: object
      properties:
        enabled:
          type: boolean
    WebFetchURLSources:
      type: object
      properties:
        client_tool_results:
          anyOf:
            - $ref: '#/components/schemas/WebFetchURLSourceAll'
            - $ref: '#/components/schemas/WebFetchURLSourceNone'
            - $ref: '#/components/schemas/WebFetchURLSourceOnly'
            - $ref: '#/components/schemas/WebFetchURLSourceExcept'
          description: >-
            Which client tools' results contribute fetchable URLs: "all",
            "none", or an only or except list of client tool names from tools[].
        server_tool_results:
          anyOf:
            - $ref: '#/components/schemas/WebFetchURLSourceAll'
            - $ref: '#/components/schemas/WebFetchURLSourceNone'
            - $ref: '#/components/schemas/WebFetchURLSourceOnly'
            - $ref: '#/components/schemas/WebFetchURLSourceExcept'
          description: >-
            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.
        user_input:
          anyOf:
            - $ref: '#/components/schemas/WebFetchURLSourceAll'
            - $ref: '#/components/schemas/WebFetchURLSourceNone'
          description: 'Whether URLs in user messages are fetchable: "all" or "none".'
    TextCitation:
      anyOf:
        - $ref: '#/components/schemas/CitationCharLocation'
        - $ref: '#/components/schemas/CitationPageLocation'
        - $ref: '#/components/schemas/CitationContentBlockLocation'
        - $ref: '#/components/schemas/CitationsWebSearchResultLocation'
        - $ref: '#/components/schemas/CitationsSearchResultLocation'
    DirectCaller:
      type: object
      properties:
        type:
          type: string
          const: direct
      required:
        - type
      description: Tool invocation directly from the model.
    ServerToolCaller:
      type: object
      properties:
        type:
          type: string
          const: code_execution_20250825
        tool_id:
          type: string
          pattern: ^srvtoolu_[a-zA-Z0-9_]+$
      required:
        - type
        - tool_id
      description: Tool invocation generated by a server-side tool.
    ServerToolCaller20260120:
      type: object
      properties:
        type:
          type: string
          const: code_execution_20260120
        tool_id:
          type: string
          pattern: ^srvtoolu_[a-zA-Z0-9_]+$
      required:
        - type
        - tool_id
    WebSearchToolResultBlockContent:
      anyOf:
        - $ref: '#/components/schemas/WebSearchToolResultError'
        - type: array
          items:
            $ref: '#/components/schemas/WebSearchResultBlock'
    WebFetchToolResultErrorBlock:
      type: object
      properties:
        type:
          type: string
          const: web_fetch_tool_result_error
        error_code:
          $ref: '#/components/schemas/WebFetchToolResultErrorCode'
      required:
        - type
        - error_code
    WebFetchBlock:
      type: object
      properties:
        type:
          type: string
          const: web_fetch_result
        content:
          $ref: '#/components/schemas/DocumentBlock'
        retrieved_at:
          anyOf:
            - type: string
            - type: 'null'
          description: ISO 8601 timestamp when the content was retrieved
        url:
          type: string
          description: Fetched content URL
      required:
        - type
        - content
        - retrieved_at
        - url
    CodeExecutionToolResultBlockContent:
      anyOf:
        - $ref: '#/components/schemas/CodeExecutionToolResultError'
        - $ref: '#/components/schemas/CodeExecutionResultBlock'
        - $ref: '#/components/schemas/EncryptedCodeExecutionResultBlock'
    BashCodeExecutionToolResultError:
      type: object
      properties:
        type:
          type: string
          const: bash_code_execution_tool_result_error
        error_code:
          $ref: '#/components/schemas/BashCodeExecutionToolResultErrorCode'
      required:
        - type
        - error_code
    BashCodeExecutionResultBlock:
      type: object
      properties:
        type:
          type: string
          const: bash_code_execution_result
        content:
          type: array
          items:
            $ref: '#/components/schemas/BashCodeExecutionOutputBlock'
        return_code:
          type: number
        stderr:
          type: string
        stdout:
          type: string
      required:
        - type
        - content
        - return_code
        - stderr
        - stdout
    TextEditorCodeExecutionToolResultError:
      type: object
      properties:
        type:
          type: string
          const: text_editor_code_execution_tool_result_error
        error_code:
          $ref: '#/components/schemas/TextEditorCodeExecutionToolResultErrorCode'
        error_message:
          anyOf:
            - type: string
            - type: 'null'
      required:
        - type
        - error_code
        - error_message
    TextEditorCodeExecutionViewResultBlock:
      type: object
      properties:
        type:
          type: string
          const: text_editor_code_execution_view_result
        content:
          type: string
        file_type:
          type: string
          enum:
            - text
            - image
            - pdf
        num_lines:
          anyOf:
            - type: number
            - type: 'null'
        start_line:
          anyOf:
            - type: number
            - type: 'null'
        total_lines:
          anyOf:
            - type: number
            - type: 'null'
      required:
        - type
        - content
        - file_type
        - num_lines
        - start_line
        - total_lines
    TextEditorCodeExecutionCreateResultBlock:
      type: object
      properties:
        type:
          type: string
          const: text_editor_code_execution_create_result
        is_file_update:
          type: boolean
      required:
        - type
        - is_file_update
    TextEditorCodeExecutionStrReplaceResultBlock:
      type: object
      properties:
        type:
          type: string
          const: text_editor_code_execution_str_replace_result
        lines:
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
        new_lines:
          anyOf:
            - type: number
            - type: 'null'
        new_start:
          anyOf:
            - type: number
            - type: 'null'
        old_lines:
          anyOf:
            - type: number
            - type: 'null'
        old_start:
          anyOf:
            - type: number
            - type: 'null'
      required:
        - type
        - lines
        - new_lines
        - new_start
        - old_lines
        - old_start
    ToolSearchToolResultError:
      type: object
      properties:
        type:
          type: string
          const: tool_search_tool_result_error
        error_code:
          $ref: '#/components/schemas/ToolSearchToolResultErrorCode'
        error_message:
          anyOf:
            - type: string
            - type: 'null'
      required:
        - type
        - error_code
        - error_message
    ToolSearchToolSearchResultBlock:
      type: object
      properties:
        type:
          type: string
          const: tool_search_tool_search_result
        tool_references:
          type: array
          items:
            $ref: '#/components/schemas/ToolReferenceBlock'
      required:
        - type
        - tool_references
    CacheMissModelChanged:
      type: object
      properties:
        type:
          type: string
          const: model_changed
        cache_missed_input_tokens:
          type: number
          description: >-
            Approximate number of input tokens that would have been read from
            cache had the prefix matched the previous request.
      required:
        - type
        - cache_missed_input_tokens
      description: >-
        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#cache-miss-reason-types)
        to learn what to change for each reason.
    CacheMissSystemChanged:
      type: object
      properties:
        type:
          type: string
          const: system_changed
        cache_missed_input_tokens:
          type: number
          description: >-
            Approximate number of input tokens that would have been read from
            cache had the prefix matched the previous request.
      required:
        - type
        - cache_missed_input_tokens
      description: >-
        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#cache-miss-reason-types)
        to learn what to change for each reason.
    CacheMissToolsChanged:
      type: object
      properties:
        type:
          type: string
          const: tools_changed
        cache_missed_input_tokens:
          type: number
          description: >-
            Approximate number of input tokens that would have been read from
            cache had the prefix matched the previous request.
      required:
        - type
        - cache_missed_input_tokens
      description: >-
        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#cache-miss-reason-types)
        to learn what to change for each reason.
    CacheMissMessagesChanged:
      type: object
      properties:
        type:
          type: string
          const: messages_changed
        cache_missed_input_tokens:
          type: number
          description: >-
            Approximate number of input tokens that would have been read from
            cache had the prefix matched the previous request.
      required:
        - type
        - cache_missed_input_tokens
      description: >-
        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#cache-miss-reason-types)
        to learn what to change for each reason.
    CacheMissPreviousMessageNotFound:
      type: object
      properties:
        type:
          type: string
          const: previous_message_not_found
      required:
        - type
      description: >-
        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#cache-miss-reason-types)
        to learn what to change for each reason.
    CacheMissUnavailable:
      type: object
      properties:
        type:
          type: string
          const: unavailable
      required:
        - type
      description: >-
        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#cache-miss-reason-types)
        to learn what to change for each reason.
    TextDelta:
      type: object
      properties:
        type:
          type: string
          const: text_delta
        text:
          type: string
      required:
        - type
        - text
    InputJSONDelta:
      type: object
      properties:
        type:
          type: string
          const: input_json_delta
        partial_json:
          type: string
      required:
        - type
        - partial_json
    CitationsDelta:
      type: object
      properties:
        type:
          type: string
          const: citations_delta
        citation:
          anyOf:
            - $ref: '#/components/schemas/CitationCharLocation'
            - $ref: '#/components/schemas/CitationPageLocation'
            - $ref: '#/components/schemas/CitationContentBlockLocation'
            - $ref: '#/components/schemas/CitationsWebSearchResultLocation'
            - $ref: '#/components/schemas/CitationsSearchResultLocation'
      required:
        - type
        - citation
    ThinkingDelta:
      type: object
      properties:
        type:
          type: string
          const: thinking_delta
        thinking:
          type: string
          description: >-
            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.
      required:
        - type
        - thinking
    SignatureDelta:
      type: object
      properties:
        type:
          type: string
          const: signature_delta
        signature:
          type: string
          description: >-
            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:
        - type
        - signature
    ContentBlockParam:
      anyOf:
        - $ref: '#/components/schemas/TextBlockParam'
        - $ref: '#/components/schemas/ImageBlockParam'
        - $ref: '#/components/schemas/DocumentBlockParam'
        - $ref: '#/components/schemas/SearchResultBlockParam'
        - $ref: '#/components/schemas/ThinkingBlockParam'
        - $ref: '#/components/schemas/RedactedThinkingBlockParam'
        - $ref: '#/components/schemas/ToolUseBlockParam'
        - $ref: '#/components/schemas/ToolResultBlockParam'
        - $ref: '#/components/schemas/ServerToolUseBlockParam'
        - $ref: '#/components/schemas/WebSearchToolResultBlockParam'
        - $ref: '#/components/schemas/WebFetchToolResultBlockParam'
        - $ref: '#/components/schemas/CodeExecutionToolResultBlockParam'
        - $ref: '#/components/schemas/BashCodeExecutionToolResultBlockParam'
        - $ref: '#/components/schemas/TextEditorCodeExecutionToolResultBlockParam'
        - $ref: '#/components/schemas/ToolSearchToolResultBlockParam'
        - $ref: '#/components/schemas/ContainerUploadBlockParam'
    BrowserTypeConfig:
      type: object
      properties:
        defer_loading:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Defer loading for this member. Must resolve to the same value on
            every enabled member of the toolset.
        enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether this member is offered 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:
      type: object
      properties:
        defer_loading:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Defer loading for this member. Must resolve to the same value on
            every enabled member of the toolset.
        enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether this member is offered 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:
      type: object
      properties:
        defer_loading:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Defer loading for this member. Must resolve to the same value on
            every enabled member of the toolset.
        enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether this member is offered 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:
      type: object
      properties:
        defer_loading:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Defer loading for this member. Must resolve to the same value on
            every enabled member of the toolset.
        enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether this member is offered 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:
      type: object
      properties:
        defer_loading:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Defer loading for this member. Must resolve to the same value on
            every enabled member of the toolset.
        enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether this member is offered 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:
      type: object
      properties:
        defer_loading:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Defer loading for this member. Must resolve to the same value on
            every enabled member of the toolset.
        enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether this member is offered 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:
      type: object
      properties:
        defer_loading:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Defer loading for this member. Must resolve to the same value on
            every enabled member of the toolset.
        enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether this member is offered 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:
      type: object
      properties:
        defer_loading:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Defer loading for this member. Must resolve to the same value on
            every enabled member of the toolset.
        enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether this member is offered 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:
      type: object
      properties:
        defer_loading:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Defer loading for this member. Must resolve to the same value on
            every enabled member of the toolset.
        enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether this member is offered 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:
      type: object
      properties:
        defer_loading:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Defer loading for this member. Must resolve to the same value on
            every enabled member of the toolset.
        enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether this member is offered 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:
      type: object
      properties:
        defer_loading:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Defer loading for this member. Must resolve to the same value on
            every enabled member of the toolset.
        enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether this member is offered 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:
      type: object
      properties:
        defer_loading:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Defer loading for this member. Must resolve to the same value on
            every enabled member of the toolset.
        enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether this member is offered 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:
      type: object
      properties:
        defer_loading:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Defer loading for this member. Must resolve to the same value on
            every enabled member of the toolset.
        enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether this member is offered 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:
      type: object
      properties:
        defer_loading:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Defer loading for this member. Must resolve to the same value on
            every enabled member of the toolset.
        enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether this member is offered 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:
      type: object
      properties:
        defer_loading:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Defer loading for this member. Must resolve to the same value on
            every enabled member of the toolset.
        enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether this member is offered 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:
      type: object
      properties:
        defer_loading:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Defer loading for this member. Must resolve to the same value on
            every enabled member of the toolset.
        enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether this member is offered 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:
      type: object
      properties:
        defer_loading:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Defer loading for this member. Must resolve to the same value on
            every enabled member of the toolset.
        enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether this member is offered 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:
      type: object
      properties:
        defer_loading:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Defer loading for this member. Must resolve to the same value on
            every enabled member of the toolset.
        enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether this member is offered 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:
      type: object
      properties:
        defer_loading:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Defer loading for this member. Must resolve to the same value on
            every enabled member of the toolset.
        enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether this member is offered 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:
      type: object
      properties:
        defer_loading:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Defer loading for this member. Must resolve to the same value on
            every enabled member of the toolset.
        enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether this member is offered 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:
      type: object
      properties:
        defer_loading:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Defer loading for this member. Must resolve to the same value on
            every enabled member of the toolset.
        enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether this member is offered 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:
      type: object
      properties:
        defer_loading:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Defer loading for this member. Must resolve to the same value on
            every enabled member of the toolset.
        enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether this member is offered 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:
      type: object
      properties:
        defer_loading:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Defer loading for this member. Must resolve to the same value on
            every enabled member of the toolset.
        enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether this member is offered 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:
      type: object
      properties:
        defer_loading:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Defer loading for this member. Must resolve to the same value on
            every enabled member of the toolset.
        enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether this member is offered 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:
      type: object
      properties:
        defer_loading:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Defer loading for this member. Must resolve to the same value on
            every enabled member of the toolset.
        enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether this member is offered 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:
      type: object
      properties:
        defer_loading:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Defer loading for this member. Must resolve to the same value on
            every enabled member of the toolset.
        enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether this member is offered 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:
      type: object
      properties:
        defer_loading:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Defer loading for this member. Must resolve to the same value on
            every enabled member of the toolset.
        enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether this member is offered 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:
      type: object
      properties:
        defer_loading:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Defer loading for this member. Must resolve to the same value on
            every enabled member of the toolset.
        enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether this member is offered 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:
      type: object
      properties:
        defer_loading:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Defer loading for this member. Must resolve to the same value on
            every enabled member of the toolset.
        enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether this member is offered 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:
      type: object
      properties:
        defer_loading:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Defer loading for this member. Must resolve to the same value on
            every enabled member of the toolset.
        enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether this member is offered 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:
      type: object
      properties:
        defer_loading:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Defer loading for this member. Must resolve to the same value on
            every enabled member of the toolset.
        enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether this member is offered to the model. Default is per member,
            per the toolset's documentation. A member whose enabled resolves
            false is withheld from the served schema.
    ComputerTypeConfig:
      type: object
      properties:
        defer_loading:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Defer loading for this member. Must resolve to the same value on
            every enabled member of the toolset.
        enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether this member is offered 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:
      type: object
      properties:
        defer_loading:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Defer loading for this member. Must resolve to the same value on
            every enabled member of the toolset.
        enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether this member is offered 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:
      type: object
      properties:
        defer_loading:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Defer loading for this member. Must resolve to the same value on
            every enabled member of the toolset.
        enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether this member is offered 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:
      type: object
      properties:
        defer_loading:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Defer loading for this member. Must resolve to the same value on
            every enabled member of the toolset.
        enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether this member is offered 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:
      type: object
      properties:
        defer_loading:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Defer loading for this member. Must resolve to the same value on
            every enabled member of the toolset.
        enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether this member is offered 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:
      type: object
      properties:
        defer_loading:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Defer loading for this member. Must resolve to the same value on
            every enabled member of the toolset.
        enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether this member is offered 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:
      type: object
      properties:
        defer_loading:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Defer loading for this member. Must resolve to the same value on
            every enabled member of the toolset.
        enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether this member is offered 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:
      type: object
      properties:
        defer_loading:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Defer loading for this member. Must resolve to the same value on
            every enabled member of the toolset.
        enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether this member is offered 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:
      type: object
      properties:
        defer_loading:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Defer loading for this member. Must resolve to the same value on
            every enabled member of the toolset.
        enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether this member is offered 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:
      type: object
      properties:
        defer_loading:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Defer loading for this member. Must resolve to the same value on
            every enabled member of the toolset.
        enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether this member is offered 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:
      type: object
      properties:
        defer_loading:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Defer loading for this member. Must resolve to the same value on
            every enabled member of the toolset.
        enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether this member is offered 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:
      type: object
      properties:
        defer_loading:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Defer loading for this member. Must resolve to the same value on
            every enabled member of the toolset.
        enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether this member is offered 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:
      type: object
      properties:
        defer_loading:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Defer loading for this member. Must resolve to the same value on
            every enabled member of the toolset.
        enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether this member is offered 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:
      type: object
      properties:
        defer_loading:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Defer loading for this member. Must resolve to the same value on
            every enabled member of the toolset.
        enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether this member is offered 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:
      type: object
      properties:
        defer_loading:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Defer loading for this member. Must resolve to the same value on
            every enabled member of the toolset.
        enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether this member is offered 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:
      type: object
      properties:
        defer_loading:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Defer loading for this member. Must resolve to the same value on
            every enabled member of the toolset.
        enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether this member is offered 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:
      type: object
      properties:
        defer_loading:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Defer loading for this member. Must resolve to the same value on
            every enabled member of the toolset.
        enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether this member is offered to the model. Default is per member,
            per the toolset's documentation. A member whose enabled resolves
            false is withheld from the served schema.
    WebFetchURLSourceAll:
      type: object
      properties:
        type:
          type: string
          const: all
      required:
        - type
      description: |-
        The `url_sources` variant under which a source contributes in
        full: every result of the tool filter's source, or all user input.
    WebFetchURLSourceNone:
      type: object
      properties:
        type:
          type: string
          const: none
      required:
        - type
      description: |-
        The `url_sources` variant under which a source contributes nothing:
        no result of the tool filter's source, or no user input.
    WebFetchURLSourceOnly:
      type: object
      properties:
        type:
          type: string
          const: only
        tools:
          type: array
          items:
            $ref: '#/components/schemas/WebFetchURLSourceToolReference'
      required:
        - type
        - tools
      description: |-
        The tool filter variant under which only the named tools' results
        contribute.
    WebFetchURLSourceExcept:
      type: object
      properties:
        type:
          type: string
          const: except
        tools:
          type: array
          items:
            $ref: '#/components/schemas/WebFetchURLSourceToolReference'
      required:
        - type
        - tools
      description: |-
        The tool filter variant under which every result but the named
        tools' contributes.
    CitationCharLocation:
      type: object
      properties:
        type:
          type: string
          const: char_location
        cited_text:
          type: string
        document_index:
          type: number
          minimum: 0
        document_title:
          anyOf:
            - type: string
            - type: 'null'
        end_char_index:
          type: number
        file_id:
          anyOf:
            - type: string
            - type: 'null'
        start_char_index:
          type: number
          minimum: 0
      required:
        - type
        - cited_text
        - document_index
        - document_title
        - end_char_index
        - file_id
        - start_char_index
    CitationPageLocation:
      type: object
      properties:
        type:
          type: string
          const: page_location
        cited_text:
          type: string
        document_index:
          type: number
          minimum: 0
        document_title:
          anyOf:
            - type: string
            - type: 'null'
        end_page_number:
          type: number
        file_id:
          anyOf:
            - type: string
            - type: 'null'
        start_page_number:
          type: number
          minimum: 1
      required:
        - type
        - cited_text
        - document_index
        - document_title
        - end_page_number
        - file_id
        - start_page_number
    CitationContentBlockLocation:
      type: object
      properties:
        type:
          type: string
          const: content_block_location
        cited_text:
          type: string
          description: >-
            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.
        document_index:
          type: number
          minimum: 0
        document_title:
          anyOf:
            - type: string
            - type: 'null'
        end_block_index:
          type: number
          description: >-
            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`.
        file_id:
          anyOf:
            - type: string
            - type: 'null'
        start_block_index:
          type: number
          description: >-
            0-based index of the first cited block in the source's `content`
            array.
          minimum: 0
      required:
        - type
        - cited_text
        - document_index
        - document_title
        - end_block_index
        - file_id
        - start_block_index
    CitationsWebSearchResultLocation:
      type: object
      properties:
        type:
          type: string
          const: web_search_result_location
        cited_text:
          type: string
        encrypted_index:
          type: string
        title:
          anyOf:
            - type: string
            - type: 'null'
          maxLength: 512
        url:
          type: string
      required:
        - type
        - cited_text
        - encrypted_index
        - title
        - url
    CitationsSearchResultLocation:
      type: object
      properties:
        type:
          type: string
          const: search_result_location
        cited_text:
          type: string
          description: >-
            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.
        end_block_index:
          type: number
          description: >-
            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`.
        search_result_index:
          type: number
          description: >-
            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
        source:
          type: string
        start_block_index:
          type: number
          description: >-
            0-based index of the first cited block in the source's `content`
            array.
          minimum: 0
        title:
          anyOf:
            - type: string
            - type: 'null'
      required:
        - type
        - cited_text
        - end_block_index
        - search_result_index
        - source
        - start_block_index
        - title
    WebSearchToolResultError:
      type: object
      properties:
        type:
          type: string
          const: web_search_tool_result_error
        error_code:
          $ref: '#/components/schemas/WebSearchToolResultErrorCode'
      required:
        - type
        - error_code
    WebSearchResultBlock:
      type: object
      properties:
        type:
          type: string
          const: web_search_result
        encrypted_content:
          type: string
        page_age:
          anyOf:
            - type: string
            - type: 'null'
        title:
          type: string
        url:
          type: string
      required:
        - type
        - encrypted_content
        - page_age
        - title
        - url
    WebFetchToolResultErrorCode:
      type: string
      enum:
        - invalid_tool_input
        - url_too_long
        - url_not_allowed
        - url_not_in_prior_context
        - url_not_accessible
        - unsupported_content_type
        - too_many_requests
        - max_uses_exceeded
        - unavailable
        - content_too_large
    DocumentBlock:
      type: object
      properties:
        type:
          type: string
          const: document
        citations:
          anyOf:
            - $ref: '#/components/schemas/CitationsConfig'
            - type: 'null'
          description: Citation configuration for the document
        source:
          anyOf:
            - $ref: '#/components/schemas/Base64PDFSource'
            - $ref: '#/components/schemas/PlainTextSource'
        title:
          anyOf:
            - type: string
            - type: 'null'
          description: The title of the document
      required:
        - type
        - citations
        - source
        - title
    CodeExecutionToolResultError:
      type: object
      properties:
        type:
          type: string
          const: code_execution_tool_result_error
        error_code:
          $ref: '#/components/schemas/CodeExecutionToolResultErrorCode'
      required:
        - type
        - error_code
    CodeExecutionResultBlock:
      type: object
      properties:
        type:
          type: string
          const: code_execution_result
        content:
          type: array
          items:
            $ref: '#/components/schemas/CodeExecutionOutputBlock'
        return_code:
          type: number
        stderr:
          type: string
        stdout:
          type: string
      required:
        - type
        - content
        - return_code
        - stderr
        - stdout
    EncryptedCodeExecutionResultBlock:
      type: object
      properties:
        type:
          type: string
          const: encrypted_code_execution_result
        content:
          type: array
          items:
            $ref: '#/components/schemas/CodeExecutionOutputBlock'
        encrypted_stdout:
          type: string
        return_code:
          type: number
        stderr:
          type: string
      required:
        - type
        - content
        - encrypted_stdout
        - return_code
        - stderr
      description: >-
        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)
        to learn more about programmatic tool calling.
    BashCodeExecutionToolResultErrorCode:
      type: string
      enum:
        - invalid_tool_input
        - unavailable
        - too_many_requests
        - execution_time_exceeded
        - output_file_too_large
    BashCodeExecutionOutputBlock:
      type: object
      properties:
        type:
          type: string
          const: bash_code_execution_output
        file_id:
          type: string
      required:
        - type
        - file_id
    TextEditorCodeExecutionToolResultErrorCode:
      type: string
      enum:
        - invalid_tool_input
        - unavailable
        - too_many_requests
        - execution_time_exceeded
        - file_not_found
    ToolSearchToolResultErrorCode:
      type: string
      enum:
        - invalid_tool_input
        - unavailable
        - too_many_requests
        - execution_time_exceeded
    ToolReferenceBlock:
      type: object
      properties:
        type:
          type: string
          const: tool_reference
        tool_name:
          type: string
          minLength: 1
          maxLength: 256
          pattern: ^[a-zA-Z0-9_-]{1,256}$
      required:
        - type
        - tool_name
    ImageBlockParam:
      type: object
      properties:
        type:
          type: string
          const: image
        source:
          anyOf:
            - $ref: '#/components/schemas/Base64ImageSource'
            - $ref: '#/components/schemas/URLImageSource'
            - $ref: '#/components/schemas/FileImageSource'
        cache_control:
          anyOf:
            - $ref: '#/components/schemas/CacheControlEphemeral'
            - type: 'null'
          description: Create a cache control breakpoint at this content block.
        transformations:
          anyOf:
            - $ref: '#/components/schemas/ImageTransformationsParam'
            - type: 'null'
          description: >-
            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.
      required:
        - type
        - source
    DocumentBlockParam:
      type: object
      properties:
        type:
          type: string
          const: document
        source:
          anyOf:
            - $ref: '#/components/schemas/Base64PDFSource'
            - $ref: '#/components/schemas/PlainTextSource'
            - $ref: '#/components/schemas/ContentBlockSource'
            - $ref: '#/components/schemas/URLPDFSource'
            - $ref: '#/components/schemas/FileDocumentSource'
        cache_control:
          anyOf:
            - $ref: '#/components/schemas/CacheControlEphemeral'
            - type: 'null'
          description: Create a cache control breakpoint at this content block.
        citations:
          anyOf:
            - $ref: '#/components/schemas/CitationsConfigParam'
            - type: 'null'
        context:
          anyOf:
            - type: string
            - type: 'null'
          minLength: 1
        title:
          anyOf:
            - type: string
            - type: 'null'
          minLength: 1
          maxLength: 500
      required:
        - type
        - source
    SearchResultBlockParam:
      type: object
      properties:
        type:
          type: string
          const: search_result
        content:
          type: array
          items:
            $ref: '#/components/schemas/TextBlockParam'
        source:
          type: string
        title:
          type: string
        cache_control:
          anyOf:
            - $ref: '#/components/schemas/CacheControlEphemeral'
            - type: 'null'
          description: Create a cache control breakpoint at this content block.
        citations:
          $ref: '#/components/schemas/CitationsConfigParam'
      required:
        - type
        - content
        - source
        - title
    ThinkingBlockParam:
      type: object
      properties:
        type:
          type: string
          const: thinking
        signature:
          type: string
          description: >-
            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`.
        thinking:
          type: string
          description: The `thinking` text of this block as returned by the API.
      required:
        - type
        - signature
        - thinking
    RedactedThinkingBlockParam:
      type: object
      properties:
        type:
          type: string
          const: redacted_thinking
        data:
          type: string
          description: >-
            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.
      required:
        - type
        - data
    ToolUseBlockParam:
      type: object
      properties:
        type:
          type: string
          const: tool_use
        id:
          type: string
          pattern: ^[a-zA-Z0-9_-]+$
        input:
          type: object
          additionalProperties: true
        name:
          type: string
          minLength: 1
          maxLength: 200
        cache_control:
          anyOf:
            - $ref: '#/components/schemas/CacheControlEphemeral'
            - type: 'null'
          description: Create a cache control breakpoint at this content block.
        caller:
          anyOf:
            - $ref: '#/components/schemas/DirectCaller'
            - $ref: '#/components/schemas/ServerToolCaller'
            - $ref: '#/components/schemas/ServerToolCaller20260120'
        toolset_name:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            For a toolset member tool_use, the toolset family this member
            belongs to.
          minLength: 1
          maxLength: 64
          pattern: ^[a-zA-Z0-9_-]+$
      required:
        - type
        - id
        - input
        - name
    ToolResultBlockParam:
      type: object
      properties:
        type:
          type: string
          const: tool_result
        tool_use_id:
          type: string
          pattern: ^[a-zA-Z0-9_-]+$
        cache_control:
          anyOf:
            - $ref: '#/components/schemas/CacheControlEphemeral'
            - type: 'null'
          description: Create a cache control breakpoint at this content block.
        content:
          anyOf:
            - type: string
            - type: array
              items:
                anyOf:
                  - $ref: '#/components/schemas/TextBlockParam'
                  - $ref: '#/components/schemas/ImageBlockParam'
                  - $ref: '#/components/schemas/SearchResultBlockParam'
                  - $ref: '#/components/schemas/DocumentBlockParam'
                  - $ref: '#/components/schemas/ToolReferenceBlockParam'
                  - $ref: '#/components/schemas/BrowserStateBlockParam'
        is_error:
          type: boolean
        toolset_name:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            For a toolset member tool_result, the toolset family of the paired
            tool_use.
          minLength: 1
          maxLength: 64
          pattern: ^[a-zA-Z0-9_-]+$
      required:
        - type
        - tool_use_id
    ServerToolUseBlockParam:
      type: object
      properties:
        type:
          type: string
          const: server_tool_use
        id:
          type: string
          pattern: ^srvtoolu_[a-zA-Z0-9_]+$
        input:
          type: object
          additionalProperties: true
        name:
          type: string
          enum:
            - web_search
            - web_fetch
            - code_execution
            - bash_code_execution
            - text_editor_code_execution
            - tool_search_tool_regex
            - tool_search_tool_bm25
        cache_control:
          anyOf:
            - $ref: '#/components/schemas/CacheControlEphemeral'
            - type: 'null'
          description: Create a cache control breakpoint at this content block.
        caller:
          anyOf:
            - $ref: '#/components/schemas/DirectCaller'
            - $ref: '#/components/schemas/ServerToolCaller'
            - $ref: '#/components/schemas/ServerToolCaller20260120'
      required:
        - type
        - id
        - input
        - name
    WebSearchToolResultBlockParam:
      type: object
      properties:
        type:
          type: string
          const: web_search_tool_result
        content:
          $ref: '#/components/schemas/WebSearchToolResultBlockParamContent'
        tool_use_id:
          type: string
          pattern: ^srvtoolu_[a-zA-Z0-9_]+$
        cache_control:
          anyOf:
            - $ref: '#/components/schemas/CacheControlEphemeral'
            - type: 'null'
          description: Create a cache control breakpoint at this content block.
        caller:
          anyOf:
            - $ref: '#/components/schemas/DirectCaller'
            - $ref: '#/components/schemas/ServerToolCaller'
            - $ref: '#/components/schemas/ServerToolCaller20260120'
      required:
        - type
        - content
        - tool_use_id
    WebFetchToolResultBlockParam:
      type: object
      properties:
        type:
          type: string
          const: web_fetch_tool_result
        content:
          anyOf:
            - $ref: '#/components/schemas/WebFetchToolResultErrorBlockParam'
            - $ref: '#/components/schemas/WebFetchBlockParam'
        tool_use_id:
          type: string
          pattern: ^srvtoolu_[a-zA-Z0-9_]+$
        cache_control:
          anyOf:
            - $ref: '#/components/schemas/CacheControlEphemeral'
            - type: 'null'
          description: Create a cache control breakpoint at this content block.
        caller:
          anyOf:
            - $ref: '#/components/schemas/DirectCaller'
            - $ref: '#/components/schemas/ServerToolCaller'
            - $ref: '#/components/schemas/ServerToolCaller20260120'
      required:
        - type
        - content
        - tool_use_id
    CodeExecutionToolResultBlockParam:
      type: object
      properties:
        type:
          type: string
          const: code_execution_tool_result
        content:
          $ref: '#/components/schemas/CodeExecutionToolResultBlockParamContent'
        tool_use_id:
          type: string
          pattern: ^srvtoolu_[a-zA-Z0-9_]+$
        cache_control:
          anyOf:
            - $ref: '#/components/schemas/CacheControlEphemeral'
            - type: 'null'
          description: Create a cache control breakpoint at this content block.
      required:
        - type
        - content
        - tool_use_id
    BashCodeExecutionToolResultBlockParam:
      type: object
      properties:
        type:
          type: string
          const: bash_code_execution_tool_result
        content:
          anyOf:
            - $ref: '#/components/schemas/BashCodeExecutionToolResultErrorParam'
            - $ref: '#/components/schemas/BashCodeExecutionResultBlockParam'
        tool_use_id:
          type: string
          pattern: ^srvtoolu_[a-zA-Z0-9_]+$
        cache_control:
          anyOf:
            - $ref: '#/components/schemas/CacheControlEphemeral'
            - type: 'null'
          description: Create a cache control breakpoint at this content block.
      required:
        - type
        - content
        - tool_use_id
    TextEditorCodeExecutionToolResultBlockParam:
      type: object
      properties:
        type:
          type: string
          const: text_editor_code_execution_tool_result
        content:
          anyOf:
            - $ref: '#/components/schemas/TextEditorCodeExecutionToolResultErrorParam'
            - $ref: '#/components/schemas/TextEditorCodeExecutionViewResultBlockParam'
            - $ref: >-
                #/components/schemas/TextEditorCodeExecutionCreateResultBlockParam
            - $ref: >-
                #/components/schemas/TextEditorCodeExecutionStrReplaceResultBlockParam
        tool_use_id:
          type: string
          pattern: ^srvtoolu_[a-zA-Z0-9_]+$
        cache_control:
          anyOf:
            - $ref: '#/components/schemas/CacheControlEphemeral'
            - type: 'null'
          description: Create a cache control breakpoint at this content block.
      required:
        - type
        - content
        - tool_use_id
    ToolSearchToolResultBlockParam:
      type: object
      properties:
        type:
          type: string
          const: tool_search_tool_result
        content:
          anyOf:
            - $ref: '#/components/schemas/ToolSearchToolResultErrorParam'
            - $ref: '#/components/schemas/ToolSearchToolSearchResultBlockParam'
        tool_use_id:
          type: string
          pattern: ^srvtoolu_[a-zA-Z0-9_]+$
        cache_control:
          anyOf:
            - $ref: '#/components/schemas/CacheControlEphemeral'
            - type: 'null'
          description: Create a cache control breakpoint at this content block.
      required:
        - type
        - content
        - tool_use_id
    ContainerUploadBlockParam:
      type: object
      properties:
        type:
          type: string
          const: container_upload
        file_id:
          type: string
        cache_control:
          anyOf:
            - $ref: '#/components/schemas/CacheControlEphemeral'
            - type: 'null'
          description: Create a cache control breakpoint at this content block.
      required:
        - type
        - file_id
      description: >-
        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.
    WebFetchURLSourceToolReference:
      type: object
      properties:
        type:
          type: string
          const: tool_reference
        name:
          type: string
      required:
        - type
        - name
    WebSearchToolResultErrorCode:
      type: string
      enum:
        - invalid_tool_input
        - unavailable
        - max_uses_exceeded
        - too_many_requests
        - query_too_long
        - request_too_large
    CitationsConfig:
      type: object
      properties:
        enabled:
          type: boolean
          default: false
      required:
        - enabled
    Base64PDFSource:
      type: object
      properties:
        type:
          type: string
          const: base64
        data:
          type: string
          format: byte
        media_type:
          type: string
          const: application/pdf
      required:
        - type
        - data
        - media_type
    PlainTextSource:
      type: object
      properties:
        type:
          type: string
          const: text
        data:
          type: string
        media_type:
          type: string
          const: text/plain
      required:
        - type
        - data
        - media_type
    CodeExecutionToolResultErrorCode:
      type: string
      enum:
        - invalid_tool_input
        - unavailable
        - too_many_requests
        - execution_time_exceeded
    CodeExecutionOutputBlock:
      type: object
      properties:
        type:
          type: string
          const: code_execution_output
        file_id:
          type: string
      required:
        - type
        - file_id
    Base64ImageSource:
      type: object
      properties:
        type:
          type: string
          const: base64
        data:
          type: string
          format: byte
        media_type:
          type: string
          enum:
            - image/jpeg
            - image/png
            - image/gif
            - image/webp
      required:
        - type
        - data
        - media_type
    URLImageSource:
      type: object
      properties:
        type:
          type: string
          const: url
        url:
          type: string
      required:
        - type
        - url
    FileImageSource:
      type: object
      properties:
        type:
          type: string
          const: file
        file_id:
          type: string
      required:
        - type
        - file_id
    ImageTransformationsParam:
      type: object
      properties:
        oversized_image:
          type: string
          enum:
            - downsize
            - error
          description: >-
            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.
    ContentBlockSource:
      type: object
      properties:
        type:
          type: string
          const: content
        content:
          anyOf:
            - type: string
            - $ref: '#/components/schemas/ContentBlockSourceContent'
      required:
        - type
        - content
    URLPDFSource:
      type: object
      properties:
        type:
          type: string
          const: url
        url:
          type: string
      required:
        - type
        - url
    FileDocumentSource:
      type: object
      properties:
        type:
          type: string
          const: file
        file_id:
          type: string
      required:
        - type
        - file_id
    ToolReferenceBlockParam:
      type: object
      properties:
        type:
          type: string
          const: tool_reference
        tool_name:
          type: string
          minLength: 1
          maxLength: 256
          pattern: ^[a-zA-Z0-9_-]{1,256}$
        cache_control:
          anyOf:
            - $ref: '#/components/schemas/CacheControlEphemeral'
            - type: 'null'
          description: Create a cache control breakpoint at this content block.
      required:
        - type
        - tool_name
      description: Tool reference block that can be included in tool_result content.
    BrowserStateBlockParam:
      type: object
      properties:
        type:
          type: string
          const: browser_state
        tabs:
          type: array
          items:
            $ref: '#/components/schemas/BrowserStateTabEntry'
          description: >-
            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
        cache_control:
          anyOf:
            - $ref: '#/components/schemas/CacheControlEphemeral'
            - type: 'null'
          description: Create a cache control breakpoint at this content block.
        state_changes:
          anyOf:
            - type: array
              items:
                $ref: '#/components/schemas/BrowserStateChange'
            - type: 'null'
          description: >-
            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
      required:
        - type
        - tabs
      description: |-
        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.
    WebSearchToolResultBlockParamContent:
      anyOf:
        - $ref: '#/components/schemas/WebSearchToolResultBlockItem'
        - $ref: '#/components/schemas/WebSearchToolRequestError'
    WebFetchToolResultErrorBlockParam:
      type: object
      properties:
        type:
          type: string
          const: web_fetch_tool_result_error
        error_code:
          $ref: '#/components/schemas/WebFetchToolResultErrorCode'
      required:
        - type
        - error_code
    WebFetchBlockParam:
      type: object
      properties:
        type:
          type: string
          const: web_fetch_result
        content:
          $ref: '#/components/schemas/DocumentBlockParam'
        url:
          type: string
          description: Fetched content URL
        retrieved_at:
          anyOf:
            - type: string
            - type: 'null'
          description: ISO 8601 timestamp when the content was retrieved
      required:
        - type
        - content
        - url
    CodeExecutionToolResultBlockParamContent:
      anyOf:
        - $ref: '#/components/schemas/CodeExecutionToolResultErrorParam'
        - $ref: '#/components/schemas/CodeExecutionResultBlockParam'
        - $ref: '#/components/schemas/EncryptedCodeExecutionResultBlockParam'
    BashCodeExecutionToolResultErrorParam:
      type: object
      properties:
        type:
          type: string
          const: bash_code_execution_tool_result_error
        error_code:
          $ref: '#/components/schemas/BashCodeExecutionToolResultErrorCode'
      required:
        - type
        - error_code
    BashCodeExecutionResultBlockParam:
      type: object
      properties:
        type:
          type: string
          const: bash_code_execution_result
        content:
          type: array
          items:
            $ref: '#/components/schemas/BashCodeExecutionOutputBlockParam'
        return_code:
          type: number
        stderr:
          type: string
        stdout:
          type: string
      required:
        - type
        - content
        - return_code
        - stderr
        - stdout
    TextEditorCodeExecutionToolResultErrorParam:
      type: object
      properties:
        type:
          type: string
          const: text_editor_code_execution_tool_result_error
        error_code:
          $ref: '#/components/schemas/TextEditorCodeExecutionToolResultErrorCode'
        error_message:
          anyOf:
            - type: string
            - type: 'null'
      required:
        - type
        - error_code
    TextEditorCodeExecutionViewResultBlockParam:
      type: object
      properties:
        type:
          type: string
          const: text_editor_code_execution_view_result
        content:
          type: string
        file_type:
          type: string
          enum:
            - text
            - image
            - pdf
        num_lines:
          anyOf:
            - type: number
            - type: 'null'
        start_line:
          anyOf:
            - type: number
            - type: 'null'
        total_lines:
          anyOf:
            - type: number
            - type: 'null'
      required:
        - type
        - content
        - file_type
    TextEditorCodeExecutionCreateResultBlockParam:
      type: object
      properties:
        type:
          type: string
          const: text_editor_code_execution_create_result
        is_file_update:
          type: boolean
      required:
        - type
        - is_file_update
    TextEditorCodeExecutionStrReplaceResultBlockParam:
      type: object
      properties:
        type:
          type: string
          const: text_editor_code_execution_str_replace_result
        lines:
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
        new_lines:
          anyOf:
            - type: number
            - type: 'null'
        new_start:
          anyOf:
            - type: number
            - type: 'null'
        old_lines:
          anyOf:
            - type: number
            - type: 'null'
        old_start:
          anyOf:
            - type: number
            - type: 'null'
      required:
        - type
    ToolSearchToolResultErrorParam:
      type: object
      properties:
        type:
          type: string
          const: tool_search_tool_result_error
        error_code:
          $ref: '#/components/schemas/ToolSearchToolResultErrorCode'
        error_message:
          anyOf:
            - type: string
            - type: 'null'
      required:
        - type
        - error_code
    ToolSearchToolSearchResultBlockParam:
      type: object
      properties:
        type:
          type: string
          const: tool_search_tool_search_result
        tool_references:
          type: array
          items:
            $ref: '#/components/schemas/ToolReferenceBlockParam'
      required:
        - type
        - tool_references
    ContentBlockSourceContent:
      type: array
      items:
        anyOf:
          - $ref: '#/components/schemas/TextBlockParam'
          - $ref: '#/components/schemas/ImageBlockParam'
    BrowserStateTabEntry:
      type: object
      properties:
        tab_id:
          type: string
          description: >-
            The caller-assigned identifier for this tab, unique within the
            inventory.
          minLength: 1
          maxLength: 4096
          pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$
        title:
          type: string
          description: The title of the page the tab is showing. May be empty.
          maxLength: 4096
          pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$
        url:
          type: string
          description: The URL of the page the tab is showing. May be empty.
          maxLength: 4096
          pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$
        active:
          type: boolean
          description: >-
            Whether this tab is the active tab after this call. Whenever `tabs`
            is non-empty, exactly one entry is marked `active: true`.
      required:
        - tab_id
        - title
        - url
    BrowserStateChange:
      anyOf:
        - $ref: '#/components/schemas/BrowserStateChangeTabOpened'
        - $ref: '#/components/schemas/BrowserStateChangeDownloadStarted'
        - $ref: '#/components/schemas/BrowserStateChangeDownloadCompleted'
        - $ref: '#/components/schemas/BrowserStateChangeDownloadFailed'
    WebSearchToolResultBlockItem:
      type: array
      items:
        $ref: '#/components/schemas/WebSearchResultBlockParam'
    WebSearchToolRequestError:
      type: object
      properties:
        type:
          type: string
          const: web_search_tool_result_error
        error_code:
          $ref: '#/components/schemas/WebSearchToolResultErrorCode'
      required:
        - type
        - error_code
    CodeExecutionToolResultErrorParam:
      type: object
      properties:
        type:
          type: string
          const: code_execution_tool_result_error
        error_code:
          $ref: '#/components/schemas/CodeExecutionToolResultErrorCode'
      required:
        - type
        - error_code
    CodeExecutionResultBlockParam:
      type: object
      properties:
        type:
          type: string
          const: code_execution_result
        content:
          type: array
          items:
            $ref: '#/components/schemas/CodeExecutionOutputBlockParam'
        return_code:
          type: number
        stderr:
          type: string
        stdout:
          type: string
      required:
        - type
        - content
        - return_code
        - stderr
        - stdout
    EncryptedCodeExecutionResultBlockParam:
      type: object
      properties:
        type:
          type: string
          const: encrypted_code_execution_result
        content:
          type: array
          items:
            $ref: '#/components/schemas/CodeExecutionOutputBlockParam'
        encrypted_stdout:
          type: string
        return_code:
          type: number
        stderr:
          type: string
      required:
        - type
        - content
        - encrypted_stdout
        - return_code
        - stderr
      description: >-
        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.
    BashCodeExecutionOutputBlockParam:
      type: object
      properties:
        type:
          type: string
          const: bash_code_execution_output
        file_id:
          type: string
      required:
        - type
        - file_id
    BrowserStateChangeTabOpened:
      type: object
      properties:
        type:
          type: string
          const: tab_opened
        tab_id:
          type: string
          description: The `tab_id` of the opened tab, present in `tabs`.
          minLength: 1
          maxLength: 4096
          pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$
      required:
        - type
        - tab_id
      description: |-
        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.
    BrowserStateChangeDownloadStarted:
      type: object
      properties:
        type:
          type: string
          const: download_started
        download_id:
          type: string
          description: >-
            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]*$
        url:
          type: string
          description: The final post-redirect URL the download was served from.
          maxLength: 4096
          pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$
      required:
        - type
        - download_id
        - url
      description: A file download that started during this call.
    BrowserStateChangeDownloadCompleted:
      type: object
      properties:
        type:
          type: string
          const: download_completed
        download_id:
          type: string
          description: >-
            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]*$
        url:
          type: string
          description: The final post-redirect URL the download was served from.
          maxLength: 4096
          pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$
        path:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            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]*$
        size_bytes:
          anyOf:
            - type: number
            - type: 'null'
          description: The completed download's size.
          minimum: 0
      required:
        - type
        - download_id
        - url
      description: |-
        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).
    BrowserStateChangeDownloadFailed:
      type: object
      properties:
        type:
          type: string
          const: download_failed
        download_id:
          type: string
          description: >-
            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]*$
        url:
          type: string
          description: The final post-redirect URL the download was served from.
          maxLength: 4096
          pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$
        error:
          anyOf:
            - type: string
            - type: 'null'
          description: The failure or cancellation detail, when known.
          maxLength: 4096
          pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$
      required:
        - type
        - download_id
        - url
      description: A file download that failed — or was cancelled — during this call.
    WebSearchResultBlockParam:
      type: object
      properties:
        type:
          type: string
          const: web_search_result
        encrypted_content:
          type: string
        title:
          type: string
        url:
          type: string
        page_age:
          anyOf:
            - type: string
            - type: 'null'
      required:
        - type
        - encrypted_content
        - title
        - url
    CodeExecutionOutputBlockParam:
      type: object
      properties:
        type:
          type: string
          const: code_execution_output
        file_id:
          type: string
      required:
        - type
        - file_id
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        Send your DreamTo API Key in the `x-api-key` header, the way the
        Anthropic SDKs do by default.
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Send your DreamTo API Key in the `Authorization` header: `Authorization:
        Bearer <API Key>`.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.