There is no cheapest model — only a cheapest model for your token mix

Every price table you have read ranks models by input price, because that is the column vendors print first. Real invoices do not look like that. Output tokens cost a median of 4.0× the input rate across 209 models, and on agent workloads output is most of what you buy. Re-rank the same 209 models on three realistic token mixes and the top ten barely overlap.

In short: Ranking models by input price alone is wrong by up to 66 places out of 209 on an agent workload, because output tokens cost a median of 4.0x input. Re-ranking the same 209 models on three token mixes (chat 3:1, agent 1:3, batch 1:9) leaves only 7 of the top ten unchanged between the chat and batch lists, and the median blended rate rises from $0.9 to $1.65 per 1M tokens as output share grows. Measure your own output share from API usage, then blend each model's two rates at that ratio before comparing.
You need a key before the code below runs. Create an account, generate a key, and copy the base URL (https://aicomp.ai/v1). Create one free →
Check current rates → Free to sign up · $1 minimum top-up · No prepayment
Confirm the key works first. One command, no SDK, costs nothing:
curl https://aicomp.ai/v1/models \
  -H "Authorization: Bearer sk-your-gateway-key"

A JSON list of model IDs means the key is good. Invalid token means it was copied wrong.

Three mixes, three different winners

Below is the same 209-model index ranked three times: once for a chat workload (long context in, short answer out), once for coding agents (short prompt, very long output), once for batch generation (almost pure output). The blended figure is what 1M tokens actually costs you at that ratio.

1. Chat and RAG — 3 parts input to 1 part output

Chat / RAG — 3:1 input:output, USD per 1M total tokens, 209 models ranked, 2026-09-20
ModelVendorInputOutputBlended
Gemma2 9B ItGoogle$0.01$0.01$0.01
Gemma 3 1B ItGoogle$0.01$0.03$0.015
Gemma 3 4B ItGoogle$0.0175$0.0525$0.0263
Gemini 1.5 Flash 8BGoogle$0.01875$0.075$0.0328
Qwen TurboAlibaba$0.025$0.1$0.0438
Qwen Turbo 1101Alibaba$0.025$0.1$0.0438
Gemma 3 12B ItGoogle$0.035$0.105$0.0525
Gemini 1.5 FlashGoogle$0.0375$0.15$0.0656
Gemini 1.5 Flash 002Google$0.0375$0.15$0.0656
Gemini 2.0 Flash LiteGoogle$0.0375$0.15$0.0656

Median across all 209 models at this mix: $0.9 per 1M tokens.

2. Coding agents and tool loops — 1 part input to 3 parts output

Coding agents / tool loops — 1:3 input:output, USD per 1M total tokens, 209 models ranked, 2026-09-20
ModelVendorInputOutputBlended
Gemma2 9B ItGoogle$0.01$0.01$0.01
Gemma 3 1B ItGoogle$0.01$0.03$0.025
Gemma 3 4B ItGoogle$0.0175$0.0525$0.0437
Gemini 1.5 Flash 8BGoogle$0.01875$0.075$0.0609
Qwen TurboAlibaba$0.025$0.1$0.0813
Qwen Turbo 1101Alibaba$0.025$0.1$0.0813
Gemma 3 12B ItGoogle$0.035$0.105$0.0875
DeepSeek OCRDeepSeek$0.108$0.108$0.108
DeepSeek Ocr1DeepSeek$0.108$0.108$0.108
Gemini 1.5 FlashGoogle$0.0375$0.15$0.1219

Median across all 209 models at this mix: $1.425 per 1M tokens.

3. Batch generation — 1 part input to 9 parts output

Batch generation — 1:9 input:output, USD per 1M total tokens, 209 models ranked, 2026-09-20
ModelVendorInputOutputBlended
Gemma2 9B ItGoogle$0.01$0.01$0.01
Gemma 3 1B ItGoogle$0.01$0.03$0.028
Gemma 3 4B ItGoogle$0.0175$0.0525$0.049
Gemini 1.5 Flash 8BGoogle$0.01875$0.075$0.0694
Qwen TurboAlibaba$0.025$0.1$0.0925
Qwen Turbo 1101Alibaba$0.025$0.1$0.0925
Gemma 3 12B ItGoogle$0.035$0.105$0.098
DeepSeek OCRDeepSeek$0.108$0.108$0.108
DeepSeek Ocr1DeepSeek$0.108$0.108$0.108
Mimo V2.5Other$0.07$0.14$0.133

Median across all 209 models at this mix: $1.65 per 1M tokens.

Median blended rate moves from $0.9 on the chat mix to $1.425 on the agent mix and $1.65 on the batch mix — the same 209 models, only the ratio changed. And only 7 of the top ten survive the move from chat to batch.

Where “cheapest” flips outright

These models move the most between the two extremes. Every one of them is a model with a flat or near-flat output rate — cheap-looking on an input-ranked table, genuinely cheaper once output dominates.

Rank by chat mix vs rank by batch mix, out of 209 models. Positive = climbs when output dominates.
ModelVendorInputOutput Chat rankBatch rankMove
Doubao Lite 32KByteDance$1$111472+42 up
Doubao Lite 4KByteDance$1$111573+42 up
Doubao Lite 128KByteDance$2$2155113+42 up
Doubao Pro 32KByteDance$2$2156114+42 up
Doubao Pro 4KByteDance$2$2157115+42 up
Gemma 7B ItGoogle$1$111674+42 up
Qwen 72BAlibaba$1$111271+41 up
Moonshot V1 8KMoonshot$1.2$1.212991+38 up

Largest move between the two mixes: 42 places out of 209.

The input-price trap, quantified

Compare the rank you get by sorting on input price alone against the rank you get by sorting on the real agent mix. The gap is the size of the mistake:

Where sorting by input price alone misleads: rank by raw input price vs rank by real agent mix (1:3), out of 209 models.
ModelVendorInputOutput By inputBy agent mixError
Moonshot V1 8KMoonshot$1.2$1.216397+66
Gemma 7B ItGoogle$1$115085+65
Grok 2 1212xAI$1.5$1.5173109+64
Doubao Lite 32KByteDance$1$114683+63
Doubao Lite 4KByteDance$1$114784+63
Gemma2 27B ItGoogle$0.63$0.6312461+63
Qwen 72BAlibaba$1$114282+60
Seed Oss 36B InstructByteDance$0.6$6108164-56

Largest gap: 66 places. At the top of the index that is the difference between %s and %s.

If you pick the vendor first: every vendor's floor

Most teams do not choose from a flat list of 209 models — they have a vendor already and want to know where the bottom of that range is. This is it, with the width of each range next to it.

Each vendor's least and most expensive model on an agent mix (1:3), USD per 1M total tokens, 2026-09-20
VendorModelsEntry model Entry blendedTop blendedSpread
Google26Gemma2 9B It$0.01$3.906391×
Alibaba51Qwen Turbo$0.0813$5.26365×
DeepSeek12DeepSeek OCR$0.108$6.560×
Other7Mimo V2.5$0.1225$2.62521×
OpenAI40GPT 5 Nano$0.1563$71.25456×
Zhipu6GLM 5.3 Flash$0.2062$8.87543×
xAI26Grok 4 1 Fast Non Reasoning$0.2125$1047×
ByteDance13Doubao 1 5 Lite 32K$0.2625$1246×
Meta1Llama 4 Maverick$0.28$0.28
MiniMax6MiniMax M2.5$0.4875$6.82514×
Moonshot9Kimi K2$0.975$21.87522×
Mistral1Dolphin3.0 R1 Mistral 24B$1.2751$1.275
Anthropic11Claude Haiku 4.5$2$3015×

Measure your own mix before you read any of this

Ten lines of code is all it takes, and it replaces every assumption above with your own number:

# 先量出你自己的 output 占比,再去看榜单。
# 这一步花 10 分钟,能省掉一次错误的选型。
import anthropic, collections

client = anthropic.Anthropic()
stats = collections.Counter()

for _ in range(200):          # 采样 200 次真实调用就够稳
    r = client.messages.create(
        model="claude-sonnet-5", max_tokens=1024,
        messages=[{"role": "user", "content": next_prompt()}],
    )
    stats["in"]  += r.usage.input_tokens
    stats["out"] += r.usage.output_tokens

total = stats["in"] + stats["out"]
print("output share: %.1f%%" % (100 * stats["out"] / total))
# 把这两个数代回本页的 blended 公式,而不是照抄别人的榜单。

Then blend the two candidate rates at your ratio:

blended = (input_rate * in_share + output_rate * out_share)

That one line is the whole method. If you skip it, you are comparing someone else's workload to your invoice.

Cost note. Ranking models on a single price column is the most expensive free mistake in this category. On a chat mix the ranking is driven by input rates; on an agent mix output rates carry most of the bill and the list reshuffles by as much as 66 places out of 209. Measure your own output share first, then blend — the calculator on this site does it for all 209 models.

FAQ

Which model is the cheapest per million tokens?

It depends on your input-to-output ratio, which is why no single answer is honest. On a chat mix (3:1 input-heavy) the lowest blended rate in our 209-model index is Gemma2 9B It at $0.01 per 1M tokens; on an agent mix (1:3) it is still Gemma2 9B It, but the models behind it shuffle because output pricing carries most of the bill. Rank one list by input price alone and you can be 66 places out on an agent workload.

Why does ranking by input price give the wrong answer?

Because output tokens cost more — a median of 4.0x the input rate across 209 models, and up to 12x. A model with a cheap input rate and an expensive output rate looks like a bargain on a price table and expensive on an invoice. The 66-place error in the table above is the size of that mistake on real workloads.

How do I work out my own token mix?

Sample your real traffic rather than guessing. Log input_tokens and output_tokens from the API usage object over a few hundred calls and take the ratio — the snippet above does it in ten lines. Once you have the ratio, blend each candidate model's two rates at that ratio before comparing; do not compare input rates and hope.

Does the ranking change if I use cached prompts?

Yes, and in the same direction but harder. A cache hit bills around 0.1x base input, which shrinks the input side of your bill and makes the output rate matter even more. If a large share of your input is cached, weight the output rate more heavily than the raw mix suggests.

Are these rates the vendor's official prices?

No — they are gateway rates we bill, in USD per 1M tokens, captured 2026-09-20. 13 of the 209 models can be cross-checked against the vendor's own published list rate and are marked verified; the rest are listed at face value with no comparison implied. Rates move with upstream promotions, so re-check before you commit a pipeline.

Why only 209 models when the catalogue has 827?

827 is the raw catalogue; 209 is what survives cleaning — dated snapshots, duplicate billing variants, preview and test entries, and rows with no usable price are all removed. Those 209 are the entries you can actually be billed on. Publishing the raw 827 would put six near-identical variants of one model in the same table and make every ranking meaningless.

Should I just pick the cheapest entry model per vendor?

Only if it does the job. The entry rate tells you the floor of a vendor's range, which is useful for a first estimate, but the spread column shows how wide that range is — one vendor's top model costs hundreds of times its entry model. Treat the floor as a budget boundary, not a recommendation.

Related

Get API access