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

# claude-fable-5-1

> 发送文本、图片、历史助手消息和工具结果。Claude Fable 5.1 可返回文本、Thinking 和工具调用内容块。

Adaptive Thinking 始终开启。请省略 `thinking` 或将类型设为 `adaptive`，并使用 `output_config.effort` 控制深度。强制工具调用和非默认采样值会返回 `400`。




## OpenAPI

````yaml zh/api-reference/model-api/anthropic/openapi/claude-fable-5-1/openapi.yaml POST /v1/messages
openapi: 3.1.0
info:
  title: Claude Fable 5.1
  description: >-
    通过 AnyFast 调用 Anthropic Claude Fable 5.1。模型具备 1M Token 上下文，最大支持 128K 输出
    Token，并始终使用 Adaptive Thinking。
  version: 1.0.0
servers:
  - url: https://www.anyfast.ai
security:
  - bearerAuth: []
paths:
  /v1/messages:
    post:
      summary: 创建消息
      description: >
        发送文本、图片、历史助手消息和工具结果。Claude Fable 5.1 可返回文本、Thinking 和工具调用内容块。


        Adaptive Thinking 始终开启。请省略 `thinking` 或将类型设为 `adaptive`，并使用
        `output_config.effort` 控制深度。强制工具调用和非默认采样值会返回 `400`。
      operationId: createMessageClaudeFable51Zh
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - model
                - max_tokens
                - messages
              properties:
                model:
                  type: string
                  enum:
                    - claude-fable-5-1
                  description: 模型 ID。
                  example: claude-fable-5-1
                messages:
                  type: array
                  minItems: 1
                  description: >-
                    对话消息。多轮对话中应原样回传 Assistant 内容块，包括 Thinking 块。不要预填最后一条
                    Assistant 回答。
                  items:
                    type: object
                    required:
                      - role
                      - content
                    properties:
                      role:
                        type: string
                        enum:
                          - user
                          - assistant
                        description: 消息作者。
                      content:
                        oneOf:
                          - type: string
                          - type: array
                            items:
                              type: object
                              properties:
                                type:
                                  type: string
                                  enum:
                                    - text
                                    - image
                                    - tool_result
                                    - thinking
                                    - tool_use
                                text:
                                  type: string
                                source:
                                  type: object
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - base64
                                        - url
                                    media_type:
                                      type: string
                                    data:
                                      type: string
                                    url:
                                      type: string
                                      format: uri
                                tool_use_id:
                                  type: string
                                content:
                                  oneOf:
                                    - type: string
                                    - type: array
                                      items:
                                        type: object
                                is_error:
                                  type: boolean
                                thinking:
                                  type: string
                                signature:
                                  type: string
                                id:
                                  type: string
                                name:
                                  type: string
                                input:
                                  type: object
                                  additionalProperties: true
                        description: 文本或内容块数组。
                  example:
                    - role: user
                      content: 找出这份迁移计划中风险最高的几个假设。
                max_tokens:
                  type: integer
                  minimum: 1
                  maximum: 128000
                  description: Thinking 与可见回答合计允许使用的最大输出 Token 数。
                  example: 4096
                system:
                  oneOf:
                    - type: string
                    - type: array
                      items:
                        type: object
                        properties:
                          type:
                            type: string
                            enum:
                              - text
                          text:
                            type: string
                  description: 系统提示词。回传 Fable 5.1 Thinking 块时，应保持系统提示词逐字节不变。
                metadata:
                  type: object
                  properties:
                    user_id:
                      type: string
                      description: 与请求关联的外部用户标识。
                  description: 请求元数据。
                stop_sequences:
                  type: array
                  items:
                    type: string
                  description: 触发停止生成的自定义文本序列。
                stream:
                  type: boolean
                  default: false
                  description: 是否通过 SSE 流式返回消息事件。
                tools:
                  type: array
                  description: 模型可使用的工具定义。回传 Fable 5.1 Thinking 块时，应保持此数组不变。
                  items:
                    type: object
                    required:
                      - name
                      - input_schema
                    properties:
                      name:
                        type: string
                        description: 工具名称。
                      description:
                        type: string
                        description: 工具的用途和使用时机。
                      input_schema:
                        type: object
                        description: 工具输入的 JSON Schema。
                        additionalProperties: true
                tool_choice:
                  type: object
                  required:
                    - type
                  properties:
                    type:
                      type: string
                      enum:
                        - auto
                        - none
                      default: auto
                      description: >-
                        `auto` 允许 Claude 决定是否调用工具；`none` 禁止工具调用。强制 `any` 或指定
                        `tool` 会返回 400。
                  description: 控制模型是否可以使用工具。
                output_config:
                  type: object
                  properties:
                    effort:
                      type: string
                      enum:
                        - low
                        - medium
                        - high
                        - xhigh
                        - max
                      default: high
                      description: 控制 Adaptive Thinking 的深度、延迟和 Token 使用量。
                  description: 输出控制配置。Claude Fable 5.1 默认使用 high effort。
                thinking:
                  type: object
                  properties:
                    type:
                      type: string
                      enum:
                        - adaptive
                      default: adaptive
                      description: Adaptive 是唯一支持的 Thinking 模式。
                  description: >-
                    请省略此字段或使用 Adaptive Thinking。手动 `enabled` 加 `budget_tokens` 和
                    `disabled` 均会返回 400。
                temperature:
                  type: number
                  minimum: 1
                  maximum: 1
                  default: 1
                  deprecated: true
                  description: 不支持自定义 temperature。仅为向后兼容接受 1，正常请求请省略。
                top_p:
                  type: number
                  minimum: 0.99
                  maximum: 1
                  default: 1
                  deprecated: true
                  description: 不支持自定义核采样。仅为向后兼容接受 0.99–1，正常请求请省略。
                top_k:
                  type: integer
                  deprecated: true
                  description: 不支持。传入任何值都会返回 400。
      responses:
        '200':
          description: 消息创建成功。安全分类器拒绝请求时同样返回 HTTP 200，并将 `stop_reason` 设为 `refusal`。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Message'
        '400':
          description: 请求无效，包括不支持的 Thinking 模式、强制工具调用、Assistant 预填、非默认采样值或已失效的 Thinking 块。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: 未授权
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: 触发速率限制
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      x-codeSamples:
        - lang: bash
          label: cURL
          source: |
            curl https://www.anyfast.ai/v1/messages \
              -H "Authorization: Bearer YOUR_API_KEY" \
              -H "Content-Type: application/json" \
              -d '{
                "model": "claude-fable-5-1",
                "max_tokens": 4096,
                "output_config": { "effort": "high" },
                "messages": [
                  { "role": "user", "content": "找出这份迁移计划中风险最高的几个假设。" }
                ]
              }'
components:
  schemas:
    Message:
      type: object
      required:
        - id
        - type
        - role
        - content
        - model
        - stop_reason
        - usage
      properties:
        id:
          type: string
          example: msg_01XFDUDYJgAACzvnptvVoYEL
        type:
          type: string
          enum:
            - message
        role:
          type: string
          enum:
            - assistant
        content:
          type: array
          items:
            type: object
            properties:
              type:
                type: string
                enum:
                  - text
                  - thinking
                  - tool_use
              text:
                type: string
              thinking:
                type: string
              signature:
                type: string
              id:
                type: string
              name:
                type: string
              input:
                type: object
                additionalProperties: true
          example:
            - type: text
              text: 风险最高的假设是所有客户端都能接受计划中的切换窗口。
        model:
          type: string
          example: claude-fable-5-1
        stop_reason:
          type: string
          enum:
            - end_turn
            - max_tokens
            - stop_sequence
            - tool_use
            - refusal
            - null
        stop_sequence:
          type: string
          nullable: true
        stop_details:
          type: object
          nullable: true
          additionalProperties: true
          description: 拒绝或其他停止条件的附加信息。
        usage:
          type: object
          properties:
            input_tokens:
              type: integer
            output_tokens:
              type: integer
            cache_creation_input_tokens:
              type: integer
            cache_read_input_tokens:
              type: integer
            cache_creation:
              type: object
              properties:
                ephemeral_1h_input_tokens:
                  type: integer
                ephemeral_5m_input_tokens:
                  type: integer
            output_tokens_details:
              type: object
              properties:
                thinking_tokens:
                  type: integer
    Error:
      type: object
      properties:
        type:
          type: string
          example: error
        error:
          type: object
          properties:
            type:
              type: string
              example: invalid_request_error
            message:
              type: string
              example: 请求参数无效
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````