Codex CLI is a terminal-based coding agent that reads files, runs commands, and builds software from natural-language instructions. The most common question about it — "what does a Codex subscription cost?" — has a slightly surprising answer.
There is no standalone Codex subscription. Codex is bundled into every ChatGPT plan, including the Free tier at $0/month, so the real question is not whether to subscribe but which ChatGPT plan gives you enough usage. The alternative path is an OpenAI API key, which skips plans entirely and bills per token.
Verified 2026-08-13. Every price, rate limit, and credit figure on this page was checked against OpenAI's own published documentation on that date — the ChatGPT and Codex pricing docs and the OpenAI API pricing page. Nothing here is copied from secondhand articles. OpenAI changes plan names, model names, and limits often, so re-check before you buy.
If you are working from older guidance, note that a lot has changed: Codex moved to token-based credit pricing in April 2026, the plan ladder gained Free, Go, and two separate Pro tiers, and the model lineup is now the GPT-5.6 family (Sol, Terra, Luna) rather than the GPT-4o and o1 models most older articles still describe.
Subscription Requirements Overview
Codex CLI does not have its own paywall — it borrows credentials from one of two OpenAI access paths. You either sign in with a ChatGPT plan (flat monthly subscription, capped throughput) or supply an OpenAI API key (metered pay-as-you-go, uncapped). The diagram below shows how both routes reach the same CLI.
The Full ChatGPT Plan Ladder
These are OpenAI's published plans, all of which include Codex access. Prices verified 2026-08-13.
| Plan | Price | Codex usage | Who it is for |
|---|---|---|---|
| Free | $0/month | Quick coding tasks | Trying Codex, light use |
| Go | $8/month | Lightweight coding tasks | Casual individual use |
| Plus | $20/month | Full Codex on web, CLI, IDE and iOS | Most working developers |
| Pro (5x) | From $100/month | 5x Plus rate limits | Heavy interactive and agentic work |
| Pro (20x) | $200/month | 20x Plus rate limits | All-day agentic workloads |
| Business | $20/user/month, annual, 2+ users | Plus-level usage, workspace credits | Startups and teams |
| Enterprise / Edu | Quote-only (contact sales) | Priority processing, admin controls | Organisations at scale |
| API key | No subscription; per-token | Uncapped, metered | Automation, CI, shared environments |
Two things in that table catch most people out. First, the Free plan includes Codex — a lot of older writing (including earlier versions of this page) claims there is no free tier, and that is no longer true. Second, Pro is not a single $200 product: it starts at $100/month for 5x Plus limits, with $200/month buying 20x.
What the paid tiers add
- Plus ($20/month) covers Codex across the web app, CLI, IDE extension, and iOS, plus cloud integrations, the GPT-5.6 model family, and the ability to buy extra credits.
- Pro (from $100/month) adds the choice of 5x or 20x higher rate limits than Plus and preview access to GPT-5.3-Codex-Spark. The $200/month tier also includes unlimited voice.
- Business ($20/user/month, annual, 2+ users) brings a shared workspace, SAML SSO, MFA, and flexible workspace credits.
- Enterprise and Edu add priority processing, enterprise security controls, audit logs, an analytics API, and data residency options. OpenAI does not publish a price — it is quote-only.
For installation, see our guide on how to install OpenAI Codex CLI. To weigh sign-in against an API key in more depth, see Codex CLI: ChatGPT login vs API key.
How the Rate Limits Actually Work
Codex usage is not a monthly bucket. It runs on a rolling 5-hour window that local messages and cloud chats share, and OpenAI notes that additional weekly limits may apply on top. Burn through your window in the terminal and the web app is throttled too.
OpenAI publishes allowances as ranges per model, per 5-hour window:
| Plan | GPT-5.6 Sol | GPT-5.6 Terra | GPT-5.6 Luna |
|---|---|---|---|
| Plus / Business | 10-100 | 25-200 | 250-2,000 |
| Pro 5x | 50-500 | 125-1,000 | 1,250-10,000 |
| Pro 20x | 200-2,000 | 500-4,000 | 5,000-40,000 |
| API key | Uncapped (billed per token) | Uncapped | Uncapped |
The ranges are wide because a "message" is not a fixed unit of work. An agentic turn that reads thirty files, runs a test suite, and rewrites four modules consumes vastly more than a one-line question. The model choice matters just as much as the plan: Luna gives you roughly 25x the message count of Sol on the same plan.
That is the single most useful lever most people ignore. If you are hitting limits on Plus, try dropping routine work to Terra or Luna before you spend $80 more per month upgrading to Pro. Sol is worth reserving for genuinely hard problems.
For a deeper treatment of what to do when you hit the ceiling, see Codex CLI usage and rate limits.
Credits: What They Are and What They Cost
When you exhaust your included usage on Plus or Pro, you do not have to upgrade. You can buy credits from Codex Settings under Usage and Credits. OpenAI publishes a credit rate card per million tokens:
| Model | Credits / 1M input | Credits / 1M cached input | Credits / 1M output |
|---|---|---|---|
| GPT-5.6 Sol | 125 | 12.5 | 750 |
| GPT-5.6 Terra | 50 | 5 | 300 |
| GPT-5.6 Luna | 5 | 0.5 | 30 |
| GPT-5.4 mini | 18.75 | 1.875 | 113 |
What a credit is worth in dollars
OpenAI does not print a headline "1 credit = $X" figure, but it publishes both the credit rate card above and dollar API rates for the same models — so the conversion is derivable. Divide the dollar rate by the credit rate for each model and direction:
| Model and direction | API dollars / 1M | Credits / 1M | Implied $ per credit |
|---|---|---|---|
| Sol input | $5.00 | 125 | $0.04 |
| Sol output | $30.00 | 750 | $0.04 |
| Terra input | $2.00 | 50 | $0.04 |
| Terra output | $12.00 | 300 | $0.04 |
| Luna input | $0.20 | 5 | $0.04 |
| Luna output | $1.20 | 30 | $0.04 |
A credit is worth $0.04, and the figure holds exactly across every model and both token directions. That is not a coincidence — credits are deliberately priced to track API rates, which means buying credits is neither a discount nor a penalty compared with using an API key. It is the same money in a different wrapper.
The practical consequence: topping up with credits is a fair-value transaction, so use it for occasional overflow without feeling gouged. Note also that cached input costs 10% of standard across every model, which is a real saving on iterative sessions where the same context is resent.
API Key Pricing
If you authenticate with an API key, you skip plan limits entirely and pay published API rates. These are the models most relevant to Codex work, verified 2026-08-13:
| Model | Input / 1M | Cached input / 1M | Output / 1M |
|---|---|---|---|
| GPT-5.3-Codex | $1.75 | $0.175 | $14.00 |
| GPT-5.6 Sol | $5.00 | $0.50 | $30.00 |
| GPT-5.6 Terra | $2.00 | $0.20 | $12.00 |
| GPT-5.6 Luna | $0.20 | $0.02 | $1.20 |
| GPT-5.4 | $2.50 | $0.25 | $15.00 |
| GPT-5.4-mini | $0.75 | $0.075 | $4.50 |
Output tokens dominate the bill everywhere — 8x input on GPT-5.3-Codex, 6x on Sol and Terra. Verbose multi-file generation is where spend climbs, not long context. Paste a real prompt into our LLM Token Counter to turn these rates into an actual dollar figure for your workload.
Subscription vs API Key: The Break-Even
This is the decision the plan ladder is really asking you to make, and it is straightforward arithmetic once you have verified rates.
Take a representative Codex session: 50,000 input tokens and 10,000 output tokens (a moderate task touching several files, with the context resent across turns).
| Model | Input cost | Output cost | Session total | Sessions per $20 |
|---|---|---|---|---|
| GPT-5.6 Luna | $0.010 | $0.012 | $0.022 | ~900 |
| GPT-5.3-Codex | $0.088 | $0.140 | $0.228 | ~88 |
| GPT-5.6 Terra | $0.100 | $0.120 | $0.220 | ~90 |
| GPT-5.6 Sol | $0.250 | $0.300 | $0.550 | ~36 |
Read the last column as your break-even against Plus at $20/month:
- Under about 4 Terra-class sessions per working day, an API key is cheaper than Plus. Above that, Plus wins and keeps winning, because the subscription price stops rising while metered spend does not.
- On Sol, the break-even drops to under 2 sessions a day. Frontier-model users cross into subscription territory almost immediately.
- On Luna, you would need around 40 sessions a day to justify $20. Light users on cheap models genuinely should not subscribe.
The same logic explains Pro. Pro 5x at $100/month is worth it when your metered equivalent would exceed $100 — about 455 Terra-class sessions a month, or roughly 20 a day, equivalent to 2,500 credits at $0.04 each — and not before. Because credits track API rates exactly, you can measure this directly: watch your credit burn for a month, multiply by $0.04, and compare against the next tier's price. If credit top-ups are costing you less than $80 a month on top of Plus, staying on Plus is correct.
The Cheapest Ways to Run Codex
If cost is the binding constraint, in ascending order of spend:
- Free plan, $0/month. Codex is included. Fine for occasional tasks.
- Local model, $0 marginal. Codex CLI accepts any OpenAI-compatible base URL, so you can point it at Ollama or a local gateway. No subscription, no rate limits, code never leaves your machine — at the cost of capability on hard multi-step problems. Size the hardware with our Self-Hosted LLM Cost Calculator.
- API key on Luna, a few dollars a month. At $0.20/$1.20 per million tokens, light metered use is remarkably cheap and has no ceiling.
- Go, $8/month. The cheapest paid plan, for casual individual use.
- Plus, $20/month. The right default for a working developer.
The genuinely cost-conscious move is a hybrid: run routine work on Luna or a local model, keep Plus for the sessions that need frontier capability, and buy credits rather than upgrading when you occasionally overrun.
Where Codex Sits Against Alternatives
Cross-vendor subscription comparisons age badly, and most articles in this niche quote plan prices that were retired months ago. What can be compared reliably is published API token rates, verified the same day:
| Model | Input / 1M | Output / 1M | Source verified |
|---|---|---|---|
| GPT-5.3-Codex (OpenAI) | $1.75 | $14.00 | 2026-08-13 |
| GPT-5.6 Terra (OpenAI) | $2.00 | $12.00 | 2026-08-13 |
| Claude Sonnet 5 (Anthropic) | $2.00 | $10.00 | 2026-08-13 |
| Claude Opus 5 (Anthropic) | $5.00 | $25.00 | 2026-08-13 |
| Gemini 3.1 Pro (Google) | $2.00 | $12.00 | 2026-08-13 |
On token rates the mid tiers are strikingly close — Codex, Terra, Sonnet 5, and Gemini 3.1 Pro all sit around $2 input, differing mainly on output. Price is therefore not the deciding factor between these tools; workflow fit is. Codex CLI's distinguishing features are image input for design-to-code, session resume, the built-in /review command, and MCP server support.
For subscription-tier comparisons across coding CLIs, see AI Coding CLI Tools: Complete Pricing Guide and Codex CLI vs Claude Code — and check each vendor's own pricing page before committing, because these move constantly.
Codex CLI Features Worth Paying For
Whether the subscription is justified depends partly on features you cannot get elsewhere.
Image input (mockups to code)
codex "Implement this UI component in React" --image ./mockup.png
This enables design-to-code workflows where you hand over a Figma export and get working components. See how to use image input with Codex CLI.
Session resume
codex resume --last
Picks up exactly where you left off, including file context and prior decisions. For long-running work this alone reduces token spend meaningfully, because you stop re-establishing context — and re-sent context is exactly what cached input pricing discounts to 10%.
The /review command
/review
Codex examines staged changes, uncommitted modifications, or specific commits and returns prioritised feedback. See how to use Codex for code review.
MCP server support
Codex CLI supports the Model Context Protocol, so it can reach databases, APIs, and custom tooling rather than only editing files.
Recommendation Summary
- Just trying it? Free, $0. Codex is included; there is no reason to pay to evaluate.
- Casual use? Go at $8/month, or an API key on Luna.
- Working developer, interactive coding? Plus at $20/month. This is the right answer for most people, and the break-even maths above shows why: past roughly four moderate sessions a day, flat-rate beats metered.
- Routinely hitting the 5-hour window? First switch routine work to Terra or Luna, then buy credits at $0.04 each. Only move to Pro 5x ($100/month) when top-ups exceed about $80/month.
- All-day agentic workloads? Pro 20x at $200/month.
- Team? Business at $20/user/month annual for 2+ users; Enterprise for admin controls and data residency, quote-only.
- CI, automation, scripted runs? An API key, with a spending limit set on your OpenAI Platform account so a runaway job cannot run away with your budget.
Generate a starter config.toml for whichever path you choose with the interactive tool below, then drop it into ~/.codex/:
For ongoing usage guidance, explore our Codex CLI knowledge base:
Start on the cheapest tier that clears your workload, measure your credit burn for a month, and let the $0.04-per-credit conversion tell you when to move up. That is a decision you can make with numbers rather than guesswork.