The token price is not the price: what a coding model actually costs

OpenAI just cut GPT-5.6 prices by up to 80%. Three of the largest cost factors in coding work sit outside the headline rate entirely.

cheapest AI model for coding
On this page

On 30 July, OpenAI cut the price of GPT-5.6 Luna by 80%. Input tokens went from $1 per million to $0.20, output from $6 to $1.20. Terra came down 20% to $2 and $12. Sol, the flagship, didn't move at all: still $5 in, $30 out.

Every roundup ran the same three numbers in a table and called it a comparison. Which is how you end up choosing a model on a metric that doesn't match your invoice.

So I went and priced the work instead. Not per token, per job - the kind you do daily. What came back is that three of the largest cost factors in coding work sit outside the headline rate entirely, one of them is worth about 30%, another can nearly double a bill without you changing a single setting, and they pull in opposite directions.

And, how it feels in practice.

First, what you're actually buying

A token is roughly four characters of English, or about three-quarters of a word. You pay for tokens going in (your prompt, your files, the conversation so far) and tokens coming out (the model's answer). Output costs five to six times more than input on every model here.

That ratio is the first thing worth a pause, because it means the form of your workload matters more than the sticker price. A job that reads a large codebase and writes a short patch behaves nothing like a job that reasons at length before producing anything.

Here is what the two vendors publish, verified against their own documentation on 4 August 2026. All figures are US dollars per million tokens.

Published API rates, verified 4 August 2026 (USD per million tokens)
ModelInputOutputCache readBatch (in/out)
GPT-5.6 Sol$5.00$30.00$0.50$2.50 / $15.00
GPT-5.6 Terra$2.00$12.00$0.20$1.00 / $6.00
GPT-5.6 Luna$0.20$1.20$0.02$0.10 / $0.60
Claude Opus 5$5.00$25.00$0.50$2.50 / $12.50
Claude Sonnet 5 (to 31 Aug 2026)$2.00$10.00$0.20$1.00 / $5.00
Claude Sonnet 5 (from 1 Sept 2026)$3.00$15.00$0.30$1.50 / $7.50
Claude Haiku 4.5$1.00$5.00$0.10$0.50 / $2.50

Both vendors discount cache reads to a tenth of input and both take 50% off for batch work, so on structure they are near-identical.

Read that table quickly and you reach three conclusions. Sonnet 5 and Terra cost the same. Opus 5 undercuts Sol on output. Luna is almost free.

Only the third one survives.

cheapest AI model for coding

Trap one: the tokenizer moved

Underneath Anthropic's model table sits a note that reframes the entire comparison:

Claude 4.7 and later models and Claude Mythos Preview use a newer tokenizer that contributes to their improved performance on a wide range of tasks. This tokenizer produces approximately 30% more tokens for the same text. The exact increase depends on the content and workload shape. Claude Sonnet 4.6 and earlier models use the previous tokenizer.

That covers Opus 5, Opus 4.8, Opus 4.7, Sonnet 5, Fable 5 and Mythos. It does not cover Haiku 4.5, which predates the change, or anything on the Sonnet 4.6 line. Anthropic's Sonnet 5 launch note puts the range at 1.0 to 1.35 times depending on content type, and adds that the introductory pricing was set so moving from Sonnet 4.6 was "roughly cost-neutral."

Think about what that second admission means.

The reason Sonnet 5 launched at $2 rather than $3 was not generosity; it was math: the per-token price had to fall for the per-job price to hold flat. Anthropic said so themselves.

The consequence across vendors is direct. When Sonnet 5 and GPT-5.6 Terra both advertise $2 per million input tokens, they are not the same price, because the same file becomes a different number of tokens depending on which model reads it. Feed both an identical repository and Sonnet 5 meters roughly 30% more of it.

I've adjusted for this throughout.

(The honest caveat, which is Anthropic's own: "the exact increase depends on the content and workload shape." Code does not tokenise like prose. I've used 1.3 everywhere, near the top of the stated range, so if your workload lands at 1.1 you should scale the Claude figures down accordingly. Tokenising one of your own files against both vendors settles it quickly.)

Trap two: thinking is output, and it's on by default

Claude Opus 5 ships with extended thinking enabled by default. On Opus 4.8 you had to ask for it. On Opus 5 the model decides when and how deeply to think on each turn, and the effort parameter (low, medium, high, xhigh, max) is the dial. Sonnet 5 defaults to adaptive thinking too.

Thinking tokens count toward output, and output is the expensive leg. Anthropic's own migration guide is explicit that max_tokens is "a hard limit on total output (thinking plus response text)" and tells you to revisit it when you upgrade, and the Opus 5 notes say the model "verifies its own work without being told to" and produces longer written deliverables by default.

None of this is hidden and it buys real capability. It just means the $25 output rate lands on a larger number than Opus 4.8 behaviour would have led you to model. OpenAI's models have the same dynamic through their own reasoning-effort ladder, so this is a difference of default rather than of kind.

I have deliberately not tried to price it. Every workload below holds output tokens constant across all seven models, which isolates the price difference cleanly but understates the Claude figures to whatever extent thinking-on-by-default generates more output than the OpenAI equivalent at comparable effort. That's a real thumb on the scale and it points against Anthropic, so treat the Claude numbers as a floor.

cheapest AI model for coding

Trap three: OpenAI has a context cliff, and Anthropic doesn't

This one cuts the other way.

GPT-5.6 has a second rate card. Any request carrying more than 272,000 input tokens is billed at 2x input and 1.5x output, applied to the entire request rather than only the tokens above the line.

GPT-5.6 long-context rates above 272,000 input tokens (USD per million tokens)
ModelStandardAbove 272K input
GPT-5.6 Sol$5.00 / $30.00$10.00 / $45.00
GPT-5.6 Terra$2.00 / $12.00$4.00 / $18.00
GPT-5.6 Luna$0.20 / $1.20$0.40 / $1.80

Anthropic has no equivalent. Its documentation states that Claude 4.6 and later include the full 1M token context window at standard pricing, and spells out that "a 900k-token request is billed at the same per-token rate as a 9k-token request."

Here is why that matters for coding specifically rather than in theory. An open issue on OpenAI's own Codex repository, filed on 11 July, points out that Codex ships GPT-5.6 with a 372,000-token context window and a 95% effective-context multiplier, giving an effective window around 353,400 tokens. Against a 272,000-token threshold, that is roughly 81,400 tokens of default headroom sitting inside the premium band. The filer notes it's "particularly easy to encounter when Sol uses subagents to audit its own work," and the workaround is a config line most people will never find.

So the default configuration of OpenAI's own coding harness can cross into 2x pricing without anyone opting in.

Price a single large request and the ranking inverts. At 400,000 input and 30,000 output tokens:

One large-context request: 400,000 input, 30,000 output tokens
ModelCostNote
GPT-5.6 Luna$0.21$0.12 under the threshold, cliff adds 84%
Claude Haiku 4.5$0.55
Claude Sonnet 5$1.43tokenizer-adjusted
GPT-5.6 Terra$2.14$1.16 under the threshold, cliff adds 84%
Claude Opus 5$3.58tokenizer-adjusted
GPT-5.6 Sol$5.35$2.90 under the threshold, cliff adds 84%

Opus 5 comes out 33% cheaper than Sol on that request, having been 18% more expensive on the small ones. Same two models, same published rates, opposite answer. The variable is context size.

Trap four: one of these prices expires

Sonnet 5's $2 and $10 is introductory. It runs through 31 August 2026 and becomes $3 and $15 on 1 September, a 50% increase on both legs.

Anything you model on Sonnet 5 today is built on a number with a published expiry date. It's the plainest illustration in the whole comparison of why a pricing page is an of-the-moment snapshot rather than a plan.

What the work actually costs

Four workloads, all seven models. Token volumes are my estimates of realistic coding work, Claude figures carry the 1.3 tokenizer adjustment, and all of these sit under the 272K per-request threshold so no cliff applies. Where a headline-rate calculation would have given a different answer, I've shown by how much.

A single bug fix or small refactor

40,000 input tokens, 8,000 output, no caching.

Bug fix or small refactor: 40,000 input, 8,000 output, no caching
ModelCostHeadline-rate estimate
GPT-5.6 Luna$0.02
Claude Haiku 4.5$0.08
GPT-5.6 Terra$0.18
Claude Sonnet 5$0.21$0.16, understated 30%
GPT-5.6 Sol$0.44
Claude Opus 5$0.52$0.40, understated 30%

A multi-file feature build

60,000 uncached input, 190,000 cached, 60,000 output.

Multi-file feature build: 60,000 uncached input, 190,000 cached, 60,000 output
ModelCostHeadline-rate estimate
GPT-5.6 Luna$0.09
Claude Haiku 4.5$0.38
GPT-5.6 Terra$0.88
Claude Sonnet 5$0.99$0.76, understated 30%
GPT-5.6 Sol$2.19
Claude Opus 5$2.46$1.90, understated 30%

A long agentic session

The Claude Code or Codex kind that runs for an afternoon. 150,000 uncached input, 1.85M cached, 400,000 output, spread across many requests.

Long agentic session: 150,000 uncached input, 1.85M cached, 400,000 output
ModelCostHeadline-rate estimate
GPT-5.6 Luna$0.55
Claude Haiku 4.5$2.33
GPT-5.6 Terra$5.47
Claude Sonnet 5$6.07$4.67, understated 30%
GPT-5.6 Sol$13.68
Claude Opus 5$15.18$11.68, understated 30%

Automated PR review at volume

500 pull requests a month, each 5,000 uncached input, 20,000 cached, 3,000 output.

Automated PR review, 500 pull requests a month
ModelStandardBatch (50% off)
GPT-5.6 Luna$2.50$1.25
Claude Haiku 4.5$11.00$5.50
GPT-5.6 Terra$25.00$12.50
Claude Sonnet 5$28.60$14.30
GPT-5.6 Sol$62.50$31.25
Claude Opus 5$71.50$35.75

Two things to flag on these. The Opus 5 versus Sol comparison inverts once you adjust: Opus 5 looked cheaper on the pricing page at $25 output against $30, and comes out more expensive in every one of these four, by between 11% and 18%. And PR review is asynchronous by nature, which makes it the clearest batch candidate in the set, halving every row.

cheapest AI model for coding

Cost per unit of capability

Cheap only matters if the work comes out usable, so the last question is what each dollar buys.

Artificial Analysis, which OpenAI gave pre-release access for evaluation, published capability and cost figures on 9 July, three weeks before the cut. Their Coding Agent Index pairs each model with its native harness across DeepSWE, Terminal-Bench v2 and SWE-Atlas-QnA. GPT-5.6 Sol in Codex led at 80 points, Terra scored 77 and Luna 75.

They published absolute cost-per-task figures only for their broader Intelligence Index, not for the coding one, where they gave relative reductions instead: Terra and Luna at roughly 60% and 80% below Sol per coding task. Rescaling those by the exact rate change on each model gives what the coding work costs now, expressed against Sol.

Coding capability against cost, rescaled to post-30-July rates
ModelCoding Agent IndexCost per coding task vs Sol
GPT-5.6 Sol80baseline
GPT-5.6 Terra773.1x cheaper
GPT-5.6 Luna7525x cheaper

Luna now runs at roughly a twenty-fifth of Sol's cost per coding task, for five index points less.

That is the actual behind 30 July, and it isn't "OpenAI got cheaper." It's that the distance between the flagship and the budget tier is now five points of capability and twenty-five times the price. Defending the flagship on quality for routine work is a materially harder argument than it was a fortnight ago.

Three caveats: Artificial Analysis ran this before Claude Opus 5 shipped, so their Anthropic comparisons are against Fable 5 and Opus 4.8 and there is no independent cost-per-task figure for Opus 5 yet. Five index points is an average across three benchmarks, and on whatever is hard in your particular codebase the gap could be far wider or absent entirely. And these are ratios derived from percentages, so treat them as the right order of magnitude rather than to the penny.

A note on the $200 plans, which are a different economy entirely

Everything above prices the API, because that's the only way to compare models on like-for-like terms. It is also not what most people buying a coding assistant actually pay. They pay for a seat, and at that point the question becomes how much you're allowed to do before something stops you.

I run both of the $200 tiers side by side, Claude Max and ChatGPT Pro, and I have done for months. My honest impression is that I get more out of the Codex plan. Not marginally more. In a completely unscientific, vibes-based way I'd put it at better than three times the use before I hit a wall, and I notice it most on exactly the long agentic sessions this piece has been considering.

I want to be careful about what that does and doesn't prove, because I suspect the mechanism isn't the model at all - and like I said, this goes off vibes only. OpenAI are very generous with their usage resets, though I still see my allowed usage decrease slower, d the two plans are built on different premises.

The practical upshot is that the tables above tell you what the work costs, though in my vibey opinion I don’t think this parses to subscription plans like-for-like.

cheapest AI model for coding

The lever that beats model choice

Look back at the long agentic session. 1.85M of those 2M input tokens are cache reads, priced at a tenth of base input on both vendors.

Without caching, that session on Sonnet 5 meters 2M tokens at $2 rather than 150,000 at $2 and 1.85M at $0.20. The bill goes from $6.07 to $10.40. Same model, same work, 71% more expensive.

Which makes prompt caching worth more than the gap between most adjacent model tiers. Anthropic charges 1.25x to write a five-minute cache and 2x for an hour, so it pays back after a single read on the short duration and two on the long, and Opus 5 dropped its minimum cacheable prompt to 512 tokens. OpenAI introduced cache-write pricing for the first time with GPT-5.6, at the same 1.25x, having previously not charged for writes at all. My workload tables above price reads but not writes, so every cached figure is a little light on both sides, which leaves the rankings intact and the absolutes optimistic.

Where that leaves the decision

There is no single best-priced model, and anyone who tells you otherwise is either has a PhD in AI or just doesn’t know.

What there is instead: Luna doing the routine volume at a twenty-fifth of flagship cost for five index points, which covers most of what most teams actually run. Terra or Sonnet 5 in the middle, with Sonnet 5's headline advantage expiring on 1 September 2026. Sol or Opus 5 held back for the problems where those five points decide whether the work ships, and Opus 5 specifically for anything with a large context, where OpenAI's 272K cliff flips the arithmetic. Caching switched on underneath all of it, and batch wherever the work can wait.

The two numbers I’d look at, if you were going to. One is the tokenizer multiplier for your own codebase, measurable in an afternoon by tokenising the same file against both vendors. The other is how often your requests cross 272,000 input tokens, which on Codex defaults is more often than anyone intends.

Both are worth more than the headline rate. Sonnet 5's 50% rise on 1 September is the next dated event on this timeline, and it's the one worth having modelled before it lands.

Rates verified against Anthropic's pricing documentation and Claude Opus 5 release notes, and OpenAI's published model pricing, on 4 August 2026. Capability scores and pre-cut cost-per-task from Artificial Analysis, 9 July 2026. Codex context-threshold detail from openai/codex issue #32486, 11 July 2026. Token volumes for the four workloads are my own estimates and yours will differ.

#ai-costs#coding-models#gpt-5.6#claude-opus-5#token-pricing#api-pricing

Updated 4 August 2026

Keep the plan connected to the business.

Romy connects the roadmap to the daily work, relationships, content, money, and results that keep it current.

One useful GTM idea each week.

Short, specific notes on positioning, distribution, outreach, and the work after shipping, from the same commercial method inside Romy.

One practical note a week. Unsubscribe whenever you like. Privacy