Coding API Costs: Compare Nine Selected Models per Request

Compare nine selected models using an illustrative input-heavy request. This is not an exhaustive cheapest-model ranking, a quality benchmark, or measured agent usage. Newer and cheaper models outside this selection may exist.

Last updated: November 10, 2026 · all rates verified against official pricing pages (see the full comparison for sources)

The workload we're pricing

For this example, one unit means one API request, not a completed coding task. We assume:

ParameterValue
Input tokens per request8,000
Output tokens per request600
Requests per month500

That's 4M input + 300K output tokens per month. Adjust the numbers to your own usage in the calculator — the ranking below shifts with workload shape, which is exactly the point.

Cost per request (selected listed rates, no cache)

DeepSeek assumes all off-peak usage; Qwen uses the US deployment discounted tier. This is standard real-time billing. See source conditions before using these figures in a budget.

ModelPer requestPer month (500 requests)
DeepSeek V4.1-Flash$0.0016$0.78
MiniMax M3.1-Flash$0.0016$0.78
GPT-5.6 Luna$0.0023$1.16
Qwen 3.7 Plus$0.0033$1.66
GLM-5$0.0099$4.96
GPT-5.6 Terra$0.0232$11.60
GPT-5.6 Sol$0.0440$22.00
Claude Opus 5.5$0.0440$22.00
Claude Fable 5$0.1100$55.00

At this workload the gap between the cheapest and the most expensive tier is ~70× within this selection. This describes token charges at these assumptions, not equal capability or cost per successfully completed task.

The cache effect: where real bills are decided

Stable prompt prefixes may qualify for caching. Assuming an 80% cache-hit rate on input, the same request mix becomes (cache-write premiums, storage, tools and taxes excluded):

ModelPer requestPer monthvs no cache
DeepSeek V4.1-Flash$0.0006$0.31−60%
GPT-5.6 Luna$0.0012$0.58−50%
MiniMax M3.1-Flash$0.0007$0.35−55%
GLM-5$0.0048$2.40−52%
Claude Opus 5.5$0.0197$9.84−55%
Claude Fable 5$0.0524$26.20−52%

Qwen 3.7 Plus keeps the same price here because its published card does not include a cache rate we could verify — this calculator does not model its caching. Verify model and region support before assuming a discount. The lesson: cheapest-at-list and cheapest-in-practice are different rankings, and observed cache hits affect the estimate.

Cheap ≠ capable: test before you switch

A lower token price tells you nothing about whether the model can hold your codebase in its head or call tools reliably. Before moving production traffic:

  1. Pick 20 real tasks from your own repo — bug fixes, refactors, test writing. Not benchmarks from a blog.
  2. Score four things per task: accuracy (did it work?), latency (time to first token matters in agents), failure rate (tool-call errors, malformed JSON), and integration quirks (does your framework's streaming/JSON mode behave identically?).
  3. Run the cheap model on 100% of staging traffic for a week. Estimate the experiment from its actual request count, token use, retries and selected rates.
  4. Route by task, not by model. Many teams run a cheap model for routine edits and reserve a frontier model for architecture-level reasoning — measure whether this improves your own cost per successful task.

Gotchas that inflate coding bills

What these estimates mean

For this illustrative mix, DeepSeek V4.1-Flash and MiniMax M3.1-Flash have token charges below a dollar at 500 requests — and GPT-5.6 Luna is about $0.58 under the stated cache assumption. Whether any of them is good enough for your code is a question only your own tasks can answer, and the test budget depends on how many requests and retries those tasks require.

Run your own workload through the calculator → · All models with official sources · Getting a DeepSeek API key