Is Codex CLI free, and what does it cost?
Codex CLI itself is free and open source, but running it takes a ChatGPT Plus plan or higher ($20 a month, Pro from $100) or an OpenAI API key billed per token. The Free and Go plans include Codex only in the desktop app. On an API key, a median coding-agent day costs about $3.91 on GPT-6.1 Sol, the CLI's default model, and $0.23 on GPT-6 Luna.
For companies: one company account, with a key and a fixed monthly budget for every person and app. Create a company workspace → or talk to us
What each plan gives you in Codex CLI
| Plan | Price a month | In Codex CLI |
|---|---|---|
| Free | $0 | Not included: Codex runs only in the desktop app, on GPT-6 Luna |
| Go | $8 | Not included: desktop app only, as on Free |
| Plus | $20 | 15 to 160 GPT-6.1 Sol or 350 to 3,000 GPT-6 Luna messages per 5 hours, plus a weekly limit |
| Pro | $100, $200 or $500 | No 5-hour limit on most models; Ultrafast on $500 |
| Business | Standard $20 a seat yearly ($25 monthly), Premium $100 ($125) | Standard as Plus; Premium has more usage and no 5-hour limit. For 2 to 200 seats |
| Enterprise, Edu | Contact sales | Scales with purchased credits |
| OpenAI API key | Per token | No cap: the bill grows with use |
Message ranges are OpenAI's estimates for local tasks. Plus, Pro and Business can buy credits when the allowance runs out. Sources: OpenAI's Codex pricing and the Codex CLI repository, checked October 14, 2026; the Business row on OpenAI business pricing, November 18, 2026. From December 2026, ChatGPT and Codex share one allowance on Plus, Pro and Business (OpenAI).
What Codex costs on an API key
| Model | Input | Cached input | Output |
|---|---|---|---|
| GPT-6.1 Sol, the CLI default | $2 | $0.10 | $10 |
| GPT-6 Luna | $0.10 | $0.01 | $0.50 |
Per million tokens for prompts up to 272K tokens; longer prompts cost $4 and $15 on Sol, $0.20 and $0.75 on Luna. Source: OpenAI API pricing, October 14, 2026.
A month on a ChatGPT plan or an API key
Which one fits you
| If you | Pick |
|---|---|
| Want to try Codex | Free or Go in the desktop app. The CLI starts at Plus |
| Code with Codex a few hours a day | Plus at $20. Set GPT-6 Luna for routine work and the 5-hour window lasts far longer |
| Run out on Plus every week | Pro at $100, which drops the 5-hour limit |
| Run Codex in scripts or CI | An API key, with a spending limit set in your OpenAI account |
| Want a fixed bill and models beyond OpenAI's | A custom provider with a monthly plan: Standard Compute from $19 |
The catch
Every ChatGPT plan price comes with a usage limit. On Plus you need room in both the 5-hour window and the weekly allowance, and the default GPT-6.1 Sol uses the window much faster than GPT-6 Luna. An API key has no limit of its own, so a long agent loop on Sol turns straight into a bill.
Where Standard Compute fits
Codex CLI accepts custom providers that serve the OpenAI Responses API (/v1/responses), and Standard Compute does, at https://api.stdcmpt.com/v1. Run standardcompute launch codex, or add it as a model provider in ~/.codex/config.toml. Plans start at $19 a month for a $19 compute budget, with no overage charges: requests stop at the budget until the plan renews or you upgrade.
For companies: one company account, with a key and a fixed monthly budget for every person and app. Create a company workspace → or talk to us
FAQ
Is Codex CLI free?
The software is. Install it with npm install -g @openai/codex or Homebrew under the Apache-2.0 license, then sign in with ChatGPT Plus or higher, or paste an OpenAI API key.
Can I use Codex CLI on the ChatGPT Free or Go plan?
No. OpenAI includes Codex on Free and Go only in the desktop app, on GPT-6 Luna at standard speed. The CLI, the IDE extension and Codex on the web start at Plus.
Is ChatGPT Plus enough for Codex CLI?
For a few hours of coding a day, usually. OpenAI estimates 15 to 160 GPT-6.1 Sol messages per five hours on Plus, or 350 to 3,000 on GPT-6 Luna, with a weekly limit on top. If you run out most weeks, Pro at $100 removes the five-hour limit.
How much does Codex CLI cost on an API key?
On our measured coding-agent traffic, a median day costs about $3.91 on GPT-6.1 Sol and $0.23 on GPT-6 Luna at list prices, or about $78 and $5 over 20 working days. A busy day, the 90th percentile, costs about $35.01 on Sol.
What happens when I hit the Codex limit on Plus?
Codex stops until the five-hour window or the week resets. You can buy credits to keep going, upgrade to Pro, or switch to an API key or a custom provider.
Can Codex CLI use other providers or models?
Yes, through a custom model provider in ~/.codex/config.toml, as long as it serves the OpenAI Responses API. That covers OpenAI-compatible gateways such as Standard Compute, which also route to Claude, DeepSeek and Gemini models.