Is Codex free? What the free plans include, and how to run Codex on local models
Codex's free plans only include a small model in the desktop app. Full Codex starts at Plus, but the CLI can run local models for free with Ollama or LM Studio.


The short answer
Only a little of Codex is free. The Free and Go plans get GPT-6 Luna at Standard speed in the ChatGPT desktop app, as it rolls out. Codex in the CLI, the IDE extension, on the web and on iOS, with the stronger models, starts at Plus for $20 a month, or runs on an API key at API prices. To spend nothing, run the Codex CLI on a local model through Ollama or LM Studio.
| Option | What you pay | Good to know |
|---|---|---|
| ChatGPT Free or Go | $0 or $8 a month | GPT-6 Luna in the desktop app only |
| ChatGPT Plus or higher | From $20 a month | Full Codex, within the plan's usage limits |
| OpenAI API key | Per token | CLI, SDK and IDE extension, no cloud features |
Local model with --oss | Nothing but your own hardware | Ollama or LM Studio; use a 64k+ context; weaker than GPT-6.2 on most machines |
| Codex for Open Source | Free if accepted | For open-source maintainers: six months of ChatGPT Pro with Codex, and API credits |
Article · Codex pricing: what each ChatGPT plan includes, what an API key costs, and paying only for what you use → What each ChatGPT plan and an API key cost for Codex.
Run Codex on a local model
# Ollama's launcher sets up a Codex profile and starts it
ollama launch codex
# or use Codex's own local mode
codex --oss
codex --oss -m gpt-oss:120b
codex --oss --local-provider lmstudio--ossuses a local open-source provider: the one you pass with--local-provider, theoss_providerin your config, or, if neither is set, the CLI asks you to choose Ollama or LM Studio.codex execstops with an error instead of asking.- To make it the default, add
oss_provider = "ollama"(or"lmstudio") to Codex's config.toml. - Give the model at least a 64k context window. Inside Codex,
/modelswitches between your installed models that support tools. - Ollama's cloud models, such as
gpt-oss:120b-cloud, run larger models without downloading them.
Article · Codex config.toml: where it is, and the settings worth changing → Codex's config.toml: where it lives and the settings worth knowing.
Pick the model per session in Mirasim
Mirasim runs the Codex CLI itself, and its free plan includes the whole local workspace. Sessions on your own ChatGPT sign-in, API keys or local models use no Mirasim credit, and you choose the model for each session instead of editing config.toml.
- Local models: Mirasim detects Ollama (and mlx-lm on macOS), can start the backend and pull models, and adds it as a model provider.
- Other providers: add any OpenAI-compatible endpoint and key in Settings › Models, then set the session's “Paying with” to “API key”.
- Or use GPT-6.2 on Mirasim credit, charged per use: Astra Limited time: 90% off, Sol Limited time: 90% off off the official API price.
Chapter 16 · Models, accounts and quota › Local models → Local models in Mirasim: Ollama and mlx-lm.
Questions
- Is the Codex CLI free to install?
- Yes, installing it costs nothing. Using it needs a ChatGPT plan that includes it, an API key, or a local model with
--oss. - Does a local model use my ChatGPT limits?
- No. With
--ossthe model runs on your machine through Ollama or LM Studio. - Who can get Codex for Open Source?
- Core maintainers and people running widely used public projects; OpenAI also asks projects that play an important role but don't fit the criteria to apply and explain why.
Article · Is Claude Code free? What it costs, and how to run it for free or for less → The same question for Claude Code.
Sources
Checked on November 27, 2026 against OpenAI's Codex documentation (learn.chatgpt.com/docs: Pricing, Command line options, Advanced Configuration), the Codex for Open Source page (developers.openai.com/community/codex-for-oss) and Ollama's Codex guide (docs.ollama.com/integrations/codex). Check those pages for current plans and flags.
Keep reading

Is Claude Code free? What it costs, and how to run it for free or for less
Claude Code is free to install, but running it on Claude needs a paid plan or an API key. The free and cheap options: local models with Ollama, or other providers.

Claude Code login: how to sign in, switch accounts, and fix login problems
How to log in to Claude Code with a Claude plan, the Console or an API key, which credential wins, how to keep several accounts, and fixes for common login errors.

Claude Code pricing: what each plan costs, what the API costs, and paying only for what you use
Claude Code comes with Claude Pro, Max, Ultra, Team and Enterprise, or runs on an API key per token. What each costs, what developers spend, and how to spend less.