Every team building on AI APIs eventually asks the same question: what will this actually cost next month? The answer is not a single number, because the same workload can cost 150× more depending on which model you point it at.
This calculator does the arithmetic for you. Enter your monthly token volume, set your prompt cache hit rate, and it prices your workload against every flagship model from OpenAI, Anthropic, Google and DeepSeek using current list rates.
AI API Cost Calculator
Estimate your monthly spend across every major model, then see which one is cheapest for your token mix. Prices are official list rates per 1M tokens, verified September 2026.
Monthly cost by model
| Model | Provider | In $/1M | Out $/1M | Monthly | Relative |
|---|
Billing model: cost = input_M × (1 − hit) × in_price + input_M × hit × cached_price + output_M × out_price. Cache rates apply to input tokens only.
List prices only. They exclude batch discounts (often 50% off), volume agreements, and regional uplifts. Providers change prices without notice — always confirm on the vendor’s own pricing page before you commit a budget.
How the calculator prices your workload
Token billing is not one rate — it is three. Input tokens, output tokens and cached input tokens are each billed separately, and output is almost always the most expensive of the three. The calculator applies this formula to every model in the list:
monthly cost = input(M) × (1 − cache hit) × input price + input(M) × cache hit × cached price + output(M) × output price
Two details trip people up. First, prompt caching only discounts input tokens; your output bill is unaffected no matter how aggressive your caching is. Second, cached reads are roughly 10× cheaper than fresh input on most providers, which is why a high cache hit rate compresses cost far more than most teams expect.
To use the tool: pick the preset closest to your workload, then override the token counts with numbers from your own billing dashboard. A quick way to get real figures is to pull the last full month of usage from your provider console and divide total input tokens by total requests.
AI API pricing comparison, September 2026
List prices per 1M tokens, standard service tier. The reference table below is the same data the calculator uses, so you can sanity-check any result by hand.
| Model | Provider | Input / 1M | Cached input / 1M | Output / 1M |
|---|---|---|---|---|
| GPT-6 Astra | OpenAI | $10.00 | $1.00 | $50.00 |
| GPT-6 Sol | OpenAI | $2.00 | $0.20 | $10.00 |
| GPT-6 Luna | OpenAI | $0.10 | $0.01 | $0.50 |
| GPT-5.6 Sol | OpenAI | $4.00 | $0.40 | $20.00 |
| GPT-5.6 Cyber | OpenAI | $12.50 | $1.25 | $75.00 |
| GPT-5.3 Codex | OpenAI | $1.75 | $0.175 | $14.00 |
| Fable 5.1 | Anthropic | $10.00 | $0.25 | $50.00 |
| Opus 5.5 | Anthropic | $4.00 | $0.20 | $20.00 |
| Sonnet 5 | Anthropic | $2.00 | $0.20 | $10.00 |
| Haiku 4.5 | Anthropic | $1.00 | $0.10 | $5.00 |
| Gemini 3.8 Flash | $0.75 | $0.075 | $3.75 | |
| Gemini 3.5 Flash | $1.50 | $0.15 | $9.00 | |
| Gemini 3.5 Flash-Lite | $0.30 | $0.03 | $2.50 | |
| Gemini 3.1 Flash-Lite | $0.25 | $0.025 | $1.50 | |
| Gemini 3.1 Pro | $2.00 | $0.20 | $12.00 | |
| Gemini 2.5 Pro | $1.25 | $0.125 | $10.00 | |
| Gemini 2.5 Flash | $0.30 | $0.03 | $2.50 | |
| Gemini 2.5 Flash-Lite | $0.10 | $0.01 | $0.40 | |
| DeepSeek V4.1 Flash (peak) | DeepSeek | $0.30 | $0.006 | $1.20 |
| DeepSeek V4.1 Flash (off-peak) | DeepSeek | $0.15 | $0.003 | $0.60 |
| DeepSeek V4 Pro (peak) | DeepSeek | $1.32 | $0.044 | $3.96 |
| DeepSeek V4 Pro (off-peak) | DeepSeek | $0.66 | $0.022 | $1.98 |
Rates verified against each provider's official pricing page in September 2026. Google's Gemini 3 Flash family is on promotional pricing through 31 December 2026 and doubles on 1 January 2027 — worth remembering before you build a budget on it.
Why the same workload costs 150× more on the wrong model
Run a modest production workload — 50M input tokens and 10M output tokens per month, no caching — and the spread is brutal:
| Model | Monthly cost | Multiple of cheapest |
|---|---|---|
| Gemini 2.5 Flash-Lite | $9.00 | 1× |
| GPT-6 Luna | $10.00 | 1.1× |
| DeepSeek V4.1 Flash (off-peak) | $13.50 | 1.5× |
| Gemini 2.5 Pro | $162.50 | 18× |
| Sonnet 5 | $200.00 | 22× |
| GPT-6 Astra | $1,000.00 | 111× |
| GPT-5.6 Cyber | $1,375.00 | 153× |
The lesson is not "always use the cheapest model" — it is that model choice should be a per-request decision, not a per-project one. A support bot answering refund policy questions does not need a frontier reasoning model. A code review agent does. Most production systems contain both kinds of traffic and route them identically because routing is hard to wire up.
Five ways to cut your AI API bill
In rough order of how much money they save per hour of engineering effort:
- Turn on prompt caching. On most providers a cache read costs about a tenth of fresh input. If your system prompt or retrieved context repeats across calls, a 60–80% hit rate is realistic and often halves the input line of your bill. The calculator's cache slider shows the effect directly.
- Route by task difficulty. Send classification, extraction and formatting work to a small model and reserve the frontier model for reasoning. This single change is usually the largest line-item saving available. See how to choose the right AI model for routing.
- Cap output tokens. Output is priced 3–6× higher than input almost everywhere. A runaway agent loop that emits 20K tokens of scratchpad per turn is the most common cause of a surprise invoice.
- Use batch tiers for non-interactive work. Batch endpoints are typically 50% off list and cost you only latency. Embedding jobs, nightly summarisation and evaluation runs belong there.
- Put a budget guardrail in front of production. Alerts on daily spend catch a misconfigured retry loop before it costs four figures overnight. See AI cost guardrails and budgets.
If you want the full breakdown of how token billing works across providers, AI API pricing explained covers caching semantics, tier pricing and the long-context cliffs that quietly double your rate. For a broader reduction playbook, how to reduce AI API costs walks through the changes that pay off first.
If you want the full picture rather than a single workload — six production workloads priced against all 22 models, plus the long-context thresholds that silently double a bill — see the 2026 AI API Cost Index. It is the analysis behind this calculator, and the raw dataset is downloadable.
Where a gateway changes the arithmetic
Every technique above assumes you can change which model a request goes to. If your code calls four providers through four SDKs, that change means four code paths, four sets of credentials and four retry strategies — which is why most teams never get around to it.
An AI gateway collapses that into one. You keep a single OpenAI-compatible client, swap the base URL, and the routing, failover and per-key budget decisions move into configuration instead of application code. That is what lets you actually act on what this calculator tells you. Related reading: what an AI API gateway does, AI gateway vs API gateway, and switching providers without rewriting your app.
Frequently asked questions
Are these prices the final price I will pay?
No. They are list prices for the standard service tier. Batch processing is usually 50% cheaper, priority or fast tiers cost more, long-context requests above a model's threshold can double the rate, and enterprise agreements change the numbers again. Treat the calculator as a comparison tool, not a quote.
Why does cached input cost so much less?
Because the provider skips recomputing the attention state for the cached prefix. The saving is real and substantial — roughly 10× on most providers — but it only applies to the part of your prompt that is byte-identical between calls, and cache entries expire (commonly after 5 minutes, with longer TTLs available at extra cost).
Is the cheapest model good enough for my use case?
For classification, extraction, summarisation and formatting, usually yes. For multi-step reasoning, code generation and anything where a wrong answer is expensive, usually no. The right test is to run your own evaluation set against two or three candidates rather than trusting a leaderboard.
How often do these prices change?
More often than you would like. Providers cut prices, launch promotional tiers and retire models on their own schedule — Gemini's Flash pricing doubles on 1 January 2027, for example. Re-check the official pricing pages before committing to an annual budget.
QoraAPI is an OpenAI-compatible AI gateway. Point your existing client at it, keep your code, and route each request to whichever model is cheapest for that task — with failover across providers when one degrades.
