How to Cut Your LLM API Bill by ~80% Without Switching Your Tools
I run Claude Code all day. For a while I assumed the API cost was just the price of doing business — the tooling is excellent, the model is excellent, and the bill is… the bill.
Then I actually did the arithmetic on what a coding assistant costs at frontier-model prices, and it turned out I was paying a premium for capability I don't always need. Here's the breakdown, with real numbers, and where I landed.
The price gap, in one table
Published list prices, per 1M tokens (USD):
| Input | Output | |
|---|---|---|
| Anthropic Claude Sonnet (list) | $3.00 | $15.00 |
| DeepSeek V4.1 Flash (off-peak) | $0.22 | $0.66 |
| DeepSeek V4.1 Flash (peak) | $0.44 | $1.32 |
That's roughly 13–14× cheaper on input and 11–23× cheaper on output, depending on the hour. DeepSeek bills peak/off-peak (peak = Mon–Fri 01:00–04:00 and 06:00–10:00 UTC), and off-peak is half price — so batching heavy jobs into off-peak hours cuts the bill in half again.
What that means for a real workload
Say you're a solo developer running a coding assistant for a month:
- 5M input tokens (system prompts, file context, diffs that keep getting re-sent)
- 1M output tokens (the model's actual work)
| Setup | Monthly cost |
|---|---|
| Claude Sonnet at list price | $30.00 |
| Claude-compatible endpoint on a Chinese frontier model (e.g. NovaAPI, Sonnet tier) | $6.16 |
| Native DeepSeek V4.1 Flash, off-peak | $1.76 |
Same tools. Same ANTHROPIC_BASE_URL env var. Same request shape. ~80% cheaper on the managed route, ~94% cheaper if you go direct and stay off-peak.
Scale that to a small team (50M in / 10M out per month) and the difference is ~$300/month vs ~$62/month.
Why is it so much cheaper?
Three reasons, none of them magic:
- Chinese lab pricing is aggressive by design. DeepSeek in particular has been cutting Flash-series prices this quarter (an August restructure, a September cut, and now V4.1 Flash, which the vendor says beats their own V4 Pro while costing less).
- Efficiency at the architecture level. These are MoE-style models with aggressive KV-cache and context handling. The token price reflects a cheaper serving stack, not a cheaper product decision.
- Prompt caching is nearly free. DeepSeek's cached-input rate is $0.007/1M off-peak — effectively nothing. If your client re-sends a stable prefix (Claude Code does), the effective input cost collapses.
The honest caveats
I'm not going to pretend this is a free lunch:
- Agentic, long-horizon tasks still favor the Western flagships. If your workflow is "let the model run 40 tool calls and recover from its own mistakes," Claude Opus / GPT-5.x still earn their price. Test on your workload before migrating anything critical.
- Quality is workload-dependent. Benchmarks are vendor claims. V4.1 Flash is genuinely strong at code, summarization, and long-context work in my testing; for subtle reasoning chains, verify before you trust.
- Peak-hour pricing is real. If your workload runs during Chinese business hours (UTC 01–04, 06–10), you pay 2×.
- Data path matters. Your prompts go to a Chinese model provider. Don't send anything you wouldn't send to any third-party API.
The setup that actually works
The practical trick is that you don't have to choose one provider. Because the clients we already use speak configurable endpoints, you can point them anywhere:
# Claude Code, pointed at an Anthropic-compatible endpoint
export ANTHROPIC_BASE_URL="https://api.lbase.com"
export ANTHROPIC_AUTH_TOKEN="sk-your-key"
claude
# Or plain OpenAI SDK
from openai import OpenAI
client = OpenAI(api_key="sk-your-key", base_url="https://api.lbase.com/v1")
resp = client.chat.completions.create(
model="deepseek-v4-flash", # served by V4.1 Flash today
messages=[{"role": "user", "content": "Refactor this function for readability."}],
)
Then use whichever profile makes sense per task: cheap-and-fast for refactors, summaries, test generation and bulk jobs; flagship for hairy architecture work. I keep two shells open with different env vars and that's the whole system.
What I actually spend now
Real numbers from my own usage this month, running a coding assistant and a couple of batch jobs through a Chinese frontier model:
- A full evening of interactive coding: 23 requests, 18,174 tokens, ~$0.008
- A single complex Claude-compatible request: ~$0.003
- A 10k-document summarization batch: a few cents, off-peak
Compare that to a month of Sonnet at list price and the gap is not marginal — it's the difference between "careful with tokens" and "stop thinking about tokens."
When to switch, when not to
Switch (or add a second profile) if:
- You're cost-sensitive, or you run high-volume batch/summarization work
- Your tasks are code edits, refactors, tests, docs, extraction — not long autonomous chains
- You want to experiment widely without watching a meter
Don't switch if:
- Your product depends on the strongest available reasoning under long tool-use loops
- You need a specific vendor's compliance posture or data residency guarantees
- You can't tolerate a third-party gateway between you and the model
Most developers I know end up in the middle: flagship for the hard 10%, cheap frontier models for the other 90%. That split is where the 80% number comes from — it isn't a magic trick, just arithmetic plus tooling that lets you route per task.
Full disclosure: I built NovaAPI, an OpenAI/Anthropic-compatible gateway for Chinese frontier models (PayPal/USDT billing, no Chinese phone number needed). The prices above are DeepSeek's published rates and Anthropic's list rates — check both before you commit to a migration. Questions about specific workloads? Ask in the comments and I'll run the numbers.
Nova