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.

%

Prices

Each model uses its cheapest provider. The chart notes which price won.

Add Models

Models and prices come live from OpenRouter at the cheapest provider's price, or the maker's own with Maker prices on. Retired models aren't listed.

Add a preset model

Loading presets from OpenRouter...

Cost Comparison

Loading model prices

Model Specs (per 1M tokens)

ModelInputCached InputOutputActions

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 usually cost 3x to 5x more than input tokens.

  3. Toggle caching and batch options

    Turn on prompt caching to model the discount for repeated system prompts, or toggle Batch to add each provider's own batch prices. Batch discounts differ by provider, can differ between input and output, and some models have none. A custom model uses the batch discount you enter for it. 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 estimates the API cost of models like GPT-5.4, Claude Sonnet 4.6, or DeepSeek V4. Change the 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 match 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 can cut a large share of an LLM bill. If you send the same 100K token system prompt repeatedly, you pay full price for it once, and a 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. In exchange for waiting on the results, providers charge less, but how much less depends on the provider and the model. The wait depends on the provider too, and many set a limit of up to 24 hours.

Batch mode uses each provider's listed batch rates, which can differ for input and output, and models without batch prices keep their normal rates.

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.

Pricing by model family

Every model from one maker in one table, newest first.

Claude API Pricing
Every Claude model from Haiku to Fable in one table, with cache and batch prices and what one request costs.
View details
OpenAI API Pricing
Every GPT model on the OpenAI API, from Luna to Astra, with cached prices and what one request costs.
View details
Gemini API Pricing
Every Gemini and Gemma model on Google's API in one table, with cached prices, deals and what one request costs.
View details
Grok API Pricing
Every Grok model on the xAI API in one table, with cached and long prompt prices and what one request costs.
View details
Meta Muse and Llama API Pricing
Every Muse and Llama model in one table, with Contributor mode, open weight hosts and what one request costs.
View details
DeepSeek API Pricing
Every DeepSeek model in one table, with cache hit prices, off-peak hours and what one request costs.
View details
Qwen API Pricing
Every Qwen model from Alibaba in one table, with cached and long prompt prices and what one request costs.
View details
Kimi API Pricing
Every Kimi model from Moonshot AI in one table, with cached prices, context windows and what one request costs.
View details
GLM API Pricing
Every GLM model from Z.ai in one table, with cached and batch prices and what one request costs.
View details
MiniMax API Pricing
Every MiniMax model in one table, with cached prices, off-peak rates and what one request costs.
View details
Mistral API Pricing
Every Mistral model from Ministral to Large 4 in one table, with batch prices and what one request costs.
View details
MiMo API Pricing
Every Xiaomi MiMo model in one table, with cached prices, UltraSpeed and what one request costs.
View details
Tencent Hy API Pricing
Every Tencent Hy model in one table, with deals, off-peak rates, translation models and what one request costs.
View details

Popular model pricing

Pre-computed API pricing calculators for current AI models.

GPT-6.1 Terra Pricing
Budget OpenAI's mid-tier GPT-6.1 model, with its long prompt rates.
View details
Gemini 4 Argon Pricing
Estimate Argon input, output, cache, and batch token costs.
View details
Kimi K3.1 Pro Pricing
Calculate input, output, and cache costs for the K3 successor.
View details

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

GPT-6.1 Terra vs GPT-6.1 Sol
See what the step up from Terra to Sol adds to the bill, from cache reads to the long prompt tiers.
Read comparison
GPT-6.1 Terra vs GPT-5.6 Terra
Work out what moving from the older Terra to the new one does to the bill, and when the switch pays back.
Read comparison
GPT-6.1 Terra vs Claude Sonnet 5.5
Compare base rates, cache reads and writes, batch prices and long prompts for mid tier coding and agent work.
Read comparison

Guides that use this tool

Longer walkthroughs that put this tool next to the others a reader needs.

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 by provider and by model, so check each model's cached input price in the calculator.
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. Results come back later, and each provider sets its own time limit, often up to 24 hours. The discount depends on the provider and the model. Input and output can get different discounts, and some models have no batch prices at all, so the calculator uses each provider's own batch rates. A custom model uses the batch discount you enter for it. It suits 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. Output tokens (generation) usually cost more than input tokens (reading), typically 3x to 5x as much, because generating text takes 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