One agent run can be a 200,000-token input with a 25,000-token output and a cache hit on most of the repeatable context — and depending on which model you point the run at, that same workload bills anywhere from a few cents to a few dollars. That spread is why "compare the input price per million tokens" is the wrong way to shop for an LLM API in 2026. The right way is to compare the rates that actually assemble a bill — input, output, cached read, cached write — and to know which models quietly change price when your input crosses a context threshold.
This is a comparison of 28 text models from nine providers on exactly those dimensions, with every rate captured from the Modellix LLM model page on September 3, 2026 — the page that lists each model's official list price next to the price Modellix bills. We run Modellix, an API gateway that exposes all 28 models through one key and three protocols, so we have a commercial interest when our name appears; where a number could not be verified from a live source, we say so instead of guessing. One boundary before the table: this page covers text models billed in USD per 1M tokens. Image and video generation bill per image and per second instead, and those two markets each get their own full price-table article in the same asset family as this one (an image-model comparison and a video-model comparison are both planned on this blog). If the question you actually came to answer is "which API is cheapest," that is a separate breakdown in our cheapest AI API guide — this page deliberately does not crown a winner, because the table below flips depending on your workload.
Why the headline input rate is the least useful number in the table
Every model below publishes an input rate and an output rate per 1M tokens. Every pricing comparison quotes them. And neither tells you what a real workload costs, for four reasons that this article exists to make concrete.
Output dominates most agent bills. Output is priced 5–6× higher than input at Anthropic and OpenAI: Claude Opus 5 bills $5 input but $25 output per 1M tokens; GPT-5.6 Sol bills $4 input and $20 output in its standard tier. A task with a short prompt and a long answer — a code edit, a document draft, a refactor — spends most of its money on output tokens, so sorting models by input price ranks them almost backwards for that workload.
Reasoning tokens bill as output. Models that "think" before answering count their hidden chain of thought at the output rate. The visible response can be short while the billed output is several times longer, which is exactly what an agent loop does on every step.
Cached input is priced separately — and cheaply. The same table column you ignore may be the one you can actually optimize. A long agent session resends the same system prompt, file contents, and conversation history on every turn; models that price cached reads at a tenth of the input rate turn that repetition into a rounding error instead of a line item. DeepSeek prices cached reads even lower, at roughly 3% of its input rate.
The four dimensions that assemble an LLM API bill: input and output are always present; cached read and cached write apply when the provider prices cache reuse. Rates captured September 3, 2026.
Some models change price when your input crosses a threshold. Seven of the 28 models below are priced by "Input Context" bands: keep the request's input under the band and you pay the lower rate; cross it and input (and sometimes output) jumps. GPT-5.6 Sol doubles its input rate from $4 to $8 per 1M when a request exceeds 272K tokens of input, and its output climbs from $20 to $30. A long-horizon agent run that accumulates context is exactly the workload that steps over that line mid-run. These models get a dedicated section below, because the threshold — not the per-token rate — is what decides their bill.
Flat-rate vs Input Context tiers: the mechanism most comparisons skip
The Modellix price page states the distinction in one sentence: "Some models are priced by the request's input-token count (Input Context). Tier count varies and is separate from the model context window. Context in the table is the supported window; Input Context is the pricing tier. Claude, most Gemini Flash, Qwen, and DeepSeek models are flat-rate."
Read that carefully, because three confusions hide in it.
Input Context tiering is not the context window. A model can support a 1,000,000-token context window and still change its price at a 200,000-token input threshold. Google Gemini 3.1 Pro accepts a 1.05M context but prices input at $2 per 1M up to 200K tokens and $4 per 1M above it. The tier is a billing construct that sits on top of the model's technical window. They are not the same number and never should be compared as if they were.
The threshold is the lower bound of the expensive band. When the page says "Input Context ≤ 272K," it means requests whose input stays at or below 272,000 tokens pay the first band's rate. The moment input exceeds 272,000 tokens, the whole request is billed at the second band's rate. There is no pro-rating: one token over the line moves the entire input to the higher price. The tier label on the live page reads verbatim "Input Context ≤ 272K" for the OpenAI models and "≤ 200K" for Gemini 3.1 Pro and the Grok models that use bands.
Flat-rate is the default, not the exception. Twenty-one of the 28 models bill one input price regardless of input length. All four Anthropic models are flat; so are every DeepSeek model, every Qwen model, the Moonshot models, the ZAI GLM-5.2/5.3 and flash models, and most Gemini Flash models. The tiered group is exactly seven models today: the four OpenAI models (GPT-5.5 and the GPT-5.6 family, all with a 272,000-token threshold) plus Gemini 3.1 Pro and Grok 4.5 / 4.6 (all with a 200,000-token threshold).
Flat-rate models bill one input price for any input length; tiered models bill per request's input-token count, with the threshold as the lower bound of the expensive band. Rates captured September 3, 2026.
That geometry is why the model list below is ordered the way it is: for a long-context agent workload, a tiered model's threshold is the first thing to check, then its output rate, then what its cached-read rate does to the repeated context. A flat model removes the threshold risk entirely and moves the decision to output cost.
The 28-model comparison: LLM API pricing per 1M tokens
All rates are USD per 1M tokens, captured from the Modellix LLM model page on September 3, 2026. Two notes on how to read the numbers:
- List vs billed. The page lists each model's official list price next to the price Modellix actually bills. The official list price is Modellix's own stated figure — we did not re-verify every row against each vendor's pricing page. Where the two prices differ, the table shows
list → billed; where they match, it shows one number. On this capture date, three models billed below their list price (Gemini 3.7 Flash, Gemini 3.8 Flash, and GLM-5.3-Flash, each about 50% below), and every other row billed at list. - Tiered models show every band. The seven tiered models each appear as two rows: the "≤ 272K" / "≤ 200K" row is the rate for input at or below the threshold, and the "> threshold" row is the rate above it.
| Model ID | Context | Input Context tier | Input $/1M | Output $/1M | Cached read $/1M | Cached write $/1M | Modellix vs list |
|---|---|---|---|---|---|---|---|
openai/gpt-5.6-sol |
1.05M | Input Context ≤ 272K | $4 | $20 | $0.4 | $5 | at list |
openai/gpt-5.6-sol |
1.05M | > 272K | $8 | $30 | $0.8 | $10 | at list |
openai/gpt-5.6-terra |
1.05M | Input Context ≤ 272K | $2 | $12 | $0.2 | $2.5 | at list |
openai/gpt-5.6-terra |
1.05M | > 272K | $4 | $18 | $0.4 | $5 | at list |
openai/gpt-5.6-luna |
1.05M | Input Context ≤ 272K | $0.2 | $1.2 | $0.02 | $0.25 | at list |
openai/gpt-5.6-luna |
1.05M | > 272K | $0.4 | $1.8 | $0.04 | $0.5 | at list |
openai/gpt-5.5 |
1.05M | Input Context ≤ 272K | $5 | $30 | $0.5 | $0 | at list |
openai/gpt-5.5 |
1.05M | > 272K | $10 | $45 | $4 | $0 | at list |
google/gemini-3.1-pro |
1.05M | Input Context ≤ 200K | $2 | $12 | $0.2 | $0 | at list |
google/gemini-3.1-pro |
1.05M | > 200K | $4 | $18 | $0.4 | $0 | at list |
xai/grok-4.5 |
500K | Input Context ≤ 200K | $2 | $6 | $0.3 | $0 | at list |
xai/grok-4.5 |
500K | > 200K | $4 | $12 | $0.6 | $0 | at list |
xai/grok-4.6 |
500K | Input Context ≤ 200K | $2 | $6 | $0.5 | $0 | at list |
xai/grok-4.6 |
500K | > 200K | $4 | $12 | $1 | $0 | at list |
anthropic/claude-opus-5 |
1M | flat | $5 | $25 | $0.5 | $6.25 | at list |
anthropic/claude-sonnet-5 |
1M | flat | $2 | $10 | $0.2 | $2.5 | at list |
anthropic/claude-haiku-4.5 |
200K | flat | $1 | $5 | $0.1 | $1.25 | at list |
anthropic/claude-fable-5.1 |
1M | flat | $10 | $50 | $0.25 | $15.25 | at list |
google/gemini-3.6-flash |
1.05M | flat | $1.5 | $7.5 | $0.15 | $0 | at list |
google/gemini-3.7-flash |
1.05M | flat | $1.5 → $0.75 | $7.5 → $3.75 | $0.15 → $0.075 | $0 | ≈ 50% below list |
google/gemini-3.8-flash |
1M | flat | $1.5 → $0.75 | $7.5 → $3.75 | $0.15 → $0.075 | $0 | ≈ 50% below list |
moonshot/kimi-k3 |
1.05M | flat | $3 | $15 | $0.3 | $0 | at list |
moonshot/kimi-k2.7 |
262K | flat | $0.95 | $4 | $0.19 | $0 | at list |
zai/glm-5.3 |
1.05M | flat | $1 | $4.4 | $0.26 | $0 | at list |
zai/glm-5.2 |
1.05M | flat | $1 | $4.4 | $0.26 | $0 | at list |
zai/glm-5.3-flash |
1.31M | flat | $0.15 → $0.075 | $0.5 → $0.25 | $0.03 → $0.015 | $0 | ≈ 50% below list |
qwen/qwen3.7-max |
1M | flat | $1.475 | $4.425 | $0.295 | $1.844 | at list |
qwen/qwen3.7-plus |
1M | flat | $0.32 | $1.28 | $0.064 | $0.4 | at list |
qwen/qwen3.8-max |
1M | flat | $2 | $6 | $0.25 | $2.5 | at list |
qwen/qwen3.8-flash |
1M | flat | $0.16 | $0.47 | $0.016 | $0.2 | at list |
deepseek/deepseek-v4-pro |
1.05M | flat | $1.33 | $3.96 | $0.044 | $0 | at list |
deepseek/deepseek-v4-flash |
1.05M | flat | $0.44 | $1.32 | $0.014 | $0 | at list |
deepseek/deepseek-v4-flash-vision |
1.05M | flat | $0.44 | $1.32 | $0.014 | $0 | at list |
modellix-ai/free-llm |
200K | flat | $0 | $0 | $0 | $0 | at list ($0) |
zai/glm-4.7-flash |
203K | flat | $0 | $0 | $0 | $0 | at list ($0) |
Source: Modellix LLM "Models and pricing" table, captured September 3, 2026. Official list prices are Modellix's stated figures and were not re-verified vendor-by-vendor; "at list" means the billed price equals that stated list price. Context is the model's supported window; Input Context is the pricing tier.
Several structural facts hide in those rows. Cache-write pricing appears on every Anthropic model (Opus 5, Sonnet 5, and Haiku 4.5 charge cache writes at 1.25× input), on all four Qwen models, and on OpenAI's GPT-5.6 family in both bands — GPT-5.5 has none, and neither do the Gemini, Grok, Moonshot, ZAI, or DeepSeek rows. Across providers the write rate is 1.25× the input rate, with Fable 5.1 the exception at a $15.25 cache-write rate on $10 input. DeepSeek gives you no cache-write column at all and the cheapest cached reads in the table. Two models — modellix-ai/free-llm and zai/glm-4.7-flash — carry a $0 rate on all four dimensions; treat those as curiosities to test, not as a documented free allowance, because the documentation describes no quotas, limits, or availability terms for either one.
If you are comparing a single family rather than the whole market, two companion pages drill into the mechanics behind specific rows: the GPT-5.6 pricing breakdown walks through the Sol / Terra / Luna bands and the 272K threshold, and the Claude API pricing guide covers the Anthropic flat-rate and cache-write structure. The single-model and total-table pages are meant to cross-link: pick the rows you care about here, then read the deep dive.
What a real agent run bills, on four of these models
Worked arithmetic beats abstract rates. Take a representative agent run: 250,000 input tokens total, of which 200,000 are repeatable context (system prompt, files, history) that hits cached read, plus 30,000 output tokens. The formula is (uncached input × input rate) + (cached input × cached read rate) + (output × output rate), all divided by 1,000,000.
| Model | Uncached in (50K) | Cached in (200K) | Output (30K) | Run total |
|---|---|---|---|---|
| GPT-5.6 Sol (≤272K) | 50K × $4 = $0.20 | 200K × $0.40 = $0.08 | 30K × $20 = $0.60 | $0.88 |
| Claude Opus 5 | 50K × $5 = $0.25 | 200K × $0.50 = $0.10 | 30K × $25 = $0.75 | $1.10 |
| Gemini 3.7 Flash | 50K × $0.75 = $0.0375 | 200K × $0.075 = $0.015 | 30K × $3.75 = $0.1125 | $0.165 |
| DeepSeek V4 Flash | 50K × $0.44 = $0.022 | 200K × $0.014 = $0.0028 | 30K × $1.32 = $0.0396 | $0.064 |
Illustrative arithmetic at September 3, 2026 rates; totals use the billed (Modellix) rate where it differs from list. The point is the shape, not the cents — each row moves differently when the mix changes.
If you run these models through an agent harness, this table is the shopping list for the models: section of your configuration — our DeepSeek Harness custom model guide shows how a provider entry turns one of the model IDs above into a selectable model. And when the run is over, the way to check which of these four rates actually applied is per-request cost logging, which our DeepSeek Harness token usage guide walks through end to end.
Now change two assumptions and watch the ranking move. If the same run sends all 250K tokens uncached (a fresh session with no cache reuse), GPT-5.6 Sol goes from $0.88 to $1.60, and Claude Opus 5 from $1.10 to $2.00 — cache reuse cut both roughly in half. If the run instead accumulates 300K tokens of input on Sol, the request crosses the 272K threshold and bills at the upper band: 300K × $8 plus 30K × $30 comes to $3.30, nearly four times the sub-threshold total. The same model, the same kind of workload, four different answers depending on context length and cache discipline. That is why "which input rate is lowest" cannot answer "what will this cost" — and why we refuse to rank these 28 rows into a single winner.
Two honest limits on that arithmetic. First, we do not teach you how to force a cache hit: the Modellix API documentation prices cached read and write tokens but does not publish how caching is triggered, its time-to-live, or any minimum-token threshold — treat cache as a billing reality to model, not a lever to game. Second, tokens are not fungible across models: each provider tokenizes text differently, so the same English prompt may consume different token counts on different models. Per-token rates are the unit of comparison, but per-task cost is the unit of truth.
How to use a per-token table without fooling yourself
The SERP for "LLM API pricing comparison" is full of rate trackers that update mechanically and articles that verified once and stopped. Most of them quote the same headline input rates and little else. Five habits keep you honest when you read any of them — including this page:
- Check the capture date before the price. Rates drift by the day; a comparison without a date is a historical document. This page's figures are September 3, 2026. The live source for every row above is the Modellix LLM model page, which lists list and billed prices side by side and updates as prices change.
- Separate input from output before comparing models. A low input rate with a high output rate is a trap for generation-heavy work; the reverse is a trap for retrieval-heavy work. Read both columns.
- Ask whether the model is flat or tiered, then check your context length against the threshold. If you run long-horizon agents, a 272K or 200K threshold is not an abstraction — it is the price you will pay on week two of a session-heavy workload.
- Price the cache dimension. If your workload repeats context across turns, the cached-read rate matters more than the headline input rate, because most of your input may land there.
- Run one real workload, not a sort. Pick your actual token mix, apply the formula above, and compare totals. A model that wins the per-token sort can lose the per-task comparison, and the reverse is common.
And if the question that brought you here really is "which LLM API is cheapest overall," the intellectually honest answer is that the question has no single answer across workloads — but our cheapest AI API guide takes on the ranking that does apply to common shapes, which this page deliberately avoids.
Compare Live LLM Rates on Modellix
Log in to open the current 28-model price table and check per-call cost logs for the models on your shortlist.
LoginFrequently Asked Questions About LLM API Pricing
How do I compare LLM API pricing across providers?
Compare the four rate dimensions — input, output, cached read, and cached write — per 1M tokens, on the same capture date, and then run your own workload through the formula (input × input rate + cached input × cached rate + output × output rate) / 1,000,000. Never compare a single input price in isolation: output is priced 5–6× higher at Anthropic and OpenAI, so output volume usually dominates.
What is Input Context pricing, and how is it different from the context window? Input Context is a billing tier: some models price the request by its input-token count, with every band above the first triggered when input exceeds a threshold (272K for the OpenAI models, 200K for Gemini 3.1 Pro and Grok 4.5/4.6). The context window is the technical maximum the model accepts. They are independent — Gemini 3.1 Pro supports a 1.05M window yet changes price above 200K input. Seven of the 28 models in this comparison are tiered; the rest are flat-rate.
How does cached input pricing change the cost of an agent run? A long agent session resends the same context every turn. Models with a cached-read rate near a tenth of input (Anthropic, OpenAI, Gemini) turn that repetition into a minor cost; DeepSeek prices it near 3% of input. In the worked example above, cache reuse cut a GPT-5.6 Sol run from $1.60 to $0.88. The catch: the Modellix documentation prices cached tokens but does not publish how caching is triggered or its time-to-live, so budget for the possibility that your cache hit rate is not what you hope.
Are there free LLM API models?
Two models in this comparison carry $0 rates on all four dimensions — modellix-ai/free-llm and zai/glm-4.7-flash. They are listed at $0, but neither has documentation describing quotas, rate limits, or availability terms, so test them before relying on them. There is no general free tier: Modellix's signup credit ended on August 19, 2026, per its changelog.
Why is my bill higher than the price table suggested? Usually one of four things: the output was longer than you estimated (or included reasoning tokens billed as output), your input crossed an Input Context threshold mid-run, your cache hit rate was lower than assumed, or you compared a stale price. Reconcile against per-request logs rather than estimates — that is the difference between a price page and a bill.
Do LLM API prices change often? Yes, and without ceremony. The table above is a snapshot — it carries a capture date for a reason. Gateway-level discounts appear and disappear without a model release, and vendors reprice tiers on their own schedules. Always re-check the live page on the day you commit spend; treat any pricing article without a capture date as suspect.




