studioglobal
熱門探索內容
答案已發布7 個來源

Codex vs Claude Code:API 與月費怎麼算才公平?

API 以每 100 萬 token 單價比較,gpt 5.1 codex mini 最便宜:100 萬輸入 + 100 萬輸出、無快取約 US$2.25;Claude Opus 4.7/4.6/4.5 約 US$30.00。[24][13] gpt 5.3 codex 比 Codex mini 貴很多,同一簡化情境是 US$15.75,但仍低於 Claude Opus 的 US$30.00。[25][13] 月費方案不能只看 US$20 或 US$200;Codex 有 5 小時使用窗,Claude Code 在 Pro 的存取權曾對部分新註冊者測試調整。[1][14]

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 的 token 單價,Codex 這邊的 gpt-5.1-codex-mini 是這組資料裡最省的選項:每 100 萬 token,輸入 US$0.25、輸出 US$2.00;Claude API 文件列出的 Claude Opus 4.7/4.6/4.5 則是輸入 US$5、輸出 US$25。[24][13]

但如果你買的是月費版 coding agent,答案就不能只看「US$20 對 US$20」。OpenAI 的 Codex 定價頁列出 5 小時視窗內的使用上限與可能的週限制;Claude Code 在 Pro 方案的可用性也曾對少數新註冊者做過測試調整。[1][14]

先講結論

  • 純 API 成本: gpt-5.1-codex-mini 是這裡列出的最低單價選項,OpenAI 標示每 100 萬 token 輸入 US$0.25、輸出 US$2.00。[24]
  • Codex 非 mini 不同級距: gpt-5.3-codex 在 OpenAI 標準 API 價格中是每 100 萬 token 輸入 US$1.75、cached input US$0.175、輸出 US$14.00。[25]
  • 簡化 token 範例: 100 萬輸入 + 100 萬輸出、不用快取時,Codex mini 約 US$2.25,gpt-5.3-codex 約 US$15.75,Claude Opus 4.7/4.6/4.5 約 US$30.00。[24][25][13]
  • 月費方案另算: Codex 要看 5 小時用量窗;Claude Code 則要確認 Pro 或 Max 當下是否包含你需要的功能。[1][14]

API 價格:每 100 萬 token 怎麼比

以下金額皆為美元,單位是每 100 萬 token。快取欄位不能直接當成同一種東西比較,因為 OpenAI 列的是 cached input,Anthropic 則把快取拆成 cache writes 與 cache hits/refreshes。[24][25][13]

API / 模型輸入快取輸出備註
OpenAI gpt-5.1-codex-miniUS$0.25US$0.025 cached inputUS$2.00OpenAI 模型文件列出的文字 token 單價。[24]
OpenAI gpt-5.3-codexUS$1.75US$0.175 cached inputUS$14.00OpenAI API pricing 標準價格。[25]
Claude Opus 4.7/4.6/4.5US$5.00cache hits/refreshes US$0.50;cache writes:5 分鐘 US$6.25、1 小時 US$10US$25.00Claude API pricing 文件列出的價格。[13]

用最單純的場景試算:100 萬輸入 token + 100 萬輸出 token,且完全不使用快取,基礎成本會是:

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

這不是你的實際月帳單。真正成本會取決於輸入/輸出比例、是否命中快取、上下文長度,以及 agent 反覆讀檔、改檔、產生 diff 的頻率。單看官方 token 單價,Codex mini 是這組比較裡最便宜的 API 選項。[24][13]

訂閱方案:不要只看月費標價

Codex 的月費或方案限制,重點不只是每月多少錢,而是每個時間窗能跑多少工作。OpenAI 的 Codex pricing 頁面以 tier 顯示 local messages、cloud tasks、code reviews 在每 5 小時視窗內的用量;該頁也說明 local messages 與 cloud tasks 共用同一個 5 小時視窗,可能另有每週限制,Pro US$200 的使用量加成會持續到 2026 年 5 月 31 日,Enterprise/Edu 則沒有固定 rate limits、使用量會隨 credits 擴充。[1]

至於 ChatGPT/Codex 的月費入口,一份第三方整理稱 ChatGPT Plus US$20/月包含 Codex Web 與 Codex CLI,ChatGPT Pro US$200/月則提供更高用量。[10] 但這不是 OpenAI 官方頁面;若你準備購買,仍應以帳戶內實際顯示的價格與用量為準。

Claude Code 這邊,一份第三方指南把使用路徑整理為:Pro US$20/月、Max US$100 或 US$200/月,或透過 Anthropic API 依 token 付費。[7] 但 Ars Technica 報導,Anthropic 曾對約 2% 的新專業個人用戶(prosumer)註冊者進行小規模測試,讓部分新 Pro 訂閱者看見 Claude Code 不支援 Pro;當時 Claude Code 仍保留在 US$100/月以上的 Max 方案。[14]

所以,如果你是為了 Claude Code 才買 Pro,不要只因為看到 US$20/月就下單。購買前應確認當下方案頁與你的帳戶是否真的開放 Claude Code,以及用量是否足以支撐你的開發節奏。[14]

依使用情境怎麼選

1. 輕量 API 寫程式

若你的主要目標是把 token 成本壓到最低,gpt-5.1-codex-mini 在這組官方價格中最有優勢:每 100 萬 token 輸入 US$0.25、輸出 US$2.00,明顯低於 Claude Opus 4.7/4.6/4.5 的輸入 US$5、輸出 US$25。[24][13]

2. 想用較高價的 Codex 模型

gpt-5.3-codex 不是 mini 價位。OpenAI 標準 API pricing 顯示它每 100 萬 token 輸入 US$1.75、cached input US$0.175、輸出 US$14.00。[25] 在 100 萬輸入 + 100 萬輸出、無快取的簡化試算中,總額是 US$15.75;比 Codex mini 高很多,但仍低於 Claude Opus 4.7/4.6/4.5 的 US$30.00。[25][13]

3. 主要用月費跑 coding agent

這時候要問的不是「月費是不是 US$20」,而是「我實際能跑多少輪」。Codex 有 5 小時用量窗,且可能有額外週限制。[1] Claude Code 的 Pro/Max 路徑雖然被第三方整理為 US$20、US$100、US$200/月,但 Ars Technica 的報導顯示,Pro 存取權曾針對少數新註冊者測試調整。[7][14]

如果你的預算大約是 US$20/月,至少先檢查兩件事:你需要的 coding agent 功能是否真的在該方案開通,以及使用上限是否足夠讓你完成平常的開發節奏。[1][14]

4. 重度使用者或團隊

重度使用時,應該比較的是用量窗、週限制、快取策略與團隊管理方式,而不是只看入門價格。OpenAI 表示 Codex 的 local messages、cloud tasks、code reviews 依 5 小時視窗計算,且可能有額外週限制;Enterprise/Edu 沒有固定 rate limits,使用量隨 credits 擴充。[1]

Claude Code 方面,第三方資料把 Max 整理為 US$100/US$200 月費選項;Ars Technica 也報導,在 Pro 測試調整期間,Claude Code 仍可在 US$100/月以上的 Max 方案使用。[7][14]

自己估成本的簡單方法

  1. 把輸入和輸出分開算。 這幾個模型的輸出 token 都比輸入 token 貴,不能只看總 token 數。[24][25][13]
  2. 快取要單獨列。 OpenAI 使用 cached input;Anthropic 則區分 cache writes 與 cache hits/refreshes。[24][25][13]
  3. 用真實工作流試算。 長 diff、多檔案讀取、多輪修正,都可能讓輸入/輸出比例與你想像不同。
  4. 月費不等於無限用。 Codex 有 5 小時用量窗與可能的週限制;Claude Code 在 Pro 的存取權也曾對少數新註冊者測試調整。[1][14]

最後怎麼判斷

若問題是 API 哪個最便宜,答案很清楚:在這組資料中,gpt-5.1-codex-mini 以每 100 萬 token 輸入 US$0.25、輸出 US$2.00 勝出。[24]

若問題是 月費訂閱哪個最划算,就沒有單一答案。Codex 要看 5 小時用量窗、週限制與你要跑的工作類型;Claude Code 則要確認 Pro/Max 當下的功能開放狀態。[1][14] 實務上,想壓低 API 成本可優先看 Codex mini;想買月費方案,則先確認配額、功能與你的使用節奏,再決定是否升級。[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 以每 100 萬 token 單價比較,gpt 5.1 codex mini 最便宜:100 萬輸入 + 100 萬輸出、無快取約 US$2.25;Claude Opus 4.7/4.6/4.5 約 US$30.00。[24][13]
  • gpt 5.3 codex 比 Codex mini 貴很多,同一簡化情境是 US$15.75,但仍低於 Claude Opus 的 US$30.00。[25][13]
  • 月費方案不能只看 US$20 或 US$200;Codex 有 5 小時使用窗,Claude Code 在 Pro 的存取權曾對部分新註冊者測試調整。[1][14]

大家也會問

「Codex vs Claude Code:API 與月費怎麼算才公平?」的簡短答案是什麼?

API 以每 100 萬 token 單價比較,gpt 5.1 codex mini 最便宜:100 萬輸入 + 100 萬輸出、無快取約 US$2.25;Claude Opus 4.7/4.6/4.5 約 US$30.00。[24][13]

最值得優先驗證的重點是什麼?

API 以每 100 萬 token 單價比較,gpt 5.1 codex mini 最便宜:100 萬輸入 + 100 萬輸出、無快取約 US$2.25;Claude Opus 4.7/4.6/4.5 約 US$30.00。[24][13] gpt 5.3 codex 比 Codex mini 貴很多,同一簡化情境是 US$15.75,但仍低於 Claude Opus 的 US$30.00。[25][13]

接下來在實務上該怎麼做?

月費方案不能只看 US$20 或 US$200;Codex 有 5 小時使用窗,Claude Code 在 Pro 的存取權曾對部分新註冊者測試調整。[1][14]

下一步適合探索哪個相關主題?

繼續閱讀「Claude Security 公測版:Anthropic 的企業程式碼漏洞掃描工具」,從另一個角度查看更多引用來源。

開啟相關頁面

我應該拿這個和什麼比較?

將這個答案與「Grok 4.3 API 解讀:1M 上下文、低 token 價格,xAI 想搶下哪個入口?」交叉比對。

開啟相關頁面

繼續深入研究

研究對話

研究問題

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...