Skip to main content
Home/Blog/OpenAI Codex CLI Pricing Explained (2026): Free Tier, ChatGPT Plans, API Key & Credits
Developer Tools

OpenAI Codex CLI Pricing Explained (2026): Free Tier, ChatGPT Plans, API Key & Credits

There's no standalone Codex subscription — it's bundled with every ChatGPT plan. Here's exactly how Codex CLI pricing works across Free, Go, Plus, Pro, and Business, plus when to use an API key and what real-world usage actually costs.

By Sean

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:

  1. Sign in with ChatGPT — uses your ChatGPT plan's included usage and shared rate limits. No per-token charges until you exhaust your allowance.
  2. 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:

PlanPriceWho it's for
Free$0/moTrying Codex, light use
Go$8/moCasual individual use
Plus$20/moMost individual developers
Profrom $100/mo (5x or 20x usage)Heavy / agentic workloads
BusinessPer-seat, pay-as-you-goTeams
Enterprise / EduCustom (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:

TierGPT-5.5GPT-5.4GPT-5.4 mini
Plus15-8020-10060-350
Pro 5x80-400100-500300-1,750
Pro 20x300-1,600400-2,0001,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:

ModelCredits / 1M inputCredits / 1M output
GPT-5.5125750
GPT-5.462.50375
GPT-5.4 mini18.75113

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:

ModelInput / 1M tokensOutput / 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:

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

Frequently Asked Questions

Find answers to common questions

Yes, if you have any ChatGPT plan — including the Free $0/mo tier — you can use Codex CLI by signing in with ChatGPT, drawing on your plan's included usage. The alternative is authenticating with an OpenAI API key, which is pay-per-token and bills your Platform account separately.

No. Codex is included across every ChatGPT tier, starting with Free at $0/mo. A paid plan (Go, Plus, or Pro) raises your usage limits, but it isn't required to start. You can also skip ChatGPT entirely and use an API key on a pay-per-token basis.

ChatGPT sign-in uses your plan's included usage and shared 5-hour-window limits across CLI, web, and IDE — no per-token billing until you run out. An API key bills every token through your OpenAI Platform account at standard API rates and does not touch plan credits. ChatGPT sign-in suits interactive work; API keys suit automation and CI/CD.

At API rates, a small bug fix runs around $0.40, a feature across 3-5 files around $1.20, and a multi-file refactor around $2.40. A typical coding session lands between $0.50 and $2.00. Power users can spend roughly $100-$200 per developer per month.

Plus ($20/mo) is plenty for most individual developers doing interactive work. Move to Pro (from $100/mo, with 5x or 20x usage options) if you regularly hit the 5-hour-window limits or run long agentic sessions. OpenAI's own estimate for heavy power users is roughly $100-$200/developer/month.

Usage is measured per a rolling 5-hour window and shared across Codex CLI, web, and IDE. On Plus, that's roughly 15-80 GPT-5.5 messages per window; Pro 5x and 20x tiers multiply those allowances substantially. Once the window rolls forward, your allowance refreshes.

Yes. Plus and Pro users can purchase credits to keep working without upgrading their plan, from Codex Settings > Usage > Credits on web or in the Codex app. Credits are priced to track API token rates; 1 credit is worth roughly $0.04.

Yes. On April 2, 2026, OpenAI moved Codex from per-message pricing to token-based (credit) pricing aligned with API token usage. It applies to new and existing Plus, Pro, and ChatGPT Business plans, and new Enterprise plans.

Building Something Great?

Our development team builds secure, scalable applications. From APIs to full platforms, we turn your ideas into production-ready software.