TechCompare LogoTechCompare
Back

LLM API Pricing & Cost Calculator

Compare API costs across OpenAI, Anthropic, Google, and DeepSeek. Model caching discounts and batch requests. Costs are estimates, refer to your provider for exact pricing.

Request Parameters

Not sure how many tokens your prompt is? Count it with the Token Counter.

0% cached
Batch API Mode (50% off)

Preset prices assume a 50% batch discount. Real-world rates vary.

Add Models

Models and prices fetched live from OpenRouter and may include temporary promotional discounts our article and comparison figures don't reflect.

Cost Comparison

Model Specs (per 1M tokens)

ModelInputCached InputOutput

How to use this tool

  1. Pick a model

    Select a model from the dropdown (GPT-5.4, Claude Sonnet 4.6, Gemini 3.5 Flash, DeepSeek V4 Pro, and more). The calculator loads that model's per-million-token input and output pricing automatically.

  2. Enter input and output token counts

    Type the number of input tokens (the prompt) and output tokens (the response) you expect per request, or per month. Output tokens are billed 3x to 5x higher than input across most providers.

  3. Toggle caching and batch options

    Turn on prompt caching to model the discount for repeated system prompts, or toggle Batch API mode for the flat 50% async discount. For multi-turn or agentic workloads, enter the expected token volume and request count directly.

  4. Read the cost estimate

    The calculator returns the total cost for your token volume, broken down by input and output. Compare multiple models side by side to find the cheapest option that meets your latency and quality needs.

About this tool

The LLM API Pricing Calculator helps developers and startups estimate the cloud costs of integrating major AI models like GPT-5.4, Claude Sonnet 4.6, or DeepSeek V4. You can tweak input and output token counts, prompt caching discounts, request volume, and batch processing to see how your monthly bill changes.

For multi-turn or agentic workloads, increase the input token count and request volume to represent the growing context and repeated calls. The calculator does not have a separate Agentic Loop mode, so the estimate comes from the values you enter.

Prompt and Context Caching

Caching is the single most important variable in modern AI economics. If you send the same 100K token system prompt repeatedly, caching means you only pay full price for it once, and a tiny fraction (10% to 50%) for subsequent hits. The calculator lets you estimate what percentage of your input tokens will be cached.

Batch API Mode

If your application does not require real-time latency, you can route requests through a Batch API. This guarantees a 50% discount across nearly all major platforms in exchange for a 24-hour turnaround window.

Standard Chat vs Agentic Workflows

A standard chat prompt has a predictable 3:1 input-to-output ratio. Autonomous agents accumulate context, and each turn can add another response or tool result to the prompt. With an append-only history, context grows roughly linearly but uncached cumulative input processing can grow quadratically across turns. Caching repeated prefixes can reduce that cost.

Pre-computed API pricing calculators for the most heavily debated AI models.

MiMo-V2.6-Pro Pricing
Estimate Xiaomi's real-time token costs and cache savings.
View details ➜
MiMo-V2.6-Flash Pricing
Budget frequent calls using Xiaomi's direct API rates.
View details ➜
GLM-5.3-Flash Pricing
Calculate Z.ai's real-time input, output, and cache costs.
View details ➜

Head-to-head cost breakdowns of the latest frontier models, including Claude Opus 5, GPT-5.6 Terra/Luna, and Kimi K3.

MiMo-V2.6-Pro vs MiMo-V2.6-Flash
Compare Xiaomi's normal-speed real-time rates, cache savings, and the cost of successful tasks.
Read comparison ➜
GLM-5.3-Flash vs DeepSeek V4.1 Flash
Cache hits can change the cheaper option off-peak. Compare Z.ai and DeepSeek's direct rates.
Read comparison ➜
MiMo-V2.6-Flash vs DeepSeek V4.1 Flash
Compare Xiaomi's flat real-time rates with DeepSeek's peak and off-peak token prices.
Read comparison ➜

Frequently asked questions

Does OpenAI support prompt caching?
Yes, OpenAI supports prompt caching natively on newer models like GPT-5.4 and GPT-4o-mini. However, the exact discount mechanics differ from Anthropic and Google, meaning you may save slightly less on long iterative conversations compared to Claude.
What is Batch API and when should I use it?
Batch APIs allow you to submit a large volume of requests that are processed asynchronously over 24 hours. Most providers (OpenAI, Anthropic, DeepSeek, Google) offer a flat 50% discount for using their batch API. It's perfect for non-urgent tasks like daily data processing, embedding generation, or bulk tagging.
Why is prompt caching so important for Agentic workflows?
In an agentic loop (like an AI trying to write code or browse the web), the model iteratively adds new responses to the same growing context window. The context usually grows roughly linearly with each appended turn, but without caching you pay for that growing history on every turn, so cumulative input-token billing can grow quadratically over the run. Prompt caching makes repeated prefixes much cheaper, while new tokens still incur input cost.
Are input and output tokens billed differently?
Yes, across almost all major providers, output tokens (generation) are significantly more expensive than input tokens (reading). The ratio is typically 3x to 5x higher for output tokens because generating text requires significantly more VRAM and compute per token.

Use this tool on your own site

Drop the LLM Pricing Calculator into your blog, docs, or CMS with one iframe snippet. Free, no signup. See all embeddable tools