# Is Codex free? Free plan, API key and open-source CLI

> Codex is on ChatGPT Free for quick tasks, and the CLI is open source, but running it costs money on any other route.

URL: https://claudegpt.si/news/is-codex-free  
Published: 2026-10-28T14:51:30.178Z  
Author: ClaudeGPT Si Newsroom  
Section: AI Tools  
Topics: OpenAI, Codex, ChatGPT, Pricing  
Publisher: ClaudeGPT Si

## Key takeaways

- OpenAI's pricing page lists Codex in ChatGPT Free at $0 a month, for quick tasks with GPT-6 Luna in the desktop app, subject to rollout.
- The Codex CLI is open source under Apache-2.0, but it still bills to a ChatGPT plan or an API key.
- With an API key you pay standard API rates and get no Codex cloud tasks, GitHub code review or Slack.

Is Codex free? Partly. OpenAI's [pricing page](https://learn.chatgpt.com/docs/pricing) lists Codex in the ChatGPT Free plan at $0 a month, but only for quick coding tasks and with a narrow model. The Codex command-line tool is open source and costs nothing to install, but you still pay to run it, either through a ChatGPT plan or per token with an API key. Prices below are as of October 28, 2026.

Our separate article covers [whether Codex is included in ChatGPT Plus](https://claudegpt.si/news/is-codex-included-in-chatgpt-plus) and what the paid plans allow. This one covers the free tier, the API key route and what "open source" does and doesn't give you.

## What the free ChatGPT plan gets

OpenAI says Codex is included in the Free, Go, Plus, Pro, Business, Edu and Enterprise plans. For Free, the page says "Explore Codex capabilities on quick coding tasks." The Free plan includes GPT-6 Luna at Standard speed in the desktop app, "subject to rollout." Go, at $8 a month, gets the same model for "lightweight coding tasks."

Two limits matter. The page publishes no usage numbers for Free or Go; its limits table covers only Plus and standard Business. And the Free listing names the desktop app, not the CLI, the IDE extension or the web. Plus is where the page lists the web, CLI, IDE extension and iOS, with cloud integrations such as automatic code review and Slack.

The README of the [openai/codex repository](https://github.com/openai/codex) says "Sign in with ChatGPT" is included with Plus, Pro, Business, Edu or Enterprise, and doesn't mention Free. The pricing page is the newer and more specific source, but the two don't match, so check the CLI sign-in yourself before counting on a free CLI.

## Using Codex with an API key

You can skip a ChatGPT plan and sign in with an OpenAI API key. According to OpenAI's [sign-in docs](https://learn.chatgpt.com/docs/auth), this works in the desktop app, the CLI and the IDE extension, and usage is billed at standard API rates through your OpenAI Platform account. The pricing page says it suits automation in shared environments like CI.

There are trade-offs. Codex cloud needs ChatGPT sign-in, so an API key gets no cloud tasks. The pricing page also lists no GitHub code review or Slack on this route, and model availability follows the models your key can use. Some plugins that need OAuth don't work either.

In the CLI, the docs give this command:

```bash
printenv OPENAI_API_KEY | codex login --with-api-key
```

`codex login status` shows which method is active. OpenAI warns against running Codex with API keys in untrusted or public environments.

### What the API costs

OpenAI's [API pricing page](https://developers.openai.com/api/docs/pricing) lists these standard prices per million tokens for short context, as read on October 28, 2026:

| Model | Input | Cached input | Output |
| --- | --- | --- | --- |
| gpt-6-luna | $0.10 | $0.01 | $0.50 |
| gpt-6.1-terra | $1.00 | $0.05 | $5.00 |
| gpt-6.1-sol | $2.00 | $0.10 | $10.00 |
| gpt-5.3-codex | $1.75 | $0.175 | $14.00 |

The same page prices gpt-5.3-codex at $3.50 input and $28.00 output in Fast tier. It also says promotional pricing for GPT-5.6 Sol runs at least through November 21, 2026. A real session costs more than one prompt, because an agent reads files and runs many steps, so the per-token price doesn't tell you the monthly bill.

## Is Codex open source

The CLI is. The repository's README states an Apache-2.0 license, and you can install it with npm (`@openai/codex`), Homebrew or an install script. OpenAI's [open-source page](https://learn.chatgpt.com/docs/open-source) also lists the Codex SDK and the app server, which live in the same repository, plus skills, plugins and the base cloud environment as separate repositories.

It also says the IDE extension and Codex cloud are not open source. The repository takes issues but not outside code contributions.

Open source means you can read and fork the tool. It doesn't include the models. The CLI still sends requests to OpenAI's models and bills them to your plan or your API key.

## Which route to pick

- To try it at no cost: the Free plan and the desktop app, within whatever limits OpenAI applies.
- For daily use in the CLI or IDE: a paid ChatGPT plan, covered in our Plus article.
- For scripts and CI: an API key, accepting pay-per-token billing and no cloud features.

OpenAI hasn't published usage numbers for the Free plan, so watch the usage dashboard once you start.

## Frequently asked questions

### Is Codex free with ChatGPT?

Partly. OpenAI's pricing page lists Codex in the Free plan for quick coding tasks, with GPT-6 Luna in the desktop app, subject to rollout. It publishes no usage limits for Free.

### Is Codex CLI open source?

Yes. The openai/codex repository states an Apache-2.0 license. The IDE extension and Codex cloud are not open source, and the models are not included.

### Can I use Codex with just an API key?

Yes, in the desktop app, CLI and IDE extension. Usage is billed at standard API rates, and Codex cloud is not supported.

### Is Codex free for students?

The pages we read don't mention a student discount. They list Edu as a plan with custom pricing through sales.

## Sources

- [Codex pricing](https://learn.chatgpt.com/docs/pricing), OpenAI
- [Codex authentication](https://learn.chatgpt.com/docs/auth), OpenAI
- [Codex open source](https://learn.chatgpt.com/docs/open-source), OpenAI
- [API pricing](https://developers.openai.com/api/docs/pricing), OpenAI
- [openai/codex](https://github.com/openai/codex), GitHub
