Developer Tools

Codex CLI Subscription Options: Plans, Limits and Cost

There is no standalone Codex subscription. Compare ChatGPT plans, included Codex usage, purchased credits, and API-key billing before choosing an access path.

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.

OpenAI changes plan names, models, prices, and limits often. Check the ChatGPT and Codex pricing docs and the OpenAI API pricing page 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 and Go, and Pro now has multiple tiers. The model lineup has changed since older articles described GPT-4o and o1; check the current model list before choosing a plan.

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 with plan allowances) or supply an OpenAI API key (metered pay-as-you-go, subject to API rate limits). 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 plan usage allowances, 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 Plan usage allowance 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 the main access paths. Check OpenAI's current pricing documentation for availability and exact limits.

PlanCost modelCodex usageWho it is for
FreeNo subscription chargeLimited useTrying Codex, light use
GoPaid subscriptionMore use than FreeCasual individual use
PlusPaid subscriptionIncluded usage across Codex surfacesRegular interactive work
ProMultiple paid tiersHigher allowances; no current five-hour limitHeavy agentic work
BusinessPer-seat subscriptionWorkspace usage and controlsTeams
Enterprise / EduContact salesOrganization optionsOrganizations at scale
API keyMetered per-token billingSubject to API rate limitsAutomation, CI, shared environments

The Free plan includes Codex, though availability and allowance can change. Pro has multiple tiers; compare current features and limits in the pricing documentation.

What the paid tiers add

  • Plus covers Codex across the web app, CLI, IDE extension, and iOS, plus cloud integrations and the ability to buy extra credits.
  • Pro offers more included usage and additional features. Pro plans currently have no five-hour limit.
  • Business brings a shared workspace and administrative controls.
  • Enterprise and Edu add organization security and administration options; contact sales for pricing.

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.

Advertisement

How the Rate Limits Actually Work

Local messages and cloud chats share a plan's usage allowance. OpenAI publishes five-hour estimates for Plus and Standard Business, but Pro plans currently have no five-hour limit. Weekly limits may also apply. An API key has separate rate limits based on the model and account tier.

The current model lineup changes over time. A message is not a fixed unit of work: large agentic tasks consume more of the allowance than short prompts. Check your usage dashboard for the models available to your account, remaining allowance, and reset times.

If you are hitting limits, try a smaller available model for routine work before choosing a higher plan or buying credits.

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 eligible users exhaust included usage, they can buy credits to continue working. Credit consumption varies by model and mode, and purchase prices can vary by plan. Check the current rate card and your usage dashboard before topping up.

What a credit is worth in dollars

There is no universal conversion from API token prices to included subscription tasks. API and ChatGPT credits are billed through different paths, and model choice, context, tools, caching, and speed mode affect usage. Measure actual credit use for your workload.

API Key Pricing

An API key bills usage at published API rates, separately from your ChatGPT plan allowance. It is subject to API rate limits. Use the OpenAI API pricing page for current model rates, and paste a real prompt into our LLM Token Counter to estimate tokens for your workload.

Subscription vs API Key: The Break-Even

Compare actual monthly API charges, included subscription usage, purchased credits, and the features available through each route. API token-price arithmetic alone cannot estimate the number of tasks included in a ChatGPT subscription. A task's model, context, tools, and caching can change its usage substantially.

The Cheapest Ways to Run Codex

If cost is the binding constraint, start with the Free plan for light use. A local model can avoid OpenAI usage charges, though it requires your own hardware; size it with our Self-Hosted LLM Cost Calculator. For automation or occasional local use, compare metered API charges with the current Go and Plus plans. Purchased credits can cover occasional overages on eligible plans.

Where Codex Sits Against Alternatives

Cross-vendor subscription comparisons age badly. Compare current published API token rates alongside workflow fit, model availability, and subscription features. Codex CLI's distinguishing features include image input, 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? Start with Free and check its current allowance.
  • Casual use? Compare Go with metered API use for your own workload.
  • Working developer, interactive coding? Check Plus's current usage allowance and features.
  • Routinely reaching limits? Try a smaller available model, then compare credit top-ups with Pro tiers.
  • Heavy agentic workloads? Compare the Pro options, and their current features, against your actual usage.
  • Team? Review Business or contact sales for Enterprise options.
  • CI, automation, scripted runs? Use an API key and check its rate and spending limits.

Generate a starter config.toml for whichever path you choose with the interactive tool below, then drop it into ~/.codex/:

Interactive toolCodex Cli Config GeneratorRuns in your browser — nothing is uploaded.

For ongoing usage guidance, explore our Codex CLI knowledge base:

Start on a tier that fits your workload, measure your actual usage, and compare the current plan and API terms before moving up.

Frequently Asked Questions

Is OpenAI Codex CLI free to use?

Yes. Codex is included in ChatGPT Free for limited use. Paid plans offer more usage and features; check current availability and limits before choosing a plan.

How much does a Codex subscription cost?

There is no separate Codex subscription. Codex is included in eligible ChatGPT Free, Go, Plus, Pro, Business, Enterprise, and Edu plans. Pro has multiple tiers. Check current plan pricing and availability before purchasing.

What is the cheapest way to get a Codex subscription?

Start with ChatGPT Free for limited use. An API key is another option for metered local or automated use; compare your actual usage and the features you need.

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

Neither is required for basic access. ChatGPT Free includes limited Codex use, and an API key can be used for metered local work. Plus and Pro provide additional usage and features; Pro plans currently have no five-hour limit.

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

ChatGPT sign-in uses your plan allowance, shared across local messages and cloud chats. Plus and Standard Business show five-hour usage estimates; Pro plans currently have no five-hour limit. An API key bills metered usage separately and remains subject to API rate limits. API keys suit CI, automation, and scripted runs.

How are Codex usage limits counted?

Local messages and cloud chats share your plan allowance. OpenAI publishes five-hour estimates for Plus and Standard Business, while Pro plans currently have no five-hour limit. Weekly limits may also apply. Check your usage dashboard for your current model and reset time.

What is a Codex credit worth in dollars?

Credits pay for eligible usage after included usage is exhausted. Their purchase price and consumption rate depend on the plan, model, and mode. API token rates do not establish a fixed dollar value for an included subscription task.

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

There is no dependable session-count break-even. Compare your real API bill with subscription usage, feature access, and any credit purchases over time. API token prices cannot predict how many tasks a subscription includes.

Can I buy more Codex usage without upgrading my plan?

Yes. Eligible Plus and Pro users can purchase credits after reaching included usage. Compare your actual top-ups and usage needs with the current Pro options before upgrading.

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