Codex, Explained: Models, Modes, and Costs

What OpenAI's Codex is, where it runs, which models power it, how to switch between them, and what faster modes really cost.

October 19, 2026 · AI · Guide

Codex is OpenAI's coding agent. It reads and edits code, runs tasks, and reports back, and it lives in more places than most people realise. This guide covers where it runs, which models power it, how to switch between them, and what the faster modes cost.

Everything here comes from OpenAI's own documentation and pricing page, checked on 19 October 2026. Codex is changing quickly, so the sources are listed at the end.

What it is

OpenAI's overview describes the idea in a sentence: start with a goal, idea, or task, and ChatGPT can gather context, take action, and produce something useful. The tasks it suggests are understanding code, building a feature, reviewing code, and fixing failures.

Where it runs

OpenAI lists six places where Codex is available:

  • The ChatGPT desktop app
  • The ChatGPT mobile app
  • ChatGPT on the web
  • The Codex CLI
  • The Codex IDE extension
  • Codex Cloud

For developers there is also a Codex SDK, an App Server, a GitHub Action, and a non-interactive mode for scripts.

The models behind it

Codex runs on OpenAI's GPT-6 family. OpenAI describes each model by the work it suits, and prices them very differently. Pick one to see its details:

OpenAI positions Sol as near-Astra performance at a lower cost, aimed at repeated, long-running work, and Luna as the efficient choice for focused, high-volume jobs like extraction and classification. If you do not choose a model, the desktop app, CLI, and IDE extension use a recommended one.

Switching models

The same model can be set in four places, and the desktop app, CLI, and IDE extension all share one configuration file.

# for one session
codex --model gpt-6.1-sol

# for a scripted, non-interactive run
codex exec -m gpt-6.1-sol

Inside an interactive CLI session, the /model command changes the model or the reasoning effort. To set a default, add one line to config.toml:

model = "gpt-6.1-sol"

In the desktop app and on the web, the model switcher sits below the composer, and the Advanced option under Power settings lets you choose a specific model. Which models you can pick depends on your plan, client, and rollout status.

Speed has a price

This is the part that surprises people. On the API, the same model is sold at several speeds. A faster mode produces tokens sooner, and OpenAI's price list shows exactly what that costs. An update on 5 to 9 October introduced Ultrafast mode for GPT-6.1 Sol in Codex.

At the extreme, Ultrafast Astra costs sixty times what Sol costs at Flex or Batch, on both input and output. Whether faster tokens are worth six times the price depends on whether a person is waiting for them.

What the models cost

Standard list prices for the whole GPT-6 line-up on the API:

Prompts above 272,000 input tokens move to a higher band on all three models: input doubles, and output rises by half. Luna lists no batch rate.

OpenAI's pricing page also still lists a Codex-specific model, gpt-5.3-codex, at $1.75 in and $14 out per million tokens at standard speed, with a Fast tier at double that. The GPT-6 models are the newer line-up and are the ones the current Codex documentation points to.

Two agents, similar shapes

Codex has an obvious counterpart in Anthropic's Claude Code, and the two have converged on a similar set of surfaces. The names differ, but the shapes line up:

CodexClaude Code
TerminalCodex CLITerminal CLI
EditorIDE extensionVS Code and JetBrains extensions
Desktop appChatGPT desktop appClaude desktop app, Code tab
BrowserChatGPT on the web, Codex CloudClaude Code on the web
PhoneChatGPT mobile appClaude mobile app
Build your ownCodex SDKAgent SDK
In CIGitHub Action, non-interactive modeGitHub Actions, GitLab CI/CD, claude -p

For choosing between them, the useful comparison is not features but cost and results on your own work, which is what the price comparison is for. The Claude side is covered in our Claude 5.5 field guide.

Sources