Developer Tools

Codex CLI Subscription Options: Every Plan, Limit and Cost (2026)

There is no standalone Codex subscription — Codex CLI is included in every ChatGPT plan, starting at $0. Here is the full plan ladder, the real 5-hour rate limits, what a credit is worth in dollars, and when an API key beats a subscription.

By InventiveHQ Team

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.

Two access paths to OpenAI Codex CLI A ChatGPT subscription path with flat monthly cost and a rolling five-hour window, and an OpenAI API key path with pay-as-you-go per-token billing, both authenticating the same Codex CLI. ChatGPT plan (sign-in) Free, Go, Plus, Pro, Business Rolling 5-hour window Predictable, capped throughput OpenAI API key Pay-as-you-go per token No plan allowance consumed Bill scales with usage Codex CLI reads files, runs commands, writes code

The Full ChatGPT Plan Ladder

These are OpenAI's published plans, all of which include Codex access. Prices verified 2026-08-13.

PlanPriceCodex usageWho it is for
Free$0/monthQuick coding tasksTrying Codex, light use
Go$8/monthLightweight coding tasksCasual individual use
Plus$20/monthFull Codex on web, CLI, IDE and iOSMost working developers
Pro (5x)From $100/month5x Plus rate limitsHeavy interactive and agentic work
Pro (20x)$200/month20x Plus rate limitsAll-day agentic workloads
Business$20/user/month, annual, 2+ usersPlus-level usage, workspace creditsStartups and teams
Enterprise / EduQuote-only (contact sales)Priority processing, admin controlsOrganisations at scale
API keyNo subscription; per-tokenUncapped, meteredAutomation, 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:

PlanGPT-5.6 SolGPT-5.6 TerraGPT-5.6 Luna
Plus / Business10-10025-200250-2,000
Pro 5x50-500125-1,0001,250-10,000
Pro 20x200-2,000500-4,0005,000-40,000
API keyUncapped (billed per token)UncappedUncapped

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:

ModelCredits / 1M inputCredits / 1M cached inputCredits / 1M output
GPT-5.6 Sol12512.5750
GPT-5.6 Terra505300
GPT-5.6 Luna50.530
GPT-5.4 mini18.751.875113
Advertisement

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 directionAPI dollars / 1MCredits / 1MImplied $ per credit
Sol input$5.00125$0.04
Sol output$30.00750$0.04
Terra input$2.0050$0.04
Terra output$12.00300$0.04
Luna input$0.205$0.04
Luna output$1.2030$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:

ModelInput / 1MCached input / 1MOutput / 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).

ModelInput costOutput costSession totalSessions 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:

  1. Free plan, $0/month. Codex is included. Fine for occasional tasks.
  2. 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.
  3. 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.
  4. Go, $8/month. The cheapest paid plan, for casual individual use.
  5. 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:

ModelInput / 1MOutput / 1MSource verified
GPT-5.3-Codex (OpenAI)$1.75$14.002026-08-13
GPT-5.6 Terra (OpenAI)$2.00$12.002026-08-13
Claude Sonnet 5 (Anthropic)$2.00$10.002026-08-13
Claude Opus 5 (Anthropic)$5.00$25.002026-08-13
Gemini 3.1 Pro (Google)$2.00$12.002026-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/:

Codex Cli Config GeneratorRuns in your browser — nothing is uploaded.

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.

Frequently Asked Questions

Is OpenAI Codex CLI free to use?

Yes. Codex is included in the ChatGPT Free plan at $0/month, so you can install the CLI, sign in with a free account, and start working without paying anything. You will hit the usage ceiling faster than a paid user, but there is no paywall in front of the tool. Paid ChatGPT plans (Go at $8/month, Plus at $20/month, Pro from $100/month) raise your limits rather than unlock the product. Verified on OpenAI's pricing documentation, 2026-08-13.

How much does a Codex subscription cost?

There is no separate Codex subscription — you pay for a ChatGPT plan and Codex comes with it. As of 2026-08-13 the published individual plans are Free ($0/month), Go ($8/month), Plus ($20/month), and Pro (from $100/month for 5x limits, $200/month for 20x limits). Business is $20 per user per month on annual billing for 2 or more users, and Enterprise and Edu are quote-only through sales.

What is the cheapest way to get a Codex subscription?

The cheapest option is the Free plan at $0/month, which includes Codex for light use. The cheapest paid step up is Go at $8/month, aimed at casual individual use. If you only need Codex occasionally, an OpenAI API key with no subscription at all can be cheaper still — GPT-5.3-Codex bills $1.75 per million input tokens and $14.00 per million output tokens, so a handful of small tasks per month costs well under $8.

Do I need ChatGPT Plus or ChatGPT Pro for Codex CLI?

Neither is required. Codex works on every ChatGPT tier including Free, and it also works with an API key and no ChatGPT plan at all. Plus at $20/month is the usual choice for a working developer because it covers ordinary interactive coding. Pro (from $100/month) exists for people running long, file-heavy agent sessions who repeatedly exhaust the 5-hour window.

What is the difference between signing in with ChatGPT and using an API key?

ChatGPT sign-in draws on your plan's included usage and its 5-hour rolling limit, which is shared across Codex CLI, the web app, and the IDE extension — predictable flat cost, capped throughput. An API key bills every token through your OpenAI Platform account at published API rates, touches no plan allowance, and has no monthly cap. Sign-in suits interactive daily coding; API keys suit CI, automation, and scripted runs.

How are Codex usage limits counted?

Usage runs on a rolling 5-hour window that local messages and cloud chats share, and OpenAI notes that additional weekly limits may apply. Allowances are published as ranges per model because a message is not a fixed unit — an agentic turn that reads many files consumes far more than a short question. On Plus, OpenAI publishes 10-100 GPT-5.6 Sol messages, 25-200 Terra, and 250-2,000 Luna per window.

What is a Codex credit worth in dollars?

About $0.04. OpenAI publishes Codex credit rates and API dollar rates for the same models, and dividing one by the other gives $0.04 per credit consistently across every model and both token directions — GPT-5.6 Sol is 125 credits or $5.00 per million input tokens ($5.00 / 125 = $0.04), and 750 credits or $30.00 per million output tokens ($30.00 / 750 = $0.04). Credits are deliberately priced to track API rates, so buying credits is neither a discount nor a penalty versus the API.

When does an API key become cheaper than a Plus subscription?

Plus costs $20/month, so an API key is cheaper whenever your metered usage stays below that. At published GPT-5.6 Terra rates ($2.00 input / $12.00 output per million tokens), a session consuming 50,000 input and 10,000 output tokens costs about $0.22, so $20 buys roughly 90 such sessions a month — about four or five per working day. On the pricier GPT-5.6 Sol ($5.00 / $30.00) the same session runs about $0.55 and $20 covers only around 36. Below that volume the API wins; above it, the subscription does.

Can I buy more Codex usage without upgrading my plan?

Yes. Plus and Pro users can purchase credits once they reach their included limits, from Codex Settings under Usage and Credits. Because credits track API rates at roughly $0.04 each, occasional overflow is usually cheaper to cover with credits than by jumping from Plus at $20/month to Pro at $100/month. Move up a tier only when you are exceeding the window routinely rather than now and then.

Can I use Codex CLI with local models instead of a subscription?

Yes. Codex CLI can point its base URL at any OpenAI-compatible endpoint, including a locally hosted model served through Ollama or similar. That means no subscription, no rate limits, and code that never leaves your machine. The tradeoff is capability — local models generally trail OpenAI's frontier models on complex multi-step coding — so this suits simple or privacy-sensitive work.

Codex CLIOpenAIChatGPTAI PricingDeveloper ToolsSubscription