The Study · Economics
How to cut your AI coding bill
In June 2025, a Cursor user opened a forum thread asking how to bring down his background-agent costs, having watched them burn about $40 in a single hour. Screenshots like his built the folk wisdom every vibe coder now carries: serious AI coding costs thousands a month, and the vendors keep raising the price. Fourteen months later, the model behind those bills is retired and its successors charge roughly a third of the old rate.
The folk wisdom never updated. This piece re-prices it: every figure below was read from a vendor’s own page on 9 August 2026, and the subscription-versus-API decision comes down to one line of arithmetic you can run on your own numbers.
The short version
- The bill you were scared by is probably last year’s. The viral “thousands of dollars of API usage” and “36x cheaper on a subscription” posts are from 2025, when Opus cost $15 in and $75 out per million tokens. That model is retired. Current Opus runs $5 and $25. Sonnet 5 runs $2 and $10 on its introductory rate. Prices fell by roughly two thirds, and most of the panic did not update.
- Three dials set your cost, and you hold all three: which model runs the turn, how much context you resend each turn, and whether the cache is warm. The vendor’s price per token is the smallest lever of the three.
- The subscription-versus-API rule is one line of arithmetic. If your monthly API token spend for interactive coding would exceed the subscription price, the subscription wins, up to its usage ceiling. That ceiling is undisclosed, which is the catch worth reading below.
- Four moves actually cut the meter, and all four are documented by the vendors, not invented here: route models by difficulty, read the in-product usage meter, keep context small, and keep the cache warm.
This is a pricing explainer, not a benchmark. Every figure below carries the date we read it, and where we show token math it is a worked example with its assumptions on the page, not a measured result. We did not test routing savings or audit anyone’s invoice.
What AI coding costs right now
All figures read from the vendors’ own pages on 9 August 2026.
Anthropic, per million tokens (API):
| Model | Input | Output | Cache read |
|---|---|---|---|
| Opus 4.5 to Opus 5 | $5.00 | $25.00 | $0.50 |
| Sonnet 5 (intro, through Aug 31) | $2.00 | $10.00 | $0.20 |
| Haiku 4.5 | $1.00 | $5.00 | $0.10 |
The Batch API is a flat 50% off both directions for work that does not need an instant answer. Cache reads cost a tenth of fresh input. Sonnet 5’s introductory rate rises to $3 and $15 on 1 September 2026.
Anthropic subscriptions: Pro is $20 a month. Max is $100 at the 5x tier and $200 at 20x. The pricing page publishes those multipliers and nothing else. There is no published token quota for any plan, so any “you get N tokens for $200” figure you see is somebody’s inference, including ours if we tried it.
Cursor: Pro is $20 a month and bundles about $20 of model usage billed at the underlying API price with no markup. Higher tiers bundle proportionally more of the same. The number you pay Cursor for a model is the model maker’s price passed through, which is why a heavy session shows up as a spike rather than a flat fee.
OpenAI, per million tokens: GPT-5 and GPT-5.1 are $1.25 in and $10 out. The GPT-5.3-codex model is $1.75 and $14. Cached input is 10% of fresh input, the same cache discount shape Anthropic uses.
One quiet detail that catches people: Claude models from 4.7 onward use a new tokenizer that emits roughly 30% more tokens for the same text. A newer model at a lower headline rate can still cost more per task, because the task is now counted as more tokens. Compare on cost per finished task, never on the per-million sticker alone.
Why one request can cost more than you expect
A coding agent does not send your prompt once. Every step of an agentic turn resends the working context, the files it is holding, and the output of the last tool call, as fresh input. Ten steps deep, the same repository context has been billed as input ten times.
Here is a worked example, and it is a hypothetical with its assumptions shown, not a measurement. Suppose one hard turn on Sonnet 5 carries 350,000 tokens of input across its steps and produces 20,000 tokens of output. At the introductory $2 and $10 rate that is $0.70 of input and $0.20 of output, about ninety cents for a single turn, before any caching. Stack a few of those in an afternoon and the meter is real. On the retired Opus 4.1 rate that same turn would have been closer to $6.75, which is the era those shock screenshots came from.
This is also why Cursor’s per-request meter can jump and why anger spiked when usage-based billing arrived: the cost was always there, the meter just made it visible. One Cursor user reported about $40 of background-agent spend in an hour in June 2025, not because the tool was broken, but because background agents burn context on every step and nobody had shown them the dials.
Subscription or API: the break-even, and its ceiling
The decision is one line. If the API tokens you would burn in a month cost more than the subscription, buy the subscription for interactive coding. Below that line, pay per token.
Anthropic’s own cost documentation is the useful anchor here, read carefully. It reports that enterprise developers running Claude Code burn on average about $13 of tokens per active day, and $150 to $250 per developer per month. Set that beside the $200 Max plan and the shape is clear: heavy Claude Code token use sits in the same range as the top subscription. Anthropic does not say the subscription wins. That comparison is arithmetic we are doing with their number, and the same page notes the session dollar figure “isn’t relevant for billing purposes” once you are on a plan.
The catch is the ceiling. Because no plan publishes a token quota, the break-even holds only up to whatever the subscription actually allows, and that limit is both undisclosed and movable. A Max 20x subscriber documented hitting daily usage limits in April 2026 despite using the tool less than the week before. So the rule holds with a ceiling on it: the subscription wins on price up to that ceiling, and you will discover the ceiling by hitting it. For a full map of how those limits have moved, our Claude Code limits study tracks the whole record.
The clean cases:
- Bursty, interactive, all-day coding on one machine: subscription. You want a flat cost and you will live inside the ceiling most months.
- Scripted, CI, batch, or multi-tenant work, or you need the full context window and per-key spend tracking: API. You want the meter and the control, and the Batch API’s 50% is yours.
- Both is a real answer: the subscription for your own hands-on work, an API key for anything automated.
The four moves that actually cut the bill
None of these is our invention. All four are in the vendors’ own documentation.
Route models by difficulty. The default should be the mid model, not the top one. On Claude Code that means Sonnet by default, Opus reserved for genuinely hard reasoning through /model, and Haiku for subagents and bulk file reads. A bulk read on Haiku at $1 in costs a fifth of the same read on Opus. Most of a coding session is reading and editing, which the cheap model does fine, as our Cursor review found the speed models handle until the task actually needs care.
Read the meter. Both major tools now expose usage in-product. Claude Code’s /usage breaks a session into its dollar cost and your plan-usage, attributes spend to skills, subagents, and MCP servers, and raises a flag when a long-context or cache-miss cost crosses about 10% of the turn. That flag is the single most useful signal for finding where your money goes.
Keep context small. Context is the input you resend every step, so it is the dial that compounds. Clear between unrelated tasks with /clear rather than letting one session accumulate. Use plan mode to think before the expensive execution steps. Trim the number of MCP servers you load, since each one’s tool definitions ride along in every turn. A hook that pre-filters a noisy log before it reaches the model pays for itself on the first large output.
Keep the cache warm. A cache read costs a tenth of fresh input, so the difference between a warm session and a cold one is an order of magnitude on the resent context. The lifetime is not the same everywhere: a subscription holds the prompt cache for an hour, while API and usage-credit access hold it for five minutes. Keep a working session inside that window and you avoid re-billing the full context on a miss. Push non-interactive work through the Batch API and take the additional 50%.
What we did not do
We did not benchmark routing, did not measure a dollar figure saved by switching to a cheaper model, and did not open anyone’s account. Every price here is a live vendor page with the date we read it, the two cost-pain anecdotes are linked to their primaries and dated, and the token math is a labelled hypothetical you can redo with your own numbers.
The takeaway holds without a benchmark. The panic numbers are stale by a model generation and a two-thirds price cut. The current bill is a routing-and-context problem you control, the subscription-versus-API question is one line of arithmetic against your own token spend, and the ceiling on every subscription is real and unpublished. Read your meter for one week and you will know your number better than any screenshot can tell you, which is the same place our limits study and our unit-economics study both land: the plan page is a band, and the only figure that matters is the one in your own account.
One email, when there's something worth sending
Get the research in your inbox.
No fixed schedule, no filler. You get an email when we've tested something, run the numbers, or found a tool worth your time.
Free. Double opt-in, unsubscribe in one click.
What does your month actually cost? Compare notes in the forum ↗
Sources & how we researched this
- Anthropic API pricing (per-token, batch, and prompt-caching table), read 2026-08-09: Opus 4.5 through Opus 5 at $5 in / $25 out per million tokens, Sonnet 5 introductory $2 / $10 through Aug 31 2026, Haiku 4.5 $1 / $5, cache reads at 0.1x input, Batch API a flat 50% off. platform.claude.com/docs/en/about-claude/pricing
- Claude plans and pricing, read 2026-08-09: Free, Pro $20/mo, Max at 5x ($100) and 20x ($200). The page publishes usage multipliers only, no token quotas. claude.com/pricing
- Anthropic, Claude Code "Manage costs effectively", read 2026-08-09: enterprise average about $13 per developer per active day and $150 to $250 per developer per month, under $30 per active day for 90% of users; documents /usage, model routing, /clear, and the 1-hour subscription cache lifetime versus 5 minutes on API. code.claude.com/docs/en/costs
- Cursor pricing, read 2026-08-09: Pro $20/mo including about $20 of model usage billed at the underlying API price with no markup; higher tiers bundle proportionally more. cursor.com/docs/account/pricing
- OpenAI API pricing, read 2026-08-09: GPT-5 and GPT-5.1 at $1.25 in / $10 out per million tokens, GPT-5.3-codex $1.75 / $14, cached input at 10% of input. developers.openai.com/api/docs/pricing
- Cursor community forum, "best practices for bringing down background agent costs" (Jun 12 2025): a user reporting about $40 of background-agent spend in an hour, a snapshot of cost opacity. forum.cursor.com/t/best-practices-for-bringing-down-background-agent-costs/103186
- GitHub, anthropics/claude-code issue #54714 (Apr 29 2026): a Max 20x subscriber reporting daily usage limits despite reduced usage, evidence that subscription ceilings are real and undisclosed. github.com/anthropics/claude-code/issues/54714