Learn
How Much Does Codex CLI Cost? ChatGPT Plans, Credits, and API Billing
Codex CLI does not have one universal price: ChatGPT plans, credits, Business workspace access, Codex-only seats, and API billing are separate routes.
Clarify the spend threshold before you commit. Use this page when the core product is familiar and the real question is whether to stay free, upgrade, or switch pricing tracks.
Editorial guide
Guide
Start with the spend threshold and the conditions that change the pricing decision.
Short answer: Codex CLI does not have one universal price. If you sign in with a ChatGPT account, your cost is governed by the ChatGPT plan, included Codex limits, and any extra credits you use. If you authenticate with an API key, usage is billed through OpenAI API token pricing instead. Business workspaces add another path because Codex can be bought as part of ChatGPT Business or as Codex-only access for developers who do not need ChatGPT seats.
For the exact plan matrix, start with Codex Pricing. For the underlying product fit, see Codex. If your real question is whether you can try it without paying, use Is Codex Free?. If you are choosing between ChatGPT sign-in, Business workspace ownership, CLI authentication, and API billing, use Codex ChatGPT vs API Access. This page focuses on the CLI cost boundary: what changes when the same command-line tool is used through ChatGPT, credits, a Business workspace, Codex-only seats, or an API key.
The cost depends on the sign-in route
The CLI itself is not the whole pricing story. OpenAI's CLI documentation treats Codex CLI as a local developer surface that can be authenticated through a ChatGPT account or through an OpenAI API key. That means two people can install the same CLI and end up in different billing systems depending on the credential they choose during setup.
Route | What pays for usage | Best fit | Main boundary |
|---|---|---|---|
ChatGPT sign-in | Included Codex access on the ChatGPT plan, then plan limits or credits | Individuals who want an interactive coding agent tied to their ChatGPT subscription | Not every task is unlimited; heavier work can hit plan or credit limits |
Business workspace | ChatGPT Business seats, Business Codex access, or workspace-level credits | Teams that need admin control, repository governance, and shared workspace billing | Codex-only seats are different from full ChatGPT seats |
API key | OpenAI API token usage | Local automation, scripts, SDK use, and CLI workflows that should live in an API budget | API billing does not include the cloud Codex features tied to ChatGPT workspaces |
Enterprise or Edu | Contracted workspace access and governance | Larger organizations with procurement, compliance, and admin requirements | Pricing and limits are usually negotiated or workspace-specific |
That separation is why a single answer such as "Codex costs $20" is too simple. A $20 ChatGPT Plus plan may be enough for a solo developer's interactive CLI use, but it does not describe API token billing, Business workspace seats, Codex-only access, enterprise controls, or extra credits after included limits.
ChatGPT plan access is the default for many individuals
For an individual developer, the simplest path is usually ChatGPT plan access. OpenAI lists Codex across ChatGPT routes and describes Codex usage through ChatGPT plan limits. In practice, this is the cleanest starting point when you want to open a repository, ask Codex to inspect code, run local commands, and use the same account for ChatGPT and coding work.
The cost boundary is usage, not installation. A light user who asks for small patches or explanations may stay inside included access. A heavier user who repeatedly runs long refactors, large-context tasks, cloud work, or code review can consume limits faster. That is why the plan question should be framed as "which access route and usage ceiling fit my workflow?" rather than "what does the CLI binary cost?"
ChatGPT Plus and Pro are the common individual upgrade paths because they expand access relative to free or entry-level use. Free or limited-time access can be useful for testing the interface, but it should not be treated as a durable budget for production development. If you only need the free-versus-paid boundary, Is Codex Free? is the tighter follow-up.
Credits and task limits are separate from the subscription label
Credits matter when included plan usage is not enough. OpenAI's Codex rate-card material separates usage into plan limits, credits, and model-dependent consumption. Some local work, cloud tasks, and code-review usage can draw down allowances differently, so the same hour of developer time does not always translate into the same Codex cost.
For Plus and Pro users, flexible-usage credits can extend eligible usage after included limits. For teams, credits may be managed at the workspace level. The practical budgeting question is whether Codex is replacing occasional help, becoming a daily pair-programming agent, or running persistent implementation and review workflows across repositories.
Avoid turning the rate card into a fixed per-task promise. Codex cost varies with model choice, prompt and repository context, output length, retries, cloud work, and review volume. Use the exact Codex Pricing page before setting a monthly developer budget, especially if the team plans to standardize Codex across multiple repositories.
Business workspaces and Codex-only access solve a different problem
Business buying is not just a larger individual subscription. ChatGPT Business is priced per user for full ChatGPT workspace access and can include Codex. OpenAI also describes Business Codex as a route for developers who need Codex in the workspace but do not need a ChatGPT seat. That matters for engineering teams where some users only need coding-agent access while others need the full ChatGPT product.
Codex-only access is useful when procurement wants Codex controls, repository permissions, and workspace billing without buying ChatGPT access for every developer. It also makes the budget conversation more honest: the team is not just counting seats, it is deciding who needs ChatGPT, who needs Codex, and whether usage-based credits should be shared across the workspace.
Enterprise and Edu should be treated as governed workspace routes rather than self-serve CLI prices. The important checks are admin policy, repository connection rules, data controls, audit needs, support path, and how credits or usage limits are allocated. A team that needs those controls should not rely on an individual Plus or Pro account as the long-term buying model.
API-key billing belongs in the OpenAI API budget
The CLI can also run with an API key. That path is clean when Codex work should be part of a developer platform budget, CI-style automation, SDK use, or internal tooling. In that setup, the bill follows OpenAI API pricing for the models and tokens used rather than the ChatGPT subscription page.
The API-key route is not simply a cheaper way to unlock every Codex feature. OpenAI's Codex materials distinguish local/API-key usage from cloud-based Codex features tied to ChatGPT accounts and workspaces, such as managed cloud tasks or certain collaboration surfaces. If those features are part of your workflow, the ChatGPT or Business route may be the relevant budget even if you also use the API elsewhere.
A practical rule: use ChatGPT plan access when a human developer is driving Codex interactively, use Business or Enterprise when workspace governance matters, and use API billing when Codex is part of programmatic infrastructure. Many teams will have more than one route at once, so keep the budgets separate in your internal cost model.
Where to go after the cost answer
If you are ready to pay or budget, move to Codex Pricing and verify plan access, credits, rate-card assumptions, and API rates in one place. If you are still deciding whether Codex is the right product, start from Codex and then compare the closest workflow alternatives.
For coding-agent comparisons, read Claude Code vs Codex when terminal-first agent behavior is the question, Codex vs Cursor when the IDE is the buying center, OpenAI Codex vs GitHub Copilot when Microsoft or GitHub workflow integration is central, and OpenAI Codex vs Windsurf when editor-native agent workflows are the main alternative. If the purchase route is still wrong after those checks, use Codex Alternatives to branch out.
FAQ
Common questions
Does Codex CLI have its own monthly price?
No separate universal CLI price is published as the main buying unit. The cost depends on how you authenticate and use it: ChatGPT account access follows ChatGPT plan limits and credits, Business workspace access follows workspace buying rules, and API-key use follows OpenAI API token billing.
Is Codex CLI included with ChatGPT Plus or Pro?
Yes, Codex is available through ChatGPT plan access, and Plus or Pro are the common individual paid routes. The important caveat is that inclusion does not mean unlimited work; usage can still be constrained by plan limits, model choice, task size, and credits.
Can I use Codex CLI with a free ChatGPT account?
OpenAI lists free or limited-time access paths for Codex, but free access should be treated as a trial or light-use route. Serious repository work, repeated implementation sessions, cloud tasks, or review workflows usually require a paid plan, credits, Business workspace, or API budget.
What changes if I use an OpenAI API key with Codex CLI?
The billing moves out of ChatGPT subscription logic and into OpenAI API pricing. You pay for model token usage under the API account, and you should not assume API-key usage includes every cloud or workspace feature available through ChatGPT-based Codex access.
What is a Codex-only Business seat?
It is a Business workspace access route for developers who need Codex but do not need full ChatGPT access. It helps teams separate full ChatGPT seats from Codex-focused developer access while still managing usage through the workspace.
Should teams budget Codex per seat, per task, or per API token?
Teams should separate all three concepts. Full ChatGPT Business seats are seat-based, Codex workspace usage and credits can be usage-sensitive, and API-key use belongs in API token billing. Mixing those budgets can make Codex look cheaper or more expensive than it really is.
Next steps
Take the next buying step
Use these next pages to confirm the plan, tool, or alternate route that fits once the spend boundary is clear.