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

# Claude Fable 5.1

> Claude Fable 5.1：面向高難度推理、長程代理式程式設計和多步驟研究的 100 萬上下文模型。

<link rel="alternate" hrefLang="en" href="https://mixroute.ai/docs/model-api/anthropic/claude-fable-5-1" />

<link rel="alternate" hrefLang="zh-Hans" href="https://mixroute.ai/docs/zh-hans/model-api/anthropic/claude-fable-5-1" />

<link rel="alternate" hrefLang="zh-Hant" href="https://mixroute.ai/docs/zh-hant/model-api/anthropic/claude-fable-5-1" />

<link rel="alternate" hrefLang="ja" href="https://mixroute.ai/docs/ja/model-api/anthropic/claude-fable-5-1" />

<link rel="alternate" hrefLang="x-default" href="https://mixroute.ai/docs/model-api/anthropic/claude-fable-5-1" />

Claude Fable 5.1 是 Anthropic 面向高難度推理和長程代理的高能力模型，面向高難度推理、長程代理式程式設計、多步驟研究與複雜知識工作。

可透過 MixRoute 的 Anthropic 相容 Messages API 呼叫 `claude-fable-5-1`，同時支援 OpenAI 相容的 Chat Completions API。

## 核心能力

* 長上下文 - 支援 100 萬 token 上下文與最大 128K 輸出
* 自適應思考 - 始終啟用自適應思考，預設 effort 為 high
* 長程任務 - 強化代理式程式設計、多步驟研究和文件密集型工作流程
* 多模態輸入 - 支援文字與圖像輸入，輸出文字
* 雙介面支援 - 可透過 Anthropic 相容 Messages 和 OpenAI 相容 Chat Completions 呼叫

## 快速範例

### Messages API

<Tabs>
  <Tab title="cURL">
    ```bash theme={null}
    curl "https://api.mixroute.ai/v1/messages" \
      -H "Authorization: Bearer YOUR_API_KEY" \
      -H "anthropic-version: 2023-06-01" \
      -H "Content-Type: application/json" \
      -d '{
      "model": "claude-fable-5-1",
      "max_tokens": 256,
      "messages": [
        {
          "role": "user",
          "content": "Explain quantum entanglement in simple terms."
        }
      ]
    }'
    ```
  </Tab>

  <Tab title="Python">
    ```python theme={null}
    from anthropic import Anthropic

    client = Anthropic(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai")

    message = client.messages.create(
        model="claude-fable-5-1",
        max_tokens=256,
        messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
    )

    print(message.content[0].text)
    ```
  </Tab>

  <Tab title="Streaming">
    ```python theme={null}
    from anthropic import Anthropic

    client = Anthropic(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai")

    with client.messages.stream(
        model="claude-fable-5-1",
        max_tokens=256,
        messages=[{"role": "user", "content": "Write a short poem about the sea."}],
    ) as stream:
        for text in stream.text_stream:
            print(text, end="")
    ```
  </Tab>
</Tabs>

### OpenAI 相容 API

<Tabs>
  <Tab title="cURL">
    ```bash theme={null}
    curl "https://api.mixroute.ai/v1/chat/completions" \
      -H "Authorization: Bearer YOUR_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
      "model": "claude-fable-5-1",
      "messages": [
        {
          "role": "user",
          "content": "Explain quantum entanglement in simple terms."
        }
      ],
      "max_tokens": 256
    }'
    ```
  </Tab>

  <Tab title="Python">
    ```python theme={null}
    from openai import OpenAI

    client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")

    response = client.chat.completions.create(
        model="claude-fable-5-1",
        messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
        max_tokens=256,
    )

    print(response.choices[0].message.content)
    ```
  </Tab>

  <Tab title="Streaming">
    ```python theme={null}
    from openai import OpenAI

    client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")

    stream = client.chat.completions.create(
        model="claude-fable-5-1",
        messages=[{"role": "user", "content": "Write a short poem about the sea."}],
        max_tokens=256,
        stream=True,
    )

    for chunk in stream:
        print(chunk.choices[0].delta.content or "", end="")
    ```
  </Tab>
</Tabs>

## 參數

### Messages API

| 參數 | 類型 | 必填 | 說明 |
| - | - | - | - |
| `model` | string | 是 | 固定為 `claude-fable-5-1`。 |
| `messages` | array | 是 | 包含 role 與 content 的輸入訊息。 |
| `max_tokens` | integer | 是 | 最大生成 token 數。 |
| `system` | string \| array | 否 | 頂層系統指令。 |
| `stream` | boolean | 否 | 啟用 SSE 串流輸出。 |
| `tools` | array | 否 | Anthropic 工具定義。 |
| `thinking` | object | 否 | 模型支援時使用的擴展思考設定。 |

### OpenAI 相容 API

| 參數 | 類型 | 必填 | 說明 |
| - | - | - | - |
| `model` | string | 是 | 固定為 `claude-fable-5-1`。 |
| `messages` | array | 是 | 包含 role 與 content 的對話訊息。 |
| `max_tokens` | integer | 否 | 最大生成 token 數。 |
| `stream` | boolean | 否 | 啟用 SSE 串流輸出，預設 false。 |
| `temperature` | number | 否 | 模型支援時用於控制取樣隨機性。 |
| `top_p` | number | 否 | 模型支援時使用的核取樣閾值。 |
| `stop` | string \| array | 否 | 觸發停止生成的序列。 |
| `tools` | array | 否 | OpenAI 相容工具定義。 |


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