LLM API & Prompt Caching Cost Simulator

Compare monthly spend across OpenAI, Anthropic, Google Gemini, DeepSeek, xAI, and Alibaba Qwen with prompt cache hit rates, reasoning token multipliers, and batch API discounts.

Cacheable prefix shared across requests
Applied to output tokens on reasoning models

Lowest monthly spend

$0

—

Flagship (Claude Sonnet 5.5)

$0

Cache savings: $0/mo

Monthly token throughput

0M

0 requests/mo

Shareable URL updates automatically as you adjust parameters.

Monthly cost comparison by model (USD)

Prompt cache hit-rate sensitivity (0% to 95%)

Model Provider Input + Cache Output Cache saved Monthly total

Mathematical model and engineering assumptions

Monthly cost with prompt caching

Monthly = (N_req * 30 / 10^6) * d_batch * [
  (T_sys * (1 - h) + T_dyn) * P_in
  + (T_sys * h) * P_cache
  + (T_out * m_reason) * P_out ]

Where h is the prompt cache hit rate (0–0.95), m_reason is the hidden reasoning token multiplier (1.0 for standard models), and d_batch is 0.50 when Batch API is enabled on supported providers.

Cache savings & per-1k request unit economics

CacheSavings = Monthly(h = 0) - Monthly(h)
UnitCost_1k = (Monthly / (N_req * 30)) * 1000

System prompts larger than 1,024 tokens trigger automatic or explicit prefix caching on OpenAI, Anthropic, and Google Gemini. DeepSeek applies disk-backed prefix caching automatically without batch tier discounts.

Engineering FAQ

How does prompt caching reduce LLM API spend?

When requests share a static prefix such as a system prompt, tool definitions, or few-shot examples, providers bill cached prefix reads at 10% to 50% of standard input rates. Anthropic offers up to 90% discount on cache reads, while OpenAI and Gemini discount cached input by 50% to 75%.

Why does the reasoning token multiplier only apply to certain models?

Reasoning models like GPT-6.2 Sol, DeepSeek V4 Pro, Claude Sonnet 5.5 (extended thinking), and Gemini 4 Carbon emit hidden chain-of-thought tokens billed at output token rates. Non-reasoning models emit only visible completion tokens, so the multiplier selectively models hidden thinking overhead.

When should teams use the Batch API 50% discount?

Batch APIs trade synchronous latency for a 24-hour asynchronous SLA at half the standard token price. They are ideal for nightly evals, document extraction, embeddings backfill, and offline classification pipelines where users are not waiting interactively.

How often are the model token rates updated?

All rates are read from a single centralized pricing table (v2026.12, last updated 2026-12-01) reflecting published US list pricing across OpenAI, Anthropic, Google, DeepSeek, xAI, and Alibaba Qwen.