If you've gone looking for "Codex CLI pricing," you've probably hit the same wall I did: there's no pricing page for Codex CLI as a product, because there's no standalone Codex subscription. Access is bundled into whatever ChatGPT plan you already have. That's genuinely good news — but it also means understanding what Codex costs requires understanding ChatGPT plans, two completely different billing models, a 5-hour usage window, and a credit system that landed in April 2026. Let me untangle it.
The one thing to internalize first
Codex CLI has two ways to authenticate, and they bill completely differently:
- Sign in with ChatGPT — uses your ChatGPT plan's included usage and shared rate limits. No per-token charges until you exhaust your allowance.
- API key — bills every token through your OpenAI Platform account at standard API rates. It does not touch your plan credits at all.
Everything about cost flows from which of these you pick. ChatGPT sign-in is the predictable, flat-rate path (you already paid for the plan). API key is the metered path — flexible and great for automation, but it can surprise you on a long run.
ChatGPT plans that include Codex
Because Codex rides along with your ChatGPT subscription, here's what you're actually paying per month:
| Plan | Price | Who it's for |
|---|---|---|
| Free | $0/mo | Trying Codex, light use |
| Go | $8/mo | Casual individual use |
| Plus | $20/mo | Most individual developers |
| Pro | from $100/mo (5x or 20x usage) | Heavy / agentic workloads |
| Business | Per-seat, pay-as-you-go | Teams |
| Enterprise / Edu | Custom (contact sales) | Orgs at scale |
The headline: the Free plan includes Codex. You can install the CLI, sign in with a $0 account, and start working. You'll hit limits faster than a paid user, but the door isn't locked behind a paywall.
How the 5-hour window works
With ChatGPT sign-in, usage isn't a flat monthly bucket — it's measured per a rolling 5-hour window, and that allowance is shared across Codex CLI, the web app, and the IDE extension. Burn through your window in the terminal and you'll find the web app throttled too.
The allowances scale with your tier. Here's roughly what each plan gets per 5-hour window, in local messages:
| Tier | GPT-5.5 | GPT-5.4 | GPT-5.4 mini |
|---|---|---|---|
| Plus | 15-80 | 20-100 | 60-350 |
| Pro 5x | 80-400 | 100-500 | 300-1,750 |
| Pro 20x | 300-1,600 | 400-2,000 | 1,200-7,000 |
The ranges exist because a "message" isn't a fixed unit — a heavy agentic turn that reads dozens of files costs more of your window than a quick question. The practical takeaway: Plus comfortably covers interactive day-to-day coding, while Pro's 5x and 20x tiers exist for people running long, file-heavy agent sessions.
Key callout: If you're an individual developer doing interactive work, Plus at $20/mo is almost certainly enough. Reach for Pro only when you're routinely hitting the 5-hour ceiling — and consider buying credits before upgrading if the overage is occasional.
Credits: what happens when you run out
When you hit your included limit on Plus or Pro, you don't have to upgrade your whole plan. You can buy credits to keep working, from Codex Settings > Usage > Credits on the web or in the Codex app.
Credits are deliberately priced to track API token rates. The per-model rates:
| Model | Credits / 1M input | Credits / 1M output |
|---|---|---|
| GPT-5.5 | 125 | 750 |
| GPT-5.4 | 62.50 | 375 |
| GPT-5.4 mini | 18.75 | 113 |
Cached input tokens cost 10% of the standard rate — a real saving on iterative sessions where context repeats.
To translate that into money: 1 credit is worth roughly $0.04 (4 cents), and a typical Codex task runs somewhere around 5-45 credits depending on the model. So an average task is on the order of a few dimes to a couple of dollars — the same ballpark as paying per token directly, which is the point.
API-key pricing (pay-per-token)
If you authenticate with an API key instead, you skip plan limits entirely and pay standard OpenAI API rates per token. Current Codex-model rates:
| Model | Input / 1M tokens | Output / 1M tokens |
|---|---|---|
| GPT-5.3-Codex | $1.75 | $14.00 |
| GPT-5.5 | $5.00 | $30.00 |
(GPT-5.5 rates are roughly 2x the GPT-5.4 line following the April 2026 price change, so treat the higher-end figure as the one to budget against.)
Output tokens dominate the bill — they're 8x the input cost on GPT-5.3-Codex — so verbose, multi-file generation is where spend climbs.
One way to blunt that per-token spend is to keep inference off the cloud entirely when you can. Because Codex CLI lets you point its base URL at any OpenAI-compatible endpoint, a local-first gateway like Wide Area AI can route requests to your own hardware first — at zero per-token cost — and only fail over to OpenAI when local nodes are unavailable.
What it actually costs in the real world
Abstract token rates are hard to reason about, so here are observed session costs at API rates:
| Task | Approx. cost |
|---|---|
| Small bug fix | ~$0.40 |
| Feature across 3-5 files | ~$1.20 |
| Test generation | ~$1.70 |
| Multi-file refactor | ~$2.40 |
| Typical coding session | $0.50-$2.00 |
Scale that up and OpenAI's own published estimate puts typical power-user spending at roughly $100-$200 per developer per month. That number is a useful sanity check: it's almost exactly the Pro tier price, which tells you the flat plan and metered usage are priced to converge for heavy users.
So which billing model should you pick?
Here's the decision I'd make:
- Interactive, day-to-day coding → ChatGPT sign-in. Predictable, you've already paid, and some Codex cloud/workspace features require it. Start on Plus; buy credits for occasional overflow.
- Automation, CI/CD, scripted runs → API key. Pay-per-token is the right model for programmatic workflows, and it keeps your interactive plan limits free for actual coding.
- Light/occasional use → Free or Go. No reason to pay $20 if you only reach for Codex a few times a week.
Teams: Business, Enterprise, and Edu
For Business, Enterprise, and Edu workspaces, usage scales with workspace credits rather than fixed personal rate limits, and admins can buy additional workspace credits as needed. Business is per-seat pay-as-you-go; Enterprise and Edu are custom-priced through sales. If you're provisioning a team, budget around the $100-$200/developer/month power-user figure rather than the personal-plan sticker price.
Avoiding surprise API bills
The metered path is where people get burned. Two things worth knowing:
- Set a spending limit on your OpenAI Platform account. API-key usage bills your card directly, and a long agentic run on an expensive model can move fast.
- Watch a known edge case: there's a reported GitHub issue where, on Windows, "Sign in with ChatGPT" could still generate or require an API key for a Pro user — quietly producing API charges. Revoking the key then broke the CLI. It's a low-frequency bug, but if you're a ChatGPT-plan user and see Platform charges you didn't expect, that's the first thing to check.
Bottom line
There is no Codex CLI subscription to buy — it's included in every ChatGPT plan, all the way down to Free. For most developers, ChatGPT sign-in on Plus ($20/mo) is the right answer: predictable cost, generous-enough 5-hour limits, and the option to buy credits (about $0.04 each) when you run long. Reach for Pro (from $100/mo) only when you're routinely hitting limits with heavy agentic work. Use an API key for automation and CI/CD, where pay-per-token (GPT-5.3-Codex at $1.75/$14.00 per 1M tokens) fits the workflow — and set a spending cap so a runaway job doesn't run away with your budget. Remember that April 2026 moved Codex to token/credit-based pricing, so older per-message guidance you find online is now out of date.