OpenAI gives no dollar cost per task or per month for Codex CLI on an API key, so we measured it. A small coding task on GPT-6.2 Sol cost 4.4 cents at OpenAI’s list price. Thirty such tasks a working day come to $28 a month at list and $9 through AIGROW credit.
Building with AI models? AIGROW API credit runs Claude, GPT, Gemini, Grok, Qwen and Kimi models up to 75% below list price.
- OpenAI’s Codex pricing page gives no dollar cost per task or per month on an API key. API-key sessions are billed per token at API rates, apart from any ChatGPT plan.
- A small coding task on GPT-6.2 Sol took 4 to 5 requests and cost 4.4 cents on average at OpenAI’s list price, 1.4 cents through AIGROW credit.
- Uncached input was 25.3% of the tokens and 73% of the bill. Each new session opens with about 12,000 to 13,000 tokens of Codex’s own instructions and tools, sent at the full input price.
- Cache reads were 73.6% of the tokens and 11% of the bill, because OpenAI prices a cache read at a twentieth of an uncached input token.
- GPT-6.1 Terra costs half as much per token as GPT-6.2 Sol, yet on the two tasks both finished it cost only 15% less per task.
- Thirty tasks a working day come to $28 a month on GPT-6.2 Sol at list and $9 through AIGROW credit.
How Codex CLI is billed on an API key
Installing Codex CLI costs nothing. You pay for the model it calls, in one of two ways. Signed in with ChatGPT, Codex uses the allowance of your plan: OpenAI includes Codex in every ChatGPT plan from Free to Enterprise, up to usage limits.
With an API key, every request is billed per token at API rates, and OpenAI’s Codex pricing page says those sessions do not draw on a ChatGPT allowance.
That page, read on 21 November 2026, gives no dollar cost for a task or a month on an API key. So we ran Codex on an API key and counted the tokens of every request.
Five coding tasks, measured
We gave Codex CLI 0.171.0 three everyday tasks in a small Node package of 4 source files and 2 test files: fix the bug behind a failing test, add a function with its tests, and change a function and test the change. Each task ran with codex exec in a new session on a fresh copy of the package, on GPT-6.2 Sol, the model in our Codex CLI setup guide, and the first two on the cheaper GPT-6.1 Terra; the third on GPT-6.1 Terra was cut short, as the method below says. Every task here ended with all tests passing.
Prices are per task, at OpenAI’s list price and through AIGROW credit.
| Task | Model | Requests | Uncached input | Cache reads | Output | At list | Through credit |
|---|---|---|---|---|---|---|---|
| Fix a failing test | GPT-6.2 Sol | 4 | 16,095 | 42,624 | 371 | 4.0 cents | 1.3 cents |
| Add a function with tests | GPT-6.2 Sol | 4 | 15,793 | 41,088 | 920 | 4.5 cents | 1.4 cents |
| Change a function, test it | GPT-6.2 Sol | 5 | 16,211 | 56,064 | 829 | 4.6 cents | 1.6 cents |
| Fix a failing test | GPT-6.1 Terra | 6 | 29,499 | 52,440 | 857 | 3.6 cents | 1.1 cents |
| Add a function with tests | GPT-6.1 Terra | 5 | 27,749 | 38,498 | 1,304 | 3.6 cents | 1.0 cents |
A request is one call to the API. Codex sends one, the model answers with a command to run or a file to edit, Codex runs it and sends the next, so one prompt you type becomes several requests. Each request carries the whole session so far.
Where the money goes
The three tasks on GPT-6.2 Sol, added up and priced at OpenAI’s list price, read on 18 November 2026:
| Token kind | Tokens | Share of tokens | List price per million | Cost at list | Share of the bill |
|---|---|---|---|---|---|
| Uncached input | 48,099 | 25.3% | $2.00 | 9.6 cents | 73% |
| Cache reads | 139,776 | 73.6% | $0.10 | 1.4 cents | 11% |
| Output | 2,120 | 1.1% | $10.00 | 2.1 cents | 16% |
Uncached input is the largest line. Most of it is the opening of each session: before your prompt, Codex sends its own instructions, the definitions of its tools and a description of your workspace, 13,250 to 13,297 tokens on GPT-6.2 Sol. The first request of a session finds none of it in the cache and pays the full input price.
In our three tasks that first request was 59% to 69% of what the task cost at list.
The requests after it read the opening back from the cache, which is why cache reads are most of the tokens. OpenAI prices a cache read on GPT-6.2 Sol at a twentieth of an uncached input token, so they come to 11% of the bill.
Output is 1.1% of the tokens and 16% of the bill. The config in our guide sets no reasoning effort, and Codex reported at most 90 reasoning tokens in a task. Reasoning is billed as output, so a higher model_reasoning_effort in config.toml raises this line. We did not measure by how much.
A measured month of Claude Code is the other way round: there cache reads are the largest line, because those sessions ran long and each request read far more back from the cache.
What Codex CLI costs a month
On average one task cost 4.4 cents on GPT-6.2 Sol and 3.6 cents on GPT-6.1 Terra at list. A month of 21 working days at those averages:
| Tasks a working day | Tasks a month | GPT-6.2 Sol at list | GPT-6.2 Sol through credit | GPT-6.1 Terra at list | GPT-6.1 Terra through credit |
|---|---|---|---|---|---|
| 10 | 210 | $9 | $3 | $8 | $2 |
| 30 | 630 | $28 | $9 | $23 | $7 |
| 100 | 2,100 | $92 | $30 | $76 | $23 |
Our package is small. In a larger repository Codex reads more files and adds your AGENTS.md to the opening, so each request carries more tokens, and a long session carries more conversation into every request. Read these figures as what small tasks cost.
To count your own, codex exec --json prints the input, cached input and output tokens of a task when it ends. Through AIGROW, GET https://aigrow.gg/v1/usage with your key lists the tokens and the cost of each request.
What lowers the bill, in the order the bill says
- Check whether a ChatGPT plan covers you. Codex is included in every ChatGPT plan up to its usage limits, which OpenAI lists. If your use fits inside one, that costs less than paying per token at any price, ours included. An API key is for what a plan does not cover: automation and CI, use past the limits, and teams that pay by consumption.
- Start fewer sessions. Each new session sends Codex’s opening again at the full input price, 63% of what our three GPT-6.2 Sol tasks cost at list. A second task in the same session reuses that opening, which the cache can serve at a twentieth of the price. Keep the session open for related work, or continue the last one with
codex resume --last, and start a new one when the work changes, since a session carries all of its conversation into every request. - Keep the reasoning effort as low as the work allows. Output, reasoning included, was 16% of the bill with no effort set.
- Choose the model by what a task costs. GPT-6.1 Terra costs half of GPT-6.2 Sol for every kind of token at list, but on the two tasks both finished it cost 15% less per task: it sent 11 requests to GPT-6.2 Sol’s 8, and 2 of them, after the first of their session, read nothing from the cache.
- Pay less per token, which the next section works out.
What a lower token price changes
AIGROW sells API credit for the GPT models below OpenAI’s list price, and Codex CLI reaches it through a provider block in config.toml. One task on average, priced four ways:
| The same tasks | Uncached input | Cache reads | Output | One task | Against list |
|---|---|---|---|---|---|
| GPT-6.2 Sol at list | 3.2 cents | 0.5 cents | 0.7 cents | 4.4 cents | the reference |
| GPT-6.2 Sol through AIGROW credit | 0.8 cents | 0.5 cents | 0.2 cents | 1.4 cents | 67% less |
| GPT-6.1 Terra at list | 2.9 cents | 0.2 cents | 0.5 cents | 3.6 cents | the reference |
| GPT-6.1 Terra through AIGROW credit | 0.7 cents | 0.2 cents | 0.1 cents | 1.1 cents | 70% less |
Through credit, uncached input and output cost 75% less, and cache reads cost the same as at OpenAI. Uncached input is the largest line of a Codex bill, so the tasks come out 67% lower on GPT-6.2 Sol and 70% lower on GPT-6.1 Terra, a little under the 75% on the price list.
The GPT models are genuine and verified: each one is sent the same prompts as the same model at its maker, and the scores, the prompt tokens and a tool call are compared. Every run is published. OpenAI did not review or endorse AIGROW. The price list has the rates of every GPT model Codex can use.
What does not work through AIGROW
- Models other than GPT. Codex speaks the Responses API, and AIGROW serves it at /v1/responses for GPT-6.2 Astra, GPT-6 Astra, GPT-6.2 Sol, GPT-6.1 Sol, GPT-6.1 Terra, and GPT-6 Luna only. Claude, Gemini, Grok and the other models answer 400 there.
- Web search. A request that carries Codex’s web search tool gets a 400, so the block in our guide sets
web_search = "disabled". previous_response_id, and anything else that needs a conversation kept on the endpoint. Nothing is stored there. Codex sends the whole conversation with each request instead, as the token counts above show.- OpenAI’s hosted tools and Codex’s cloud features. OpenAI offers no cloud tasks or GitHub code review on an API key either. The tools Codex runs on your machine work: in our tasks it ran shell commands and edited files.
How we measured, and what it leaves out
- Tool: Codex CLI 0.171.0,
codex exec --jsonwith the workspace-write sandbox and the config.toml block from our guide, on 21 November 2026. - Package: 4 source files and 2 test files with 7 tests, one of them failing for the first task. The other tasks started from the same package with the bug fixed.
- Prompts, word for word: “npm test fails. Find the cause and fix the code so every test passes. Do not edit the tests.”, “Add a function parseDuration(text) in src/duration.js that turns strings such as "1h30m", "45s" and "2h 5m" into a number of seconds, and throws a RangeError for anything else. Export it from src/index.js, add tests in test/duration.test.js, and run npm test.” and “slugify should turn accented letters into plain ones ("Crème Brûlée" becomes "creme-brulee") and never return more than 60 characters, cutting at a dash rather than in the middle of a word. Change src/slug.js, add tests for both rules to test/slug.test.js, and run npm test.”
- Counts: the usage of every request on our key, with uncached input, cache reads and output. Added up per task, they equal the usage Codex printed when the task ended.
- Left out: a sixth task, the third on GPT-6.1 Terra, which stopped after 3 requests when the test key reached the monthly spend cap set on it.
- Prices: OpenAI’s API pricing page, read on 18 November 2026, and AIGROW’s price list, which this page reads, so its credit figures are the prices on sale.
- This is 5 small tasks on one package. Read the shares and the cost of one task as the finding, and the monthly totals as an example.
Sources
- Codex pricing, OpenAI, read on 21 November 2026
- API pricing, OpenAI, read on 18 November 2026
- Codex CLI with a custom model provider and the AIGROW price list
AIGROW is not affiliated with OpenAI, and OpenAI did not review or endorse AIGROW. It sells the API credit described above.
Current Claude, GPT, Gemini, Grok, Qwen and Kimi models, up to 75% below list price
One API key for Claude, GPT, Gemini, Grok, Qwen and Kimi models on the OpenAI SDK. Claude models also work with the Anthropic SDK and Claude Code.
Each model’s rate through AIGROW credit sits beside its maker’s list price, never above it.

