Learn
Codex CLI Cost: Billing, Credits, ChatGPT Plans, and API
Codex CLI cost depends on authentication: ChatGPT plan limits and shared Work/Codex credits with ChatGPT sign-in, or separate OpenAI API token billing with an API key.
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.
Codex CLI has no standalone subscription price. ChatGPT sign-in uses the Codex allowance attached to Free, Go, Plus, Pro, Business, Edu, or Enterprise, and ChatGPT Work shares that usage structure. API-key sign-in is billed separately at standard OpenAI API rates. Standard Business seats include ChatGPT and Codex; legacy Codex-only seats require a seat before June 24, 2026 or a pending invite as of June 24.
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, legacy 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 eligibility-bound and 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. Plus is $20, while Pro starts at $100 for 5x usage and has a $200 20x tier. Those prices describe ChatGPT product access, not API token billing, Business workspaces, or credits after included limits.
ChatGPT plan access is the default for many individuals
For an individual developer, ChatGPT sign-in is usually the simplest path. Free and Go provide lower-headroom GPT-5.6 Terra access; Plus, Pro, Business, and Enterprise can choose Sol, Terra, or Luna. The CLI remains free to install, while the plan or API credential owns the usage cost.
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?"
Free and Go are current lower-headroom entry routes. Plus and Pro are the individual upgrade paths when model choice, higher limits, or credits matter. Free access is useful for testing, but should not be treated as a predictable production-development budget. 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. ChatGPT Work and Codex share eligible agentic usage and credits, and current GPT-5.6 consumption depends on model, context, reasoning, tools, and token mix. The same hour of developer time does not translate into one fixed 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. Standard Business seats include ChatGPT and Codex under workspace governance. Separate usage-based Codex-only seats are a legacy route available only to workspaces with a seat before June 24, 2026 or a pending invite as of June 24.
New Business buyers should budget standard seats and workspace credits rather than assume a Codex-only seat is available. Existing eligible workspaces can still manage the legacy seat type. API usage remains a separate line regardless of seat choice.
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 for developer-platform budgets, CI/CD, SDK use, or internal tooling. It supports local CLI, SDK, and IDE work, but not Codex cloud, GitHub review, or Slack features tied to ChatGPT sign-in.
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.
Evidence boundary
Official sources
Editorial guidance grounded in official product sources.
FAQ
Common questions
Is Codex included in ChatGPT plans?
Yes. OpenAI's Codex pricing page says Codex is included across ChatGPT Free, Go, Plus, Pro, Business, and Enterprise, with different access levels and limits by plan.
How do ChatGPT plan limits affect Codex CLI cost?
When you sign in through ChatGPT, the relevant plan's Codex limits determine included use. Plus is positioned for focused weekly sessions, while Pro is positioned for longer, higher-intensity daily sessions.
What happens when Codex plan limits are reached?
Eligible users can purchase credits to continue after plan limits. Credit use depends on the models and features used, so review the live rate and usage dashboard rather than estimating from message count alone.
What changes when Codex CLI uses an API key?
Extra local tasks run with an API key are charged at standard API rates. That moves the work from ChatGPT plan capacity to a separate API-platform budget.
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.