Large language model APIs are priced per token, with separate rates for input, output, cached input and batch requests, so the same workload can cost very different amounts depending on how it is sent. This page explains what a token is, how each price line works, how prompt caching and batch processing change the bill, and which surcharges apply for long prompts, regional processing, faster tiers and tools. It uses figures from provider pricing pages as worked examples. It is written for developers, finance and FinOps teams, and anyone estimating or reviewing an AI bill.
Last checked: 2026-11-15. Providers are listed alphabetically; order is never a ranking. All prices are in US dollars per million tokens unless stated.
This is an independent reference page from NHI Mgmt Group based on public provider documentation; it is not sponsored or endorsed by any provider.
Key takeaways
- Output tokens cost more than input tokens. On the pricing pages checked, output is priced at three to six times input for the models shown.
- Cached input is the biggest lever. Repeated prompt prefixes read from cache are billed at a small fraction of the input rate, for example 0.1 times on most Claude models and on OpenAI GPT-5.6 and later.
- Batch processing halves many bills. Anthropic, Google and OpenAI document a 50% batch discount; xAI documents 20% for listed models.
- Surcharges are easy to miss. Long prompts, regional or data-residency processing, faster tiers and tool calls each add cost on some providers.
- Tokens are not comparable across providers. Each model family uses its own tokenizer, so the same text produces different token counts; Anthropic states its Claude 4.7 and later tokenizer produces about 30% more tokens for the same text than its earlier one.
What is a token?
A token is the unit a model reads and writes. Text is split by the model's tokenizer into pieces that are often parts of words, plus punctuation and spaces. Images, audio and video are also converted into tokens. Providers count tokens in three places: the input you send (system prompt, conversation history, documents, tool definitions), the output the model generates, and for reasoning models the internal reasoning tokens, which Google's pricing page includes in the output price ("Output (incl. thinking)").
Hidden inputs add up. Anthropic's pricing page lists a fixed tool-use system prompt of 286 tokens on its 5.5 models when tools are enabled, about 4,520 extra tokens for the computer use tool and about 6,610 for the browser tool. Every turn in a chat resends the history, so input grows with conversation length. For limits on how much can be sent, see LLM Context Windows Explained.
What are the price lines on an LLM bill?
| Price line | What it charges for | How providers describe it |
|---|---|---|
| Input | Tokens sent to the model that are not read from cache | "Input" or "cache miss" (DeepSeek) |
| Output | Tokens generated, including reasoning tokens where stated | "Output" |
| Cache write | Storing a prompt prefix for reuse | Anthropic: 5-minute and 1-hour writes; OpenAI: 30-minute and 12-hour writes |
| Cache read | Reused prefix tokens | "Cache hit", "cached input" |
| Cache storage | Holding an explicit cache over time | Google: per million tokens per hour |
| Batch | Asynchronous requests at a discount | "Batch API", "Batch / Flex" |
| Speed tier | Faster or prioritised processing at a premium | Anthropic and OpenAI: "Fast"; Google: "Priority" |
| Tools | Per-call fees for search and other server tools | Per 1,000 calls or searches |
How much do current models cost per token?
As of 2026-11-15, standard tier, short prompts, from each provider's pricing page. One or two current models per provider are shown as examples, not a complete list; see each provider's page for all models.
| Provider | Model (API ID) | Input | Cached input (read) | Output | Batch |
|---|---|---|---|---|---|
| Anthropic | claude-opus-5-5 | $4.00 | $0.20 | $20.00 | $2.00 / $10.00 |
| Anthropic | claude-fable-5-2 | $8.00 | $0.20 | $40.00 | $4.00 / $20.00 |
| DeepSeek | deepseek-flash (peak) | $0.30 | $0.006 | $1.20 | Not stated by DeepSeek |
| DeepSeek | deepseek-v4-pro (peak) | $1.32 | $0.044 | $3.96 | Not stated by DeepSeek |
| gemini-3.5-flash | $1.50 | $0.15 | $9.00 | $0.75 / $4.50 | |
| gemini-3.1-pro-preview (up to 200K) | $2.00 | $0.20 | $12.00 | $1.00 / $6.00 | |
| Mistral AI | mistral-large-4 | $0.70 | $0.07 | $2.10 | Batching supported; discount not stated on the model card |
| OpenAI | gpt-6.1-sol | $2.00 | $0.10 | $10.00 | 50% lower (model page) |
| OpenAI | gpt-6-astra | $10.00 | $1.00 | $50.00 | 50% (Batch API guide) |
| xAI | grok-4.7 | $2.00 | $0.50 | $6.00 | 20% discount |
DeepSeek's page uses the "$" symbol without naming a currency. Batch column shows input / output where the provider lists figures.
How does prompt caching work?
Prompt caching stores the start (prefix) of a prompt so later requests that begin with the same tokens are billed at a lower rate and processed faster. It suits long system prompts, tool definitions, documents and conversation history that repeat across requests. Caching only matches an identical prefix: anything that varies, such as a timestamp near the start, prevents hits.
As of 2026-11-15, from each provider's caching documentation or pricing page.
| Provider | How it is turned on | Minimum prefix | Lifetime | Read price | Write or storage price |
|---|---|---|---|---|---|
| Anthropic | cache_control, automatic (top-level) or explicit per block, up to 4 breakpoints | 512 tokens on current models (1,024 to 4,096 on older) | 5 minutes default, refreshed free on each use; 1 hour option | 0.1x input on most models (0.025x to 0.05x on some current models) | 1.25x input (5 minutes) or 2x (1 hour) |
| DeepSeek | Not stated on the pricing page | Not stated by DeepSeek | Not stated by DeepSeek | "Cache hit" rate, for example $0.006 peak on deepseek-flash | Not stated by DeepSeek |
| Context caching (see Google docs) | Not stated on the pricing page | Billed per hour of storage | About 0.1x input on the models shown | Storage $1.00 or $4.50 per million tokens per hour, by model | |
| Mistral AI | prompt_cache_key parameter on requests likely to share a prefix; Mistral states the key raises the chance of a hit but does not guarantee one | 64 tokens (cache blocks of 64 tokens; shorter prompts get no hits) | Not stated by Mistral AI | 10% of the standard input price; reported in usage.prompt_tokens_details.cached_tokens | Not stated by Mistral AI |
| OpenAI | On by default for supported models | 1,024 visible tokens (GPT-5.6 and later) | 30 minutes default, 12 hours option (Responses API) | 0.1x input (0.05x on GPT-6.1 Sol and Terra) | 30-minute and 12-hour write prices listed per model |
| xAI | Not stated on the pricing page | Not stated by xAI | Not stated by xAI | Cached input rate, for example $0.50 on grok-4.7 | Not stated by xAI |
From Anthropic's published multipliers (1.25x or 2x input to write, 0.1x or less to read), a 5-minute write pays back after one cache read and a 1-hour write after two. To check whether caching works, read the usage fields: Anthropic returns cache_creation_input_tokens and cache_read_input_tokens; OpenAI returns usage.input_tokens_details.cached_tokens and cache_write_tokens.
What breaks a cache?
- Changing anything early in the prompt: Anthropic documents a hierarchy of tools, then system, then messages; changing tool definitions invalidates everything after them.
- Toggling features: Anthropic lists turning web search or citations on or off, image changes and thinking settings as cache-invalidating changes.
- Prompts below the minimum: Anthropic notes that shorter prompts are processed without caching and no error is returned.
- Waiting too long: entries expire after the lifetime above.
Both Anthropic and OpenAI state that caches are not shared between organisations. OpenAI notes that separate prompt_cache_key values per user help prevent cache-hit probing across users.
How do batch discounts work?
Batch APIs accept a file or list of requests, process them asynchronously and return results later, in exchange for a lower price.
| Provider | Batch discount | Documented conditions |
|---|---|---|
| Anthropic | 50% on input and output | Not available with fast mode |
| DeepSeek | Not stated by DeepSeek | Off-peak hours are half the peak rate instead (see below) |
| 50% ("Batch API (50% cost reduction)") | Batch and Flex share the same listed prices on the models shown | |
| Mistral AI | Not stated on the model card | Card lists batching as a supported feature |
| OpenAI | 50% compared with synchronous APIs | 24-hour completion window; up to 50,000 requests and 200 MB per batch; separate rate-limit pool |
| xAI | 20% for listed models | Applies to input, output, cached and reasoning tokens; image and video generation billed at standard rates |
DeepSeek uses time-of-day pricing: peak hours are 01:00 to 04:00 and 06:00 to 10:00 UTC, Monday to Friday, excluding Chinese public holidays, and all other hours are billed at half the peak rate.
Which surcharges and premiums apply?
| Surcharge | Provider rule (as of 2026-11-15) |
|---|---|
| Long prompts | Anthropic: Claude 4.6 and later (except Haiku 5.5) bill the full 1M window at standard rates; Haiku 5.5 prompts over 100,000 tokens use higher rates. Google: separate rates above 200K tokens on gemini-3.1-pro-preview and gemini-2.5-pro. OpenAI: on gpt-6.1-sol, prompts over 272K input tokens cost 2x input and cache rates plus 1.5x output for the full request. xAI: once a prompt reaches 200K tokens, long-context rates apply to all tokens in that request. |
| Regional or data-residency processing | Anthropic: inference_geo "us" is 1.1x on all token categories; regional endpoints on Bedrock and Google Cloud carry a 10% premium for listed models. OpenAI: regional processing endpoints carry a 10% uplift for models released on or after 5 March 2026, and FedRAMP a 10% uplift. |
| Speed tiers | Anthropic: fast mode, for example $8 / $40 on Opus 5.5. Google: Priority, for example $2.70 / $16.20 on gemini-3.5-flash. OpenAI: Fast mode (renamed from Priority processing on 30 July 2026) is 2x Standard on gpt-6.1-sol. |
| Web search tool | Anthropic: $10 per 1,000 searches. DeepSeek: $0.75 per 1,000 searches. Google: Gemini 3 grounding, 5,000 prompts per month free then $14 per 1,000 queries. OpenAI: $10 per 1,000 calls. xAI: $5 per 1,000 calls. |
How do you estimate the cost of a request?
Cost = (uncached input tokens x input rate) + (cache write tokens x write rate) + (cache read tokens x read rate) + (output tokens x output rate) + tool fees, all divided by one million for per-million prices, then multiplied by any regional or batch factor.
Worked example (Anthropic, from its published rates): a request to claude-opus-5-5 with a 20,000-token system prompt already in cache, 2,000 new input tokens and 1,000 output tokens costs 20,000 x $0.20 + 2,000 x $4 + 1,000 x $20, divided by one million: $0.004 + $0.008 + $0.020 = $0.032. Without caching the same request costs 22,000 x $4 + 1,000 x $20 = $0.108. Through the Batch API without caching it is half of that, $0.054. The same arithmetic applies to every provider's rates in the tables above.
- Measure real token counts with the provider's own tokenizer or usage fields, not word counts.
- Separate the stable prefix (system prompt, tools, documents) from the variable part.
- Apply cache read rates to the prefix at your expected hit rate.
- Decide which traffic can wait for batch processing.
- Add surcharges for long prompts, regional processing and tools.
- Compare the estimate with the first month's invoice and adjust.
How do you control LLM spending?
- Cap output: set a maximum output token limit per request; output is the most expensive line.
- Structure prompts for caching: put stable content first and variable content last.
- Route by task: send simple tasks to smaller, cheaper models. See Model Routing vs Single Model.
- Use a gateway for budgets and attribution: per-team keys, quotas and logging. See the AI Gateway and LLM Gateway Guide.
- Watch for runaway agents and stolen keys: agent loops and leaked API keys both show up first as cost spikes. See the Denial-of-Wallet and AI Agent Cost Runaway Guide and the LLM Provider API Key Security and LLMjacking Guide.
What should you measure?
- Cache hit ratio: cache read tokens divided by total input tokens.
- Cost per successful task: total spend divided by completed user tasks, not per request.
- Output to input ratio: rising output share drives cost faster than input.
- Batch share: percentage of eligible traffic sent through batch.
- Surcharge share: spend on long-context, regional, fast-tier and tool fees as a share of the total.
Common pricing mistakes
- Comparing per-token prices across providers directly: tokenizers differ, so a cheaper rate can still mean a higher bill for the same text.
- Ignoring reasoning tokens: reasoning models can generate many billed tokens before the visible answer.
- Putting variable data at the top of the prompt: this defeats caching on every request.
- Missing threshold rules: on xAI and OpenAI's gpt-6.1-sol, crossing a prompt-size threshold reprices the whole request, not only the extra tokens.
- Forgetting tool and storage fees: search calls and cache storage are billed separately from tokens.
- Treating prices as fixed: DeepSeek's page explicitly says prices may change; every provider updates prices with new models.
Practitioner checklist
- Record each model's input, output, cache read, cache write and batch price with the date checked.
- Confirm caching is active by reading cache usage fields in responses.
- Order prompts with stable content first.
- Move non-urgent workloads to batch processing.
- Set output token limits and per-team budgets in a gateway.
- Check for long-context, regional and speed-tier surcharges before choosing a configuration.
- Alert on cost anomalies as a security signal. See Cloud Cost Anomalies as Security Signals.
- Re-check provider pricing pages at least quarterly.
Standards and references
- Anthropic: Claude API pricing (accessed 2026-11-15)
- Anthropic: Prompt caching (accessed 2026-11-15)
- DeepSeek: Models and pricing (accessed 2026-11-15)
- Google: Gemini API pricing (accessed 2026-11-15)
- Mistral AI: Mistral Large 4 model card (accessed 2026-11-15)
- Mistral AI: Prompt caching, docs.mistral.ai/studio-api/conversations/advanced/prompt-caching (accessed 2026-11-15)
- OpenAI: API pricing (accessed 2026-11-15)
- OpenAI: GPT-6.1 Sol model page (accessed 2026-11-15)
- OpenAI: Prompt caching guide (accessed 2026-11-15)
- OpenAI: Batch API guide (accessed 2026-11-15)
- xAI: API pricing (accessed 2026-11-15)
Related NHI Mgmt Group resources: FinOps Security, Open-Weight vs Closed Models Explained, Reasoning Models Explained, Self-Hosted LLMs vs Hosted LLM APIs.