studioglobal
热门发现
答案已发布7 来源

Codex vs Claude Code:2026 年 API 与订阅价格对比

只比 API 价格,gpt 5.1 codex mini 是本文数据中最便宜的选择:100 万输入 token + 100 万输出 token、无缓存时约 $2.25。 gpt 5.3 codex 比 Codex mini 贵很多,同样简单场景约 $15.75;Claude Opus 4.7/4.6/4.5 则约 $30.00。

18K0
Ilustrasi perbandingan biaya Codex dan Claude Code untuk developer yang memakai AI coding
Codex vs Claude Code: Perbandingan Harga API dan Langganan 2026Perbandingan biaya Codex vs Claude Code bergantung pada dua hal berbeda: tarif token API dan batas paket langganan.
AI 提示

Create a landscape editorial hero image for this Studio Global article: Codex vs Claude Code: Perbandingan Harga API dan Langganan 2026. Article summary: Untuk biaya API, Codex mini adalah pemenang jelas dalam angka resmi: gpt 5.1 codex mini $0.25 input, $0.025 cached input, dan $2.00 output per 1 juta token, sedangkan Claude Opus 4.7/4.6/4.5 $5 input dan $25 output.. Topic tags: ai, openai, anthropic, codex, claude code. Reference image context from search candidates: Reference image 1: visual subject "# Codex vs Claude Code: The Complete 2026 Comparison for Developers. Codex and Claude Code are the two dominant agentic coding tools in 2026. Both can take a task description in na" source context "Codex vs Claude Code: 2026 Comparison for Developers - Leanware" Reference image 2: visual subject "Verbatim context compaction for long-running agents. Connect Claude, Cursor, and VS Code to M

openai.com

如果只看 API 计费,结论很直接:在本文列出的官方价格里,gpt-5.1-codex-mini 是最便宜的一档。OpenAI 文档给出的价格是输入 $0.25/100 万 token、输出 $2.00/100 万 token;Claude API 文档中 Claude Opus 4.7/4.6/4.5 是输入 $5.00/100 万 token、输出 $25.00/100 万 token。[24][13]

但如果你买的是月度订阅,用来跑 coding agent(编程代理),账就没这么简单。Codex 有按 5 小时窗口计算的使用限制;科技媒体 Ars Technica 也报道称,Anthropic 曾对一小部分新用户测试过 Claude Code 在 Pro 套餐中不可用。[1][14]

先给结论

  • API 最省钱:gpt-5.1-codex-mini,按 OpenAI 官方文档的每 100 万 token 价格计算。[24]
  • Codex 非 mini 版本贵一档:gpt-5.3-codex 在 OpenAI 标准 API 价格中为输入 $1.75、缓存输入 $0.175、输出 $14.00,均按每 100 万 token 计。[25]
  • **简单 token 场景下,Claude Opus 更贵:**若按 100 万输入 token + 100 万输出 token、无缓存计算,Claude Opus 4.7/4.6/4.5 为 $30.00;gpt-5.1-codex-mini 为 $2.25,gpt-5.3-codex 为 $15.75。[13][24][25]
  • **订阅套餐没有统一赢家:**Codex 要看 5 小时窗口内能跑多少 local messages、cloud tasks 和 code reviews;Claude Code 则要确认当前 Pro/Max 套餐是否包含你需要的功能。[1][14]

API 价格:按每 100 万 token 比

下面价格均为美元,按每 100 万 token 计。需要注意:OpenAI 的“cached input”和 Anthropic 的“cache writes / cache hits and refreshes”并不是完全相同的计价项,不能简单当成同一个东西横向比较。[24][25][13]

API / 模型输入缓存相关输出说明
OpenAI gpt-5.1-codex-mini$0.25$0.025 cached input$2.00OpenAI 模型文档列出的文本 token 价格。[24]
OpenAI gpt-5.3-codex$1.75$0.175 cached input$14.00OpenAI API pricing 页面的标准价格。[25]
Claude Opus 4.7/4.6/4.5$5.00cache hits and refreshes $0.50;cache writes 为 5 分钟 $6.25 或 1 小时 $10$25.00Claude API 文档列出的价格。[13]

如果只做一个很粗的基准:100 万输入 token + 100 万输出 token,不使用缓存,成本为:

  • gpt-5.1-codex-mini$2.25[24]
  • gpt-5.3-codex$15.75[25]
  • Claude Opus 4.7/4.6/4.5:$30.00[13]

这不是你的真实月账单。真实成本会取决于输入与输出比例、缓存命中/写入、上下文规模,以及 agent 在一次任务中反复读文件、写 diff、修 bug 的次数。但只按官方 token 单价做静态比较,Codex mini 的价格优势最明显。[24][13]

订阅:不要只盯着 $20/月

Codex 的官方 pricing 页面列出了不同 tier 下 local messages、cloud tasks 和 code reviews 的 5 小时窗口限制。页面还说明,local messages 和 cloud tasks 共享同一个 5 小时窗口,可能还会有额外周限额;$200 的 Pro 在 2026 年 5 月 31 日前有使用量 boost;Enterprise/Edu 用户没有固定 rate limits,使用量随 credits 扩展。[1]

关于 ChatGPT/Codex 套餐,一份第三方梳理称 ChatGPT Plus 为 $20/月,包含 Codex Web 和 Codex CLI;ChatGPT Pro 为 $200/月,提供更大的使用量。由于这不是 OpenAI 官方价格页,适合当作线索,购买前仍应以账号内和官网当时显示为准。[10]

Claude Code 也类似:一份第三方指南将其订阅路径概括为 Pro $20/月、Max $100 或 $200/月,或者通过 Anthropic API 按 token 付费。[7] 但 Ars Technica 报道称,Anthropic 曾在一次测试中让部分新注册 Pro 用户看不到 Claude Code 支持,而 Claude Code 仍保留在 $100/月以上的 Max 套餐中;Anthropic 将其解释为面向约 2% 新 prosumer 注册用户的小规模测试。[14]

所以,如果你打算只买 Claude Pro 来用 Claude Code,最好不要默认“$20 一定够用”。购买前应核对 Anthropic 当前价格页或你账号里的功能状态,尤其当 Claude Code 是你的主要需求时。[14]

不同使用场景怎么选?

1. 轻量 API 编程:优先看 Codex mini

如果你的核心诉求是把 API token 成本压到最低,gpt-5.1-codex-mini 是本文价格表中最省的一项:输入 $0.25/100 万 token,输出 $2.00/100 万 token,明显低于 Claude Opus 4.7/4.6/4.5 的输入 $5.00、输出 $25.00。[24][13]

2. 使用 gpt-5.3-codex:仍要重新算账

gpt-5.3-codex 与 Codex mini 不是一个价位。OpenAI 标准 API 价格列出它的输入为 $1.75、缓存输入 $0.175、输出 $14.00,均按每 100 万 token 计。[25] 在 100 万输入 + 100 万输出、无缓存的简单场景中,它合计 $15.75,贵于 Codex mini,但仍低于同场景下 Claude Opus 4.7/4.6/4.5 的 $30.00。[25][13]

3. 月度订阅跑 agent:关键是“能跑多少”

订阅场景里,真正的问题不是月费写着 $20 还是 $200,而是你每天能跑多少次有效的 coding agent 会话。Codex 有 5 小时窗口限制,且可能存在额外周限额。[1] Claude Code 方面,第三方指南提到 Pro $20 与 Max $100/$200 的路径,但 Ars Technica 的报道显示,Pro 中的 Claude Code 访问权限曾被 Anthropic 小范围测试调整。[7][14]

如果你的预算大约是 $20/月,购买前至少确认两件事:第一,所需的 coding agent 功能是否真的包含在该套餐中;第二,限额是否足够覆盖你的日常开发节奏。[1][14]

4. 重度使用或团队:看限额结构,不只看入门价

重度使用时,最需要比较的是限额结构和团队用量模式。OpenAI 对 Codex 列出了 local messages、cloud tasks、code reviews 的 5 小时窗口限制,并注明可能有额外周限额;Enterprise/Edu 则没有固定 rate limits,使用量随 credits 扩展。[1]

Claude Code 方面,第三方来源将 Max 概括为 $100/$200 月费选项;Ars Technica 报道称,在 Pro 测试期间,Claude Code 仍可用于 $100/月以上的 Max 套餐。[7][14]

自己估算成本的 4 个步骤

  1. 分开算输入和输出。 这几组价格都把 input 与 output 分开计费,而且本文比较的模型里,输出 token 通常更贵。[24][25][13]
  2. 单独处理缓存。 OpenAI 写的是 cached input;Anthropic 则把 cache writes 与 cache hits/refreshes 分开。[24][25][13]
  3. 用真实工作流估算。 让 agent 读取大量文件、生成长 diff、反复测试和修改,都会显著改变 token 消耗结构。
  4. 别把便宜订阅等同于无限使用。 Codex 有 5 小时窗口和可能的周限额;Claude Code 在 Pro 中的可用性也曾被小范围测试调整。[1][14]

底线

如果问题是“哪个 API 更便宜”,答案很清楚:在本文引用的官方价格中,gpt-5.1-codex-mini 最省,输入 $0.25/100 万 token、输出 $2.00/100 万 token。[24]

如果问题是“哪个月度订阅更划算”,就没有放之四海皆准的答案。Codex 要看 5 小时窗口和潜在周限额;Claude Code 要看 Pro/Max 的最新功能开放情况。[1][14] 实用建议是:追求最低 API 成本时优先测 Codex mini;购买订阅前,则先核对实际配额和你需要的 coding agent 功能是否可用。[24][1][14]

Studio Global AI

Search, cite, and publish your own answer

Use this topic as a starting point for a fresh source-backed answer, then compare citations before you share it.

使用 Studio Global AI 搜索并核查事实

要点

  • 只比 API 价格,gpt 5.1 codex mini 是本文数据中最便宜的选择:100 万输入 token + 100 万输出 token、无缓存时约 $2.25。
  • gpt 5.3 codex 比 Codex mini 贵很多,同样简单场景约 $15.75;Claude Opus 4.7/4.6/4.5 则约 $30.00。
  • 订阅套餐不能只看 $20 或 $200 的月费,还要核对 Codex 的 5 小时窗口限额,以及 Claude Code 在 Pro/Max 中的最新可用状态。

人们还问

“Codex vs Claude Code:2026 年 API 与订阅价格对比”的简短答案是什么?

只比 API 价格,gpt 5.1 codex mini 是本文数据中最便宜的选择:100 万输入 token + 100 万输出 token、无缓存时约 $2.25。

首先要验证的关键点是什么?

只比 API 价格,gpt 5.1 codex mini 是本文数据中最便宜的选择:100 万输入 token + 100 万输出 token、无缓存时约 $2.25。 gpt 5.3 codex 比 Codex mini 贵很多,同样简单场景约 $15.75;Claude Opus 4.7/4.6/4.5 则约 $30.00。

接下来在实践中我应该做什么?

订阅套餐不能只看 $20 或 $200 的月费,还要核对 Codex 的 5 小时窗口限额,以及 Claude Code 在 Pro/Max 中的最新可用状态。

接下来我应该探索哪个相关主题?

继续“Claude Security 公测版详解:Anthropic 的 AI 代码漏洞扫描工具”以获得另一个角度和额外的引用。

打开相关页面

我应该将其与什么进行比较?

对照“Grok 4.3 API 解读:1M 上下文、低 token 价与语音平台野心”交叉检查此答案。

打开相关页面

继续你的研究

研究对话

研究问题

Bandingkan harga Codex dengan Claude Code.

Studio Global AI35 来源

引用的答案

Secara harga langganan, Codex dan Claude Code sama-sama mulai di sekitar $20/bulan, tetapi Claude Code untuk pemakaian berat biasanya naik ke Max $100–$200/bulan, sedangkan Codex punya paket ChatGPT/Codex dan opsi API yang bisa lebih murah untuk model mini atau lebih mahal untuk model utama tergantung token. Data Claude Code Pro saat ini agak tidak stabil karena ada laporan Anthropic sempat menguji penghapusan akses Claude Code dari paket Pro $20 untuk pengguna baru. [7]

  • Codex langganan

    • Codex pricing resmi OpenAI menunjukkan batas penggunaan per 5 jam berdasarkan tier seperti Pro 20x, dengan kuota local messages, cloud tasks, dan code reviews tergantung model. [3]
    • Untuk API, gpt-5.1-codex-mini dihargai $0.25 per 1 juta token input, $0.025 cached input, dan $2.00 output. [1]
    • gpt-5.3-codex di halaman pricing API OpenAI tercantum $1.75 input, $0.175 cached input, dan $14.00 output per 1 juta token. [2]
  • Claude Code langganan

    • Sumber pihak ketiga yang merangkum Claude Code menyebut paket Pro sekitar $20/bulan dan Max sekitar $100–$200/bulan, tetapi ini bukan halaman resmi Anthropic. [15]
    • Ars Technica melaporkan Anthropic sempat menampilkan Claude Code tidak didukung di paket Pro dan tetap tersedia di paket Max $100+/bulan, jadi status paket $20 perlu dicek langsung sebelum beli. [7]
  • Claude API

    • Pricing API resmi Anthropic menunjukkan Claude Opus 4.7/4.6/4.5 di $5 per 1 juta token input, $0.50 cache hit/refresh, dan $25 output. [5]
    • Untuk coding via API, biaya Claude bisa lebih mahal daripada Codex mini, terutama pada output token, tetapi perbandingan tepat tergantung model Claude yang dipakai. [1][5]
  • Ringkasnya

    • Termurah untuk coding ringan: Codex API mini tampak paling murah dari angka resmi yang ditemukan. [1]
    • Langganan murah: Codex/ChatGPT dan Claude Pro sama-sama sekitar kelas $20, tetapi akses Claude Code di Pro sedang/sempat tidak pasti untuk pengguna baru. [7]
    • Pemakaian berat: Claude Code Max $100–$200/bulan bisa menarik jika Anda sering menjalankan agent coding, tetapi Codex Pro/API bisa lebih fleksibel jika ingin bayar sesuai token. [2][7][15]

来源

  • [1] Codex Pricingdevelopers.openai.com

    Pro 20x Local Messages / 5h Cloud Tasks / 5h Code Reviews / 5h --- --- GPT-5.5 300-1600 Not available Not available GPT-5.4 400-2000 Not available Not available GPT-5.4-mini 1200-7000 Not available Not available GPT-5.3-Codex 600-3000 200-1200 400-1000 The...

  • [7] Claude Code Pricing in 2026: Every Plan Explained (Pro, Max, API ...ssdnodes.com

    Note: Before diving into pricing, one of the most effective ways to reduce Claude Code costs is running it on a Linux VPS. If you haven't set that up yet, here's how to install Claude Code on Ubuntu Linux. Claude Code Pricing: Quick Summary Claude Code cost...

  • [10] OpenAI Codex Pricing in 2026: What I Found After Ditching Claude ...userjot.com

    Current pricing: ChatGPT Plus: $20/mo (includes Codex Web + Codex CLI) ChatGPT Pro: $200/mo (same features, 10x the usage) Business: $25 to 30/user/mo (team features) Enterprise: Custom pricing That’s it. No separate Codex subscription. No standalone pricin...

  • [13] Pricing - Claude API Docsplatform.claude.com

    Model Base Input Tokens 5m Cache Writes 1h Cache Writes Cache Hits & Refreshes Output Tokens --- --- --- Claude Opus 4.7 $5 / MTok $6.25 / MTok $10 / MTok $0.50 / MTok $25 / MTok Claude Opus 4.6 $5 / MTok $6.25 / MTok $10 / MTok $0.50 / MTok $25 / MTok Clau...

  • [14] Anthropic tested removing Claude Code from the Pro plan - Ars Technicaarstechnica.com

    Users took to Reddit and X to point out that Anthropic’s pricing page for Claude explicitly showed Claude Code as not supported in the Pro plan. (It remained in the $100/month+ Max plan.) New users signing up for Pro subscriptions were unable to access Clau...

  • [24] GPT-5.1 Codex mini Model | OpenAI APIdevelopers.openai.com

    Text tokens Per 1M tokens Input $0.25 Cached input $0.025 Output $2.00 Quick comparison Input Cached input Output GPT-5-Codex $1.25 GPT-5.1 Codex mini $0.25 GPT-5.1 Codex mini $0.25 Modalities Text Input and output Image Input only Audio Not supported Video...

  • [25] Pricing | OpenAI APIdevelopers.openai.com

    Specialized models Prices per 1M tokens. Standard Batch Priority Standard Category Model Input Cached input Output --- --- ChatGPT gpt-5.3-chat-latest $1.75 $0.175 $14.00 Codex gpt-5.3-codex $1.75 $0.175 $14.00 All models Batch Category Model Input Cached i...