← Blog

How-to4 min read

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.

Mirasim's agent and model picker, where a Codex session can run on a local modelMirasim's agent and model picker, where a Codex session can run on a local model

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.

From OpenAI's Codex pricing page and Codex for Open Source page, November 27, 2026.
OptionWhat you payGood to know
ChatGPT Free or Go$0 or $8 a monthGPT-6 Luna in the desktop app only
ChatGPT Plus or higherFrom $20 a monthFull Codex, within the plan's usage limits
OpenAI API keyPer tokenCLI, SDK and IDE extension, no cloud features
Local model with --ossNothing but your own hardwareOllama or LM Studio; use a 64k+ context; weaker than GPT-6.2 on most machines
Codex for Open SourceFree if acceptedFor open-source maintainers: six months of ChatGPT Pro with Codex, and API credits

Run Codex on a local model

From Codex's CLI options and Ollama's Codex guide.
# 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
  • --oss uses a local open-source provider: the one you pass with --local-provider, the oss_provider in your config, or, if neither is set, the CLI asks you to choose Ollama or LM Studio. codex exec stops 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, /model switches between your installed models that support tools.
  • Ollama's cloud models, such as gpt-oss:120b-cloud, run larger models without downloading them.

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.

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 --oss the 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.

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