What Will Your AI API Calls Cost?
Compare 26 live LLM rates (GPT-5, Claude 5.5, Gemini 4, DeepSeek V4, Grok 4.7) or add custom pricing with cache hit-rate & reasoning token math.
AI API Token & Cost Projection Engine
Applied to thinking models (o3, o4-mini, Claude Fable, Gemini Pro) at output rate.
Share of input tokens hitting cached system/RAG prefix.
Models context history accumulation across chat turns.
| Model & Provider | Context | Input / Output ($/1M) | Cost / 1K Calls | Daily Cost | Monthly Projection | Customize |
|---|---|---|---|---|---|---|
GPT-5 nano· OpenAI Ultra-low latency routing | 400K | $0.028 / $0.40 Base $0.05 · Cache $0.005 | $0.249 | $0.622 | $18.93 | |
Claude Haiku 5.5· Anthropic Sub-100K prompt rate | 200K | $0.055 / $0.50 Base $0.10 · Cache $0.010 | $0.362 | $0.906 | $27.58 | |
Llama 4 Scout· Open Inference Avg serverless host pricing | 10M | $0.100 / $0.30 | $0.385 | $0.963 | $29.30 | |
DeepSeek V4.1-Flash· DeepSeek Aggressive cache hit pricing | 128K | $0.076 / $0.60 Base $0.15 · Cache $0.003 | $0.461 | $1.15 | $35.10 | |
Mistral Small 4· Mistral | 128K | $0.082 / $0.60 Base $0.15 · Cache $0.015 | $0.476 | $1.19 | $36.24 | |
GPT-4o mini· OpenAI | 128K | $0.112 / $0.60 Base $0.15 · Cache $0.075 | $0.551 | $1.38 | $41.95 | |
Codestral· Mistral Specialized code completion | 256K | $0.165 / $0.90 Base $0.30 · Cache $0.030 | $0.817 | $2.04 | $62.21 | |
Llama 4 Maverick· Open Inference Avg serverless host pricing | 1M | $0.200 / $0.80 | $0.860 | $2.15 | $65.44 | |
Gemini 3.5 Flash-Lite· Google | 1M | $0.138 / $1.50 Base $0.25 · Cache $0.025 | $1.02 | $2.55 | $77.52 | |
GPT-5 mini· OpenAI | 400K | $0.138 / $2.00 Base $0.25 · Cache $0.025 | $1.24 | $3.11 | $94.64 | |
DeepSeek V4-Pro· DeepSeek Off-peak base rate | 128K | $0.341 / $1.98 Base $0.66 · Cache $0.022 | $1.74 | $4.36 | $132.67 | |
Grok Build· xAI | 200K | $0.600 / $2.00 Base $1.00 · Cache $0.200 | $2.40 | $6.00 | $182.63 | |
Gemini 3.8 Flash· Google | 1M | $0.412 / $3.75 Base $0.75 · Cache $0.075 | $2.72 | $6.80 | $206.88 | |
Grok 4.3· xAI | 200K | $0.725 / $2.50 Base $1.25 · Cache $0.200 | $2.94 | $7.34 | $223.53 | |
o4-mini· OpenAI | 200K | $0.688 / $4.40 Base $1.10 · Cache $0.275 | $3.70 | $9.25 | $281.45 | |
Mistral Large 4· Mistral | 256K | $0.750 / $4.18 Base $1.36 · Cache $0.140 | $3.76 | $9.39 | $285.81 | |
Grok 4.7· xAI | 200K | $1.250 / $6.00 Base $2.00 · Cache $0.500 | $5.83 | $14.56 | $443.25 | |
GPT-5· OpenAI Standard flagship model | 400K | $0.688 / $10.00 Base $1.25 · Cache $0.125 | $6.22 | $15.55 | $473.21 | |
o3· OpenAI Thinking tokens billed as output | 200K | $1.250 / $8.00 Base $2.00 · Cache $0.500 | $6.72 | $16.81 | $511.73 | |
Claude Sonnet 5.5· Anthropic Production coding leader | 200K | $1.050 / $10.00 Base $2.00 · Cache $0.100 | $7.12 | $17.81 | $542.17 | |
Gemini 4 Argon· Google Intro rate through Nov 30, 2026 | 1M+ | $1.100 / $10.00 Base $2.00 · Cache $0.200 | $7.25 | $18.13 | $551.68 | |
Gemini 3.1 Pro· Google | 1M | $1.100 / $12.00 Base $2.00 · Cache $0.200 | $8.15 | $20.38 | $620.16 | |
GPT-4o· OpenAI | 128K | $1.875 / $10.00 Base $2.50 · Cache $1.250 | $9.19 | $22.97 | $699.11 | |
Claude Opus 5.5· Anthropic Heavy agentic workflows | 200K | $2.100 / $20.00 Base $4.00 · Cache $0.200 | $14.25 | $35.63 | $1,084.34 | |
Claude Fable 5.2· Anthropic | 200K | $4.100 / $40.00 Base $8.00 · Cache $0.200 | $28.25 | $70.63 | $2,149.65 | |
GPT-6 Astra· OpenAI Frontier research tier | 1M | $5.500 / $50.00 Base $10.00 · Cache $1.000 | $36.25 | $90.63 | $2,758.40 |
Rates reflect standard published developer API tiers as of November 2026 (base context windows). Long-context prompts (>100K–200K tokens) or regional cloud endpoints may carry provider surcharges—use the edit icon on any row to match your exact invoice rate.
AI API Cost Modeling That Matches Your Actual Cloud Invoice (Not Back-of-the-Napkin Guesses)
Almost every team ships its first AI feature with rough back-of-the-napkin token math—only to open the billing dashboard thirty days later and wonder why actual spend came in four times higher than forecast. On paper, pricing looks straightforward: multiply input and output tokens by a dollar rate per million. In production, three quiet multipliers distort that spreadsheet: hidden reasoning tokens billed at expensive output rates, multi-turn conversation histories that re-send the entire thread on every user reply, and real-world prompt cache hit rates that rarely stay at 100%. This calculator models all of those variables side by side across 26 current API models—and lets you add your own custom endpoints, self-hosted GPU rates, or negotiated enterprise discounts right inside your browser.
Current LLM API Pricing Snapshot (November 2026 · USD per 1M Tokens)
| Specification | Pattern / Benchmark | Why It Matters |
|---|---|---|
| GPT-5 (OpenAI) | $1.25 In / $0.125 Cache / $10.00 Out | 400K context window flagship; 90% cache discount and 50% Batch API reduction. |
| GPT-5 nano (OpenAI) | $0.05 In / $0.005 Cache / $0.40 Out | Ultra-cheap triage, JSON classification, and high-frequency routing endpoint. |
| o3 & o4-mini (OpenAI) | $2.00 / $8.00 (o3) · $1.10 / $4.40 (o4-mini) | Reasoning tiers; hidden chain-of-thought tokens are billed at output rate. |
| Claude Opus 5.5 (Anthropic) | $4.00 In / $0.20 Cache / $20.00 Out | 200K context upper-tier agentic model with 95% cache read discount. |
| Claude Sonnet 5.5 (Anthropic) | $2.00 In / $0.10 Cache / $10.00 Out | Balanced coding and synthesis workhorse; 50% off via Anthropic Batch API. |
| Claude Haiku 5.5 (Anthropic) | $0.10 In / $0.01 Cache / $0.50 Out | High-volume sub-100K prompt rate; scales to $0.50/$2.50 above 100K prompts. |
| Gemini 4 Argon (Google) | $2.00 In / $0.20 Cache / $10.00 Out | Introductory rate through Nov 30, 2026 (scheduled $4.00/$20.00 Dec 1, 2026). |
| Gemini 3.8 Flash (Google) | $0.75 In / $0.075 Cache / $3.75 Out | Fast 1M-context workhorse (intro rate through Dec 31, 2026); supports Flex/Batch. |
| DeepSeek V4.1-Flash | $0.15 In / $0.003 Cache / $0.60 Out | Off-peak MoE rate with aggressive cache hit pricing (98% discount on hits). |
| Grok 4.7 / Mistral Large 4 / Llama 4 | $2.00/$6.00 · $1.36/$4.18 · ~$0.20/$0.80 | Short-context Grok (<200K), Mistral La Plateforme flagship, and serverless Llama 4 Maverick. |
Why Production LLM Bills Rarely Match Simple Token Calculators
Most beginner tutorials tell you that 1,000 tokens equals roughly 750 English words, or about four characters per token. That rule holds surprisingly well for blog posts and email copy, and then collapses the moment you build real software. Modern BPE tokenizers split punctuation, indentation, UUIDs, SQL keywords, and non-Latin scripts into far smaller fragments. A 4,000-character JSON schema or React component regularly tokenizes into 1,350 to 1,500 tokens—nearly 40% denser than plain English. Paste mode in this tool inspects punctuation and non-ASCII density before estimating so your engineering payload estimates stay grounded.
The second surprise on most cloud invoices is the price gap between input and output tokens. Providers typically charge 4x to 8x more for every generated output token than for an input token. During the prefill stage, GPUs process your entire prompt in one parallel matrix pass. During generation, however, the model produces one token at a time sequentially while hauling the growing key-value (KV) attention cache through GPU memory bandwidth on every step. Asking an API to return verbose JSON explanations or repeat half your prompt back in its output quietly quadruples unit costs—often switching from prose replies to compact enum keys cuts bills in half without changing models.
Reasoning models introduce an even trickier billing wrinkle: invisible thinking tokens. When you call OpenAI o3, o4-mini, Claude Fable, or Gemini thinking tiers on a hard debugging or math prompt, the model may burn 1,500 to 6,000 internal scratchpad tokens before emitting a 200-token final answer. You never show those scratchpad tokens to your end user, yet every single one is metered on your invoice at the full output rate. That is why this calculator provides a dedicated Hidden Reasoning Tokens slider rather than lumping everything into visible output length.
Prompt caching is the single strongest lever for cutting RAG and agent costs—with discounts ranging from 50% on legacy tiers up to 90%–98% on GPT-5, Claude 5.5, Gemini, and DeepSeek V4. Still, modeling a flat 100% cache hit rate is wishful thinking. Caches require exact prefix matches from byte zero, expire after inactivity windows (often 5 to 60 minutes), and miss whenever dynamic user metadata or timestamps sit above static system instructions. Move your timestamp and user ID blocks to the bottom of the prompt, then model a realistic 60% to 80% cache hit ratio.
If you run a conversational chatbot or multi-step coding agent, watch out for geometric context growth across turns. On turn 1 you pay for 1,500 input tokens; by turn 6 the client re-sends turns 1 through 5 plus tool outputs, pushing that single call past 9,000 input tokens. Across a N-turn session, cumulative input usage scales roughly as N × (N + 1) / 2. Keeping a rolling summary every four turns or trimming stale tool responses keeps multi-turn unit economics predictable.
Before migrating to self-hosted open weights, test two architectural shortcuts first: Batch/Flex APIs and hybrid model routing. Non-interactive pipelines—overnight catalog tagging, lead enrichment, transcript summaries, or evaluation suites—almost always qualify for 50% Batch discounts. Meanwhile, an intent router that sends 80% of straightforward extraction or routing calls to GPT-5 nano ($0.05/1M in), Claude Haiku 5.5 ($0.10/1M in), or DeepSeek V4.1-Flash ($0.15/1M in) and escalates only the hardest 20% to GPT-5 or Claude Sonnet 5.5 routinely trims monthly spend by 65% to 78% with negligible quality loss.
Finally, published list prices rarely match what finance actually signs off on. Deploying Claude through regional cloud endpoints on AWS Bedrock or Google Vertex can carry an approximate 10% regional surcharge, long-context prompts above 100K–200K tokens step into higher pricing brackets on several providers, and dedicated GPU clusters (vLLM on rented H100/B200 nodes) convert hourly hardware spend into an effective per-million-token floor. Use the inline Edit Rate button on any row—or Add Custom Model—to plug in your exact vendor quote.
Forecasting Monthly API Spend
Follow these steps for fast, local results inside Token Calculator.
Pick a Scenario or Enter Token Sizes
Start from a one-click workload preset (RAG Search, SaaS Chat, Agent Loop, or Nightly Batch), type exact token counts, or switch to Paste Mode to measure a real prompt and JSON response.
Add Reasoning Tokens & Traffic Volume
Set hidden thinking tokens if you use o3, o4-mini, Claude Fable, or Gemini Pro. Choose either direct daily API calls or Daily Active Users multiplied by prompts per user.
Tune Cache Hit Rate, Turns & Batch Mode
Dial in a realistic prompt cache hit percentage (for example, 65% for shared RAG system prefixes), multi-turn chat depth, and optional 50% Batch/Flex discounts for async jobs.
Customize Rates & Export Your Budget
Add a custom model or edit any row to reflect AWS Bedrock, Azure, or volume discounts, simulate an 80/20 model router split, and export CSV or Markdown.
Built-In Cost Modeling Capabilities
26 Current Models Across 7 Ecosystems
Compare November 2026 rates across OpenAI (GPT-5, GPT-5 mini/nano, GPT-6 Astra, o3, o4-mini), Anthropic (Claude Opus/Sonnet/Haiku 5.5, Fable 5.2), Google (Gemini 4 Argon, 3.8 Flash, 3.1 Pro), DeepSeek V4, xAI Grok 4.7, Mistral Large 4, and Llama 4.
Custom Endpoints & Inline Rate Overrides
Add unlimited custom models for private vLLM/SGLang clusters or regional Bedrock/Vertex markups, or click the edit icon on any built-in row to test negotiated enterprise rates. Preferences stay saved in local browser storage.
Fractional Prompt Cache Hit-Rate Modeling
Instead of assuming an unrealistic 100% cache hit, slide your expected hit rate from 0% to 100% to blend full-price cache misses with discounted cache reads across providers.
Hidden Reasoning & Multi-Turn Accounting
Include internal thinking tokens (which reasoning models bill at output rates) and model 1–10 conversation turns per user session so context accumulation never blindsides your unit economics.
Content-Aware Prompt & JSON Estimator
Paste real prompts, JSON schemas, or TypeScript snippets to detect syntax density—because minified JSON burns roughly 35% more tokens per character than plain English prose.
Hybrid Model Router Savings Simulator
Test an 80/20 routing split between a sub-$0.15/1M triage model and a frontier flagship model, then export full CSV projections or copy a clean Markdown budget table for your team.
LLM Token & Billing FAQ
Clear answers and practical edge cases for AI API Token & Cost Calculator.