Learn
Codex CLI Cost: Billing, Credits, ChatGPT Plans, and API
Understand Codex CLI billing across ChatGPT plans, credits, Business seats, Codex-only access, and separate OpenAI API token costs.
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
Is Codex CLI included with ChatGPT?
Codex CLI access can depend on the ChatGPT plan or workspace route used to sign in, so check the plan and credit rules attached to that account.
Does Codex CLI use API billing?
Not always. ChatGPT plan access, credits, workspace seats, and API-key usage are different billing routes and should not be mixed together.
What are Codex credits?
Codex credits are a usage control for Codex work and should be evaluated separately from the name of the ChatGPT subscription.
When do Business seats matter for Codex?
Business seats matter when a team needs workspace ownership, admin controls, and predictable access rather than individual account billing.
Does Codex CLI have its own monthly price?
The CLI itself is not the whole pricing system. The cost depends on whether you sign in with ChatGPT, use plan limits and credits, work through a Business workspace, buy Codex-only access, or authenticate with an API key.
Is Codex CLI billed through ChatGPT?
It can be. If you sign in with a ChatGPT account, Codex CLI usage follows the relevant ChatGPT plan, Codex limits, and any credits that apply to that account or workspace.
Do Codex CLI tasks use API credits?
Only when you use an API-key route. ChatGPT sign-in and API-key authentication are different budget paths, so do not assume a ChatGPT subscription includes API token usage.
What changes if I use an OpenAI API key with Codex CLI?
API-key use moves the budget to OpenAI API billing. That is better for programmatic or developer-controlled usage, but it should be planned as token-based API spend rather than a ChatGPT seat cost.
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.