{{1}}Claude Opus 5 API 指南的标题卡片{{/1}},{{2}}展示一张圆角网关卡片,上面有代码标签,写着 POST /v1/messages 和 model: claude-opus-5{{/2}},{{3}}一个价格标签,写着每 100 万 token 收费 $5 / $25{{/3}},{{4}}以及四个模型标签,分别标注为 Claude、GPT、Gemini 和 Qwen,通过细线连接到同一个网关{{/4}}。
Guides & Insights

Claude Opus 5 API:如何调用、费用多少、以及何时属于大材小用

作者

Alistair Wren

发布日期

最新模型 · 20查看全部模型
基准测试:Artificial Analysis · 每日更新
返回全部文章

The Claude Opus 5 API is live on the Messages endpoint and on every OpenAI-compatible gateway that carries it. To call it directly you POST to https://api.anthropic.com/v1/messages with the model id claude-opus-5 and the anthropic-version: 2023-06-01 header. To call it with an OpenAI-style client — the route that needs no new SDK — you point your base URL at https://api.orcarouter.ai/v1 and pass the model id anthropic/claude-opus-5, which is how OrcaRouter exposes it. The price is identical on both: $5 per million input tokens and $25 per million output, exactly the list rate with zero markup. It launched on July 24, 2026, and it is the current Opus tier — Claude Opus 4.8 costs the same $5 / $25 and scores lower on the independent benchmarks. The interesting decision is not which dialect to use; it is whether Opus-tier is what your workload actually needs.

两个端点,一个模型

大多数关于 Claude Opus 5 API 的教程只展示了原生的 Anthropic 调用,然后就到此为止了。实际上有两种方言,两者都能达到相同的权重。

Anthropic native — /v1/messages. POST to https://api.anthropic.com/v1/messages with two required headers: x-api-key with your key and anthropic-version: 2023-06-01. The body carries model: "claude-opus-5", a max_tokens, and a messages array. This is what the Anthropic Python and TypeScript SDKs send under the hood.

OpenAI-compatible — /v1/chat/completions. POST to https://api.orcarouter.ai/v1/chat/completions (or /v1/messages if you want the Anthropic dialect through the same host) with the model id anthropic/claude-opus-5. If you already run an OpenAI client, the switch is two lines: change base_url to https://api.orcarouter.ai/v1 and swap the API key. Nothing else in your request shape changes.

云模型。在 Amazon Bedrock 上,ID 是 anthropic.claude-opus-5;在 Google Vertex AI 和 Microsoft Foundry 上,它保留第一方 ID claude-opus-5。这些途径适用于已经选定云服务提供商的团队;OpenAI 兼容的途径才是能让你的代码保持可移植性的那一种。

模型并不关心你使用哪种方言。真正不同的是调用周围的一切——计费、密钥、速率限制、故障转移,以及在不更改代码的情况下你可以访问多少其他模型。

你会得到什么 —— 以及破坏旧代码的两件事

Claude Opus 5 是 Anthropic 主打推理能力的旗舰模型:拥有 100 万 token 的上下文窗口(最大值也是默认值)、128K 的输出上限、2026 年 5 月的知识截止时间,并支持文本、图像和文件输入及文本输出。在独立的 Artificial Analysis 排行榜上,其成绩为AA Coding 78.0,在 132 个模型中位列第 1,以及AA Intelligence 63.1,在 134 个模型中位列第 2;截至 2026 年 7 月 24 日,其 GPQA Diamond 得分为 93.2,Humanity's Last Exam 得分为 54.9。Anthropic 官方发布时的说法——在 Frontier-Bench 上的表现约为 Opus 4.8 的两倍——属于厂商自测结果,尚未被独立复现。

A spec and benchmark scoreboard for Claude Opus 5: 1M token context window, 128K max output, $5 / $25 list price, $0.50 per 1M cache read, AA Coding 78.0 ranked #1 of 132, and AA Intelligence 63.1 ranked #2 of 134.

思考默认开启。自适应思考决定每次调用进行多少推理,由output_config.effort参数控制,该参数接受lowmax,默认值为high。对于编码和智能体循环,xhigh是推荐的起点;lowmedium在 Opus 5 上确实比先前模型更强,这使得它们适用于真实工作负载,而非玩具式调用。推理令牌计入你的输出费用。

Claude Opus 4.8 的两个破坏性变更会影响所有复制旧请求体的人:

现在,过紧的 max_tokens 会导致输出截断。由于默认会先运行思考过程,max_tokens如果只按预期答案长度来设置,其额度会先被推理消耗掉。如果你把 4.8 工作负载原样迁移过来,在提高上限或降低思考投入之前,预计会看到响应被截断。

采样参数会被拒绝。 temperaturetop_ptop_k在任何非默认值下都会返回 400 错误,assistant prefill 也是如此。控制输出使用effort,而不是 temperature。

禁用 thinking 是受限制的。 thinking: {"type": "disabled"} 仅在 effort 为 high 或以下时被接受;与 xhighmax 搭配都会返回 400。降低成本的合理方式是降低 effort,而不是关闭 thinking。

它的实际成本

Claude Opus 5 的定价为每百万输入 token 5 美元、每百万输出 25 美元——与 Claude Opus 4.8 的定价相同,这正是本次发布中的低调好消息。缓存读取按每百万 0.50 美元计费(提示缓存需要至少 512 个 token 的前缀,并支持 5 分钟和 1 小时的 TTL)。研究预览版快速模式以高达 2.5 倍的每秒输出 token 数运行同一模型,价格为10 美元 / 50 美元,而 Batch API 以半价异步返回结果。

A price comparison card for the Claude Opus 5 API: Opus 5 at $5/$25 with a $0.50 cache read, $10/$50 fast mode and roughly half-price Batch API, Claude Opus 4.8 at the same $5/$25, Claude Sonnet 5 at $3/$15 with $2/$10 intro pricing, Claude Haiku 4.5 at $1/$5, and a worked example of 100K tokens in plus 20K out billing $1.00 uncached or about $0.55 cached.

一个具体的账单:一个100K-token的请求产生20K输出token,费用为输入$0.50、输出$0.50,合计$1.00,未缓存时。如果下一次调用时该100K提示词从缓存中提供,那么输入部分降至约$0.05,为$0.55的往返行程。这种缓存计算就是Opus在长而重复的上下文上是否负担得起的区别。

供参考,更高一档和更低一档的价格如下:Claude Fable 5 是 Anthropic 最强大的模型,定价为 $10 / $50Claude Sonnet 5 定价为 $3 / $15(享有 $2 / $10 的优惠定价,截至 2026 年 8 月 31 日);Claude Haiku 4.5 定价为 $1 / $5。在 OrcaRouter 上,上述每一款模型均以供应商的标价传递,不收取任何按 token 计算的加价,因此上面的对比也就是您实际支付的费用。

单端点情况

如果你正在阅读 Claude Opus 5 API 指南,那你很可能已经有了一套集成和一个密钥,而真正的问题是:对于你要尝试的下一个模型,你是否还需要第二套集成和第二个密钥。OrcaRouter 用一个兼容 OpenAI 的端点来回答这个问题,该端点位于200+ 个模型之前:同一个客户端、同一个 base URL、每个模型只需一个不同的 model id——anthropic/claude-opus-5,今天就用它;当工作负载不再需要 Opus 级别时,换用更便宜的模型;新前沿模型发布当周即可切换——全程无需修改代码。

The OrcaRouter model page for anthropic/claude-opus-5, showing the $5.00 per million input and $25.00 per million output pricing, a 1,000,000-token context window, the released July 24, 2026 label, and both OpenAI-compatible and Anthropic-native endpoints.

经济部分是实打实的。OrcaRouter 增加每 token $0——你按各提供商公布的费率付费,因此 Claude Opus 5 的价格仍保持在 Anthropic 的 $5 / $25,而供应商的降价会在公布当天就在我们这边生效。自带密钥是一项一流选项:提交你现有的 Anthropic API 密钥,保留你自己的速率限制和额度,由提供商直接向你计费。护栏——PII 屏蔽和内容策略——在请求计费之前强制生效,而非之后。模型页面anthropic/claude-opus-5显示实时价格、1M 上下文和当前的吞吐量数据,路由 DSL 会编排故障转移,当 Opus 5 出错或你的流量形态允许时,由更便宜的模型来应答。

在Opus 5是错误答案的情况下

最优秀并不等同于最适合你的工作负载,而$5/$25的旗舰款在三个方面有所欠缺。

大批量、低风险的调用。每月处理1000万个输入token的摘要或分类管道,成本在Claude Opus 5上为$50,而Claude Haiku 4.5上仅为$10——相同的端点、相同的密钥,只需更改一个ID。Haiku虽不及Opus,但对于路由、提取和格式化等任务而言,其表现已足够接近,这5倍的价差很难说是合理的。

长时代理循环。 Opus 5 会主动验证自己的工作,因此针对旧模型调优的“再检查一遍答案”指令现在会引发过度验证并消耗推理token。在 xhigh 和 max effort 档位下,思考预算会按设计增长。如果你的代理不需要前沿推理能力,Claude Sonnet 5 以 $3 / $15 的价格是大多数生产团队应采用的默认起点,而努力度旋钮就是调低它的方式。

当模型非我们所有时。 OrcaRouter 负责路由和计费;Anthropic 负责运行权重。端点、零加价、故障转移和防护栏是我们的,但推理质量和安全行为是 Anthropic 的;使用 BYOK 时,资金直接流向他们。这笔交易说白了就是:无论哪种方式,你都按提供商费率付费,问题在于,一个端点支持 200 多个模型是否值得。

底线

如果没有其他集成方式,请使用原生 Messages 端点调用 Claude Opus 5 API;如果想用一个客户端处理所有事情,请使用兼容 OpenAI 的端点。当任务困难、上下文很长,且输出价值达到每百万 tokens 25 美元时,它是正确的模型;而当任务是例行公事时,它就是错误的模型。最简洁的设置是那种能让你随时改变主意的设置:一个端点、你自己的密钥、$0 加价,以及一个你可以在工作负载变化当天更换的模型 ID。

本文中的对比2

根据本文内容识别 · 基准测试:Artificial Analysis · 每日更新

© 2026 OrcaRouter

推理服务商

运营推理平台?让您的模型上线 OrcaRouter。

providers@orcarouter.ai

加入我们的社区

Discordsupport@orcarouter.aiXGitHubYouTube