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

# Claude - 完整参数文档

> - 发送包含文本或文本+图像内容的结构化输入消息列表，模型将生成对话中的下一条消息。
- Messages API 可用于单次查询或无状态多轮对话。

<Note>
  **BaseURL 说明**：默认 BaseURL 为 `https://direct.evolink.ai`，对文本模型支持更好，支持长连接；`https://api.evolink.ai` 是多模态主力地址，对文本模型作为备用地址使用。
</Note>


## OpenAPI

````yaml cn/api-manual/language-series/claude/claude-messages-api.json POST /v1/messages
openapi: 3.1.0
info:
  title: Claude Messages API
  description: 发送包含文本和/或图像内容的结构化输入消息列表，模型将生成对话中的下一条消息。Messages API 可用于单次查询或无状态多轮对话。
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://direct.evolink.ai
    description: 生产环境（推荐）
  - url: https://api.evolink.ai
    description: 备用地址
security:
  - bearerAuth: []
tags:
  - name: Messages
    description: Claude AI 消息生成和对话 API
paths:
  /v1/messages:
    post:
      tags:
        - Messages
      summary: Create a Message
      description: |-
        - 发送包含文本或文本+图像内容的结构化输入消息列表，模型将生成对话中的下一条消息。
        - Messages API 可用于单次查询或无状态多轮对话。
      operationId: createMessage
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateMessageParams'
            example:
              model: claude-opus-4-8
              max_tokens: 1024
              messages:
                - role: user
                  content: Hello, world
      responses:
        '200':
          description: 消息对象
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Message'
              example:
                model: claude-haiku-4-5-20251001
                id: msg_bdrk_017XLrAa77zWvfBGQ6ESvrxz
                type: message
                role: assistant
                content:
                  - type: text
                    text: |-
                      # Hey there! 👋

                      How's it going? What can I help you with today?
                stop_reason: end_turn
                stop_sequence: null
                usage:
                  input_tokens: 8
                  cache_creation_input_tokens: 0
                  cache_read_input_tokens: 0
                  output_tokens: 24
        '400':
          description: 无效的请求
          content:
            application/json:
              schema:
                $ref: 6a57b536-fcd9-454d-a343-57e641f938ba
              example:
                error:
                  message: Invalid request
                  type: invalid_request_error
                request_id: <string>
                type: error
        '401':
          description: 身份验证错误
          content:
            application/json:
              schema:
                $ref: 6a57b536-fcd9-454d-a343-57e641f938ba
              example:
                error:
                  message: Authentication error
                  type: authentication_error
                request_id: <string>
                type: error
        '402':
          description: 账单错误
          content:
            application/json:
              schema:
                $ref: 6a57b536-fcd9-454d-a343-57e641f938ba
              example:
                error:
                  message: Billing error
                  type: billing_error
                request_id: <string>
                type: error
                fallback_suggestion: https://evolink.ai/dashboard/billing
        '403':
          description: 权限错误
          content:
            application/json:
              schema:
                $ref: 6a57b536-fcd9-454d-a343-57e641f938ba
              example:
                error:
                  message: Permission denied
                  type: permission_error
                request_id: <string>
                type: error
        '404':
          description: 未找到
          content:
            application/json:
              schema:
                $ref: 6a57b536-fcd9-454d-a343-57e641f938ba
              example:
                error:
                  message: Not found
                  type: not_found_error
                request_id: <string>
                type: error
        '429':
          description: 速率限制错误
          content:
            application/json:
              schema:
                $ref: 6a57b536-fcd9-454d-a343-57e641f938ba
              example:
                error:
                  message: Rate limited
                  type: rate_limit_error
                request_id: <string>
                type: error
                fallback_suggestion: retry after 60 seconds
        '500':
          description: 内部服务器错误
          content:
            application/json:
              schema:
                $ref: 6a57b536-fcd9-454d-a343-57e641f938ba
              example:
                error:
                  message: Internal server error
                  type: api_error
                request_id: <string>
                type: error
                fallback_suggestion: try again later
        '503':
          description: 服务过载
          content:
            application/json:
              schema:
                $ref: 6a57b536-fcd9-454d-a343-57e641f938ba
              example:
                error:
                  message: Overloaded
                  type: overloaded_error
                request_id: <string>
                type: error
                fallback_suggestion: retry after 30 seconds
        '524':
          description: Cloudflare 网关超时错误
          content:
            application/json:
              schema:
                $ref: 6a57b536-fcd9-454d-a343-57e641f938ba
              example:
                error:
                  message: Request timeout
                  type: timeout_error
                request_id: <string>
                type: error
                fallback_suggestion: 请将 BaseURL 切换为 https://direct.evolink.ai，这个地址对长任务更友好
components:
  schemas:
    CreateMessageParams:
      type: object
      required:
        - model
        - messages
        - max_tokens
      additionalProperties: false
      properties:
        model:
          type: string
          description: 将完成你的提示的模型。
          enum:
            - claude-haiku-4-5-20251001
            - claude-sonnet-4-5-20250929
            - claude-opus-4-5-20251101
            - claude-opus-4-6
            - claude-fable-5
            - claude-opus-4-8
            - claude-opus-4-7
            - claude-sonnet-4-6
            - claude-sonnet-5
          examples:
            - claude-opus-4-8
          title: Model
        messages:
          type: array
          description: >-
            输入消息。


            可以处理交替的 `user` 和 `assistant` 对话回合。创建新的 `Message` 时，需要通过 `messages`
            参数指定之前的对话回合，然后模型会生成对话中的下一条 `Message`。请求中连续的 `user` 或 `assistant`
            回合将被合并为一个回合。


            每条输入消息必须是一个包含 `role` 和 `content` 的对象。可以指定单个 `user` 角色消息，也可以包含多个
            `user` 和 `assistant` 消息。
          items:
            $ref: '#/components/schemas/InputMessage'
          title: Messages
        max_tokens:
          type: integer
          description: |-
            停止前生成的最大令牌数。

            请注意，我们的模型可能会在达到此最大值之前停止。此参数仅指定要生成的绝对最大令牌数。
          examples:
            - 1024
          minimum: 1
          title: Max Tokens
        inference_geo:
          type: string
          description: 指定推理处理的地理区域。如果未指定，将使用工作区的 `default_inference_geo`。
          title: Inference Geo
        container:
          description: 跨请求重用的容器标识符。
          title: Container
          anyOf:
            - $ref: '#/components/schemas/ContainerParams'
            - type: string
            - type: 'null'
        context_management:
          description: 上下文管理配置。
          anyOf:
            - $ref: '#/components/schemas/ContextManagementConfig'
            - type: 'null'
        mcp_servers:
          type: array
          description: 此请求中要使用的 MCP 服务器
          items:
            $ref: '#/components/schemas/RequestMCPServerURLDefinition'
          maxItems: 20
          title: Mcp Servers
        metadata:
          $ref: '#/components/schemas/Metadata'
          description: 描述请求元数据的对象。
        output_config:
          $ref: '#/components/schemas/OutputConfig'
          description: 模型输出的配置，例如输出格式。
        service_tier:
          type: string
          description: 确定此请求是使用优先容量（如果可用）还是标准容量。
          enum:
            - auto
            - standard_only
          title: Service Tier
        stop_sequences:
          type: array
          description: 会导致模型停止生成的自定义文本序列。
          items:
            type: string
          title: Stop Sequences
        stream:
          type: boolean
          description: 是否使用服务器发送事件增量流式传输响应。
          title: Stream
        system:
          description: 系统提示。
          examples:
            - Today's date is 2024-06-01.
          title: System
          anyOf:
            - type: string
            - type: array
              items:
                $ref: '#/components/schemas/RequestTextBlock'
        temperature:
          type: number
          description: |-
            注入响应中的随机性程度。

            默认为 `1.0`。范围从 `0.0` 到 `1.0`。
          examples:
            - 1
          minimum: 0
          maximum: 1
          title: Temperature
        thinking:
          description: >-
            启用 Claude 扩展思考的配置。


            `type: "enabled"` 时，需要提供 `budget_tokens`，且预算至少为 1,024，并会计入
            `max_tokens` 上限。可通过 `display` 控制思考内容的展示方式。


            `type: "adaptive"` 时，Claude 会根据请求复杂度动态决定是否以及如何使用扩展思考；同样可通过 `display`
            控制思考内容的展示方式。


            `type: "disabled"` 时，不启用扩展思考。
          anyOf:
            - $ref: '#/components/schemas/ThinkingConfigEnabled'
            - $ref: '#/components/schemas/ThinkingConfigDisabled'
            - $ref: '#/components/schemas/ThinkingConfigAdaptive'
        tool_choice:
          description: 模型应如何使用提供的工具。
          anyOf:
            - $ref: '#/components/schemas/ToolChoiceAuto'
            - $ref: '#/components/schemas/ToolChoiceAny'
            - $ref: '#/components/schemas/ToolChoiceTool'
            - $ref: '#/components/schemas/ToolChoiceNone'
        tools:
          type: array
          description: 模型可能使用的工具定义。
          items:
            anyOf:
              - $ref: '#/components/schemas/Tool'
              - $ref: '#/components/schemas/BashTool_20241022'
              - $ref: '#/components/schemas/BashTool_20250124'
              - $ref: '#/components/schemas/CodeExecutionTool_20250522'
              - $ref: '#/components/schemas/CodeExecutionTool_20250825'
              - $ref: '#/components/schemas/ComputerUseTool_20241022'
              - $ref: '#/components/schemas/MemoryTool_20250818'
              - $ref: '#/components/schemas/ComputerUseTool_20250124'
              - $ref: '#/components/schemas/TextEditor_20241022'
              - $ref: '#/components/schemas/TextEditor_20250124'
              - $ref: '#/components/schemas/TextEditor_20250429'
              - $ref: '#/components/schemas/TextEditor_20250728'
              - $ref: '#/components/schemas/WebSearchTool_20250305'
              - $ref: '#/components/schemas/WebFetchTool_20250910'
          title: Tools
        top_k:
          type: integer
          description: 对于每个后续令牌，仅从前 K 个选项中采样。
          examples:
            - 5
          minimum: 0
          title: Top K
        top_p:
          type: number
          description: 使用核采样。
          examples:
            - 0.7
          minimum: 0
          maximum: 1
          title: Top P
    Message:
      type: object
      required:
        - id
        - type
        - role
        - content
        - model
        - stop_reason
        - stop_sequence
        - usage
      properties:
        id:
          type: string
          description: |-
            唯一对象标识符。

            ID 的格式和长度可能随时间变化。
          examples:
            - msg_013Zva2CMHLNnXjNJJKqJ2EF
          title: Id
        type:
          type: string
          const: message
          description: |-
            对象类型。

            对于 Messages，这始终是 `"message"`。
          title: Type
        role:
          type: string
          const: assistant
          description: |-
            生成消息的对话角色。

            这始终是 `"assistant"`。
          title: Role
        content:
          type: array
          description: |-
            模型生成的内容。

            这是一个内容块数组，每个块都有一个决定其结构的 `type`。
          items:
            anyOf:
              - $ref: '#/components/schemas/ResponseTextBlock'
              - $ref: '#/components/schemas/ResponseThinkingBlock'
              - $ref: '#/components/schemas/ResponseRedactedThinkingBlock'
              - $ref: '#/components/schemas/ResponseToolUseBlock'
              - $ref: '#/components/schemas/ResponseServerToolUseBlock'
              - $ref: '#/components/schemas/ResponseWebSearchToolResultBlock'
              - $ref: '#/components/schemas/ResponseWebFetchToolResultBlock'
              - $ref: '#/components/schemas/ResponseCodeExecutionToolResultBlock'
              - $ref: '#/components/schemas/ResponseBashCodeExecutionToolResultBlock'
              - $ref: >-
                  #/components/schemas/ResponseTextEditorCodeExecutionToolResultBlock
              - $ref: '#/components/schemas/ResponseMCPToolUseBlock'
              - $ref: '#/components/schemas/ResponseMCPToolResultBlock'
              - $ref: '#/components/schemas/ResponseContainerUploadBlock'
          title: Content
        model:
          type: string
          description: 处理请求的模型。
          enum:
            - claude-haiku-4-5-20251001
            - claude-sonnet-4-5-20250929
            - claude-opus-4-5-20251101
            - claude-opus-4-6
            - claude-fable-5
            - claude-opus-4-8
            - claude-opus-4-7
            - claude-sonnet-4-6
            - claude-sonnet-5
          examples:
            - claude-opus-4-8
          title: Model
        stop_reason:
          type: string
          nullable: true
          description: 我们停止的原因。
          enum:
            - end_turn
            - max_tokens
            - stop_sequence
            - tool_use
            - pause_turn
            - refusal
            - model_context_window_exceeded
          title: Stop Reason
        stop_sequence:
          type: string
          nullable: true
          description: 生成的自定义停止序列（如果有）。
          title: Stop Sequence
        usage:
          $ref: '#/components/schemas/Usage'
          description: 计费和速率限制使用情况。
        context_management:
          anyOf:
            - $ref: '#/components/schemas/ResponseContextManagement'
            - type: 'null'
          description: 上下文管理响应。
        container:
          anyOf:
            - $ref: '#/components/schemas/Container'
            - type: 'null'
          description: 此请求中使用的容器信息。
    InputMessage:
      additionalProperties: false
      properties:
        content:
          anyOf:
            - type: string
            - items:
                discriminator:
                  mapping:
                    bash_code_execution_tool_result:
                      $ref: >-
                        #/components/schemas/RequestBashCodeExecutionToolResultBlock
                    code_execution_tool_result:
                      $ref: '#/components/schemas/RequestCodeExecutionToolResultBlock'
                    container_upload:
                      $ref: '#/components/schemas/RequestContainerUploadBlock'
                    document:
                      $ref: '#/components/schemas/RequestDocumentBlock'
                    image:
                      $ref: '#/components/schemas/RequestImageBlock'
                    mcp_tool_result:
                      $ref: '#/components/schemas/RequestMCPToolResultBlock'
                    mcp_tool_use:
                      $ref: '#/components/schemas/RequestMCPToolUseBlock'
                    redacted_thinking:
                      $ref: '#/components/schemas/RequestRedactedThinkingBlock'
                    search_result:
                      $ref: '#/components/schemas/RequestSearchResultBlock'
                    server_tool_use:
                      $ref: '#/components/schemas/RequestServerToolUseBlock'
                    text:
                      $ref: '#/components/schemas/RequestTextBlock'
                    text_editor_code_execution_tool_result:
                      $ref: >-
                        #/components/schemas/RequestTextEditorCodeExecutionToolResultBlock
                    thinking:
                      $ref: '#/components/schemas/RequestThinkingBlock'
                    tool_result:
                      $ref: '#/components/schemas/RequestToolResultBlock'
                    tool_use:
                      $ref: '#/components/schemas/RequestToolUseBlock'
                    web_fetch_tool_result:
                      $ref: '#/components/schemas/RequestWebFetchToolResultBlock'
                    web_search_tool_result:
                      $ref: '#/components/schemas/RequestWebSearchToolResultBlock'
                  propertyName: type
                oneOf:
                  - $ref: '#/components/schemas/RequestTextBlock'
                    description: 常规文本内容。
                  - $ref: '#/components/schemas/RequestImageBlock'
                    description: 直接指定为 base64 数据或通过 URL 引用的图像内容。
                  - $ref: '#/components/schemas/RequestDocumentBlock'
                    description: 文档内容，可以直接指定为 base64 数据、文本或通过 URL 引用。
                  - $ref: '#/components/schemas/RequestSearchResultBlock'
                    description: 包含搜索操作的来源、标题和内容的搜索结果块。
                  - $ref: '#/components/schemas/RequestThinkingBlock'
                    description: 指定模型内部思考的块。
                  - $ref: '#/components/schemas/RequestRedactedThinkingBlock'
                    description: 指定模型内部已编辑思考的块。
                  - $ref: '#/components/schemas/RequestToolUseBlock'
                    description: 指示模型使用工具的块。
                  - $ref: '#/components/schemas/RequestToolResultBlock'
                    description: 指定模型工具使用结果的块。
                  - $ref: '#/components/schemas/RequestServerToolUseBlock'
                  - $ref: '#/components/schemas/RequestWebSearchToolResultBlock'
                  - $ref: '#/components/schemas/RequestWebFetchToolResultBlock'
                  - $ref: '#/components/schemas/RequestCodeExecutionToolResultBlock'
                  - $ref: >-
                      #/components/schemas/RequestBashCodeExecutionToolResultBlock
                  - $ref: >-
                      #/components/schemas/RequestTextEditorCodeExecutionToolResultBlock
                  - $ref: '#/components/schemas/RequestMCPToolUseBlock'
                  - $ref: '#/components/schemas/RequestMCPToolResultBlock'
                  - $ref: '#/components/schemas/RequestContainerUploadBlock'
              type: array
          title: Content
        role:
          enum:
            - user
            - assistant
          title: Role
          type: string
      required:
        - content
        - role
      title: InputMessage
      type: object
    ContainerParams:
      additionalProperties: false
      description: 包含要加载技能的容器参数。
      properties:
        id:
          anyOf:
            - type: string
            - type: 'null'
          description: 容器 ID
          title: Id
        skills:
          anyOf:
            - items:
                $ref: '#/components/schemas/SkillParams'
              maxItems: 8
              type: array
            - type: 'null'
          description: 容器中要加载的技能列表
          title: Skills
      title: ContainerParams
      type: object
    ContextManagementConfig:
      additionalProperties: false
      properties:
        edits:
          description: 要应用的上下文管理编辑列表
          items:
            discriminator:
              mapping:
                clear_thinking_20251015:
                  $ref: '#/components/schemas/ClearThinking20251015'
                clear_tool_uses_20250919:
                  $ref: '#/components/schemas/ClearToolUses20250919'
              propertyName: type
            oneOf:
              - $ref: '#/components/schemas/ClearToolUses20250919'
              - $ref: '#/components/schemas/ClearThinking20251015'
          minItems: 0
          title: Edits
          type: array
      title: ContextManagementConfig
      type: object
    RequestMCPServerURLDefinition:
      additionalProperties: false
      properties:
        authorization_token:
          anyOf:
            - type: string
            - type: 'null'
          title: Authorization Token
        name:
          title: Name
          type: string
        tool_configuration:
          anyOf:
            - $ref: '#/components/schemas/RequestMCPServerToolConfiguration'
            - type: 'null'
        type:
          const: url
          title: Type
          type: string
        url:
          title: Url
          type: string
      required:
        - name
        - type
        - url
      title: RequestMCPServerURLDefinition
      type: object
    Metadata:
      additionalProperties: false
      properties:
        user_id:
          anyOf:
            - maxLength: 256
              type: string
            - type: 'null'
          description: >-
            与请求关联的用户的外部标识符。


            这应该是 uuid、哈希值或其他不透明标识符。Anthropic 可能会使用此 ID
            来帮助检测滥用行为。不要包含任何识别信息，如姓名、电子邮件地址或电话号码。
          examples:
            - 13803d75-b4b5-4c3e-b2a2-6f21399b021b
          title: User Id
      title: Metadata
      type: object
    OutputConfig:
      additionalProperties: false
      properties:
        effort:
          description: 输出努力程度。
          enum:
            - low
            - medium
            - high
            - xhigh
            - max
          title: Effort
          type: string
        format:
          $ref: '#/components/schemas/JSONOutputFormat'
          description: 用于约束 Claude 输出格式的 schema。
        task_budget:
          $ref: '#/components/schemas/TokenTaskBudget'
          description: 跨上下文会话的总 token 预算。
      title: OutputConfig
      type: object
    RequestTextBlock:
      additionalProperties: false
      properties:
        cache_control:
          anyOf:
            - discriminator:
                mapping:
                  ephemeral:
                    $ref: '#/components/schemas/CacheControlEphemeral'
                propertyName: type
              oneOf:
                - $ref: '#/components/schemas/CacheControlEphemeral'
            - type: 'null'
          description: 在此内容块创建缓存控制断点。
          title: Cache Control
        citations:
          anyOf:
            - items:
                discriminator:
                  mapping:
                    char_location:
                      $ref: '#/components/schemas/RequestCharLocationCitation'
                    content_block_location:
                      $ref: '#/components/schemas/RequestContentBlockLocationCitation'
                    page_location:
                      $ref: '#/components/schemas/RequestPageLocationCitation'
                    search_result_location:
                      $ref: '#/components/schemas/RequestSearchResultLocationCitation'
                    web_search_result_location:
                      $ref: >-
                        #/components/schemas/RequestWebSearchResultLocationCitation
                  propertyName: type
                oneOf:
                  - $ref: '#/components/schemas/RequestCharLocationCitation'
                  - $ref: '#/components/schemas/RequestPageLocationCitation'
                  - $ref: '#/components/schemas/RequestContentBlockLocationCitation'
                  - $ref: >-
                      #/components/schemas/RequestWebSearchResultLocationCitation
                  - $ref: '#/components/schemas/RequestSearchResultLocationCitation'
              type: array
            - type: 'null'
          title: Citations
        text:
          minLength: 1
          title: Text
          type: string
        type:
          const: text
          title: Type
          type: string
      required:
        - text
        - type
      title: Text
      type: object
    ThinkingConfigEnabled:
      additionalProperties: false
      properties:
        budget_tokens:
          description: >-
            确定 Claude 可用于内部推理过程的令牌数。更大的预算可以为复杂问题提供更彻底的分析，从而提高响应质量。


            必须 ≥1024 且小于 `max_tokens`。


            详情请参阅[扩展思考](https://docs.claude.com/en/docs/build-with-claude/extended-thinking)。
          minimum: 1024
          title: Budget Tokens
          type: integer
        display:
          description: 控制思考内容在响应中的展示方式。
          enum:
            - summarized
            - omitted
          title: 显示
          type: string
        type:
          const: enabled
          title: Type
          type: string
      required:
        - budget_tokens
        - type
      title: Enabled
      type: object
    ThinkingConfigDisabled:
      additionalProperties: false
      properties:
        type:
          const: disabled
          title: Type
          type: string
      required:
        - type
      title: Disabled
      type: object
    ThinkingConfigAdaptive:
      additionalProperties: false
      properties:
        display:
          description: 控制思考内容在响应中的展示方式。
          enum:
            - summarized
            - omitted
          title: Display
          type: string
        type:
          const: adaptive
          title: Type
          type: string
      required:
        - type
      title: Adaptive
      type: object
    ToolChoiceAuto:
      additionalProperties: false
      description: 模型将自动决定是否使用工具。
      properties:
        disable_parallel_tool_use:
          description: |-
            是否禁用并行工具使用。

            默认为 `false`。如果设置为 `true`，模型最多输出一个工具使用。
          title: Disable Parallel Tool Use
          type: boolean
        type:
          const: auto
          title: Type
          type: string
      required:
        - type
      title: Auto
      type: object
    ToolChoiceAny:
      additionalProperties: false
      description: 模型将使用任何可用的工具。
      properties:
        disable_parallel_tool_use:
          description: |-
            是否禁用并行工具使用。

            默认为 `false`。如果设置为 `true`，模型将精确输出一个工具使用。
          title: Disable Parallel Tool Use
          type: boolean
        type:
          const: any
          title: Type
          type: string
      required:
        - type
      title: Any
      type: object
    ToolChoiceTool:
      additionalProperties: false
      description: 模型将使用 `tool_choice.name` 指定的工具。
      properties:
        disable_parallel_tool_use:
          description: |-
            是否禁用并行工具使用。

            默认为 `false`。如果设置为 `true`，模型将精确输出一个工具使用。
          title: Disable Parallel Tool Use
          type: boolean
        name:
          description: 要使用的工具名称。
          title: Name
          type: string
        type:
          const: tool
          title: Type
          type: string
      required:
        - name
        - type
      title: Tool
      type: object
    ToolChoiceNone:
      additionalProperties: false
      description: 模型将不被允许使用工具。
      properties:
        type:
          const: none
          title: Type
          type: string
      required:
        - type
      title: None
      type: object
    Tool:
      additionalProperties: false
      properties:
        type:
          anyOf:
            - type: 'null'
            - const: custom
              type: string
          title: Type
        description:
          description: |-
            此工具的功能描述。

            工具描述应尽可能详细。模型掌握的工具信息和使用方法越多，其性能就越好。你可以使用自然语言描述来强化工具输入 JSON 架构的重要方面。
          examples:
            - Get the current weather in a given location
          title: Description
          type: string
        name:
          description: |-
            工具的名称。

            这是模型调用工具以及在 `tool_use` 块中使用的名称。
          maxLength: 128
          minLength: 1
          pattern: ^[a-zA-Z0-9_-]{1,128}$
          title: Name
          type: string
        input_schema:
          $ref: '#/components/schemas/InputSchema'
          description: |-
            此工具输入的 [JSON 架构](https://json-schema.org/draft/2020-12)。

            这定义了工具接受的 `input` 形状以及模型将生成的内容。
          examples:
            - properties:
                location:
                  description: The city and state, e.g. San Francisco, CA
                  type: string
                unit:
                  description: Unit for the output - one of (celsius, fahrenheit)
                  type: string
              required:
                - location
              type: object
        cache_control:
          anyOf:
            - discriminator:
                mapping:
                  ephemeral:
                    $ref: '#/components/schemas/CacheControlEphemeral'
                propertyName: type
              oneOf:
                - $ref: '#/components/schemas/CacheControlEphemeral'
            - type: 'null'
          description: 在此内容块创建缓存控制断点。
          title: Cache Control
      required:
        - name
        - input_schema
      title: Custom tool
      type: object
    BashTool_20241022:
      additionalProperties: false
      properties:
        cache_control:
          anyOf:
            - discriminator:
                mapping:
                  ephemeral:
                    $ref: '#/components/schemas/CacheControlEphemeral'
                propertyName: type
              oneOf:
                - $ref: '#/components/schemas/CacheControlEphemeral'
            - type: 'null'
          description: 在此内容块创建缓存控制断点。
          title: Cache Control
        name:
          const: bash
          description: |-
            工具的名称。

            这是模型调用工具以及在 `tool_use` 块中使用的名称。
          title: Name
          type: string
        type:
          const: bash_20241022
          title: Type
          type: string
      required:
        - name
        - type
      title: Bash tool (2024-10-22)
      type: object
    BashTool_20250124:
      additionalProperties: false
      properties:
        cache_control:
          anyOf:
            - discriminator:
                mapping:
                  ephemeral:
                    $ref: '#/components/schemas/CacheControlEphemeral'
                propertyName: type
              oneOf:
                - $ref: '#/components/schemas/CacheControlEphemeral'
            - type: 'null'
          description: 在此内容块创建缓存控制断点。
          title: Cache Control
        name:
          const: bash
          description: |-
            工具的名称。

            这是模型调用工具以及在 `tool_use` 块中使用的名称。
          title: Name
          type: string
        type:
          const: bash_20250124
          title: Type
          type: string
      required:
        - name
        - type
      title: Bash tool (2025-01-24)
      type: object
    CodeExecutionTool_20250522:
      additionalProperties: false
      properties:
        cache_control:
          anyOf:
            - discriminator:
                mapping:
                  ephemeral:
                    $ref: '#/components/schemas/CacheControlEphemeral'
                propertyName: type
              oneOf:
                - $ref: '#/components/schemas/CacheControlEphemeral'
            - type: 'null'
          description: 在此内容块创建缓存控制断点。
          title: Cache Control
        name:
          const: code_execution
          description: |-
            工具的名称。

            这是模型调用工具以及在 `tool_use` 块中使用的名称。
          title: Name
          type: string
        type:
          const: code_execution_20250522
          title: Type
          type: string
      required:
        - name
        - type
      title: Code execution tool (2025-05-22)
      type: object
    CodeExecutionTool_20250825:
      additionalProperties: false
      properties:
        cache_control:
          anyOf:
            - discriminator:
                mapping:
                  ephemeral:
                    $ref: '#/components/schemas/CacheControlEphemeral'
                propertyName: type
              oneOf:
                - $ref: '#/components/schemas/CacheControlEphemeral'
            - type: 'null'
          description: 在此内容块创建缓存控制断点。
          title: Cache Control
        name:
          const: code_execution
          description: |-
            工具的名称。

            这是模型调用工具以及在 `tool_use` 块中使用的名称。
          title: Name
          type: string
        type:
          const: code_execution_20250825
          title: Type
          type: string
      required:
        - name
        - type
      title: CodeExecutionTool_20250825
      type: object
    ComputerUseTool_20241022:
      additionalProperties: false
      properties:
        cache_control:
          anyOf:
            - discriminator:
                mapping:
                  ephemeral:
                    $ref: '#/components/schemas/CacheControlEphemeral'
                propertyName: type
              oneOf:
                - $ref: '#/components/schemas/CacheControlEphemeral'
            - type: 'null'
          description: 在此内容块创建缓存控制断点。
          title: Cache Control
        display_height_px:
          description: 显示器的高度（以像素为单位）。
          minimum: 1
          title: Display Height Px
          type: integer
        display_number:
          anyOf:
            - minimum: 0
              type: integer
            - type: 'null'
          description: 显示器的 X11 显示编号（例如 0、1）。
          title: Display Number
        display_width_px:
          description: 显示器的宽度（以像素为单位）。
          minimum: 1
          title: Display Width Px
          type: integer
        name:
          const: computer
          description: |-
            工具的名称。

            这是模型调用工具以及在 `tool_use` 块中使用的名称。
          title: Name
          type: string
        type:
          const: computer_20241022
          title: Type
          type: string
      required:
        - display_height_px
        - display_width_px
        - name
        - type
      title: Computer use tool (2024-01-22)
      type: object
    MemoryTool_20250818:
      additionalProperties: false
      properties:
        cache_control:
          anyOf:
            - discriminator:
                mapping:
                  ephemeral:
                    $ref: '#/components/schemas/CacheControlEphemeral'
                propertyName: type
              oneOf:
                - $ref: '#/components/schemas/CacheControlEphemeral'
            - type: 'null'
          description: 在此内容块创建缓存控制断点。
          title: Cache Control
        name:
          const: memory
          description: |-
            工具的名称。

            这是模型调用工具以及在 `tool_use` 块中使用的名称。
          title: Name
          type: string
        type:
          const: memory_20250818
          title: Type
          type: string
      required:
        - name
        - type
      title: MemoryTool_20250818
      type: object
    ComputerUseTool_20250124:
      additionalProperties: false
      properties:
        cache_control:
          anyOf:
            - discriminator:
                mapping:
                  ephemeral:
                    $ref: '#/components/schemas/CacheControlEphemeral'
                propertyName: type
              oneOf:
                - $ref: '#/components/schemas/CacheControlEphemeral'
            - type: 'null'
          description: 在此内容块创建缓存控制断点。
          title: Cache Control
        display_height_px:
          description: 显示器的高度（以像素为单位）。
          minimum: 1
          title: Display Height Px
          type: integer
        display_number:
          anyOf:
            - minimum: 0
              type: integer
            - type: 'null'
          description: 显示器的 X11 显示编号（例如 0、1）。
          title: Display Number
        display_width_px:
          description: 显示器的宽度（以像素为单位）。
          minimum: 1
          title: Display Width Px
          type: integer
        name:
          const: computer
          description: |-
            工具的名称。

            这是模型调用工具以及在 `tool_use` 块中使用的名称。
          title: Name
          type: string
        type:
          const: computer_20250124
          title: Type
          type: string
      required:
        - display_height_px
        - display_width_px
        - name
        - type
      title: Computer use tool (2025-01-24)
      type: object
    TextEditor_20241022:
      additionalProperties: false
      properties:
        cache_control:
          anyOf:
            - discriminator:
                mapping:
                  ephemeral:
                    $ref: '#/components/schemas/CacheControlEphemeral'
                propertyName: type
              oneOf:
                - $ref: '#/components/schemas/CacheControlEphemeral'
            - type: 'null'
          description: 在此内容块创建缓存控制断点。
          title: Cache Control
        name:
          const: str_replace_editor
          description: |-
            工具的名称。

            这是模型调用工具以及在 `tool_use` 块中使用的名称。
          title: Name
          type: string
        type:
          const: text_editor_20241022
          title: Type
          type: string
      required:
        - name
        - type
      title: Text editor tool (2024-10-22)
      type: object
    TextEditor_20250124:
      additionalProperties: false
      properties:
        cache_control:
          anyOf:
            - discriminator:
                mapping:
                  ephemeral:
                    $ref: '#/components/schemas/CacheControlEphemeral'
                propertyName: type
              oneOf:
                - $ref: '#/components/schemas/CacheControlEphemeral'
            - type: 'null'
          description: 在此内容块创建缓存控制断点。
          title: Cache Control
        name:
          const: str_replace_editor
          description: |-
            工具的名称。

            这是模型调用工具以及在 `tool_use` 块中使用的名称。
          title: Name
          type: string
        type:
          const: text_editor_20250124
          title: Type
          type: string
      required:
        - name
        - type
      title: Text editor tool (2025-01-24)
      type: object
    TextEditor_20250429:
      additionalProperties: false
      properties:
        cache_control:
          anyOf:
            - discriminator:
                mapping:
                  ephemeral:
                    $ref: '#/components/schemas/CacheControlEphemeral'
                propertyName: type
              oneOf:
                - $ref: '#/components/schemas/CacheControlEphemeral'
            - type: 'null'
          description: 在此内容块创建缓存控制断点。
          title: Cache Control
        name:
          const: str_replace_based_edit_tool
          description: |-
            工具的名称。

            这是模型调用工具以及在 `tool_use` 块中使用的名称。
          title: Name
          type: string
        type:
          const: text_editor_20250429
          title: Type
          type: string
      required:
        - name
        - type
      title: Text editor tool (2025-04-29)
      type: object
    TextEditor_20250728:
      additionalProperties: false
      properties:
        cache_control:
          anyOf:
            - discriminator:
                mapping:
                  ephemeral:
                    $ref: '#/components/schemas/CacheControlEphemeral'
                propertyName: type
              oneOf:
                - $ref: '#/components/schemas/CacheControlEphemeral'
            - type: 'null'
          description: 在此内容块创建缓存控制断点。
          title: Cache Control
        max_characters:
          anyOf:
            - minimum: 1
              type: integer
            - type: 'null'
          description: 查看文件时显示的最大字符数。如果未指定，默认显示完整文件。
          title: Max Characters
        name:
          const: str_replace_based_edit_tool
          description: |-
            工具的名称。

            这是模型调用工具以及在 `tool_use` 块中使用的名称。
          title: Name
          type: string
        type:
          const: text_editor_20250728
          title: Type
          type: string
      required:
        - name
        - type
      title: TextEditor_20250728
      type: object
    WebSearchTool_20250305:
      additionalProperties: false
      properties:
        allowed_domains:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          description: 如果提供，结果中将仅包含这些域名。不能与 `blocked_domains` 一起使用。
          title: Allowed Domains
        blocked_domains:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          description: 如果提供，这些域名将不会出现在结果中。不能与 `allowed_domains` 一起使用。
          title: Blocked Domains
        cache_control:
          anyOf:
            - discriminator:
                mapping:
                  ephemeral:
                    $ref: '#/components/schemas/CacheControlEphemeral'
                propertyName: type
              oneOf:
                - $ref: '#/components/schemas/CacheControlEphemeral'
            - type: 'null'
          description: 在此内容块创建缓存控制断点。
          title: Cache Control
        max_uses:
          anyOf:
            - exclusiveMinimum: 0
              type: integer
            - type: 'null'
          description: 在 API 请求中工具可使用的最大次数。
          title: Max Uses
        name:
          const: web_search
          description: |-
            工具的名称。

            这是模型调用工具以及在 `tool_use` 块中使用的名称。
          title: Name
          type: string
        type:
          const: web_search_20250305
          title: Type
          type: string
        user_location:
          anyOf:
            - $ref: '#/components/schemas/UserLocation'
            - type: 'null'
          description: 用户位置的参数。用于提供更相关的搜索结果。
      required:
        - name
        - type
      title: Web search tool (2025-03-05)
      type: object
    WebFetchTool_20250910:
      additionalProperties: false
      properties:
        allowed_domains:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          description: 允许获取内容的域名列表
          title: Allowed Domains
        blocked_domains:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          description: 禁止获取内容的域名列表
          title: Blocked Domains
        cache_control:
          anyOf:
            - discriminator:
                mapping:
                  ephemeral:
                    $ref: '#/components/schemas/CacheControlEphemeral'
                propertyName: type
              oneOf:
                - $ref: '#/components/schemas/CacheControlEphemeral'
            - type: 'null'
          description: 在此内容块创建缓存控制断点。
          title: Cache Control
        citations:
          anyOf:
            - $ref: '#/components/schemas/RequestCitationsConfig'
            - type: 'null'
          description: 已获取文档的引用配置。引用默认禁用。
        max_content_tokens:
          anyOf:
            - exclusiveMinimum: 0
              type: integer
            - type: 'null'
          description: 在上下文中包含网页文本内容所使用的最大令牌数。此限制是近似值，不适用于 PDF 等二进制内容。
          title: Max Content Tokens
        max_uses:
          anyOf:
            - exclusiveMinimum: 0
              type: integer
            - type: 'null'
          description: 在 API 请求中工具可使用的最大次数。
          title: Max Uses
        name:
          const: web_fetch
          description: |-
            工具的名称。

            这是模型调用工具以及在 `tool_use` 块中使用的名称。
          title: Name
          type: string
        type:
          const: web_fetch_20250910
          title: Type
          type: string
      required:
        - name
        - type
      title: WebFetchTool_20250910
      type: object
    ResponseTextBlock:
      properties:
        citations:
          anyOf:
            - items:
                discriminator:
                  mapping:
                    char_location:
                      $ref: '#/components/schemas/ResponseCharLocationCitation'
                    content_block_location:
                      $ref: >-
                        #/components/schemas/ResponseContentBlockLocationCitation
                    page_location:
                      $ref: '#/components/schemas/ResponsePageLocationCitation'
                    search_result_location:
                      $ref: >-
                        #/components/schemas/ResponseSearchResultLocationCitation
                    web_search_result_location:
                      $ref: >-
                        #/components/schemas/ResponseWebSearchResultLocationCitation
                  propertyName: type
                oneOf:
                  - $ref: '#/components/schemas/ResponseCharLocationCitation'
                  - $ref: '#/components/schemas/ResponsePageLocationCitation'
                  - $ref: '#/components/schemas/ResponseContentBlockLocationCitation'
                  - $ref: >-
                      #/components/schemas/ResponseWebSearchResultLocationCitation
                  - $ref: '#/components/schemas/ResponseSearchResultLocationCitation'
              type: array
            - type: 'null'
          default: null
          description: >-
            支持文本块的引用。


            返回的引用类型取决于被引用文档的类型。引用 PDF 会得到 `page_location`，纯文本会得到
            `char_location`，内容文档会得到 `content_block_location`。
          title: Citations
        text:
          maxLength: 5000000
          minLength: 0
          title: Text
          type: string
        type:
          const: text
          default: text
          title: Type
          type: string
      required:
        - citations
        - text
        - type
      title: Text
      type: object
    ResponseThinkingBlock:
      properties:
        signature:
          title: Signature
          type: string
        thinking:
          title: Thinking
          type: string
        type:
          const: thinking
          default: thinking
          title: Type
          type: string
      required:
        - signature
        - thinking
        - type
      title: Thinking
      type: object
    ResponseRedactedThinkingBlock:
      properties:
        data:
          title: Data
          type: string
        type:
          const: redacted_thinking
          default: redacted_thinking
          title: Type
          type: string
      required:
        - data
        - type
      title: Redacted thinking
      type: object
    ResponseToolUseBlock:
      properties:
        id:
          pattern: ^[a-zA-Z0-9_-]+$
          title: Id
          type: string
        input:
          additionalProperties: true
          title: Input
          type: object
        name:
          minLength: 1
          title: Name
          type: string
        type:
          const: tool_use
          default: tool_use
          title: Type
          type: string
      required:
        - id
        - input
        - name
        - type
      title: Tool use
      type: object
    ResponseServerToolUseBlock:
      properties:
        id:
          pattern: ^srvtoolu_[a-zA-Z0-9_]+$
          title: Id
          type: string
        input:
          additionalProperties: true
          title: Input
          type: object
        name:
          enum:
            - web_search
            - web_fetch
            - code_execution
            - bash_code_execution
            - text_editor_code_execution
          title: Name
          type: string
        type:
          const: server_tool_use
          default: server_tool_use
          title: Type
          type: string
      required:
        - id
        - input
        - name
        - type
      title: Server tool use
      type: object
    ResponseWebSearchToolResultBlock:
      properties:
        content:
          anyOf:
            - $ref: '#/components/schemas/ResponseWebSearchToolResultError'
            - items:
                $ref: '#/components/schemas/ResponseWebSearchResultBlock'
              type: array
          title: Content
        tool_use_id:
          pattern: ^srvtoolu_[a-zA-Z0-9_]+$
          title: Tool Use Id
          type: string
        type:
          const: web_search_tool_result
          default: web_search_tool_result
          title: Type
          type: string
      required:
        - content
        - tool_use_id
        - type
      title: Web search tool result
      type: object
    ResponseWebFetchToolResultBlock:
      properties:
        content:
          anyOf:
            - $ref: '#/components/schemas/ResponseWebFetchToolResultError'
            - $ref: '#/components/schemas/ResponseWebFetchResultBlock'
          title: Content
        tool_use_id:
          pattern: ^srvtoolu_[a-zA-Z0-9_]+$
          title: Tool Use Id
          type: string
        type:
          const: web_fetch_tool_result
          default: web_fetch_tool_result
          title: Type
          type: string
      required:
        - content
        - tool_use_id
        - type
      title: ResponseWebFetchToolResultBlock
      type: object
    ResponseCodeExecutionToolResultBlock:
      properties:
        content:
          anyOf:
            - $ref: '#/components/schemas/ResponseCodeExecutionToolResultError'
            - $ref: '#/components/schemas/ResponseCodeExecutionResultBlock'
          title: Content
        tool_use_id:
          pattern: ^srvtoolu_[a-zA-Z0-9_]+$
          title: Tool Use Id
          type: string
        type:
          const: code_execution_tool_result
          default: code_execution_tool_result
          title: Type
          type: string
      required:
        - content
        - tool_use_id
        - type
      title: Code execution tool result
      type: object
    ResponseBashCodeExecutionToolResultBlock:
      properties:
        content:
          anyOf:
            - $ref: '#/components/schemas/ResponseBashCodeExecutionToolResultError'
            - $ref: '#/components/schemas/ResponseBashCodeExecutionResultBlock'
          title: Content
        tool_use_id:
          pattern: ^srvtoolu_[a-zA-Z0-9_]+$
          title: Tool Use Id
          type: string
        type:
          const: bash_code_execution_tool_result
          default: bash_code_execution_tool_result
          title: Type
          type: string
      required:
        - content
        - tool_use_id
        - type
      title: ResponseBashCodeExecutionToolResultBlock
      type: object
    ResponseTextEditorCodeExecutionToolResultBlock:
      properties:
        content:
          anyOf:
            - $ref: >-
                #/components/schemas/ResponseTextEditorCodeExecutionToolResultError
            - $ref: >-
                #/components/schemas/ResponseTextEditorCodeExecutionViewResultBlock
            - $ref: >-
                #/components/schemas/ResponseTextEditorCodeExecutionCreateResultBlock
            - $ref: >-
                #/components/schemas/ResponseTextEditorCodeExecutionStrReplaceResultBlock
          title: Content
        tool_use_id:
          pattern: ^srvtoolu_[a-zA-Z0-9_]+$
          title: Tool Use Id
          type: string
        type:
          const: text_editor_code_execution_tool_result
          default: text_editor_code_execution_tool_result
          title: Type
          type: string
      required:
        - content
        - tool_use_id
        - type
      title: ResponseTextEditorCodeExecutionToolResultBlock
      type: object
    ResponseMCPToolUseBlock:
      properties:
        id:
          pattern: ^[a-zA-Z0-9_-]+$
          title: Id
          type: string
        input:
          additionalProperties: true
          title: Input
          type: object
        name:
          description: MCP 工具的名称
          title: Name
          type: string
        server_name:
          description: MCP 服务器的名称
          title: Server Name
          type: string
        type:
          const: mcp_tool_use
          default: mcp_tool_use
          title: Type
          type: string
      required:
        - id
        - input
        - name
        - server_name
        - type
      title: MCP tool use
      type: object
    ResponseMCPToolResultBlock:
      properties:
        content:
          anyOf:
            - type: string
            - items:
                $ref: '#/components/schemas/ResponseTextBlock'
              type: array
          title: Content
        is_error:
          default: false
          title: Is Error
          type: boolean
        tool_use_id:
          pattern: ^[a-zA-Z0-9_-]+$
          title: Tool Use Id
          type: string
        type:
          const: mcp_tool_result
          default: mcp_tool_result
          title: Type
          type: string
      required:
        - content
        - is_error
        - tool_use_id
        - type
      title: MCP tool result
      type: object
    ResponseContainerUploadBlock:
      description: 上传到容器的文件的响应模型。
      properties:
        file_id:
          title: File Id
          type: string
        type:
          const: container_upload
          default: container_upload
          title: Type
          type: string
      required:
        - file_id
        - type
      title: Container upload
      type: object
    Usage:
      properties:
        cache_creation:
          anyOf:
            - $ref: '#/components/schemas/CacheCreation'
            - type: 'null'
          default: null
          description: 按 TTL 划分的缓存令牌细分
        cache_creation_input_tokens:
          anyOf:
            - minimum: 0
              type: integer
            - type: 'null'
          default: null
          description: 用于创建缓存条目的输入令牌数。
          examples:
            - 2051
          title: Cache Creation Input Tokens
        cache_read_input_tokens:
          anyOf:
            - minimum: 0
              type: integer
            - type: 'null'
          default: null
          description: 从缓存中读取的输入令牌数。
          examples:
            - 2051
          title: Cache Read Input Tokens
        input_tokens:
          description: 使用的输入令牌数。
          examples:
            - 2095
          minimum: 0
          title: Input Tokens
          type: integer
        output_tokens:
          description: 使用的输出令牌数。
          examples:
            - 503
          minimum: 0
          title: Output Tokens
          type: integer
        server_tool_use:
          anyOf:
            - $ref: '#/components/schemas/ServerToolUsage'
            - type: 'null'
          default: null
          description: 服务器工具请求数。
        service_tier:
          anyOf:
            - enum:
                - standard
                - priority
                - batch
              type: string
            - type: 'null'
          default: null
          description: 请求使用的是优先级层、标准层还是批处理层。
          title: Service Tier
      required:
        - cache_creation
        - cache_creation_input_tokens
        - cache_read_input_tokens
        - input_tokens
        - output_tokens
        - server_tool_use
        - service_tier
      title: Usage
      type: object
    ResponseContextManagement:
      properties:
        applied_edits:
          description: 已应用的上下文管理编辑列表。
          items:
            discriminator:
              mapping:
                clear_thinking_20251015:
                  $ref: '#/components/schemas/ResponseClearThinking20251015Edit'
                clear_tool_uses_20250919:
                  $ref: '#/components/schemas/ResponseClearToolUses20250919Edit'
              propertyName: type
            oneOf:
              - $ref: '#/components/schemas/ResponseClearToolUses20250919Edit'
              - $ref: '#/components/schemas/ResponseClearThinking20251015Edit'
          title: Applied Edits
          type: array
      required:
        - applied_edits
      title: ResponseContextManagement
      type: object
    Container:
      description: 请求中使用的容器信息（用于代码执行工具）
      properties:
        expires_at:
          description: 容器过期的时间。
          format: date-time
          title: Expires At
          type: string
        id:
          description: 此请求中使用的容器标识符
          title: Id
          type: string
        skills:
          anyOf:
            - items:
                $ref: '#/components/schemas/Skill'
              type: array
            - type: 'null'
          default: null
          description: 容器中加载的技能
          title: Skills
      required:
        - expires_at
        - id
        - skills
      title: Container
      type: object
    RequestBashCodeExecutionToolResultBlock:
      additionalProperties: false
      properties:
        cache_control:
          anyOf:
            - discriminator:
                mapping:
                  ephemeral:
                    $ref: '#/components/schemas/CacheControlEphemeral'
                propertyName: type
              oneOf:
                - $ref: '#/components/schemas/CacheControlEphemeral'
            - type: 'null'
          description: 在此内容块创建缓存控制断点。
          title: Cache Control
        content:
          anyOf:
            - $ref: '#/components/schemas/RequestBashCodeExecutionToolResultError'
            - $ref: '#/components/schemas/RequestBashCodeExecutionResultBlock'
          title: Content
        tool_use_id:
          pattern: ^srvtoolu_[a-zA-Z0-9_]+$
          title: Tool Use Id
          type: string
        type:
          const: bash_code_execution_tool_result
          title: Type
          type: string
      required:
        - content
        - tool_use_id
        - type
      title: RequestBashCodeExecutionToolResultBlock
      type: object
    RequestCodeExecutionToolResultBlock:
      additionalProperties: false
      properties:
        cache_control:
          anyOf:
            - discriminator:
                mapping:
                  ephemeral:
                    $ref: '#/components/schemas/CacheControlEphemeral'
                propertyName: type
              oneOf:
                - $ref: '#/components/schemas/CacheControlEphemeral'
            - type: 'null'
          description: 在此内容块创建缓存控制断点。
          title: Cache Control
        content:
          anyOf:
            - $ref: '#/components/schemas/RequestCodeExecutionToolResultError'
            - $ref: '#/components/schemas/RequestCodeExecutionResultBlock'
          title: Content
        tool_use_id:
          pattern: ^srvtoolu_[a-zA-Z0-9_]+$
          title: Tool Use Id
          type: string
        type:
          const: code_execution_tool_result
          title: Type
          type: string
      required:
        - content
        - tool_use_id
        - type
      title: Code execution tool result
      type: object
    RequestContainerUploadBlock:
      additionalProperties: false
      description: |-
        表示要上传到容器的文件的内容块
        通过此块上传的文件将在容器的输入目录中可用。
      properties:
        cache_control:
          anyOf:
            - discriminator:
                mapping:
                  ephemeral:
                    $ref: '#/components/schemas/CacheControlEphemeral'
                propertyName: type
              oneOf:
                - $ref: '#/components/schemas/CacheControlEphemeral'
            - type: 'null'
          description: 在此内容块创建缓存控制断点。
          title: Cache Control
        file_id:
          title: File Id
          type: string
        type:
          const: container_upload
          title: Type
          type: string
      required:
        - file_id
        - type
      title: Container upload
      type: object
    RequestDocumentBlock:
      additionalProperties: false
      properties:
        cache_control:
          anyOf:
            - discriminator:
                mapping:
                  ephemeral:
                    $ref: '#/components/schemas/CacheControlEphemeral'
                propertyName: type
              oneOf:
                - $ref: '#/components/schemas/CacheControlEphemeral'
            - type: 'null'
          description: 在此内容块创建缓存控制断点。
          title: Cache Control
        citations:
          anyOf:
            - $ref: '#/components/schemas/RequestCitationsConfig'
            - type: 'null'
        context:
          anyOf:
            - minLength: 1
              type: string
            - type: 'null'
          title: Context
        source:
          discriminator:
            mapping:
              base64:
                $ref: '#/components/schemas/Base64PDFSource'
              content:
                $ref: '#/components/schemas/ContentBlockSource'
              file:
                $ref: '#/components/schemas/FileDocumentSource'
              text:
                $ref: '#/components/schemas/PlainTextSource'
            propertyName: type
          oneOf:
            - $ref: '#/components/schemas/Base64PDFSource'
            - $ref: '#/components/schemas/PlainTextSource'
            - $ref: '#/components/schemas/ContentBlockSource'
            - $ref: '#/components/schemas/FileDocumentSource'
        title:
          anyOf:
            - maxLength: 500
              minLength: 1
              type: string
            - type: 'null'
          title: Title
        type:
          const: document
          title: Type
          type: string
      required:
        - source
        - type
      title: Document
      type: object
    RequestImageBlock:
      additionalProperties: false
      properties:
        cache_control:
          anyOf:
            - discriminator:
                mapping:
                  ephemeral:
                    $ref: '#/components/schemas/CacheControlEphemeral'
                propertyName: type
              oneOf:
                - $ref: '#/components/schemas/CacheControlEphemeral'
            - type: 'null'
          description: 在此内容块创建缓存控制断点。
          title: Cache Control
        source:
          discriminator:
            mapping:
              base64:
                $ref: '#/components/schemas/Base64ImageSource'
              file:
                $ref: '#/components/schemas/FileImageSource'
            propertyName: type
          oneOf:
            - $ref: '#/components/schemas/Base64ImageSource'
            - $ref: '#/components/schemas/FileImageSource'
          title: Source
        type:
          const: image
          title: Type
          type: string
      required:
        - source
        - type
      title: Image
      type: object
    RequestMCPToolResultBlock:
      additionalProperties: false
      properties:
        cache_control:
          anyOf:
            - discriminator:
                mapping:
                  ephemeral:
                    $ref: '#/components/schemas/CacheControlEphemeral'
                propertyName: type
              oneOf:
                - $ref: '#/components/schemas/CacheControlEphemeral'
            - type: 'null'
          description: 在此内容块创建缓存控制断点。
          title: Cache Control
        content:
          anyOf:
            - type: string
            - type: array
              items:
                $ref: '#/components/schemas/RequestTextBlock'
          title: Content
        is_error:
          title: Is Error
          type: boolean
        tool_use_id:
          pattern: ^[a-zA-Z0-9_-]+$
          title: Tool Use Id
          type: string
        type:
          const: mcp_tool_result
          title: Type
          type: string
      required:
        - tool_use_id
        - type
      title: MCP tool result
      type: object
    RequestMCPToolUseBlock:
      additionalProperties: false
      properties:
        cache_control:
          anyOf:
            - discriminator:
                mapping:
                  ephemeral:
                    $ref: '#/components/schemas/CacheControlEphemeral'
                propertyName: type
              oneOf:
                - $ref: '#/components/schemas/CacheControlEphemeral'
            - type: 'null'
          description: 在此内容块创建缓存控制断点。
          title: Cache Control
        id:
          pattern: ^[a-zA-Z0-9_-]+$
          title: Id
          type: string
        input:
          additionalProperties: true
          title: Input
          type: object
        name:
          title: Name
          type: string
        server_name:
          description: MCP 服务器的名称
          title: Server Name
          type: string
        type:
          const: mcp_tool_use
          title: Type
          type: string
      required:
        - id
        - input
        - name
        - server_name
        - type
      title: MCP tool use
      type: object
    RequestRedactedThinkingBlock:
      additionalProperties: false
      properties:
        data:
          title: Data
          type: string
        type:
          const: redacted_thinking
          title: Type
          type: string
      required:
        - data
        - type
      title: Redacted thinking
      type: object
    RequestSearchResultBlock:
      additionalProperties: false
      properties:
        cache_control:
          anyOf:
            - discriminator:
                mapping:
                  ephemeral:
                    $ref: '#/components/schemas/CacheControlEphemeral'
                propertyName: type
              oneOf:
                - $ref: '#/components/schemas/CacheControlEphemeral'
            - type: 'null'
          description: 在此内容块创建缓存控制断点。
          title: Cache Control
        citations:
          $ref: '#/components/schemas/RequestCitationsConfig'
        content:
          items:
            $ref: '#/components/schemas/RequestTextBlock'
          title: Content
          type: array
        source:
          title: Source
          type: string
        title:
          title: Title
          type: string
        type:
          const: search_result
          title: Type
          type: string
      required:
        - content
        - source
        - title
        - type
      title: Search result
      type: object
    RequestServerToolUseBlock:
      additionalProperties: false
      properties:
        cache_control:
          anyOf:
            - discriminator:
                mapping:
                  ephemeral:
                    $ref: '#/components/schemas/CacheControlEphemeral'
                propertyName: type
              oneOf:
                - $ref: '#/components/schemas/CacheControlEphemeral'
            - type: 'null'
          description: 在此内容块创建缓存控制断点。
          title: Cache Control
        id:
          pattern: ^srvtoolu_[a-zA-Z0-9_]+$
          title: Id
          type: string
        input:
          additionalProperties: true
          title: Input
          type: object
        name:
          enum:
            - web_search
            - web_fetch
            - code_execution
            - bash_code_execution
            - text_editor_code_execution
          title: Name
          type: string
        type:
          const: server_tool_use
          title: Type
          type: string
      required:
        - id
        - input
        - name
        - type
      title: Server tool use
      type: object
    RequestTextEditorCodeExecutionToolResultBlock:
      additionalProperties: false
      properties:
        cache_control:
          anyOf:
            - discriminator:
                mapping:
                  ephemeral:
                    $ref: '#/components/schemas/CacheControlEphemeral'
                propertyName: type
              oneOf:
                - $ref: '#/components/schemas/CacheControlEphemeral'
            - type: 'null'
          description: 在此内容块创建缓存控制断点。
          title: Cache Control
        content:
          anyOf:
            - $ref: >-
                #/components/schemas/RequestTextEditorCodeExecutionToolResultError
            - $ref: >-
                #/components/schemas/RequestTextEditorCodeExecutionViewResultBlock
            - $ref: >-
                #/components/schemas/RequestTextEditorCodeExecutionCreateResultBlock
            - $ref: >-
                #/components/schemas/RequestTextEditorCodeExecutionStrReplaceResultBlock
          title: Content
        tool_use_id:
          pattern: ^srvtoolu_[a-zA-Z0-9_]+$
          title: Tool Use Id
          type: string
        type:
          const: text_editor_code_execution_tool_result
          title: Type
          type: string
      required:
        - content
        - tool_use_id
        - type
      title: RequestTextEditorCodeExecutionToolResultBlock
      type: object
    RequestThinkingBlock:
      additionalProperties: false
      properties:
        signature:
          title: Signature
          type: string
        thinking:
          title: Thinking
          type: string
        type:
          const: thinking
          title: Type
          type: string
      required:
        - signature
        - thinking
        - type
      title: Thinking
      type: object
    RequestToolResultBlock:
      additionalProperties: false
      properties:
        cache_control:
          anyOf:
            - discriminator:
                mapping:
                  ephemeral:
                    $ref: '#/components/schemas/CacheControlEphemeral'
                propertyName: type
              oneOf:
                - $ref: '#/components/schemas/CacheControlEphemeral'
            - type: 'null'
          description: 在此内容块创建缓存控制断点。
          title: Cache Control
        content:
          anyOf:
            - type: string
            - items:
                discriminator:
                  mapping:
                    document:
                      $ref: '#/components/schemas/RequestDocumentBlock'
                    image:
                      $ref: '#/components/schemas/RequestImageBlock'
                    search_result:
                      $ref: '#/components/schemas/RequestSearchResultBlock'
                    text:
                      $ref: '#/components/schemas/RequestTextBlock'
                  propertyName: type
                oneOf:
                  - $ref: '#/components/schemas/RequestTextBlock'
                  - $ref: '#/components/schemas/RequestImageBlock'
                  - $ref: '#/components/schemas/RequestSearchResultBlock'
                  - $ref: '#/components/schemas/RequestDocumentBlock'
              type: array
          title: Content
        is_error:
          title: Is Error
          type: boolean
        tool_use_id:
          pattern: ^[a-zA-Z0-9_-]+$
          title: Tool Use Id
          type: string
        type:
          const: tool_result
          title: Type
          type: string
      required:
        - tool_use_id
        - type
      title: Tool result
      type: object
    RequestToolUseBlock:
      additionalProperties: false
      properties:
        cache_control:
          anyOf:
            - discriminator:
                mapping:
                  ephemeral:
                    $ref: '#/components/schemas/CacheControlEphemeral'
                propertyName: type
              oneOf:
                - $ref: '#/components/schemas/CacheControlEphemeral'
            - type: 'null'
          description: 在此内容块创建缓存控制断点。
          title: Cache Control
        id:
          pattern: ^[a-zA-Z0-9_-]+$
          title: Id
          type: string
        input:
          additionalProperties: true
          title: Input
          type: object
        name:
          maxLength: 200
          minLength: 1
          title: Name
          type: string
        type:
          const: tool_use
          title: Type
          type: string
      required:
        - id
        - input
        - name
        - type
      title: Tool use
      type: object
    RequestWebFetchToolResultBlock:
      additionalProperties: false
      properties:
        cache_control:
          anyOf:
            - discriminator:
                mapping:
                  ephemeral:
                    $ref: '#/components/schemas/CacheControlEphemeral'
                propertyName: type
              oneOf:
                - $ref: '#/components/schemas/CacheControlEphemeral'
            - type: 'null'
          description: 在此内容块创建缓存控制断点。
          title: Cache Control
        content:
          anyOf:
            - $ref: '#/components/schemas/RequestWebFetchToolResultError'
            - $ref: '#/components/schemas/RequestWebFetchResultBlock'
          title: Content
        tool_use_id:
          pattern: ^srvtoolu_[a-zA-Z0-9_]+$
          title: Tool Use Id
          type: string
        type:
          const: web_fetch_tool_result
          title: Type
          type: string
      required:
        - content
        - tool_use_id
        - type
      title: RequestWebFetchToolResultBlock
      type: object
    RequestWebSearchToolResultBlock:
      additionalProperties: false
      properties:
        cache_control:
          anyOf:
            - discriminator:
                mapping:
                  ephemeral:
                    $ref: '#/components/schemas/CacheControlEphemeral'
                propertyName: type
              oneOf:
                - $ref: '#/components/schemas/CacheControlEphemeral'
            - type: 'null'
          description: 在此内容块创建缓存控制断点。
          title: Cache Control
        content:
          anyOf:
            - items:
                $ref: '#/components/schemas/RequestWebSearchResultBlock'
              type: array
            - $ref: '#/components/schemas/RequestWebSearchToolResultError'
          title: Content
        tool_use_id:
          pattern: ^srvtoolu_[a-zA-Z0-9_]+$
          title: Tool Use Id
          type: string
        type:
          const: web_search_tool_result
          title: Type
          type: string
      required:
        - content
        - tool_use_id
        - type
      title: Web search tool result
      type: object
    SkillParams:
      additionalProperties: false
      description: 要在容器中加载的技能规范（请求模型）。
      properties:
        skill_id:
          description: 技能 ID
          maxLength: 64
          minLength: 1
          title: Skill Id
          type: string
        type:
          description: 技能类型 - 'anthropic'（内置）或 'custom'（用户定义）
          enum:
            - anthropic
            - custom
          title: Type
          type: string
        version:
          description: 技能版本或 'latest' 表示最新版本
          maxLength: 64
          minLength: 1
          title: Version
          type: string
      required:
        - skill_id
        - type
      title: SkillParams
      type: object
    ClearThinking20251015:
      additionalProperties: false
      properties:
        keep:
          anyOf:
            - discriminator:
                mapping:
                  all:
                    $ref: '#/components/schemas/AllThinkingTurns'
                  thinking_turns:
                    $ref: '#/components/schemas/ThinkingTurns'
                propertyName: type
              oneOf:
                - $ref: '#/components/schemas/ThinkingTurns'
                - $ref: '#/components/schemas/AllThinkingTurns'
            - const: all
              type: string
          description: 保留思考块的最近助手回合数。较早的回合将移除其思考块。
          title: Keep
        type:
          const: clear_thinking_20251015
          title: Type
          type: string
      required:
        - type
      title: ClearThinking20251015
      type: object
    ClearToolUses20250919:
      additionalProperties: false
      properties:
        clear_at_least:
          anyOf:
            - $ref: '#/components/schemas/InputTokensClearAtLeast'
            - type: 'null'
          description: 触发时必须清除的最小令牌数。只有在至少能够移除这么多令牌时才会修改上下文。
        clear_tool_inputs:
          anyOf:
            - type: boolean
            - items:
                type: string
              type: array
            - type: 'null'
          description: 是否清除所有工具输入（布尔值）或要清除的特定工具输入（列表）
          title: Clear Tool Inputs
        exclude_tools:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          description: 保留不被清除的工具名称
          title: Exclude Tools
        keep:
          description: 对话中要保留的工具使用次数
          discriminator:
            mapping:
              tool_uses:
                $ref: '#/components/schemas/ToolUsesKeep'
            propertyName: type
          oneOf:
            - $ref: '#/components/schemas/ToolUsesKeep'
          title: Keep
        trigger:
          description: 触发上下文管理策略的条件
          discriminator:
            mapping:
              input_tokens:
                $ref: '#/components/schemas/InputTokensTrigger'
              tool_uses:
                $ref: '#/components/schemas/ToolUsesTrigger'
            propertyName: type
          oneOf:
            - $ref: '#/components/schemas/InputTokensTrigger'
            - $ref: '#/components/schemas/ToolUsesTrigger'
          title: Trigger
        type:
          const: clear_tool_uses_20250919
          title: Type
          type: string
      required:
        - type
      title: ClearToolUses20250919
      type: object
    RequestMCPServerToolConfiguration:
      additionalProperties: false
      properties:
        allowed_tools:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Allowed Tools
        enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Enabled
      title: RequestMCPServerToolConfiguration
      type: object
    JSONOutputFormat:
      additionalProperties: false
      properties:
        schema:
          description: 用于定义 Claude 输出的 JSON schema。
          type: object
        type:
          const: json_schema
          title: Type
          type: string
      required:
        - schema
        - type
      title: JSONOutputFormat
      type: object
    TokenTaskBudget:
      additionalProperties: false
      properties:
        remaining:
          description: 剩余可用 token 预算。
          minimum: 0
          title: Remaining
          type: integer
        total:
          description: 跨上下文会话的总 token 预算。
          minimum: 20000
          title: Total
          type: integer
        type:
          const: tokens
          title: Type
          type: string
      required:
        - total
        - type
      title: TokenTaskBudget
      type: object
    CacheControlEphemeral:
      additionalProperties: false
      properties:
        type:
          const: ephemeral
          title: Type
          type: string
      required:
        - type
      title: CacheControlEphemeral
      type: object
    RequestCharLocationCitation:
      additionalProperties: false
      properties:
        cited_text:
          title: Cited Text
          type: string
        document_index:
          minimum: 0
          title: Document Index
          type: integer
        document_title:
          anyOf:
            - maxLength: 255
              minLength: 1
              type: string
            - type: 'null'
          title: Document Title
        end_char_index:
          title: End Char Index
          type: integer
        start_char_index:
          minimum: 0
          title: Start Char Index
          type: integer
        type:
          const: char_location
          title: Type
          type: string
      required:
        - cited_text
        - document_index
        - document_title
        - end_char_index
        - start_char_index
        - type
      title: Character location
      type: object
    RequestContentBlockLocationCitation:
      additionalProperties: false
      properties:
        cited_text:
          title: Cited Text
          type: string
        document_index:
          minimum: 0
          title: Document Index
          type: integer
        document_title:
          anyOf:
            - maxLength: 255
              minLength: 1
              type: string
            - type: 'null'
          title: Document Title
        end_block_index:
          title: End Block Index
          type: integer
        start_block_index:
          minimum: 0
          title: Start Block Index
          type: integer
        type:
          const: content_block_location
          title: Type
          type: string
      required:
        - cited_text
        - document_index
        - document_title
        - end_block_index
        - start_block_index
        - type
      title: Content block location
      type: object
    RequestPageLocationCitation:
      additionalProperties: false
      properties:
        cited_text:
          title: Cited Text
          type: string
        document_index:
          minimum: 0
          title: Document Index
          type: integer
        document_title:
          anyOf:
            - maxLength: 255
              minLength: 1
              type: string
            - type: 'null'
          title: Document Title
        end_page_number:
          title: End Page Number
          type: integer
        start_page_number:
          minimum: 1
          title: Start Page Number
          type: integer
        type:
          const: page_location
          title: Type
          type: string
      required:
        - cited_text
        - document_index
        - document_title
        - end_page_number
        - start_page_number
        - type
      title: Page location
      type: object
    RequestSearchResultLocationCitation:
      additionalProperties: false
      properties:
        cited_text:
          title: Cited Text
          type: string
        end_block_index:
          title: End Block Index
          type: integer
        search_result_index:
          minimum: 0
          title: Search Result Index
          type: integer
        source:
          title: Source
          type: string
        start_block_index:
          minimum: 0
          title: Start Block Index
          type: integer
        title:
          anyOf:
            - type: string
            - type: 'null'
          title: Title
        type:
          const: search_result_location
          title: Type
          type: string
      required:
        - cited_text
        - end_block_index
        - search_result_index
        - source
        - start_block_index
        - title
        - type
      title: RequestSearchResultLocationCitation
      type: object
    RequestWebSearchResultLocationCitation:
      additionalProperties: false
      properties:
        cited_text:
          title: Cited Text
          type: string
        encrypted_index:
          title: Encrypted Index
          type: string
        title:
          anyOf:
            - maxLength: 512
              minLength: 1
              type: string
            - type: 'null'
          title: Title
        type:
          const: web_search_result_location
          title: Type
          type: string
        url:
          maxLength: 2048
          minLength: 1
          title: Url
          type: string
      required:
        - cited_text
        - encrypted_index
        - title
        - type
        - url
      title: RequestWebSearchResultLocationCitation
      type: object
    InputSchema:
      additionalProperties: true
      properties:
        properties:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Properties
        required:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Required
        type:
          const: object
          title: Type
          type: string
      required:
        - type
      title: InputSchema
      type: object
    UserLocation:
      additionalProperties: false
      properties:
        city:
          anyOf:
            - maxLength: 255
              minLength: 1
              type: string
            - type: 'null'
          description: 用户所在的城市。
          examples:
            - New York
            - Tokyo
            - Los Angeles
          title: City
        country:
          anyOf:
            - maxLength: 2
              minLength: 2
              type: string
            - type: 'null'
          description: >-
            用户的两位字母 [ISO
            国家代码](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)。
          examples:
            - US
            - JP
            - GB
          title: Country
        region:
          anyOf:
            - maxLength: 255
              minLength: 1
              type: string
            - type: 'null'
          description: 用户所在的地区。
          examples:
            - California
            - Ontario
            - Wales
          title: Region
        timezone:
          anyOf:
            - maxLength: 255
              minLength: 1
              type: string
            - type: 'null'
          description: 用户的 [IANA 时区](https://nodatime.org/TimeZones)。
          examples:
            - America/New_York
            - Asia/Tokyo
            - Europe/London
          title: Timezone
        type:
          const: approximate
          title: Type
          type: string
      required:
        - type
      title: UserLocation
      type: object
    RequestCitationsConfig:
      additionalProperties: false
      properties:
        enabled:
          title: Enabled
          type: boolean
      title: RequestCitationsConfig
      type: object
    ResponseCharLocationCitation:
      properties:
        cited_text:
          title: Cited Text
          type: string
        document_index:
          minimum: 0
          title: Document Index
          type: integer
        document_title:
          anyOf:
            - type: string
            - type: 'null'
          title: Document Title
        end_char_index:
          title: End Char Index
          type: integer
        file_id:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: File Id
        start_char_index:
          minimum: 0
          title: Start Char Index
          type: integer
        type:
          const: char_location
          default: char_location
          title: Type
          type: string
      required:
        - cited_text
        - document_index
        - document_title
        - end_char_index
        - file_id
        - start_char_index
        - type
      title: Character location
      type: object
    ResponseContentBlockLocationCitation:
      properties:
        cited_text:
          title: Cited Text
          type: string
        document_index:
          minimum: 0
          title: Document Index
          type: integer
        document_title:
          anyOf:
            - type: string
            - type: 'null'
          title: Document Title
        end_block_index:
          title: End Block Index
          type: integer
        file_id:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: File Id
        start_block_index:
          minimum: 0
          title: Start Block Index
          type: integer
        type:
          const: content_block_location
          default: content_block_location
          title: Type
          type: string
      required:
        - cited_text
        - document_index
        - document_title
        - end_block_index
        - file_id
        - start_block_index
        - type
      title: Content block location
      type: object
    ResponsePageLocationCitation:
      properties:
        cited_text:
          title: Cited Text
          type: string
        document_index:
          minimum: 0
          title: Document Index
          type: integer
        document_title:
          anyOf:
            - type: string
            - type: 'null'
          title: Document Title
        end_page_number:
          title: End Page Number
          type: integer
        file_id:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: File Id
        start_page_number:
          minimum: 1
          title: Start Page Number
          type: integer
        type:
          const: page_location
          default: page_location
          title: Type
          type: string
      required:
        - cited_text
        - document_index
        - document_title
        - end_page_number
        - file_id
        - start_page_number
        - type
      title: Page location
      type: object
    ResponseSearchResultLocationCitation:
      properties:
        cited_text:
          title: Cited Text
          type: string
        end_block_index:
          title: End Block Index
          type: integer
        search_result_index:
          minimum: 0
          title: Search Result Index
          type: integer
        source:
          title: Source
          type: string
        start_block_index:
          minimum: 0
          title: Start Block Index
          type: integer
        title:
          anyOf:
            - type: string
            - type: 'null'
          title: Title
        type:
          const: search_result_location
          default: search_result_location
          title: Type
          type: string
      required:
        - cited_text
        - end_block_index
        - search_result_index
        - source
        - start_block_index
        - title
        - type
      title: ResponseSearchResultLocationCitation
      type: object
    ResponseWebSearchResultLocationCitation:
      properties:
        cited_text:
          title: Cited Text
          type: string
        encrypted_index:
          title: Encrypted Index
          type: string
        title:
          anyOf:
            - maxLength: 512
              type: string
            - type: 'null'
          title: Title
        type:
          const: web_search_result_location
          default: web_search_result_location
          title: Type
          type: string
        url:
          title: Url
          type: string
      required:
        - cited_text
        - encrypted_index
        - title
        - type
        - url
      title: ResponseWebSearchResultLocationCitation
      type: object
    ResponseWebSearchToolResultError:
      properties:
        error_code:
          $ref: '#/components/schemas/WebSearchToolResultErrorCode'
        type:
          const: web_search_tool_result_error
          default: web_search_tool_result_error
          title: Type
          type: string
      required:
        - error_code
        - type
      title: ResponseWebSearchToolResultError
      type: object
    ResponseWebSearchResultBlock:
      properties:
        encrypted_content:
          title: Encrypted Content
          type: string
        page_age:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Page Age
        title:
          title: Title
          type: string
        type:
          const: web_search_result
          default: web_search_result
          title: Type
          type: string
        url:
          title: Url
          type: string
      required:
        - encrypted_content
        - page_age
        - title
        - type
        - url
      title: ResponseWebSearchResultBlock
      type: object
    ResponseWebFetchToolResultError:
      properties:
        error_code:
          $ref: '#/components/schemas/WebFetchToolResultErrorCode'
        type:
          const: web_fetch_tool_result_error
          default: web_fetch_tool_result_error
          title: Type
          type: string
      required:
        - error_code
        - type
      title: ResponseWebFetchToolResultError
      type: object
    ResponseWebFetchResultBlock:
      properties:
        content:
          $ref: '#/components/schemas/ResponseDocumentBlock'
        retrieved_at:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: 检索内容时的 ISO 8601 时间戳
          title: Retrieved At
        type:
          const: web_fetch_result
          default: web_fetch_result
          title: Type
          type: string
        url:
          description: 获取的内容 URL
          title: Url
          type: string
      required:
        - content
        - retrieved_at
        - type
        - url
      title: ResponseWebFetchResultBlock
      type: object
    ResponseCodeExecutionToolResultError:
      properties:
        error_code:
          $ref: '#/components/schemas/CodeExecutionToolResultErrorCode'
        type:
          const: code_execution_tool_result_error
          default: code_execution_tool_result_error
          title: Type
          type: string
      required:
        - error_code
        - type
      title: Code execution tool error
      type: object
    ResponseCodeExecutionResultBlock:
      properties:
        content:
          items:
            $ref: '#/components/schemas/ResponseCodeExecutionOutputBlock'
          title: Content
          type: array
        return_code:
          title: Return Code
          type: integer
        stderr:
          title: Stderr
          type: string
        stdout:
          title: Stdout
          type: string
        type:
          const: code_execution_result
          default: code_execution_result
          title: Type
          type: string
      required:
        - content
        - return_code
        - stderr
        - stdout
        - type
      title: Code execution result
      type: object
    ResponseBashCodeExecutionToolResultError:
      properties:
        error_code:
          $ref: '#/components/schemas/BashCodeExecutionToolResultErrorCode'
        type:
          const: bash_code_execution_tool_result_error
          default: bash_code_execution_tool_result_error
          title: Type
          type: string
      required:
        - error_code
        - type
      title: ResponseBashCodeExecutionToolResultError
      type: object
    ResponseBashCodeExecutionResultBlock:
      properties:
        content:
          items:
            $ref: '#/components/schemas/ResponseBashCodeExecutionOutputBlock'
          title: Content
          type: array
        return_code:
          title: Return Code
          type: integer
        stderr:
          title: Stderr
          type: string
        stdout:
          title: Stdout
          type: string
        type:
          const: bash_code_execution_result
          default: bash_code_execution_result
          title: Type
          type: string
      required:
        - content
        - return_code
        - stderr
        - stdout
        - type
      title: ResponseBashCodeExecutionResultBlock
      type: object
    ResponseTextEditorCodeExecutionToolResultError:
      properties:
        error_code:
          $ref: '#/components/schemas/TextEditorCodeExecutionToolResultErrorCode'
        error_message:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Error Message
        type:
          const: text_editor_code_execution_tool_result_error
          default: text_editor_code_execution_tool_result_error
          title: Type
          type: string
      required:
        - error_code
        - error_message
        - type
      title: ResponseTextEditorCodeExecutionToolResultError
      type: object
    ResponseTextEditorCodeExecutionViewResultBlock:
      properties:
        content:
          title: Content
          type: string
        file_type:
          enum:
            - text
            - image
            - pdf
          title: File Type
          type: string
        num_lines:
          anyOf:
            - type: integer
            - type: 'null'
          default: null
          title: Num Lines
        start_line:
          anyOf:
            - type: integer
            - type: 'null'
          default: null
          title: Start Line
        total_lines:
          anyOf:
            - type: integer
            - type: 'null'
          default: null
          title: Total Lines
        type:
          const: text_editor_code_execution_view_result
          default: text_editor_code_execution_view_result
          title: Type
          type: string
      required:
        - content
        - file_type
        - num_lines
        - start_line
        - total_lines
        - type
      title: ResponseTextEditorCodeExecutionViewResultBlock
      type: object
    ResponseTextEditorCodeExecutionCreateResultBlock:
      properties:
        is_file_update:
          title: Is File Update
          type: boolean
        type:
          const: text_editor_code_execution_create_result
          default: text_editor_code_execution_create_result
          title: Type
          type: string
      required:
        - is_file_update
        - type
      title: ResponseTextEditorCodeExecutionCreateResultBlock
      type: object
    ResponseTextEditorCodeExecutionStrReplaceResultBlock:
      properties:
        lines:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          default: null
          title: Lines
        new_lines:
          anyOf:
            - type: integer
            - type: 'null'
          default: null
          title: New Lines
        new_start:
          anyOf:
            - type: integer
            - type: 'null'
          default: null
          title: New Start
        old_lines:
          anyOf:
            - type: integer
            - type: 'null'
          default: null
          title: Old Lines
        old_start:
          anyOf:
            - type: integer
            - type: 'null'
          default: null
          title: Old Start
        type:
          const: text_editor_code_execution_str_replace_result
          default: text_editor_code_execution_str_replace_result
          title: Type
          type: string
      required:
        - lines
        - new_lines
        - new_start
        - old_lines
        - old_start
        - type
      title: ResponseTextEditorCodeExecutionStrReplaceResultBlock
      type: object
    CacheCreation:
      properties:
        ephemeral_1h_input_tokens:
          default: 0
          description: 用于创建 1 小时缓存条目的输入令牌数。
          minimum: 0
          title: Ephemeral 1H Input Tokens
          type: integer
        ephemeral_5m_input_tokens:
          default: 0
          description: 用于创建 5 分钟缓存条目的输入令牌数。
          minimum: 0
          title: Ephemeral 5M Input Tokens
          type: integer
      required:
        - ephemeral_1h_input_tokens
        - ephemeral_5m_input_tokens
      title: CacheCreation
      type: object
    ServerToolUsage:
      properties:
        web_fetch_requests:
          default: 0
          description: 网络获取工具请求数。
          examples:
            - 2
          minimum: 0
          title: Web Fetch Requests
          type: integer
        web_search_requests:
          default: 0
          description: 网络搜索工具请求数。
          examples:
            - 0
          minimum: 0
          title: Web Search Requests
          type: integer
      required:
        - web_fetch_requests
        - web_search_requests
      title: ServerToolUsage
      type: object
    ResponseClearThinking20251015Edit:
      properties:
        cleared_input_tokens:
          description: 此编辑清除的输入令牌数。
          minimum: 0
          title: Cleared Input Tokens
          type: integer
        cleared_thinking_turns:
          description: 被清除的思考回合数。
          minimum: 0
          title: Cleared Thinking Turns
          type: integer
        type:
          const: clear_thinking_20251015
          default: clear_thinking_20251015
          description: 应用的上下文管理编辑类型。
          title: Type
          type: string
      required:
        - cleared_input_tokens
        - cleared_thinking_turns
        - type
      title: ResponseClearThinking20251015Edit
      type: object
    ResponseClearToolUses20250919Edit:
      properties:
        cleared_input_tokens:
          description: 此编辑清除的输入令牌数。
          minimum: 0
          title: Cleared Input Tokens
          type: integer
        cleared_tool_uses:
          description: 被清除的工具使用次数。
          minimum: 0
          title: Cleared Tool Uses
          type: integer
        type:
          const: clear_tool_uses_20250919
          default: clear_tool_uses_20250919
          description: 应用的上下文管理编辑类型。
          title: Type
          type: string
      required:
        - cleared_input_tokens
        - cleared_tool_uses
        - type
      title: ResponseClearToolUses20250919Edit
      type: object
    Skill:
      description: 容器中加载的技能（响应模型）。
      properties:
        skill_id:
          description: 技能 ID
          maxLength: 64
          minLength: 1
          title: Skill Id
          type: string
        type:
          description: 技能类型 - 'anthropic'（内置）或 'custom'（用户定义）
          enum:
            - anthropic
            - custom
          title: Type
          type: string
        version:
          description: 技能版本或 'latest' 表示最新版本
          maxLength: 64
          minLength: 1
          title: Version
          type: string
      required:
        - skill_id
        - type
        - version
      title: Skill
      type: object
    RequestBashCodeExecutionToolResultError:
      additionalProperties: false
      properties:
        error_code:
          $ref: '#/components/schemas/BashCodeExecutionToolResultErrorCode'
        type:
          const: bash_code_execution_tool_result_error
          title: Type
          type: string
      required:
        - error_code
        - type
      title: RequestBashCodeExecutionToolResultError
      type: object
    RequestBashCodeExecutionResultBlock:
      additionalProperties: false
      properties:
        content:
          items:
            $ref: '#/components/schemas/RequestBashCodeExecutionOutputBlock'
          title: Content
          type: array
        return_code:
          title: Return Code
          type: integer
        stderr:
          title: Stderr
          type: string
        stdout:
          title: Stdout
          type: string
        type:
          const: bash_code_execution_result
          title: Type
          type: string
      required:
        - content
        - return_code
        - stderr
        - stdout
        - type
      title: RequestBashCodeExecutionResultBlock
      type: object
    RequestCodeExecutionToolResultError:
      additionalProperties: false
      properties:
        error_code:
          $ref: '#/components/schemas/CodeExecutionToolResultErrorCode'
        type:
          const: code_execution_tool_result_error
          title: Type
          type: string
      required:
        - error_code
        - type
      title: Code execution tool error
      type: object
    RequestCodeExecutionResultBlock:
      additionalProperties: false
      properties:
        content:
          items:
            $ref: '#/components/schemas/RequestCodeExecutionOutputBlock'
          title: Content
          type: array
        return_code:
          title: Return Code
          type: integer
        stderr:
          title: Stderr
          type: string
        stdout:
          title: Stdout
          type: string
        type:
          const: code_execution_result
          title: Type
          type: string
      required:
        - content
        - return_code
        - stderr
        - stdout
        - type
      title: Code execution result
      type: object
    Base64PDFSource:
      additionalProperties: false
      properties:
        data:
          format: byte
          title: Data
          type: string
        media_type:
          const: application/pdf
          title: Media Type
          type: string
        type:
          const: base64
          title: Type
          type: string
      required:
        - data
        - media_type
        - type
      title: PDF (base64)
      type: object
    ContentBlockSource:
      additionalProperties: false
      properties:
        content:
          anyOf:
            - type: string
            - items:
                discriminator:
                  mapping:
                    image:
                      $ref: '#/components/schemas/RequestImageBlock'
                    text:
                      $ref: '#/components/schemas/RequestTextBlock'
                  propertyName: type
                oneOf:
                  - $ref: '#/components/schemas/RequestTextBlock'
                  - $ref: '#/components/schemas/RequestImageBlock'
              type: array
          title: Content
        type:
          const: content
          title: Type
          type: string
      required:
        - content
        - type
      title: Content block
      type: object
    FileDocumentSource:
      additionalProperties: false
      properties:
        file_id:
          title: File Id
          type: string
        type:
          const: file
          title: Type
          type: string
      required:
        - file_id
        - type
      title: File document
      type: object
    PlainTextSource:
      additionalProperties: false
      properties:
        data:
          title: Data
          type: string
        media_type:
          const: text/plain
          title: Media Type
          type: string
        type:
          const: text
          title: Type
          type: string
      required:
        - data
        - media_type
        - type
      title: Plain text
      type: object
    Base64ImageSource:
      additionalProperties: false
      properties:
        data:
          format: byte
          title: Data
          type: string
        media_type:
          enum:
            - image/jpeg
            - image/png
            - image/gif
            - image/webp
          title: Media Type
          type: string
        type:
          const: base64
          title: Type
          type: string
      required:
        - data
        - media_type
        - type
      title: Base64ImageSource
      type: object
    FileImageSource:
      additionalProperties: false
      properties:
        file_id:
          title: File Id
          type: string
        type:
          const: file
          title: Type
          type: string
      required:
        - file_id
        - type
      title: FileImageSource
      type: object
    RequestTextEditorCodeExecutionToolResultError:
      additionalProperties: false
      properties:
        error_code:
          $ref: '#/components/schemas/TextEditorCodeExecutionToolResultErrorCode'
        error_message:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Message
        type:
          const: text_editor_code_execution_tool_result_error
          title: Type
          type: string
      required:
        - error_code
        - type
      title: RequestTextEditorCodeExecutionToolResultError
      type: object
    RequestTextEditorCodeExecutionViewResultBlock:
      additionalProperties: false
      properties:
        content:
          title: Content
          type: string
        file_type:
          enum:
            - text
            - image
            - pdf
          title: File Type
          type: string
        num_lines:
          anyOf:
            - type: integer
            - type: 'null'
          title: Num Lines
        start_line:
          anyOf:
            - type: integer
            - type: 'null'
          title: Start Line
        total_lines:
          anyOf:
            - type: integer
            - type: 'null'
          title: Total Lines
        type:
          const: text_editor_code_execution_view_result
          title: Type
          type: string
      required:
        - content
        - file_type
        - type
      title: RequestTextEditorCodeExecutionViewResultBlock
      type: object
    RequestTextEditorCodeExecutionCreateResultBlock:
      additionalProperties: false
      properties:
        is_file_update:
          title: Is File Update
          type: boolean
        type:
          const: text_editor_code_execution_create_result
          title: Type
          type: string
      required:
        - is_file_update
        - type
      title: RequestTextEditorCodeExecutionCreateResultBlock
      type: object
    RequestTextEditorCodeExecutionStrReplaceResultBlock:
      additionalProperties: false
      properties:
        lines:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Lines
        new_lines:
          anyOf:
            - type: integer
            - type: 'null'
          title: New Lines
        new_start:
          anyOf:
            - type: integer
            - type: 'null'
          title: New Start
        old_lines:
          anyOf:
            - type: integer
            - type: 'null'
          title: Old Lines
        old_start:
          anyOf:
            - type: integer
            - type: 'null'
          title: Old Start
        type:
          const: text_editor_code_execution_str_replace_result
          title: Type
          type: string
      required:
        - type
      title: RequestTextEditorCodeExecutionStrReplaceResultBlock
      type: object
    RequestWebFetchToolResultError:
      additionalProperties: false
      properties:
        error_code:
          $ref: '#/components/schemas/WebFetchToolResultErrorCode'
        type:
          const: web_fetch_tool_result_error
          title: Type
          type: string
      required:
        - error_code
        - type
      title: RequestWebFetchToolResultError
      type: object
    RequestWebFetchResultBlock:
      additionalProperties: false
      properties:
        content:
          $ref: '#/components/schemas/RequestDocumentBlock'
        retrieved_at:
          anyOf:
            - type: string
            - type: 'null'
          description: 检索内容时的 ISO 8601 时间戳
          title: Retrieved At
        type:
          const: web_fetch_result
          title: Type
          type: string
        url:
          description: 获取的内容 URL
          title: Url
          type: string
      required:
        - content
        - type
        - url
      title: RequestWebFetchResultBlock
      type: object
    RequestWebSearchResultBlock:
      additionalProperties: false
      properties:
        encrypted_content:
          title: Encrypted Content
          type: string
        page_age:
          anyOf:
            - type: string
            - type: 'null'
          title: Page Age
        title:
          title: Title
          type: string
        type:
          const: web_search_result
          title: Type
          type: string
        url:
          title: Url
          type: string
      required:
        - encrypted_content
        - title
        - type
        - url
      title: RequestWebSearchResultBlock
      type: object
    RequestWebSearchToolResultError:
      additionalProperties: false
      properties:
        error_code:
          $ref: '#/components/schemas/WebSearchToolResultErrorCode'
        type:
          const: web_search_tool_result_error
          title: Type
          type: string
      required:
        - error_code
        - type
      title: RequestWebSearchToolResultError
      type: object
    AllThinkingTurns:
      additionalProperties: false
      properties:
        type:
          const: all
          title: Type
          type: string
      required:
        - type
      title: AllThinkingTurns
      type: object
    ThinkingTurns:
      additionalProperties: false
      properties:
        type:
          const: thinking_turns
          title: Type
          type: string
        value:
          minimum: 1
          title: Value
          type: integer
      required:
        - type
        - value
      title: ThinkingTurns
      type: object
    InputTokensClearAtLeast:
      additionalProperties: false
      properties:
        type:
          const: input_tokens
          title: Type
          type: string
        value:
          minimum: 0
          title: Value
          type: integer
      required:
        - type
        - value
      title: InputTokensClearAtLeast
      type: object
    ToolUsesKeep:
      additionalProperties: false
      properties:
        type:
          const: tool_uses
          title: Type
          type: string
        value:
          minimum: 0
          title: Value
          type: integer
      required:
        - type
        - value
      title: ToolUsesKeep
      type: object
    InputTokensTrigger:
      additionalProperties: false
      properties:
        type:
          const: input_tokens
          title: Type
          type: string
        value:
          minimum: 1
          title: Value
          type: integer
      required:
        - type
        - value
      title: InputTokensTrigger
      type: object
    ToolUsesTrigger:
      additionalProperties: false
      properties:
        type:
          const: tool_uses
          title: Type
          type: string
        value:
          minimum: 1
          title: Value
          type: integer
      required:
        - type
        - value
      title: ToolUsesTrigger
      type: object
    WebSearchToolResultErrorCode:
      enum:
        - invalid_tool_input
        - unavailable
        - max_uses_exceeded
        - too_many_requests
        - query_too_long
      title: WebSearchToolResultErrorCode
      type: string
    WebFetchToolResultErrorCode:
      enum:
        - invalid_tool_input
        - url_too_long
        - url_not_allowed
        - url_not_accessible
        - unsupported_content_type
        - too_many_requests
        - max_uses_exceeded
        - unavailable
      title: WebFetchToolResultErrorCode
      type: string
    ResponseDocumentBlock:
      properties:
        citations:
          anyOf:
            - $ref: '#/components/schemas/ResponseCitationsConfig'
            - type: 'null'
          default: null
          description: 文档的引用配置
        source:
          discriminator:
            mapping:
              base64:
                $ref: '#/components/schemas/Base64PDFSource'
              text:
                $ref: '#/components/schemas/PlainTextSource'
            propertyName: type
          oneOf:
            - $ref: '#/components/schemas/Base64PDFSource'
            - $ref: '#/components/schemas/PlainTextSource'
          title: Source
        title:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: 文档的标题
          title: Title
        type:
          const: document
          default: document
          title: Type
          type: string
      required:
        - citations
        - source
        - title
        - type
      title: ResponseDocumentBlock
      type: object
    CodeExecutionToolResultErrorCode:
      enum:
        - invalid_tool_input
        - unavailable
        - too_many_requests
        - execution_time_exceeded
      title: CodeExecutionToolResultErrorCode
      type: string
    ResponseCodeExecutionOutputBlock:
      properties:
        file_id:
          title: File Id
          type: string
        type:
          const: code_execution_output
          default: code_execution_output
          title: Type
          type: string
      required:
        - file_id
        - type
      title: ResponseCodeExecutionOutputBlock
      type: object
    BashCodeExecutionToolResultErrorCode:
      enum:
        - invalid_tool_input
        - unavailable
        - too_many_requests
        - execution_time_exceeded
        - output_file_too_large
      title: BashCodeExecutionToolResultErrorCode
      type: string
    ResponseBashCodeExecutionOutputBlock:
      properties:
        file_id:
          title: File Id
          type: string
        type:
          const: bash_code_execution_output
          default: bash_code_execution_output
          title: Type
          type: string
      required:
        - file_id
        - type
      title: ResponseBashCodeExecutionOutputBlock
      type: object
    TextEditorCodeExecutionToolResultErrorCode:
      enum:
        - invalid_tool_input
        - unavailable
        - too_many_requests
        - execution_time_exceeded
        - file_not_found
      title: TextEditorCodeExecutionToolResultErrorCode
      type: string
    RequestBashCodeExecutionOutputBlock:
      additionalProperties: false
      properties:
        file_id:
          title: File Id
          type: string
        type:
          const: bash_code_execution_output
          title: Type
          type: string
      required:
        - file_id
        - type
      title: RequestBashCodeExecutionOutputBlock
      type: object
    RequestCodeExecutionOutputBlock:
      additionalProperties: false
      properties:
        file_id:
          title: File Id
          type: string
        type:
          const: code_execution_output
          title: Type
          type: string
      required:
        - file_id
        - type
      title: RequestCodeExecutionOutputBlock
      type: object
    ResponseCitationsConfig:
      properties:
        enabled:
          default: false
          title: Enabled
          type: boolean
      required:
        - enabled
      title: ResponseCitationsConfig
      type: object
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: |-
        ##所有接口均需要使用Bearer Token进行认证##

        **获取 API Key：**

        访问 [API Key 管理页面](https://evolink.ai/dashboard/keys) 获取您的 API Key

        **使用时在请求头中添加：**
        ```
        Authorization: Bearer YOUR_API_KEY
        ```

````