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

# claude-opus-4-8

> Anthropic 的 Claude 旗舰 —— 代码库级推理、多文档综述、硬核 agentic 任务，配 200K 上下文窗口。Extended thinking、web search、vision 全部支持。发布于 2026-05-29。

`claude-opus-4-8` 是 ByteSpike 上 Claude 家族的旗舰 —— Anthropic 能力最强的模型，发布于 **2026-05-29**。它为最硬的活而生：代码库级推理、多文档综述、长文档审阅、agentic tool use。上下文窗口为 **200K tokens**。定价就是标准 Opus 费率。

**价格：** 输入 $5.00 / 1M，输出 $25.00 / 1M，缓存读取 $0.50 / 1M，缓存写入 $6.25 / 1M（输入的 1.25×）—— 见[费率卡](/zh/pricing)。

## 协议

| 协议                            | 路径                                                  |
| ----------------------------- | --------------------------------------------------- |
| Anthropic Messages            | `POST https://llm.bytespike.ai/v1/messages`         |
| OpenAI Chat Completions（shim） | `POST https://llm.bytespike.ai/v1/chat/completions` |

## 快速开始

<CodeGroup>
  ```bash cURL theme={null}
  curl https://llm.bytespike.ai/v1/messages \
    -H "x-api-key: $BYTESPIKE_API_KEY" \
    -H "anthropic-version: 2023-06-01" \
    -H "content-type: application/json" \
    -d '{
      "model": "claude-opus-4-8",
      "max_tokens": 2048,
      "thinking": { "type": "enabled", "budget_tokens": 1024 },
      "messages": [
        { "role": "user", "content": "Untangle this contract." }
      ]
    }'
  ```

  ```python Python (anthropic SDK) theme={null}
  import anthropic

  client = anthropic.Anthropic(
      base_url="https://llm.bytespike.ai",
      api_key=os.environ["BYTESPIKE_API_KEY"],
  )

  resp = client.messages.create(
      model="claude-opus-4-8",
      max_tokens=2048,
      thinking={"type": "enabled", "budget_tokens": 1024},
      messages=[{"role": "user", "content": "Untangle this contract."}],
  )

  for block in resp.content:
      if block.type == "text":
          print(block.text)
  ```
</CodeGroup>

## 能力

| 能力                         | 是否支持            |
| -------------------------- | --------------- |
| Chat completions           | ✅               |
| 流式（SSE）                    | ✅               |
| Vision（图像输入）               | ✅               |
| Tool use（function calling） | ✅ 并行            |
| Prompt 缓存（cache\_control）  | ✅               |
| Extended thinking          | ✅               |
| Web search（web\_search 工具） | ✅               |
| JSON / 结构化输出               | ✅               |
| 上下文窗口                      | **200K tokens** |

## 什么时候用

* **代码库级推理** —— 把整个仓库塞进 200K 窗口，让它做审计或多文件重构方案。
* **硬核 agentic 任务** —— tool use 搭配 extended thinking，处理需要真正规划的多步任务。
* **多文档综述** —— 长文档 QA 与跨文档推理，Sonnet 力有不逮时。
* **Web search + 推理** —— 同时需要新鲜事实和深度分析的研究类查询。

什么时候**不**用：

* 大规模默认 chat —— `claude-sonnet-4-6` 在相同上下文窗口下成本只有五分之一。
* 高吞吐分类 —— `claude-haiku-4-5` 处理简单重复调用便宜得多。

## 下一步

* [claude-opus-4-7](/zh/models/claude-opus-4-7) —— 上一代 Opus
* [claude-sonnet-4-6](/zh/models/claude-sonnet-4-6) —— 生产中档
* [claude-haiku-4-5](/zh/models/claude-haiku-4-5) —— 小 + 便宜
