AI API Cost Calculator
Estimate and compare API costs for popular AI models across providers — text, image, video, and embeddings — by input/output token pricing.
Cost / request
$0.0100
Total (1,000 requests)
$10.00
Selected model
GPT-5.4
All text models — cost for your inputs
· cheapest first| Model | Provider | Cost / request | Total × 1,000 |
|---|---|---|---|
| Mistral Small | Mistral | $0.000250 | $0.2500 |
| DeepSeek V4 Flash (chat/reasoner) | DeepSeek | $0.000280 | $0.2800 |
| GPT-4.1 nano | OpenAI | $0.000300 | $0.3000 |
| Gemini 2.5 Flash-Lite | Google (Gemini) | $0.000300 | $0.3000 |
| GPT-4o mini | OpenAI | $0.000450 | $0.4500 |
| Grok 4 Fast | xAI (Grok) | $0.000450 | $0.4500 |
| GPT-5.4 nano | OpenAI | $0.000825 | $0.8250 |
| DeepSeek V4 Pro | DeepSeek | $0.000870 | $0.8700 |
| GPT-4.1 mini | OpenAI | $0.001200 | $1.20 |
| Gemini 2.5 Flash | Google (Gemini) | $0.001550 | $1.55 |
| Gemini 3 Flash | Google (Gemini) | $0.002000 | $2.00 |
| GPT-5.4 mini | OpenAI | $0.003000 | $3.00 |
| Claude Haiku 4.5 | Anthropic (Claude) | $0.003500 | $3.50 |
| Mistral Large | Mistral | $0.005000 | $5.00 |
| Gemini 3.6 FlashLaunched Jul 2026; output includes thinking tokens. | Google (Gemini) | $0.005250 | $5.25 |
| GPT-4.1 | OpenAI | $0.006000 | $6.00 |
| Gemini 3.5 Flash | Google (Gemini) | $0.006000 | $6.00 |
| Gemini 2.5 ProHigher rate ($2.50/$15) above 200k input tokens. | Google (Gemini) | $0.006250 | $6.25 |
| Claude Sonnet 5Introductory pricing through Aug 31, 2026 ($2/$10); then $3/$15. | Anthropic (Claude) | $0.007000 | $7.00 |
| GPT-4o | OpenAI | $0.007500 | $7.50 |
| Cohere Command A | Cohere | $0.007500 | $7.50 |
| Gemini 3.1 ProHigher rate ($4/$18) above 200k input tokens. | Google (Gemini) | $0.008000 | $8.00 |
| GPT-5.4 | OpenAI | $0.0100 | $10.00 |
| Claude Sonnet 4.6 | Anthropic (Claude) | $0.0105 | $10.50 |
| Grok 4 | xAI (Grok) | $0.0105 | $10.50 |
| Claude Opus 5Current flagship; 1M context at no premium. Fast Mode $10/$50. | Anthropic (Claude) | $0.0175 | $17.50 |
| Claude Opus 4.8 | Anthropic (Claude) | $0.0175 | $17.50 |
| GPT-5.5 | OpenAI | $0.0200 | $20.00 |
| Claude Fable 5 | Anthropic (Claude) | $0.0350 | $35.00 |
| Claude Opus 4.1Deprecated. | Anthropic (Claude) | $0.0525 | $52.50 |
| GPT-5.5 Pro | OpenAI | $0.1200 | $120.00 |
The headline price is per million tokens, and that is what fools people
Almost every language model API bills by the token, not by the request. A token is a chunk of text — roughly four characters, or about three-quarters of an English word — and both the prompt you send and the completion the model returns are counted. Prices are quoted per million tokens, which makes the numbers look trivially small: $2.50 per million sounds like nothing until you notice a single retrieval-augmented chat turn can carry 20,000 tokens of context, and that you are serving it tens of thousands of times a day. This calculator exists to turn that per-million rate into the two figures that actually drive a budget — cost per request, and cost across your real monthly volume — and to line every model up in one sorted table so the cheap option for your specific token mix is obvious rather than buried in seven different pricing pages.
Output is the line item that bites
The single most important thing to understand is that input and output tokens are priced separately, and output almost always costs several times more because generating text is far more compute-intensive than reading it. GPT-5.4 is $2.50 per million in and $15 out; Claude Opus 4.8 is $5 in and $25 out; even DeepSeek V4 Flash keeps the 2× gap at $0.14 and $0.28. The practical consequence is that a model with a cheap input rate can still lose on total cost if your workload is generation-heavy. A summariser that reads 10,000 tokens and writes 200 is dominated by input; a code generator that reads 500 and writes 4,000 is dominated by output. Look at the column that matches your traffic, not the one in the headline.
Prompt caching is the biggest discount most teams miss
When you send the same large context on every call — a long system prompt, a fixed knowledge-base document, or a growing conversation history — providers like OpenAI and Anthropic will bill the repeated portion at roughly a tenth of the normal input rate on a cache hit. GPT-5.4 drops from $2.50 to $0.25 per million on cached input; Claude Opus 4.8 from $5 to $0.50. For an agent that resends a 15,000-token instruction block on every one of thousands of turns, that alone can cut the input bill by the better part of an order of magnitude. The text tab has a dedicated cached-tokens field so you can see the split between fresh and cached input reflected in the estimate rather than guessing at it.
Image, video, and embeddings are priced on completely different units
Not every modality is a token. Image APIs mostly charge a flat rate per generated image — FLUX.1 Schnell at about $0.003, Gemini 2.5 Flash Image at $0.039, Ideogram v3 at $0.09 — a 30× spread that matters enormously at volume. Video is billed per second of output, from Veo 3.1 Lite at $0.05 to Veo 3.1 Standard at $0.40, so a single 60-second clip ranges from $3 to $24 depending only on the model. A few image models, such as OpenAI's GPT Image 2, are priced by image tokens rather than per image; because this tool has no image-token input to price them honestly, they are deliberately left out of the per-image comparison rather than shown as a misleading zero. Embeddings are the cheapest line on any AI bill — OpenAI's text-embedding-3-small is $0.02 per million tokens — which is why embedding a whole corpus for search usually costs less than a single day of chat traffic.
How to actually cut the bill, and where these numbers stop
The cheapest model is rarely the right default and the flagship is rarely necessary. The highest-leverage move is to route by difficulty: send classification, extraction, and simple summarisation to a mini or nano tier, Gemini Flash-Lite, or DeepSeek, and reserve GPT-5.5, Claude Opus, or Gemini Pro for genuine reasoning and high-stakes output. Because the gap between tiers is often 10× to 50×, shifting routine traffic downward usually saves more than any other single change. Estimate before you build: put your realistic average token counts and monthly volume into the calculator, compare the top few candidates, and you will frequently find two models of similar quality that differ several-fold in cost. What this tool deliberately does not model is everything beyond the base per-token rate — batch tiers (commonly around 50% off), regional and data-residency endpoints, fine-tuning surcharges, and server-side tools like web search all change the final invoice, and every provider's live pricing page is linked in the tool so you can confirm the current figure before you commit budget. The prices here were gathered in July 2026 and are a planning aid, not a contract.
How to Use
Pick a modality: text/chat, image, video, or embeddings.
Choose a model, then enter your token counts (or images/seconds) and number of requests.
See cost per request and total, plus a comparison table of every model sorted cheapest-first.
Cross-check the number on the provider’s official pricing page before you rely on it.
Features
Common Questions
About AI API Cost Calculator
Estimate and compare the cost of AI API calls across every popular provider and model. Enter input and output token counts to see the cost per request and monthly total for OpenAI GPT, Anthropic Claude, Google Gemini, DeepSeek, Mistral, xAI Grok, and Cohere. Includes prompt-cache pricing (cached input billed at a fraction of the normal rate), image generation cost per image, video generation cost per second, and embedding cost per token, with a comparison table sorted cheapest-first and optional USD/INR display. All calculations run in your browser.
Also known as: llm api cost, token cost calculator, openai pricing calculator, ai api pricing, gpt cost per token, claude pricing calculator, gemini api cost, deepseek pricing, prompt caching cost, embedding cost calculator, image generation api cost, video generation api cost, compare llm prices, ai api price comparison.
Processing Note
AI API Cost Calculator runs in your browser, so the input you enter is processed locally on this page and is not uploaded to a ToolMintX account.
Tool Limits
IT tools provide quick diagnostics and transformations. They cannot see every private network, deployment setting, proxy, firewall, or production edge case.
Explore More
AI VRAM Calculator
Estimate GPU VRAM for LLM inference and training using model, quantization, users, and context length.
Client-sideAPI Key and .env Secret Generator
Generate secure .env secrets plus selectable Hugging Face, OpenAI, JWT, database, and webhook variables.
Client-sideSubnet Calculator
IPv4 subnet calculator: network and broadcast address, subnet and wildcard mask, usable host range, and host count from any IP and CIDR prefix.
Client-sideIPv4 to IPv6 Converter
Convert an IPv4 address into its IPv4-mapped IPv6 form, 6to4 prefix, and mixed notation, in canonical RFC 5952 hex.
Client-side