Ninja Builder Sign in Get started

How to use your ChatGPT Plus plan for coding (Codex in a desktop app)

Your ChatGPT plan already includes Codex. Here is how to code with it in a desktop app or the CLI, and how the limits work.

By Ninja Builder team5 min read
Title card: Use your ChatGPT plan for coding with Codex, beside a screenshot of a desktop coding chat

Key takeaways

  • Codex is included in ChatGPT plans from Free to Enterprise; you sign in with your ChatGPT account, not an API key.
  • You can use that sign-in in the ChatGPT desktop app, the Codex CLI, the IDE extension, or apps that run Codex.
  • Plus usage is counted in five-hour windows, with weekly limits that may apply; long tasks and big contexts use more.
  • An OpenAI API key is billed separately, per use, even if you have Plus.

If you pay for ChatGPT Plus, you can already use it for coding. OpenAI includes Codex, its coding agent, in ChatGPT plans, and you sign in with your ChatGPT account instead of an API key. There is no per-message bill: your plan's Codex allowance covers the work until you reach its limit.

This guide shows where you can run Codex with that sign-in, how to set up the desktop app and the command line version, what the Plus limits mean in practice, and when an API key is the better choice.

What your ChatGPT plan includes

According to OpenAI's Codex pricing page, Codex is included in the ChatGPT Free, Go, Plus, Pro, Business, Edu and Enterprise plans. The plans differ in how much you can use it, not in whether you can. Codex cloud tasks, which run on OpenAI's computers instead of yours, are narrower: OpenAI's help centre lists eligible Plus, Pro, Business, Enterprise and Education accounts, and excludes Free and Go.

The key point for Plus users: signing in with ChatGPT and using an API key are two different billing routes.

Sign in with ChatGPTOpenAI API key
What you payYour plan's monthly pricePer use, at API rates
How usage is countedAgainst your plan's Codex limits (5-hour and weekly windows)Every token, billed to your API account
At the limitWait for the reset, buy credits, or upgradeKeeps going while your credit and budget allow
Best forDaily coding on a plan you already haveScripts, automation, or heavy bursts beyond the plan

A ChatGPT Plus subscription is not an API key. API usage is billed separately, on the OpenAI platform, even if you have Plus.

Where you can run Codex with your plan

The same ChatGPT sign-in works in several places. Pick the one that matches how you like to work:

  • The ChatGPT desktop app, in Codex mode. A window on your Mac, Windows or Linux computer where you open a project folder and give Codex tasks. Good if you never want to touch a terminal.
  • The Codex CLI. The codex command in a terminal. Open source under the Apache-2.0 licence, fast, and scriptable.
  • The Codex IDE extension. Codex in a panel beside your code, for editors such as VS Code. OpenAI also publishes a version for JetBrains IDEs.
  • Apps that run Codex for you. Desktop tools that install and drive the Codex CLI, so you get its work inside their own interface.
Diagram: your ChatGPT plan signs in to Codex, which runs in the ChatGPT desktop app, the Codex CLI, the IDE extension, or an app that runs Codex; an API key is a separate, pay-per-use route
One ChatGPT sign-in, several places to use it. An API key is a separate route with its own bill.

Set up Codex in the desktop app

  1. Download the ChatGPT desktop app from OpenAI for your system and install it.
  2. Open it and sign in with the same ChatGPT account that has your Plus plan.
  3. Switch to Codex and open the folder of the project you want to work on. Codex can only see and change files in the folders you give it.
  4. Describe the first task in plain words, for example: "Read this project and tell me how to run it locally. Don't change anything yet."
  5. Read the plan or the answer, then ask for the actual change. Review the diff before you keep it.

Starting with a read-only question is a cheap way to check that Codex understands the project before it edits anything.

Introducing the Codex app

Set up the Codex CLI

If you are comfortable in a terminal, the CLI is the quickest route. Install it with OpenAI's standalone installer on macOS or Linux, or with npm or Homebrew:

# macOS and Linux, OpenAI's installer
curl -fsSL https://chatgpt.com/codex/install.sh | sh

# or with npm
npm install -g @openai/codex

# or with Homebrew
brew install --cask codex

On Windows, OpenAI's CLI page has a PowerShell install line. Then go to your project and start it:

cd path/to/your-project
codex

On the first run, choose Sign in with ChatGPT. Your browser opens, you sign in, and the CLI picks up the session. The /permissions command controls when Codex may edit files or run commands without asking, and shows which folders it can write to.

How the Plus limits work

OpenAI describes Plus usage as a number of local messages per five-hour period, with the count depending on the model. Weekly limits may also apply, and cloud tasks can use more of your allowance than local work. OpenAI notes that model choice, context size, reasoning effort and tool use all change how much a task uses. A long refactor that reads dozens of files costs far more than a one-line fix.

When you reach the limit, OpenAI lists these options: wait for the reset shown in Codex, buy credits (eligible Plus and Pro users can do this without changing plan), or upgrade. Exact numbers change, so check the usage page in your account rather than relying on a figure from a blog post, including this one.

Our guide on using fewer tokens when coding with AI goes deeper, and what AI coding really costs compares plans and API keys across providers.

Work safely with an agent that edits files

Codex changes real files and runs real commands. A few habits keep that safe:

  • Commit your work to Git before a big task, so you can see exactly what changed and roll it back.
  • Start new or unfamiliar projects in a read-only mode and only allow edits once the plan looks right.
  • Read the diff, then run the project yourself. "It compiles" is not the same as "it works".

If something goes wrong, our guide to undoing AI code changes walks through the options.

Use your ChatGPT plan in Ninja Builder

Ninja Builder is a desktop app for Mac, Windows and Linux that can run Codex on your ChatGPT plan. In Settings › Accounts › Add account › OpenAI, the ChatGPT plan (Codex) tab installs OpenAI's Codex app in the background with OpenAI's own installer, then opens the ChatGPT sign-in in your browser. You don't need Terminal or Node.js. Your plan's Codex limits apply and nothing is billed per message.

Ninja Builder account menu listing Claude accounts, a ChatGPT plan account using a Codex model, a Gemini key, GitHub Copilot and Cursor
A ChatGPT plan account sits in the same menu as your other AI accounts.

Each step Codex takes, a command or a changed file, shows in the chat. The chat's Autonomy setting maps to Codex's own sandbox: Plan first keeps it read-only, Just build it lets it change files inside the project. You get a live preview of the site beside the chat, a built-in Git client, and the option to move a chat to Claude, Gemini, GitHub Copilot or a local model when your Plus window runs out. Be aware that Ninja Builder's own skills, playbooks and helper agents are not used in Codex chats; Codex uses its own tools there. Setup details are in the ChatGPT plan chats guide.

Ninja Builder has a 14-day free trial, then costs $4.99 a month (see pricing). Download Ninja Builder and add your ChatGPT plan in a couple of minutes.

Frequently asked questions

Is Codex included in ChatGPT Plus?

Yes. OpenAI includes Codex in ChatGPT Free, Go, Plus, Pro, Business, Edu and Enterprise plans. Plus gives you a set amount of Codex use per five-hour window, and weekly limits may also apply.

Do I need an OpenAI API key to use Codex?

No. You can sign in with your ChatGPT account and use your plan's allowance. An API key is an optional, separate route that is billed per use at API rates.

What happens when I hit the Codex limit on Plus?

Codex shows when the limit resets. You can wait, buy extra credits (eligible Plus and Pro users can do this without changing plan), or upgrade to a higher plan.

Can I use Codex without the terminal?

Yes. The ChatGPT desktop app has a Codex mode, and the IDE extension works inside your editor. Third-party desktop apps such as Ninja Builder can also install and run Codex for you.

Keep reading