How to reduce AI costs for work: nine levers, ranked by what they save

The largest savings in AI cost optimization come from three things: paying on the right rail, not paying for people who are not using it, and not running frontier models on work a cheaper one handles. Prompt engineering is somewhere near the bottom of the list.

By the Continuum team. We build a workbench that runs Claude Code, Codex, and their peers, so the model rates quoted here are the ones our own cost analytics ship with.

The short version

Ranked by impact for a typical engineering organization: right-size subscriptions against metered API keys, reclaim idle seats, cache long prompts (cache reads cost 0.1x base input, so a warm cache is roughly 90% off), route easy turns to a cheaper model (Sonnet 5 costs 2.5x less than Opus 5 for the same shape of work), batch anything asynchronous (50% off on both Anthropic and OpenAI), and keep context tight. Measure per repo first, because the ranking above is generic and yours will not be.

What you need to know
  • Measure before you optimize. Cutting tokens on a prepaid subscription saves zero cash.
  • Caching is the biggest technical lever: cache reads are 0.1x base input price, and a 5-minute cache pays for itself after a single read.
  • Model routing beats prompt trimming by an order of magnitude. Opus 5 to Sonnet 5 is 2.5x; Sol to Luna is 25x.
  • Idle seats are pure cash. 30 unused Copilot Business seats is $6,840 a year, and the seat API tells you which ones.
  • Batch is 50% off on both major providers and useless for interactive coding. Know which of your workloads is which.

Step zero: split the bill before you touch anything

Every lever below either saves cash or saves prepaid capacity, and those are not the same thing. A developer on a Claude Max subscription who halves their token usage has saved the company nothing this month. A developer holding a metered API key who does the same has cut a real invoice line. Optimizing the first one is theatre.

So the first job is a two-column split: how much of this month's AI spend is prepaid plan capacity, and how much is metered per token. The evidence for that split is not in the usage logs, because a request looks identical whether the CLI authenticated with a subscription login or an API key. It is in how each tool is signed in.

The ranking

Ordered by typical impact for an engineering org running coding agents. Effort is a rough engineering estimate.
#LeverTypical impactEffortSaves cash?
1Right-size the rail (plan vs API)Up to 3x on heavy usersA decisionYes
2Reclaim idle seats10 to 25% of seat spendOne API callYes
3Prompt caching70 to 90% of repeated inputConfig, sometimes freeOnly on metered
4Model routing2.5x to 25x on the routed sharePolicy plus a defaultBoth rails
5Batch the asynchronous work50% flatRewrite the callerYes
6Context discipline10 to 30% of inputOngoing habitOnly on metered
7Kill runaway automationSpiky, occasionally hugeAlertingYes
8A response cache in front0 to 40%, workload dependentReal engineeringYes
9Prompt trimming2 to 8%EndlessOnly on metered

Lever 9 is where most "reduce your AI costs" advice starts, and it is last here on purpose. Shaving 200 tokens off a system prompt is a rounding error next to running that prompt on a model that costs 2.5x more than it needed to.

Lever 1: right-size the rail

Subscriptions are a capacity purchase. API keys are a meter. The break-even is arithmetic, and for full-time agent users it is not close. Using Claude Sonnet 5 rates checked in August 2026 ($2 per million input, $10 per million output, $0.20 per million cache reads) and a modelled medium day of 8M cache reads, 1M fresh input and 200k output, one developer-day costs $5.60. A $100 monthly subscription covers roughly 18 of those days, which is less than a working month.

When each rail wins. Plan prices from claude.com/pricing.checked aug 2026
SituationCheaper railWhy
Full-time developer driving an agent dailySubscriptionMarginal turn costs nothing once the plan is bought
Occasional use, a few prompts a weekAPI key or free tierA $20 plan for $8 of usage is a $12 donation
CI and scheduled automationAPI keyNo human attached to a seat, and bursty by nature
You already hold a discounted enterprise API contractAPI keyYour negotiated rate beats list, the plan does not
Mixed team, unknown shapeMeasure firstThe answer differs per person by 10x

Lever 2: reclaim the seats nobody is using

The most reliable cash saving in AI tooling, because it is a subtraction from a real invoice rather than an efficiency estimate. GitHub exposes it directly: GET /orgs/{org}/copilot/billing/seats returns every assigned seat with a last_activity_at timestamp and the editor it was last used in.

Seats with no recorded activity in 30 days. Endpoint and field names from GitHub's REST documentation, August 2026.
gh api --paginate "/orgs/$ORG/copilot/billing/seats" \
  --jq '.seats[]
        | select(.last_activity_at == null
                 or (.last_activity_at | fromdateiso8601) < (now - 30*86400))
        | {user: .assignee.login, last: .last_activity_at, editor: .last_activity_editor}'

# then, deliberately, one at a time:
# gh api -X DELETE "/orgs/$ORG/copilot/billing/selected_users" -f "selected_usernames[]=$USER"

At GitHub Copilot Business pricing of $19 per user per month, thirty dormant seats is $570 a month and $6,840 a year. That is a larger number than most caching projects return, and it takes an afternoon.

Lever 3: prompt caching, with the arithmetic

Anthropic prices cached content with published multipliers relative to base input: a 5-minute cache write is 1.25x, a 1-hour cache write is 2x, and a cache read is 0.1x. That means a 5-minute cache pays for itself after one read (1.25 + 0.1 = 1.35 against 2.0 for two uncached passes) and a 1-hour cache after two.

A 200k-token repo and system context, read 40 times a day, at Sonnet 5's $2 per million input.
uncached      40 reads x 0.2M x $2.00           = $16.00 / day

cached, warm   1 write x 0.2M x $2.50           =  $0.50
              39 reads x 0.2M x $0.20           =  $1.56
                                                 -------
                                                   $2.06 / day   (87% off)

cached, realistic (cache goes cold every 10 reads)
               4 writes x 0.2M x $2.50          =  $2.00
              36 reads  x 0.2M x $0.20          =  $1.44
                                                 -------
                                                   $3.44 / day   (78% off)

The realistic line matters more than the warm one. A 5-minute cache goes cold whenever a developer thinks for six minutes, and every cold start pays the 1.25x write again. Long-running resident sessions cache far better than short task-scoped ones, which is a workflow change rather than a config change and is why the same feature returns 87% for one team and 30% for another.

Lever 4: route the easy turns to a cheaper model

This is the largest multiplier available and the one teams are most nervous about. The spread, from vendor pricing pages checked August 2026:

Per million tokens. Anthropic rates from platform.claude.com, OpenAI from the API pricing page.
ModelInputOutputCached inputRatio to the tier below
Claude Opus 5$5.00$25.00$0.502.5x Sonnet 5
Claude Sonnet 5$2.00$10.00$0.202x Haiku 4.5
Claude Haiku 4.5$1.00$5.00$0.10floor
GPT-5.6-Sol$5.00$30.00$0.502.5x Terra
GPT-5.6-Terra$2.00$12.00$0.2010x Luna
GPT-5.6-Luna$0.20$1.20$0.02floor

The rule that works: route down one tier, never to the floor. Sending hard architectural work to the cheapest available model produces three failed attempts and a frustrated engineer, which costs more than the model did. Routing frontier work to the next tier down, and only where the turn is short and mechanical, is the version that survives contact with a real team. A price table cannot tell you which model is genuinely one tier down, only which one is cheaper: our coding-model leaderboard puts measured pass rate next to cost per task, and a cheap open model like DeepSeek V4 Flash is worth checking there before it becomes a default.

The signal that a turn was overkill is cheap to compute and does not require a classifier: short output on an expensive model. A stream of 300-token replies from a frontier model, repeated hundreds of times a day, is a routing problem wearing a prompt-engineering costume.

Levers 5 to 9, briefly

5. Batch anything asynchronous

Both Anthropic and OpenAI discount batch requests by 50% on input and output. Claude Sonnet 5 drops to $1 and $5; GPT-5.6-Sol drops to $2.50 input. This applies to evaluations, bulk classification, backfills, and documentation generation. It does not apply to an interactive coding agent, because a batch job is asynchronous by definition and a developer waiting at a terminal is not.

6. Context discipline

Every connected MCP server contributes instructions on every turn, and every tool result stays in context permanently once it returns. The cheapest audit is to compare the input token count of your first turn against the input token count of your tenth. If the baseline climbs steeply on short sessions, the tool list is the cause, not the work.

7. Catch runaway automation

The single largest unexpected AI bill most teams ever receive comes from a loop: a retry that does not back off, a scheduled job that fans out, an agent handed a task with no termination condition. This is not an optimization, it is an alert on a derivative. Watch the hourly rate of change, not the monthly total.

8. A response cache in front

Worth real engineering only when your traffic has genuine repetition, which coding agents mostly do not. Support bots, classification pipelines, and documentation search do. Be honest about which one you are running before you build it.

9. Prompt trimming

Real, small, and endless. Do it as hygiene, never as a program with a target attached.

Questions people ask

How can I reduce AI costs for work?

In order of impact: put each person on the right rail (a subscription for full-time agent use, an API key for occasional and automated use), reclaim seats nobody is using, cache long repeated context, route easy turns to a model one tier cheaper, and batch anything asynchronous for a flat 50% off. Prompt trimming is real but returns single-digit percentages and should be treated as hygiene rather than as a project.

Does prompt caching actually save money?

Yes, substantially, on metered API usage. Anthropic prices cache reads at 0.1x the base input rate and 5-minute cache writes at 1.25x, so a cache pays for itself after a single read. On a 200k-token context read 40 times a day at Sonnet 5 rates that is roughly $16 a day uncached against $2 to $3.50 a day cached. On a prepaid subscription it buys you headroom rather than cash.

Is it cheaper to use an API key or a subscription for AI coding?

For a developer using a coding agent daily, a subscription is almost always cheaper. A modelled medium day at Sonnet 5 rates costs about $5.60, so a $100 monthly plan is beaten by roughly 18 working days of usage. API keys win for occasional users, for CI and automation where there is no seat, and for organizations with a negotiated enterprise rate below list.

How much can model routing save?

The price gap between adjacent tiers is 2 to 2.5x, and between the flagship and the cheapest small model it can be 25x. Realistically you can route a minority of turns, so a well-implemented routing policy typically returns 15 to 40% overall. Routing everything to the cheapest model saves more on paper and costs more in practice, because failed work gets retried.

What is the fastest AI cost saving to implement?

Reclaiming unused seats. It is one API call to find them, it subtracts from a real invoice, and at GitHub Copilot Business pricing of $19 per user per month, thirty dormant seats is $6,840 a year. Check the last-activity timestamp, confirm with the person, and remember that removal takes effect at the end of the billing cycle rather than immediately.

Should we ban expensive models to control AI spend?

No. Change the default instead. Banning the frontier model pushes hard work onto a model that cannot do it, and the retries cost more than the model would have. Set a cheaper default, keep the expensive one available, and require a reason rather than an approval.

Sources

Every figure above was read from these pages on August 2026. Vendors reprice without notice; if you find a stale number, tell us.

  1. Claude API pricing and caching multipliers
  2. Anthropic prompt caching documentation
  3. OpenAI API pricing
  4. GitHub Copilot user management API
  5. GitHub Copilot plans
  6. Claude pricing (plans)
Try it

Which lever,
for your bill.

One command reads the agent history already on your disk and prints what is prepaid, what is metered, and which repo burned it.

free app · your subscriptions · local-first