Factory

Comparisons

AI Coding Agents

Codex credits, API keys, and the Factory bill

October 23, 2026 - 5 minute read

The cost of a Codex task depends first on how the developer signs in. With a ChatGPT account, Codex draws from plan usage and then from ChatGPT credits. With an API key, the same agent bills at OpenAI API token prices.

The two paths use different units, different speed multipliers, and different feature sets, so a single "Codex cost" figure is rarely meaningful.

Factory has its own version of the same split. Droids can run on Factory-managed models that consume Standard Credits, or on a customer's own provider key. The comparison below prices one realistic task each way using published rates as of October 2026. The general trial method, with fixed repository revisions and reruns in the denominator, is in Factory and Claude Code: compare completed work and is not repeated here.

Two ways to pay for the same Codex task

OpenAI's Codex pricing page offers ChatGPT plans from Free to Pro, Business, and Enterprise, plus an API-key option. Plus is $20 per month and includes Codex on the web, in the CLI, in the IDE extension, and on iOS. Pro comes in $100, $200, and $500 tiers. On these plans, usage comes out of included limits first, and once those run out, purchased credits can extend it.

The API-key option is described as suited to automation in shared environments such as CI. It runs Codex in the CLI, SDK, or IDE extension and bills at API pricing. OpenAI lists no cloud-based features for it, such as GitHub code review and Slack. The pricing page also warns that API token prices are separate from subscription usage and should not be used to estimate included tasks.

Where the work runs matters too. OpenAI publishes estimated local messages per five-hour window (15 to 160 for GPT-6.1 Sol on Plus) and notes that cloud tasks may use more of the allowance than local messages. Pro plans currently have no five-hour limit. Model choice, context, reasoning, tool use, retrieval, and caching all change how much a single message consumes.

One bug fix, priced three ways

The token profile below is an illustrative assumption for a multi-file bug fix with several test runs. It is not a measured Codex or Factory session. Assume about 40 model turns totaling 2.0 million input tokens, of which 1.8 million are cache reads, 150,000 are cache writes, and 50,000 are uncached input. The run also produces 50,000 output tokens. Long agent sessions often look like this, with most input re-read from cache on each turn.

ChatGPT credits. OpenAI lists GPT-6.1 Sol at 50 credits per million input tokens, 2.5 per million cached input tokens, and 250 per million output tokens. Codex credit billing has no separate cache-write charge, so the example bills the 150,000 cache-write tokens as ordinary input. That gives 0.2M × 50 = 10 credits, plus 1.8M × 2.5 = 4.5 credits, plus 0.05M × 250 = 12.5 credits, for 27 credits at Standard speed. OpenAI says credit purchase prices depend on the plan or agreement, so the example stays in credits.

OpenAI API key. The API pricing page lists GPT-6.1 Sol at $2.00 input, $2.50 for a 30-minute cache write, $0.10 cached input, and $10.00 output per million tokens. The same profile costs 0.05 × $2.00 + 0.15 × $2.50 + 1.8 × $0.10 + 0.05 × $10.00 = $0.10 + $0.375 + $0.18 + $0.50 = $1.155.

Speed settings. According to the Codex speed documentation, Fast mode bills purchased credits at 2x the Standard rate but draws on included subscription limits at 2.5x. Ultrafast bills purchased credits at 6x and included limits at 8x. Ultrafast is limited to Pro $500 and eligible Enterprise and Edu plans. With an API key, ChatGPT credit multipliers do not apply, and the API's Fast and Ultrafast price tables apply instead.

Put side by side, the same task costs this much on each path:

Billing pathUnitStandardFastUltrafast
Codex, purchased ChatGPT creditsCredits2754162
Codex, included plan limitsAllowance rate1x2.5x8x
Codex or Factory, OpenAI API keyUSD$1.155$2.31$6.93
Factory-managed GPT-6.1 SolMultiplier0.8Not listed4.8

Ultrafast changes the result more than any other single setting. At API prices, the $6.93 Ultrafast run costs as much as six Standard runs of the same task.

Where the Factory bill comes from

Factory prices the same work through two mechanisms. Factory's individual plans are Pro at $20, Plus at $100 with about 5x Pro usage, and Max at $200 with about 10x. Usage is governed by rolling 5-hour, 7-day, and 30-day limits. Sessions consume Factory Standard Credits based on model usage. Extra Usage is prepaid with a $10 minimum and does not expire. Teams is $60 per month plus $40 per seat.

For Factory-managed models, the models page lists a usage multiplier per model. GPT-6.1 Sol is 0.8 and GPT-6.1 Sol Ultrafast is 4.8, the same 6x step that OpenAI applies to purchased credits. GPT-6 Luna is 0.04. A team that moves routine work from Sol to Luna moves it to a model with one twentieth of the multiplier. Whether Luna can still finish the task is a separate question.

With BYOK, a Droid calls OpenAI with the customer's key, so the example's $1.155 API price applies to the same token profile. Factory includes a free BYOK allowance on individual plans, and after that BYOK usage is charged according to the plan. On both products, then, the API-key path ends at the same OpenAI rate card. Any difference in that bill has to come from how many tokens each harness sends. Factory reports that profile directly. The /cost command in the Droid CLI shows cost breakdowns and cache savings. The Analytics API returns input, output, cache-read, and cache-write tokens per day and per model. On the Codex side, the usage dashboard and the CLI /status command show remaining limits.

The denominator moves more than the rate card

Rate cards price a run. A team pays for every run it needed to reach an accepted change. If 10 tasks take 13 runs at 27 credits each and 8 are accepted, the cost is 351 credits divided by 8, or about 43.9 credits per accepted change. That is 63% above the single-run price. Every rerun counts toward the total.

Factory's published benchmarks show how much the harness can move that denominator with the model held constant. In its October 2026 Droid 1.0 research post, Factory ran Droid and codex@0.163.0 on all Terminal-Bench 4 tasks with GPT-6.1 Sol at high reasoning, three trials per task. Factory reports Droid scoring 3.5 points higher at 12% lower cost per passed task and with 12% fewer tokens, while taking 10% longer. Factory produced these figures, not a third party.

Cost is measured at list price on tasks that both harnesses passed in all three trials.

An earlier September 2025 Terminal-Bench report put Droid with GPT-5 at 52.5% and Codex CLI at 42.8%, on an earlier model generation and benchmark version. Both results show that pass rate, and with it the number of reruns, varies by harness as well as by model.

Context handling is the other lever. In Factory's context compression evaluation, OpenAI's compaction endpoint removed 99.3% of tokens and Factory's approach removed 98.6%. Factory's approach scored 0.35 points higher on quality. That evaluation tested the API endpoint, not Codex. Its conclusion was that the right target is total tokens per task, because details lost in compression have to be fetched again later.

Settings that change Codex usage

OpenAI's own guidance for making limits last longer is specific. Keep prompts precise and remove unnecessary context. Limit source material to the files that matter. Nest AGENTS.md files rather than injecting one large file. Disable MCP servers a task does not need, since each server adds context to every message. Choosing a smaller model or a tighter task scope is the other suggestion.

The Factory equivalents are model choice and routing. Factory reports that production sessions using Factory Router cost 63% less in aggregate than the same workload at published frontier-model rates, in the week ending September 13, 2026. That figure covers Factory-managed inference at Factory's published rates. For a team comparing Codex and Factory, it is a separate configuration to test, not a property of the API-key path.

Further reading

Ready to build the software of the future?

Start building

Arrow Right Icon