Is Codex Free? OpenAI Codex Pricing, Free Tier, and Limits Explained
In this article
OpenAI Codex (the CLI agent) is free to use if you have a ChatGPT Plus or Pro subscription. There is no separate charge for Codex itself. However, usage is not unlimited: Codex runs on OpenAI's codex-1 model and is subject to the usage limits attached to your ChatGPT plan. Heavy users on Plus will hit rate limits faster than Pro subscribers.
- Free with ChatGPT Plus ($20/mo) and ChatGPT Pro ($200/mo)
- Not available on the free ChatGPT tier
- API access to
codex-1is billed separately per token
What is OpenAI Codex?
OpenAI Codex is an agentic coding tool that runs in your terminal as a CLI. Released in April 2025, it uses the codex-1 model — fine-tuned specifically for software engineering tasks — to read files, write code, run tests, and execute shell commands autonomously inside a sandboxed environment. It is distinct from the older Codex API (used to power GitHub Copilot), which was deprecated in 2023.
Is Codex free to use?
Codex is included at no extra cost for ChatGPT Plus and Pro subscribers. OpenAI bundles it with paid plans as part of the broader push toward agentic AI tools. You cannot use Codex on the free ChatGPT tier. If you want direct API access (for scripting or integrations), you pay per token through the OpenAI API.
| Plan | Codex CLI access | Monthly cost | Usage level |
|---|---|---|---|
| ChatGPT Free | No | $0 | N/A |
| ChatGPT Plus | Yes | $20/mo | Standard limits |
| ChatGPT Pro | Yes | $200/mo | Extended limits |
| API (codex-1) | Pay-per-token | Varies | No hard cap |
What are the usage limits on Codex?
OpenAI has not published exact task or message quotas for Codex CLI the way Anthropic does for Claude Code. Limits are enforced dynamically based on demand and your plan tier. In practice, Plus users report hitting slowdowns or soft blocks during peak hours, while Pro users have more headroom. For current limits, check your OpenAI usage dashboard.
- Plus: Standard rate limits shared with other GPT-4o usage
- Pro: Higher rate limits and priority access
- API: Governed by your API tier (free, tier 1–5)
For a detailed breakdown, see our post on Codex usage limits and reset times.
How does Codex compare to Claude Code's free tier?
Claude Code is not free on any plan: it requires a Claude Pro ($20/mo) or Max ($100 or $200/mo) subscription, and usage is metered within a 5-hour rolling window. Codex, by contrast, is bundled into ChatGPT Plus with no separate charge. If cost is the primary concern and you already have a Plus subscription, Codex is the cheaper entry point.
| Tool | Included with subscription? | Min monthly cost | Usage model |
|---|---|---|---|
| OpenAI Codex | Yes (Plus/Pro) | $20/mo | Dynamic rate limits |
| Claude Code | Yes (Pro/Max) | $20/mo | 5-hour rolling window |
| GitHub Copilot | Free tier exists | $0 (limited) | Monthly completions cap |
| Cursor | Free tier exists | $0 (limited) | Monthly fast requests |
See our full Claude Code vs Cursor pricing comparison for more detail on the subscription differences.
How do you install and run Codex?
Codex CLI installs via npm. You need Node.js 22 or later and an OpenAI account on a Plus or Pro plan.
npm install -g @openai/codex
export OPENAI_API_KEY=your_key_here
codex
Run codex from any project directory. It will read your codebase and accept natural language instructions. The tool runs in a sandboxed environment by default, so file writes and shell commands are contained. Full setup documentation is available in the openai/codex GitHub repository.
Is the Codex API free?
No. The codex-1 model accessed via the OpenAI API is billed per token. As of mid-2025, OpenAI has not published a public price card specifically for codex-1 separate from its other models. New API accounts receive a small free credit, but sustained agentic use will exhaust that quickly. See OpenAI Codex pricing details for the latest rates.
What are the best free alternatives to Codex?
If you want a genuinely free AI coding tool with no subscription required, your best options are GitHub Copilot's free tier (2,000 completions/month, 50 chat messages/month) and Cursor's free tier (limited fast requests). Both degrade to slower models once you exceed the free cap. Codex does not have a free tier at all: if you are not a Plus or Pro subscriber, you cannot use it.
- GitHub Copilot Free: 2,000 code completions and 50 chat messages per month, no credit card needed
- Cursor Free: Limited fast requests per month before falling back to slow mode
- Kiro Free: Preview access available; see Kiro pricing and free tier for limits
- Windsurf Free: Free tier with monthly credit allowance; details at Windsurf free tier limits
Key takeaways
- Codex CLI is free if you already have ChatGPT Plus or Pro — no extra charge.
- There is no free-tier access. You must be on a paid ChatGPT plan.
- API access (
codex-1) is separate and billed per token. - Usage limits exist but are not publicly documented — Pro users get higher headroom than Plus.
- If you want a completely free coding assistant, Copilot Free or Cursor Free are the closest alternatives.
Sources
Never Get Locked Out Mid-Task Again
Never hit your usage limits unexpectedly. Usagebar lives in your menu bar and shows your 5-hour and weekly limits at a glance.
Get Usagebar$9 — one-time, lifetime updates