> ## 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 Haiku 5.5

> 通过 AnyFast 调用 Claude Haiku 5.5，处理快速分类、信息提取、路由和智能体任务。

Claude Haiku 5.5 是 Anthropic 面向高吞吐、低延迟任务的快速模型。通过 AnyFast 的 Anthropic Messages API `POST /v1/messages` 调用，模型 ID 为 `claude-haiku-5-5`。

## 核心能力

* **1M 上下文窗口** — 根据 Anthropic 模型规格，支持最多 1M 上下文 Token 和 128K 输出 Token
* **自适应思维** — 默认开启，可用 `output_config.effort` 平衡速度与深度
* **快速处理日常任务** — 适用于分类、信息提取、路由和高吞吐助手
* **工具调用与视觉** — 接收文本和图像输入，可返回文本或工具调用
* **模型 ID** — 请求中使用 `claude-haiku-5-5`

## 快速示例

<CodeGroup>
  ```bash cURL theme={null}
  curl https://www.anyfast.ai/v1/messages \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "model": "claude-haiku-5-5",
      "max_tokens": 1024,
      "output_config": {"effort": "low"},
      "messages": [
        {"role": "user", "content": "将这个工单分为账单、技术或账户问题：我无法重置密码。"}
      ]
    }'
  ```

  ```python Python theme={null}
  import anthropic

  client = anthropic.Anthropic(
      api_key="YOUR_API_KEY",
      base_url="https://www.anyfast.ai",
  )

  message = client.messages.create(
      model="claude-haiku-5-5",
      max_tokens=1024,
      output_config={"effort": "low"},
      messages=[{"role": "user", "content": "从这句话中提取截止日期：周五前付款。"}],
  )

  for block in message.content:
      if block.type == "text":
          print(block.text)
  ```

  ```python 流式输出 theme={null}
  import anthropic

  client = anthropic.Anthropic(
      api_key="YOUR_API_KEY",
      base_url="https://www.anyfast.ai",
  )

  with client.messages.stream(
      model="claude-haiku-5-5",
      max_tokens=1024,
      messages=[{"role": "user", "content": "总结这份支持工单。"}],
  ) as stream:
      for text in stream.text_stream:
          print(text, end="")
  ```
</CodeGroup>

## 参数说明

| 参数 | 类型 | 必填 | 说明 |
| - | - | - | - |
| `model` | string | 是 | 固定为 `claude-haiku-5-5`。 |
| `messages` | array | 是 | 用户与助手消息，可包含文本、图像或工具结果。 |
| `max_tokens` | integer | 是 | 思维和可见文本共用的最大输出 Token 数，最多 128,000。 |
| `output_config` | object | 否 | `effort` 可选 `low`、`medium`、`high`、`xhigh` 或 `max`；默认 `medium`。 |
| `thinking` | object | 否 | 默认使用自适应思维；关闭时应省略 `output_config.effort`，并使用 `{"type":"disabled"}`。 |
| `tools` | array | 否 | 工具定义。 |
| `tool_choice` | object | 否 | 使用 `auto`、`none`、`any` 或指定 `tool`。 |
| `stream` | boolean | 否 | 开启 SSE 流式输出；默认 `false`。 |

<Note>
  AnyFast 实测中，省略 `output_config.effort` 时，`thinking: {"type":"disabled"}` 调用成功；与显式 `effort: "low"` 同时使用则返回 `400`。强制 `tool_choice: {"type":"any"}` 调用成功，返回 `tool_use` 块。请省略自定义 `temperature`、`top_p` 和 `top_k` 值，并按 `type` 读取响应内容块。
</Note>

<Note>
  AnyFast 实测文本响应将请求 ID `claude-haiku-5-5` 返回为 `model: "claude-haiku-5.5"`，并包含 `request_id`、字符串类型的 `billing.billed_cost_usd` 和 `usage.service_tier`。请求仍应使用连字符形式的 ID。
</Note>

<Card title="API 参考" icon="code" href="/zh/api-reference/model-api/anthropic/claude-haiku-5-5">
  查看 Claude Haiku 5.5 的请求与响应字段。
</Card>

<script src="/public/feedback.js" />


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