跳转到主要内容
厂商: Anthropic Model ID: claude-opus-4-6 能力: 200K context · tool use · vision · prompt caching · streaming · extended thinking 价格: 按 token,Opus 档(实时价格 Opus 4.6 是在 4.5 上的精修 —— 更紧致的长文散文,且在其 200K context 内跨多文档综合时幻觉有可测量的下降。它是 4.5 几乎够用、但还差点意思的 多文档工作流的正确 Opus:法律评审、科技文献综合、代码库审计报告。 Opus 4.8 是当前旗舰; 4.6 保留是给已经针对此特定版本验证过的团队。

请求

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-6",
    "max_tokens": 16384,
    "messages": [
      {"role": "user", "content": "Synthesize the methodology sections of these 14 papers."}
    ]
  }'

Body 参数

字段类型是否必填默认说明
modelstringclaude-opus-4-6
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 预算。
streambooleanfalseSSE 流式。

响应

{
  "id": "msg_opus_…",
  "type": "message",
  "role": "assistant",
  "model": "claude-opus-4-6",
  "content": [
    {"type": "text", "text": "Across the 14 papers, three methodological themes emerge..."}
  ],
  "stop_reason": "end_turn",
  "usage": {
    "input_tokens": 187430,
    "output_tokens": 4218
  }
}

代码示例

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-6",
    "max_tokens": 16384,
    "messages": [{"role": "user", "content": "Synthesize the methodology sections of these papers."}]
  }'

Cache control

{
  "model": "claude-opus-4-6",
  "system": [
    {
      "type": "text",
      "text": "<the corpus you keep referring to>",
      "cache_control": {"type": "ephemeral"}
    }
  ],
  "messages": [...]
}
缓存读取的折扣价见 pricing table

错误

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

何时使用

  • 4.5 几乎够用但还差点意思的多文档综合。
  • 需要紧致、不重复散文的长文总结。
  • 当前旗舰 Opus,见 Opus 4.8
  • 上一版 Opus,见 Opus 4.5
  • 中端成本 / 延迟,见 Sonnet 4.6

限制

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