Price per Million Tokens: The Complete Comparison of AI for Coding (Subscriptions, APIs, Aggregators, Local)

How much should a developer really spend on AI per month?

I measured my own consumption over two weeks, applied the official pricing grids from the entire market, and worked out a price per million tokens for every offering. Here are the tables.

This isn't an article that explains something. It's a price grid, with just enough text around it for the figures to mean something. All prices were recorded on August 11, 2026 from the publishers' official pages, never from a comparison blog: during preparation, I found the GLM Lite plan listed at 10, 18, and 30 dollars depending on the page. You might as well go straight to the source.

Before the tables, I need to explain the method, because a price per million tokens for a subscription isn't something you can read in a brochure. It has to be calculated. And the result surprised me.

How I calculate it, and why it changes everything

A subscription no longer sells tokens. Claude Pro, ChatGPT Plus, GLM Coding Plan: they all sell 5-hour windows and weekly caps. To derive a price per million tokens from them, you need to know how many tokens are actually consumed. So I looked at my own usage.

I combed through the logs of my Claude Code sessions, in ~/.claude/projects: 724 files, from July 28 to August 11, 2026. The script adds up the tokens reported by the API in each response and applies Anthropic's pricing grid. Verdict:

Measured period14 days (07/28 to 08/11/2026)
Tokens consumed5.85 billion
What it would cost through the API$4,867, or approximately $10,400 per month
Equivalent hourly cost$17.24 per session hour
Average cost per million$0.83, not $5 or $25

This last figure is at the heart of the matter. Claude Opus 5 is priced at 5 dollars per million input tokens and 25 per million output tokens. My actual cost comes to 0.83 dollars. Why? Because the breakdown of what a coding agent consumes has nothing to do with what one might imagine:

Token typeActual shareCharged at
Cache read95.81%0.1 times the input price
Cache write3.60%1.25 times the input price
Output (the code written)0.55%full output price
Uncached input0.04%full input price

A coding agent spends its time rereading the same repository. These reviews are served by the cache (a copy of your context that the provider keeps warm and charges ten times less for), and they overwhelm everything else. The output—the actual code produced—is half a percent of the volume. All comparisons that assume a mix of “70% input, 30% output” are off by a factor of 5 when it comes to the final price.

That is why I use the following column throughout the tables: the effective cost per million, calculated by applying this measured mix to each provider’s pricing. The formula fits on one line, so you can redo the calculation yourself:

coût_effectif = prix_entrée × 0,1412 + prix_sortie × 0,005524

Two caveats, and I prefer to mention them right away. First: my usage is extreme—I orchestrate parallel sub-agents, so my volumes reflect a limiting case, not an average developer. Second: I have not tested all forty offerings in this article. I use Claude Code daily and have experimented with Ollama; the rest comes from official pricing pages and documentation. I’ll point this out whenever it matters.

The master table: everything, from smartest to least smart

Ranked by coding capability, from top to bottom. The index is my own, compiled from SWE-bench Verified and SWE-bench Pro scores recorded on BenchLM on August 10, 2026, supplemented by my own experience when no public score is available. Estimates are marked with an asterisk.

ModelScoreSWE-b. V.AccessEffective $/MtokMonthly input
Claude Opus 510096,0 %API + subscription0,84 $20 $
Claude Mythos 59995,5 %API, restricted access1,69 $n/a
Claude Fable 59895,0 %API + subscription1,69 $100 $
Claude Opus 4.89088,6 %API + subscription0,84 $20 $
GPT-5.6 Sol88*n/aAPI + subscription0,87 $20 $
Claude Sonnet 58685,2 %API + subscription0,51 $
0,34 $ until 08/31
20 $
GPT-5.6 Terra84*n/aAPI + subscription0,35 $20 $
GPT-5.3 Codex82*n/aAPI + subscription0,32 $20 $
Gemini 3.1 Pro80*n/aAPI + subscription0,35 $100 $
Kimi K378*n/aAPI, open weights0,51 $n/a
GLM-5.276*n/aAPI + subscription0,22 $18 $
Grok 4.575*n/aAPI + subscription0,32 $30 $
DeepSeek V4 Pro74*n/aAPI, open weights0,024 $pay-as-you-go
Kimi K2.7 Code72*n/aAPI, open weights0,16 $pay-as-you-go
GLM-4.770*n/aAPI, open weights0,10 $pay-as-you-go
Qwen3 Coder Next66*n/aAPI, open weights0,020 $pay-as-you-go
Qwen3-Coder 30B (local)55*n/aOllama, on your machineelectricity0 $
GLM-4.7 Flash (local)48*n/aOllama, on your machineelectricity0 $

Score out of 100, compiled from SWE-bench Verified and SWE-bench Pro (BenchLM, August 10, 2026). Values marked with an asterisk are my estimates, due to the lack of a public score on these two tests. The effective cost applies the mix measured above. n.c. means not disclosed, never “I didn’t look.”

An honest remark about this ranking: the leaderboards do not agree with each other. BenchLM puts Opus 5 at the top with 96%, CodeSOTA gives Fable 5 95% and a Mythos Preview 93.9%. A two-point gap between two tables that supposedly measure the same thing mainly shows that you shouldn’t fixate on the decimals. The order of magnitude is reliable; the ranking to the nearest tenth is not.

Subscriptions: what you’re really paying per million

This is where the methodology becomes necessary. Two columns: what it costs if you use up your limits (the “saturated” column, the figure sellers use), and what it costs at a realistic pace. My reference volume for the realistic column is 1,500 million tokens per month, which corresponds to roughly 6 hours of agent use per working day.

Offer$/monthDocumented cap$/Mtok at saturation$/Mtok realistic
Claude Pro20 $
17 $ annually
not published, ~40-80 h/week~0.01 $cap reached
Claude Max 5x100 $not published, ~140-280 h/week~0.014 $0.067 $
Claude Max 20x200 $not published, ~240-480 h/week0.016 $
measured by me
0.13 $
GLM Coding Lite18 $43 to 87 Mtok/week, published0.048 to 0.097 $cap reached
GLM Coding Pro72 $263 to 526 Mtok/week, published0.032 to 0.063 $0.048 $
GLM Coding Max160 $613 to 1226 Mtok/week, published0.030 to 0.060 $0.107 $
ChatGPT Plus20 $not published, 5-hour windowsn/acap reached
ChatGPT Pro100 or 200 $not publishedn/a0.067 to 0.13 $
Google AI Ultra 5x99.99 $multiplier, no tokensn/a0.067 $
SuperGrok30 $weekly limitsn/a0.020 $
GitHub Copilot Pro10 $15 $ in included creditsat API priceat API price
GitHub Copilot Max100 $200 $ in included creditshalf API pricehalf API price
Cursor Pro20 $500 fast requests/monthn/an/a
Le Chat Pro14.99 $not publishedn/an/a

Advantages and disadvantages, in no particular order. Claude Max 20x is by far the best token-per-dollar value on the market when you max it out, but 200 dollars a month is something you have to justify to an accountant. GLM Coding Plan is the only provider that publishes an official token equivalent, which is bold and should be the norm: the others hide behind unverifiable “5-hour windows.” GitHub Copilot changed its model on June 1, 2026, and now bills based on usage, with one credit worth one cent, making it more of a disguised API than a subscription. Cursor limits requests rather than tokens, a counter that means nothing when a request can process 200,000 context tokens.

The figure that made me do a double take was my own. Over 14 days I consumed the equivalent of 4,867 dollars in API usage. Compared with a Max 20x subscription, that comes to a ratio of 52 to 1. No subscription in the world can be profitable for this usage profile, which means one simple thing: either Anthropic is heavily subsidizing it, or the limits are there so that very few people can reach them. Probably both.

Pay-as-you-go APIs: the reality check

Here, there are no estimates or vague limits. These are public pricing tables. I am adding the effective cost column, the one that really matters for a coding agent.

ModelInputCacheOutputContextEffective
Claude Fable 510,00 $1,00 $50,00 $1M1,69 $
Claude Opus 55,00 $0,50 $25,00 $1M0,84 $
GPT-5.6 Sol5,00 $0,50 $30,00 $N/A0,87 $
GPT-5.5 Pro30,00 $none180,00 $N/A5,23 $
Claude Sonnet 53,00 $0,30 $15,00 $1M0,51 $
GPT-5.42,50 $0,25 $15,00 $N/A0,44 $
Gemini 3.1 Pro2,00 $0,20 $12,00 $200k+0,35 $
Grok 4.52,00 $0,30 $6,00 $500k0,32 $
GPT-5.3 Codex1,75 $0,175 $14,00 $N/A0,32 $
GLM-5.21,40 $0,14 $4,40 $N/A0,22 $
Claude Haiku 4.51,00 $0,10 $5,00 $200K0,17 $
Kimi K2.7 Code0,95 $N/A4,00 $N/A0,16 $
GLM-4.70,60 $0,06 $2,20 $N/A0,10 $
DeepSeek V4 Pro0,435 $0,0036 $0,87 $1M0,024 $
Qwen3.7 Plus0,32 $N/A1,28 $N/A0,052 $
MiniMax M20,255 $N/A1,02 $N/A0,042 $
DeepSeek V4 Flash0,14 $0,0028 $0,28 $1M0,009 $
Qwen3 Coder Next0,11 $N/A0,80 $N/A0,020 $
GLM-4.7 FlashfreefreefreeN/A0 $

Prices in dollars per million tokens. The « Cache » column is the read rate, generally one-tenth of the input rate. Beware of conditional pricing: Grok and Gemini double their rates beyond 200,000 context tokens, while Qwen3 Coder Plus has four tiers depending on input length. And Claude Sonnet 5's introductory rate ($2 / $10) expires on August 31, 2026, after which it rises to $3 / $15.

Three things immediately stand out. First, DeepSeek charges 0.0028 dollars for cache reads, or two percent of the input price, whereas everyone else applies ten percent. For a coding agent that rereads its context in a loop, this pricing gap is more decisive than the advertised price. DeepSeek V4 Flash comes in at less than one cent per effective million, meaning it is 90 times cheaper than Opus 5. However, the documentation warns that a significant price increase is planned, so don't build your business plan around it.

Next, GPT-5.5 Pro and GPT-5.4 Pro at 30 dollars for input and 180 for output have no cache pricing at all. For an agent, that's a deal-breaker: 5.23 dollars per effective million, or six times the cost of Opus 5, which performs better at coding. These models are designed for one-off reasoning, not for looping over a repository.

Finally, GLM-4.7 Flash is free. Not a « launch offer, » free according to the official pricing table. I haven't yet put a real project through it, but for scaffolding and mechanical tasks, it's hard to beat.

Balance a plateaux en laiton sur fond sombre, un plateau plus bas que l autre

The whole exercise boils down to this: on one side, what it costs; on the other, what it can do. No offering wins on both sides.

Aggregators: what they take along the way

An aggregator is an intermediary that gives you a single account and a single bill for fifty models from fifteen providers. The awkward question is how much margin it makes.

PlatformInference markupOther feesWhat you're buying
OpenRouter0%, prices passed through as-is5.5% when purchasing credits (min. $0.80), 5% in crypto, 5% with personal keys above $25,000/monthOne account for everything, switch models on the fly, no publisher rate limit
Together AITheir own pricing, sometimes above the publisher'sno entry feesOpen-weight models, dedicated hosting available
Fireworks AIn.c.n.c.Standard, priority, and fast tiers. Pricing referred to the documentation; I couldn't record it cleanly
Groq / Cerebrasn.c.n.c.Extraordinary inference speed on dedicated hardware, limited catalog
Hugging Facen.c.n.c.The broadest catalog of open models, geared toward experimentation

The good surprise is OpenRouter: zero markup on inference; the documentation says so in black and white. They make money from credit top-ups, at 5.5%. In practice, you pay the publisher's price plus 5.5% upfront, and in exchange you can switch models by changing a string of characters. For testing fifteen models before choosing one, it's unbeatable. For high-volume production on a single model, go directly to the publisher.

The three lines marked n.c. bother me, and I'd rather spell it out: Fireworks refers to its pricing in its documentation rather than displaying it, and I didn't want to copy second-hand figures to fill the gap. A table with an honest gap is better than a table full of assumptions.

Local: free, but not without trade-offs

Ollama remains free and unlimited for models running on your machine. It's the cloud models that are billed, with a free tier, a $20 Pro plan, and a $100 Max plan.

Local modelScoreVRAMRTX 4090 throughputMy take
Qwen3-Coder 30B55*19 GB40 to 60 tok/sThe best choice for local use. Mixture-of-experts architecture, with only 3.3 billion active parameters, so it's fast despite its size. 256K context, which is huge for local use. You need a 24 GB card
GLM-4.7 Flash48*19 GBn/a198K context, same size class. A credible alternative, and it's also available through a free API if you don't want to tie up your card
Qwen3.6 27B50*17 GB~30 tok/sDense model, so all parameters work on every token. Almost twice as slow as the 30B for a comparable result
Full Kimi, DeepSeek models70+*200 GB and morevery slowVery impressive on paper, but impractical on a developer's PC: you need a multi-GPU workstation or a Mac with 128 GB of unified memory, and it's still sluggish. Best left to curiosity

The real cost of local use isn't electricity (figure 350 watts under load, or about 0.10 euro per hour at the Belgian rate in August 2026, so a few euros per month). It's the graphics card: a used 4090 costs around 1,500 euros, and amortized over three years that already comes to 42 euros per month, before you've written a single line. A used RTX 3090 at 700 euros runs exactly the same models 20% slower and halves the amortization cost.

And the capability gap is real. A 19 GB local model scores around 55 on my index, versus 100 for Opus 5. This isn't a minor finishing detail: it's the difference between an assistant that completes your line and an agent that refactors your module on its own. In my view, local use serves three purposes: autocompletion, repetitive mechanical tasks, and working on code that must not leave any machine. For everything else, the inexpensive API costs less than amortizing the card.

Four quantified setups, depending on your profile

This is the part I would keep if I had to keep only one. The tables above give prices, but nobody buys a price: they buy a stack.

1. Student or personal project, $0 per month

GLM-4.7 Flash via API0 $the bulk of the work
Ollama locally0 $autocomplete, offline
Total0 $What you give up: truly difficult tasks get stuck, and you need to know when to take over

2. Independent developer, approximately $58 per month

Claude Pro20 $architecture, review, finishing
GLM Coding Lite18 $volume, long loops
DeepSeek V4 Flash via API~20 $overflow, batch processing
Total58 $What you give up: you have to juggle three tools and know what to send where

This is the combination people talk about most, and rightly so: 20 dollars for Claude Pro buy judgment, 18 dollars for GLM buy volume. You have the inexpensive model lay down the foundation and the good one refine it. At 20 dollars, DeepSeek V4 Flash gives you, at the effective rate, more than two billion overflow tokens. Yes, two billion.

3. Full-time AI developer, approximately $272 per month

Claude Max 20x200 $the main engine, without limits
GLM Coding Pro72 $the second engine, in parallel
Total272 $What you give up: nothing, except 272 dollars. At this level, you pay to stop thinking about the meter

That is more or less my stack, and the calculation is quick: what I consume would cost around 10,400 dollars per month through the API. Even dividing that by five for less aggressive usage, the subscription remains profitable by a factor of ten. For this profile, pay-as-you-go API access makes no sense.

4. Small team of five developers, approximately $190 per month

Copilot Business, 5 seats$95autocomplete and repository integration
Shared GLM Coding Pro$72the heavy-duty agent for major projects
Backup API credits~$23via OpenRouter, to test without multiplying accounts
Total$190What you give up: no permanent access to the top models for everyone

What I take away

The listed price of a model says almost nothing about what you will pay. What matters is the cache read rate, because that accounts for 96% of what a coding agent consumes. Two models with the same listed price can end up with a 1-to-5 cost ratio depending on their cache policy, and a model with no cache at all is disqualified from the outset, regardless of its score.

Next, the price gap between the top and bottom of the table is around 90 times, while the gap in coding capability is around twofold. That does not mean the high-end option is worthless: on a task that the smaller model fails, the price per token is irrelevant; the only thing that matters is whether it succeeds or not. But it does mean that sending every task to the most expensive model is wasteful. The right stack puts two or three side by side.

Finally, if you should remember just one figure: at between 40 and 60 dollars per month, an independent developer now has access to computing power that cost several thousand dollars a year ago. The debate is no longer “is it worth it,” but “which combination.”

All prices recorded on August 11, 2026, from the publishers' official pages. Prices are in U.S. dollars, excluding VAT (allow 21% in Belgium for consumer subscriptions; at today's exchange rate, 1 dollar is worth approximately 0.92 euros). Usage measurements were taken from my own Claude Code session logs, from July 28 to August 11, 2026. The introductory rate for Claude Sonnet 5 expires on August 31, 2026: I will update the table in early September.

Join the conversation

You need an account to comment on this article. Creating one is free and takes under a minute.

  • The XMLTV file, free to download every day
  • Comment on articles and reply to other readers
  • Get an e-mail when an article you follow is updated

No comments yet.

Une erreur s'est produite. Cette application peut ne plus répondre jusqu'à ce qu'elle soit rechargée.Veuillez contacter l'auteur. Reload 🗙