跳转到主要内容
厂商: Anthropic Model ID: claude-opus-4-5 能力: 200K context · tool use · vision · prompt caching · streaming · extended thinking 价格: 按 token,Opus 档(实时价格 Opus 4.5 是 4 系列 Opus 家族里的第一款,在 200K token context 上以 Opus 品质交付深度长程推理。对新工作,建议选 Opus 4.8 —— 当前旗舰,输出可量化地更紧致、工具调用精度更高。4.5 保留是给已经针对它 验证过的团队继续使用。

请求

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-5",
    "max_tokens": 16384,
    "messages": [
      {"role": "user", "content": "Review this 150-page deposition for inconsistencies in the dates."}
    ]
  }'

Body 参数

字段类型是否必填默认说明
modelstringclaude-opus-4-5
messagesarray对话历史。最多 200K token 输入。
max_tokensinteger硬上限。本模型最大:32768。
systemstring | arrayarray 形式支持 cache_control
temperaturenumber1.0范围 0.0–1.0。
top_pnumber1.0Nucleus sampling。
toolsarray支持。
tool_choiceobject{"type":"auto"}auto / any / tool(指定名)。
thinkingobjectExtended-thinking 预算。见 Anthropic thinking 文档
streambooleanfalseSSE 流式。

响应

{
  "id": "msg_opus_…",
  "type": "message",
  "role": "assistant",
  "model": "claude-opus-4-5",
  "content": [
    {"type": "thinking", "thinking": "<extended reasoning trace>"},
    {"type": "text", "text": "Three date inconsistencies on pages 42, 87, and 131..."}
  ],
  "stop_reason": "end_turn",
  "usage": {
    "input_tokens": 168250,
    "output_tokens": 1872
  }
}

代码示例

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-5",
    "max_tokens": 16384,
    "messages": [{"role": "user", "content": "Review this deposition for date inconsistencies."}]
  }'

Cache control

Cache control 是 4 系列中对成本最具杠杆效应的设置。大块 200K token context 下,缓存命中可以让重复 agent 轮次的成本下降 10 倍。缓存价见 pricing table
{
  "model": "claude-opus-4-5",
  "system": [
    {
      "type": "text",
      "text": "<the 100K-token corpus you keep referring to>",
      "cache_control": {"type": "ephemeral"}
    }
  ],
  "messages": [...]
}

错误

Code触发是否计费
400Body 校验失败(max_tokens 过大等)
401key 缺失 / 已撤销
402钱包用尽(Opus 比 Sonnet 触发得更快)
413输入超过 200K token
429速率限制
5xx上游 provider 问题否(自动重试信封)

何时使用

  • 200K 窗口内的长程推理(法律评审、代码库审计、多文档综合)。
  • Sonnet 开始漏步骤的多步 prompt。
  • 对新工作,建议选 Opus 4.8 —— 当前旗舰,输出更紧致。
  • 中端成本 / 延迟,见 Sonnet 4.6

限制

限制
Context window200K tokens
Max output32768 tokens
支持 tool use
支持 vision
支持 streaming
支持 prompt caching
支持 extended thinking