OpenAI API Pricing 2026: Cost Calculator & Per-Token Rates
What will your app actually cost to run? Enter your tokens and request volume below and compare 41 models across five providers on the same workload โ free, instant, no signup.
Prices verified July 28, 2026 against each provider's official pricing page (sources linked below).
TL;DR: OpenAI API pricing at a glance
- You pay per token, not per month. No subscription, no seat, no minimum.
- GPT-5: $1.25 per 1M input tokens / $10.00 per 1M output tokens
- GPT-5 mini: $0.25 / $2.00 ย โขย GPT-5 nano: $0.05 / $0.40
- GPT-5.6 Sol: $5.00 / $30.00 ย โขย GPT-5.5 Pro: $30.00 / $180.00
- Cached input costs 10% of the standard rate on the GPT-5 family, and the batch API is 50% off both directions.
The thing that trips people up: ChatGPT Plus does not include API access. They are separate products with separate bills. See our ChatGPT Plus pricing guide if you want the consumer subscription instead.
LLM API Cost Calculator
Estimate your monthly API bill across OpenAI, Anthropic, Google, xAI and DeepSeek. Everything runs in your browser โ nothing is sent anywhere, and no model is called.
Models to compare (6 selected)
| Model | Input cost | Output cost | Per request | Monthly total |
|---|---|---|---|---|
| DeepSeek V4 FlashDeepSeekCHEAPEST | $17.50 | $4.90 | $0.00045 | $22.40 |
| GPT-5 miniOpenAI | $31.25 | $35.00 | $0.0013 | $66.25 |
| Gemini 2.5 FlashGoogle | $37.50 | $43.75 | $0.0016 | $81.25 |
| Claude Haiku 4.5Anthropic | $125.00 | $87.50 | $0.0043 | $212.50 |
| Claude Sonnet 5 (intro rate)Anthropic | $250.00 | $175.00 | $0.0085 | $425.00 |
| GPT-5.6 TerraOpenAI | $312.50 | $262.50 | $0.01 | $575.00 |
You now know what GPT-5 costs. Do you know if ChatGPT recommends you?
Every dollar in that estimate goes into a product someone still has to find. We ask ChatGPT about your category across 5 prompt angles and score how often your tool actually gets named. ~30 seconds, no signup, no card.
Quick Navigation
How token pricing actually works
Every LLM API bills the same way: it counts the tokens going in, counts the tokens coming out, multiplies each by a published per-million rate, and adds them up. There is no per-request fee, no seat licence and no monthly minimum. If you send nothing, you pay nothing.
A token is a chunk of text, usually a few characters. For ordinary English prose the working rule is:
- 1 token โ 4 characters
- 1 token โ 0.75 words
- 1,000 words โ 1,300โ1,400 tokens
- A 500-page book โ 150,000โ200,000 tokens
Those ratios get worse for code, JSON, XML, and any language that isn't written in the Latin alphabet โ 20% to 60% more tokens for the same visible content is normal. Tokenizers also differ between providers and between model generations, so the identical prompt will not produce an identical token count on GPT-5, Claude Sonnet 5 and Gemini 2.5 Flash. When you compare providers on price, you are comparing rates on slightly different token counts, which is one more reason to validate on your own traffic rather than trusting a table.
What a single request costs: the arithmetic
Say you send a 2,000-token prompt to GPT-5 and get a 500-token answer back:
- Input: 2,000 รท 1,000,000 ร $1.25 = $0.0025
- Output: 500 รท 1,000,000 ร $10.00 = $0.0050
- Total: $0.0075 per request โ about 133 requests per dollar
Note that the output was a quarter the size of the input but cost twice as much. That asymmetry is the single most important thing to understand about LLM cost modelling.
The conversation trap. In a chat app, the entire history is re-sent as input on every turn. A 20-turn conversation doesn't cost 20 requests โ it costs something closer to the sum of a growing prompt, which is quadratic in the number of turns. This is why prompt caching and history truncation matter far more in chat than in one-shot workloads.
Why output tokens cost 4โ8x more than input tokens
This isn't arbitrary pricing โ it reflects a real difference in what the hardware has to do.
Input (prefill)
The whole prompt is processed in one parallel pass. A GPU can chew through tens of thousands of input tokens in a single batched operation, and many users' prompts can share that batch. Cheap, and it parallelises almost perfectly.
Output (decode)
Each token is generated one at a time, and every single one requires another pass over the model weights, because token 500 depends on token 499. The work is serial, it holds GPU memory for the whole generation, and it cannot be batched nearly as efficiently. Expensive.
The practical consequence: the shape of your workload matters as much as your volume. Two apps that each push 100 million tokens a month can have wildly different bills.
- Summarization โ huge input, tiny output. Cheap per token processed, and the ideal candidate for the batch discount.
- Classification / extraction โ small input, tiny output. The cheapest shape there is; run it on a nano/lite/flash model and the cost effectively disappears.
- Chat โ medium input that grows every turn, medium output. Prompt caching is the main lever.
- Content generation and coding agents โ long output, often plus reasoning tokens. The most expensive shape per request by a wide margin.
Reasoning tokens bill as output. On reasoning models the hidden chain of thought is charged at the output rate even though you never see it. A 200-token visible answer can carry several thousand billed tokens behind it. If you're budgeting for a reasoning model, set the output figure in the calculator well above the answer length you expect to display.
LLM API pricing table: cost per 1M tokens
Standard (synchronous) tier, USD per 1,000,000 tokens. Every figure below was read off the provider's own pricing page on July 28, 2026. Models whose price could not be verified against a first-party page are not listed.
OpenAI API pricing
Source: developers.openai.com/api/docs/pricing โ verified July 28, 2026
| Model | Input / 1M | Cached input / 1M | Output / 1M | Notes |
|---|---|---|---|---|
GPT-5.6 Solgpt-5.6-sol | $5.00 | $0.50 | $30.00 | Current frontier tier |
GPT-5.6 Terragpt-5.6-terra | $2.50 | $0.25 | $15.00 | Mid tier |
GPT-5.6 Lunagpt-5.6-luna | $1.00 | $0.10 | $6.00 | Cheapest 5.6 |
GPT-5.5gpt-5.5 | $5.00 | $0.50 | $30.00 | 50% batch discount available |
GPT-5.5 Progpt-5.5-pro | $30.00 | โ | $180.00 | No cached-input rate published |
GPT-5.4gpt-5.4 | $2.50 | $0.25 | $15.00 | 50% batch discount available |
GPT-5.4 minigpt-5.4-mini | $0.75 | $0.07 | $4.50 | 50% batch discount available |
GPT-5.4 nanogpt-5.4-nano | $0.20 | $0.02 | $1.25 | 50% batch discount available |
GPT-5.2gpt-5.2 | $1.75 | $0.17 | $14.00 | 50% batch discount available |
GPT-5.1gpt-5.1 | $1.25 | $0.13 | $10.00 | 50% batch discount available |
GPT-5gpt-5 | $1.25 | $0.13 | $10.00 | 50% batch discount available |
GPT-5 minigpt-5-mini | $0.25 | $0.03 | $2.00 | 50% batch discount available |
GPT-5 nanogpt-5-nano | $0.05 | $0.0050 | $0.40 | Cheapest OpenAI model |
GPT-4.1gpt-4.1 | $2.00 | $0.50 | $8.00 | 50% batch discount available |
GPT-4.1 minigpt-4.1-mini | $0.40 | $0.10 | $1.60 | 50% batch discount available |
GPT-4.1 nanogpt-4.1-nano | $0.10 | $0.03 | $0.40 | 50% batch discount available |
GPT-4ogpt-4o | $2.50 | $1.25 | $10.00 | Legacy; cache discount only 50% |
GPT-4o minigpt-4o-mini | $0.15 | $0.07 | $0.60 | Legacy |
o3o3 | $2.00 | $0.50 | $8.00 | Reasoning model |
o4-minio4-mini | $1.10 | $0.28 | $4.40 | Reasoning model |
Anthropic API pricing
Source: platform.claude.com/docs/en/about-claude/pricing โ verified July 28, 2026
| Model | Input / 1M | Cached input / 1M | Output / 1M | Notes |
|---|---|---|---|---|
Claude Fable 5claude-fable-5 | $10.00 | $1.00 | $50.00 | Top of Anthropic's range |
Claude Opus 5claude-opus-5 | $5.00 | $0.50 | $25.00 | 50% batch discount available |
Claude Opus 4.8claude-opus-4-8 | $5.00 | $0.50 | $25.00 | 50% batch discount available |
Claude Opus 4.6claude-opus-4-6 | $5.00 | $0.50 | $25.00 | 50% batch discount available |
Claude Sonnet 5 (intro rate)claude-sonnet-5 | $2.00 | $0.20 | $10.00 | Introductory rate through Aug 31, 2026; then $3 / $15 |
Claude Sonnet 4.6claude-sonnet-4-6 | $3.00 | $0.30 | $15.00 | 50% batch discount available |
Claude Sonnet 4.5claude-sonnet-4-5 | $3.00 | $0.30 | $15.00 | 50% batch discount available |
Claude Haiku 4.5claude-haiku-4-5 | $1.00 | $0.10 | $5.00 | Cheapest current Claude |
Google API pricing
Source: ai.google.dev/gemini-api/docs/pricing โ verified July 28, 2026
| Model | Input / 1M | Cached input / 1M | Output / 1M | Notes |
|---|---|---|---|---|
Gemini 3.6 Flashgemini-3.6-flash | $1.50 | $0.15 | $7.50 | 50% batch discount available |
Gemini 3.5 Flashgemini-3.5-flash | $1.50 | $0.15 | $9.00 | 50% batch discount available |
Gemini 3.5 Flash-Litegemini-3.5-flash-lite | $0.30 | $0.03 | $2.50 | 50% batch discount available |
Gemini 3.1 Pro (preview)gemini-3.1-pro | $2.00 | $0.20 | $12.00 | Rate shown is for prompts โค200k tokens; doubles above that |
Gemini 2.5 Progemini-2.5-pro | $1.25 | $0.13 | $10.00 | โค200k-token prompts; $2.50 / $15 above |
Gemini 2.5 Flashgemini-2.5-flash | $0.30 | $0.03 | $2.50 | 50% batch discount available |
Gemini 2.5 Flash-Litegemini-2.5-flash-lite | $0.10 | $0.01 | $0.40 | Cheapest Gemini |
Gemini 2.0 Flashgemini-2.0-flash | $0.10 | $0.03 | $0.40 | 50% batch discount available |
xAI API pricing
Source: docs.x.ai/docs/models โ verified July 28, 2026
| Model | Input / 1M | Cached input / 1M | Output / 1M | Notes |
|---|---|---|---|---|
Grok 4.5grok-4.5 | $2.00 | $0.30 | $6.00 | Rate shown is for prompts <200k tokens; doubles above that |
Grok 4.3grok-4.3 | $1.25 | $0.20 | $2.50 | <200k-token prompts |
Grok Build 0.1grok-build-0.1 | $1.00 | $0.20 | $2.00 | <200k-token prompts |
DeepSeek API pricing
Source: api-docs.deepseek.com/quick_start/pricing โ verified July 28, 2026
| Model | Input / 1M | Cached input / 1M | Output / 1M | Notes |
|---|---|---|---|---|
DeepSeek V4 Flashdeepseek-v4-flash | $0.14 | $0.0028 | $0.28 | Cheapest model on this page |
DeepSeek V4 Prodeepseek-v4-pro | $0.43 | $0.0036 | $0.87 | No batch discount published |
Get an email when the numbers in this table change
We re-read every provider's own pricing page and mail you only when a rate on this page actually moves โ no weekly digest padding, no launch roundups.
Already on the calendar: Claude Sonnet 5's introductory $2 / $10 per 1M tokens expires Aug 31, 2026 and goes to $3 / $15 โ a 50% increase on the same workload. Prices here were last re-verified July 28, 2026.
Prompt caching and batch pricing: the two biggest discounts
Prompt caching
If you send the same prefix over and over โ a long system prompt, a product catalogue, a document you're answering questions about, a conversation history โ the provider can keep its processed form warm and skip the work next time. You get charged a fraction of the input rate for those tokens.
- OpenAI: cached input is 10% of the standard rate across the GPT-5 family (for example GPT-5 at $1.25 โ $0.125). On the older GPT-4.1 and GPT-4o generations the discount is smaller โ GPT-4o cached input is $1.25 against a $2.50 base, only 50% off.
- Anthropic: a cache hit costs 10% of the base input rate. Writing to the cache costs 1.25x base for a 5-minute TTL, or 2x for a 1-hour TTL โ so a 5-minute cache pays for itself after a single hit, and a 1-hour cache after two.
- Google: context caching runs at roughly 10% of the input rate, plus a storage charge billed per hour of cached content.
- xAI and DeepSeek: both publish cached input rates. DeepSeek's is the most aggressive on this page โ V4 Flash cache hits are $0.0028 per million against a $0.14 miss rate.
Drag the cache slider in the calculator above to see what this does to your own numbers. On a chatbot with a large fixed system prompt, a realistic 60% hit rate typically removes over half the input line.
Batch pricing
OpenAI, Anthropic and Google all take 50% off both input and output if you submit requests asynchronously and accept results within 24 hours. There is no quality difference โ it's the same model, scheduled when there's spare capacity.
This is the most under-used discount in the industry, because most teams reach for a synchronous endpoint by reflex. If a human isn't waiting on the response, batch it: nightly summarization, backfills over historical data, bulk tagging and classification, eval runs, embedding refreshes, content pipelines. Caching and batching stack, so a batched job over a cached prefix can land near a fifth of the naive sticker price.
Worked examples: what four real app shapes actually cost
Monthly cost at standard synchronous rates, with the cache hit rate noted for each shape and no batch discount applied. These are computed with the exact same maths as the calculator โ load any of them as a preset above and change the numbers to match your own app.
Support chatbot
A ~1,200-token system prompt plus a short conversation history, answered in a paragraph or two. 50,000 conversations a month. Most of the input repeats every turn, so caching bites hard.
2,500 input tokens ยท 350 output tokens ยท 50,000 requests/month ยท 60% cached
| Model | Input | Output | Monthly total |
|---|---|---|---|
| GPT-5 mini | $14.38 | $35.00 | $49.38 |
| Gemini 2.5 Flash | $17.25 | $43.75 | $61.00 |
| Claude Sonnet 5 (intro rate) | $115.00 | $175.00 | $290.00 |
| GPT-5.6 Terra | $143.75 | $262.50 | $406.25 |
RAG question answering
Eight retrieved chunks (~1,000 tokens each) stuffed into the prompt, answered with a cited paragraph. Input-heavy: the retrieved context dwarfs the answer.
9,000 input tokens ยท 500 output tokens ยท 20,000 requests/month ยท 20% cached
| Model | Input | Output | Monthly total |
|---|---|---|---|
| GPT-5 mini | $36.90 | $20.00 | $56.90 |
| Gemini 2.5 Flash | $44.28 | $25.00 | $69.28 |
| Claude Sonnet 5 (intro rate) | $295.20 | $100.00 | $395.20 |
| GPT-5.6 Terra | $369.00 | $150.00 | $519.00 |
Document summarization
A 20-page document (~15,000 tokens) reduced to a one-page summary. Almost pure input cost, and a textbook batch-API candidate because nobody is waiting on the response.
15,000 input tokens ยท 800 output tokens ยท 5,000 requests/month ยท 0% cached
| Model | Input | Output | Monthly total |
|---|---|---|---|
| GPT-5 mini | $18.75 | $8.00 | $26.75 |
| Gemini 2.5 Flash | $22.50 | $10.00 | $32.50 |
| Claude Sonnet 5 (intro rate) | $150.00 | $40.00 | $190.00 |
| GPT-5.6 Terra | $187.50 | $60.00 | $247.50 |
Coding agent
A large repo context plus tool definitions, and long generated diffs. Output-heavy and expensive: this is the shape where the input/output price gap really shows up.
30,000 input tokens ยท 4,000 output tokens ยท 8,000 requests/month ยท 70% cached
| Model | Input | Output | Monthly total |
|---|---|---|---|
| GPT-5 mini | $22.20 | $64.00 | $86.20 |
| Gemini 2.5 Flash | $26.64 | $80.00 | $106.64 |
| Claude Sonnet 5 (intro rate) | $177.60 | $320.00 | $497.60 |
| GPT-5.6 Terra | $222.00 | $480.00 | $702.00 |
Seven ways to cut your LLM API bill
1. Route by difficulty, not by habit
Most production traffic is easy. Send the easy 80% to a nano, mini, lite or flash model and reserve the frontier model for the cases that genuinely need it. The rate gap between GPT-5 nano and GPT-5.5 Pro is 600x on input โ no other optimisation comes close.
2. Turn on prompt caching
Put everything stable at the front of the prompt and everything variable at the end, so the cacheable prefix is as long as possible. Cached tokens cost 10% of standard on the current model families.
3. Batch anything nobody is waiting on
50% off, same model, results within 24 hours. Free money for offline pipelines.
4. Cap your output
Output is the expensive direction. Set max_tokens, ask for structured JSON instead of prose, and stop asking the model to restate the question before answering it.
5. Trim retrieved context
RAG apps routinely stuff twenty chunks in when five would do. Rerank, then truncate. This is usually the largest single line on a RAG bill.
6. Cache the answers, not just the prompt
Real user traffic is heavily repetitive. A plain semantic cache in front of the API โ same question, return the stored answer โ often deflects 20% to 40% of calls at zero token cost.
7. Set a hard spend limit before you ship
Every provider dashboard supports a monthly cap and usage alerts. The canonical LLM billing disaster is a retry loop shipped on a Friday, and a spend limit is the only thing that reliably stops it.
Frequently Asked Questions
How much does the OpenAI API cost?
OpenAI API pricing is per token, not per month. As of July 28, 2026, GPT-5 costs $1.25 per million input tokens and $10.00 per million output tokens. GPT-5 mini is $0.25 / $2.00, and GPT-5 nano is $0.05 / $0.40. At the top of the range, GPT-5.6 Sol is $5.00 / $30.00 and GPT-5.5 Pro is $30.00 / $180.00. There is no subscription and no minimum โ you are billed only for the tokens you actually send and receive.
Is the OpenAI API included in ChatGPT Plus?
No. A ChatGPT Plus, Team or Enterprise subscription covers the ChatGPT web and mobile apps only. API access is billed completely separately on a pay-per-token basis through platform.openai.com, with its own billing account and its own spend limits. Paying $20/month for ChatGPT Plus gives you zero API credit.
Why do output tokens cost more than input tokens?
Input tokens are processed in parallel in a single forward pass (the prefill stage), which is cheap and highly batchable on a GPU. Output tokens are generated one at a time, each requiring its own pass over the whole model (the decode stage), which serialises the work and occupies the GPU for far longer per token. Providers price that difference through: output is typically 4x to 8x the input rate. In practice this means a summarization workload โ huge input, small output โ is far cheaper per call than a code-generation workload with the same total token count.
How many tokens is 1,000 words?
For English prose, roughly 1,300 to 1,400 tokens. The common rule of thumb is 1 token โ 4 characters โ 0.75 words. Code, JSON, non-Latin scripts and unusual proper nouns tokenize less efficiently and can run 20% to 60% higher. Note also that tokenizers differ between providers and even between model generations from the same provider, so the same text will not produce an identical token count everywhere.
What is prompt caching and how much does it save?
Prompt caching lets a provider reuse the processed form of a prefix you send repeatedly โ a long system prompt, a document, a conversation history โ instead of reprocessing it on every call. Cached input tokens are dramatically cheaper: OpenAI charges 10% of the standard input rate on the GPT-5 family, and Anthropic charges 10% on a cache hit (with a one-time write premium of 1.25x for a 5-minute cache or 2x for a 1-hour cache). For a chatbot with a big fixed system prompt, caching routinely removes 40% to 70% of the input line on the bill.
What is the batch API discount?
OpenAI, Anthropic and Google all offer a 50% discount on both input and output tokens if you submit work asynchronously and accept results within 24 hours. If nobody is sitting waiting for the response โ nightly summarization, backfills, bulk classification, evals โ this is the single easiest way to halve your bill. xAI and DeepSeek do not currently publish a batch discount.
Do reasoning tokens count as output tokens?
Yes. On reasoning models the internal chain of thought is billed at the output rate even though you never see most of it. This is the most common source of a surprise bill: a request that returns a 200-token answer may have generated several thousand reasoning tokens first. When you estimate costs for a reasoning model, budget output tokens well above the visible answer length.
Which LLM API is cheapest?
Among the models verified here on July 28, 2026, DeepSeek V4 Flash is the cheapest at $0.14 per million input tokens and $0.28 per million output tokens. Among the US frontier labs, the cheapest options are GPT-5 nano ($0.05 / $0.40), Gemini 2.5 Flash-Lite ($0.10 / $0.40) and GPT-4.1 nano ($0.10 / $0.40). But headline rate is not the same as bill: a cheaper model that needs retries, longer prompts or more reasoning tokens to hit the same quality can cost more in production than a pricier model that gets it right the first time.
How do I estimate API costs before I build?
Take one realistic request, count its input and output tokens, multiply by your expected monthly request volume, then apply the per-million rates. That is exactly what the calculator on this page does. Two adjustments matter more than anything else: subtract the share of input tokens that prompt caching will serve, and add the reasoning tokens if you're on a reasoning model. Then set a hard monthly spend limit in your provider dashboard before you ship, because a retry loop in production is the classic way to turn a $50 estimate into a $5,000 invoice.
Are these prices current?
Every price on this page was read directly off the provider's own pricing page on July 28, 2026, and each provider's source URL is linked in the table. LLM API prices change often โ new model families frequently launch below the ones they replace โ so confirm against the linked provider page before committing to a budget.
Per-token pricing for the other providers
Every page in this set reads from the same verified price table, so the numbers never disagree with each other.
Claude API pricing
Anthropic's tier ladder, cache-write premiums and the Sonnet 5 intro rate.
Gemini API pricing
Google's free tier, the 200k context price cliff and the Batch/Priority service tiers.
Grok API pricing
xAI's unusually flat input/output gap and what it means for output-heavy apps.
DeepSeek API pricing
The cheapest rates on the board and a 50x cache-hit discount.
LLM API pricing comparison
All five providers head to head, with a recommendation per workload shape.
Related Guides & Tools
ChatGPT Plus Pricing
The consumer subscription โ Free, Plus, Team and Enterprise plans explained
Claude Pro Pricing
Anthropic's consumer plans, and how they differ from API billing
ChatGPT Review
Full breakdown of features, limits and who it's for
Claude Review
How Claude compares on long context and code
Cursor Review
The AI code editor that sits on top of these same APIs
AI Tool Pricing Hub
Compare pricing across every tool in the directory
ChatGPT vs Claude
Side-by-side comparison of the two leading assistants
Best AI Coding Tools
What developers are actually building with these APIs
ChatGPT already recommends your AI app. Does it recommend yours?
If you're building in LLM APIs, run a free AI-visibility scan on your own product โ we ask ChatGPT across 5 prompt angles and score how often you get named. ~30 seconds, no signup, no card.
๐ฌ Get the best new AI tools delivered weekly
One concise email with fresh launches, trending picks, and featured standouts.