← All posts
·4 min readAPI Costs

Cheapest AI API in 2026: The Real Per-Token Math

Search "cheapest AI API" and you get price sheets. Price sheets answer the wrong question. Your bill isn't set by the per-token price alone — it's the price times the tokens your workload actually burns, minus the discounts you remembered to claim. Two teams can use the same "cheap" model and get invoices 10x apart.

So let's do the real math, with July 2026 numbers.

The price floor right now

Per million tokens, cross-checked against three public trackers in our July pricing survey:

Model Input $/M Output $/M
Gemini 2.5 Flash-Lite $0.075 $0.30
DeepSeek V3.2 $0.27 $1.10
Gemini 3 Flash $0.50 $3.00
Claude Haiku 4.5 $1.00 $5.00
Claude Sonnet 4.6 (for scale) $3.00 $15.00
GPT-5.5 (for scale) $5.00 $30.00

The literal answer to "what's the cheapest AI API" in mid-2026 is Gemini 2.5 Flash-Lite at $0.075/M input, with DeepSeek's hosted models crowding the same floor. If your workload is simple enough that a floor-tier model clears your quality bar, call one of those directly and stop reading — honestly.

Most workloads aren't that simple, which is where the math gets interesting.

A worked example

Take a support assistant: 800 input tokens per message (system prompt + history + question), 300 output tokens per answer, 100,000 messages a month. That's 80M input tokens and 30M output tokens monthly.

Model Monthly cost The math
Gemini 2.5 Flash-Lite $15 80 × $0.075 + 30 × $0.30
DeepSeek V3.2 $55 80 × $0.27 + 30 × $1.10
Gemini 3 Flash $130 80 × $0.50 + 30 × $3.00
Claude Haiku 4.5 $230 80 × $1.00 + 30 × $5.00
Claude Sonnet 4.6 $690 80 × $3.00 + 30 × $15.00
GPT-5.5 $1,300 80 × $5.00 + 30 × $30.00

Same product, same traffic: $15 to $1,300 a month depending on one string in your config. And notice the output column's weight — output is only 27% of the tokens in this example but around 60% of the bill at every price point, because every provider charges 4–6x more for output than input. Generation-heavy workloads should optimize the output side first (more on that in the tokenizer tax, including why identical text doesn't even tokenize to the same count across vendors).

Why cheapest-per-token isn't cheapest-per-task

Three things the price sheet hides:

  1. Verbosity varies by model. Some models answer in 150 tokens what others say in 400. A model with double the per-token price and half the verbosity costs the same per task.
  2. Failures cost double. If the floor-tier model gets 8% of answers wrong and each miss triggers a retry on a bigger model (or worse, a human), your effective price includes those re-runs. The cheapest model that clears your quality bar is the cheapest model, full stop.
  3. Rack rate is the ceiling, not the price. Batch APIs run 50% off at the major providers, and prompt caching discounts repeated input by up to 90%. A support bot resending the same 600-token system prompt 100,000 times a month is exactly the workload caching was invented for — claiming it cuts the input side of the table above by most of its weight.

Run your own numbers — our LLM cost calculator does the per-token math for 13 models and tiers with dated, sourced prices, and the cost-reduction guide walks the full checklist in provider-neutral terms.

Where TierUp sits in this

TierUp's angle on "cheapest" is the quality-bar problem in point 2: you pick a performance tier, we route to models that clear it, and the math above stops being a config file you re-litigate every quarter. Tier 1 (Speed) is currently free; tier 2 (Balance) runs $1.50/M input, $7.50/M output — about half the retail price of the Sonnet-class models it routes to ($345 in the worked example above).

The honest footnotes, same as we print everywhere: we route through OpenRouter today, and that pricing is transparently subsidized while we test product–market fit, with a daily spend guardrail. It's a funded experiment, not secret efficiency. New accounts get $25 in credit with no card, and the playground needs no signup at all — the fastest way to check whether a cheaper tier clears your quality bar is to paste your prompt and look.

Prices in this post were verified 2026-07-05 against CloudZero, APIpulse, and CostGoat. They will drift; re-check before you commit budget.

Featured on Fazier