Cost / Pricing

Is Codex CLI Free? Codex CLI Pricing & API Cost Breakdown (2026)

Codex CLI pricing and API cost breakdown on cloud Mac mini M4

Finance teams keep asking the same question after engineers install OpenAI’s terminal agent: “Is Codex CLI free?” The installer costs $0, but every model call bills against either your ChatGPT subscription quota or API tokens. This guide maps both wallets, cites official Codex pricing, and shows how teams running always-on agents on a rented Mac mini LaunchAgent should budget separately for compute and inference.

Note: ProxyMac publishes Mac rental pricing independently of OpenAI. Codex figures below come from OpenAI’s published rate cards as of May 2026.

Is Codex CLI free?

No—for sustained professional use. Codex CLI is free to download; inference is not free.

Billing pathInstall costInference costBest for
ChatGPT sign-in (default)$0Included in Plus ($20/mo) and higherInteractive coding
API key mode$0Per-token API ratesOverflow & automation
Free ChatGPT tier$0Limited trial onlyEvaluation, not production

Quotable definition: Codex CLI is free to download; usage is not free—every model call consumes either ChatGPT plan quota or API tokens.

Two billing systems behind one terminal

OpenAI ships Codex in the CLI, IDE extensions, and cloud tasks, but operators only manage two wallets:

  • Obra Superpowers coding agent install
  • Subscription wallet (ChatGPT auth) — Local messages and cloud tasks share rolling five-hour windows. Plus users typically see about 30–150 GPT-5.3-Codex local messages per 5h depending on prompt size (see the limits table).
  • API wallet (API key auth) — No included messages. Models bill per million input, cached input, and output tokens with a card on file.

Teams often keep ChatGPT auth on laptops and API keys for CI bursts—store keys with Keychain patterns on cloud Mac mini hosts.

ChatGPT plan snapshot (Codex-relevant)

PlanMonthly priceCodex CLIIndicative GPT-5.3-Codex local / 5h
Free$0Trial accessNot for production
Plus$20Full CLI~30–150 messages
Pro $100$100Higher caps~150–750 messages
API key onlyUsage-basedNo included cap

Subscription mode: limits, credits, and promos

Local messages and cloud tasks share one five-hour counter on ChatGPT-authenticated Codex. When you hit the ceiling, work pauses until the window resets, you buy credits, or you switch to a smaller model such as GPT-5.4-mini.

Monitor live usage with /status or enable /statusline in the CLI; reset timestamps appear on the Codex usage dashboard.

Active promo (verify dates): OpenAI documents 2× Codex usage on Pro $100 through May 31, 2026. Plan capacity using baseline limits, not promo ceilings.

API key mode: per-token mechanics

With API key authentication, Codex behaves like any OpenAI API client. Model tier dominates spend; cloud tasks and GitHub code review are not available in pure API-key mode per OpenAI’s matrix.

Worked example: A 40-turn refactor averaging 8k input + 2k output tokens per turn on a mid-tier Codex model often lands in the $3–$12 range for that session—variance is normal when agents re-read entire repositories.

Real-world monthly cost bands

OpenAI cites $100–$200 per developer per month as a typical Codex-heavy average, with tails from $40 to $400+ when cloud tasks and Fast mode spike.

PersonaStackExpected Codex spend
Plus individualCLI + GPT-5.4-mini routine$20 plan + $0–$30 credits
Pro engineerCLI + cloud tasks$100 plan + $50–$150 credits
Platform CIAPI keys on cloud Mac mini$200–$800+ API invoice
Hybrid fleetMLX + Codex codegenLower API tail — see MLX spend guide

Nine cost controls that move the needle

  1. Default to GPT-5.4-mini for lint and docstring work.
  2. Trim AGENTS.md and disable unused MCP servers.
  3. Cap parallel agents — see concurrency ceilings.
  4. Disable Fast mode unless latency SLAs require it.
  5. Separate API keys per environment with budget alerts.
  6. Route summarization to local inference per MLX hybrid guide.
  7. Use ChatGPT auth interactively; API keys for bounded automation only.
  8. Stop 429 retry storms — failover playbook.
  9. Run long agents on always-on Mac mini instead of sleeping laptops.

Codex CLI on a cloud Mac mini (infrastructure vs tokens)

Codex bills inference to OpenAI; hardware is separate. Renting a Mac mini M4 (~$99/mo entry on ProxyMac) helps when you need 24/7 OpenClaw schedules, stable egress for corporate proxies, and unified memory for hybrid MLX + Codex—across HK / JP / KR / SG / US nodes. Model tokens still flow to OpenAI; compare ProxyMac pricing only after you forecast API spend.

FAQ

Is the Codex CLI installer free?+
Yes—download and install cost $0. Model usage is billed separately.
Can I use Codex CLI without ChatGPT Plus?+
Free ChatGPT includes severely limited Codex. Sustained daily use expects Plus ($20/mo) or API pay-as-you-go.
What happens when I hit Codex limits?+
Work pauses until the five-hour window resets, you purchase credits, downgrade models, or switch to API billing.
Is API key mode cheaper than Plus?+
Not inherently—light users save on Plus; heavy autonomous agents often exceed $20 quickly.

Run Codex CLI on Apple Silicon

A ProxyMac Mac mini gives you dedicated compute for Codex CLI—infrastructure cost separate from token spend, available in HK, JP, KR, SG, and US.