DevKits

AI API Cost Calculator (GPT-4o, Claude, Gemini, DeepSeek)

Estimate monthly LLM API cost across GPT-4o, Claude 3.5, Gemini, DeepSeek and 100+ models. Compare providers side-by-side with prompt-caching and batch discounts. Free, no signup — prices refreshed daily from the public LiteLLM catalog.

Last updated:

Comments

Estimate the cost of an OpenAI / Anthropic / Google API call by choosing a model and entering token counts (input, output, cache read, batch). Compare multiple models side-by-side. Pricing is fetched daily from the public LiteLLM catalog.

273 chars · 9 lines

Token counts are estimated locally (±3% vs official tokenizers). Text is never sent to any server.

Cheapest option at this workload

DeepSeek V3 (chat)$3.14/mo· $0.000105 per request · ~74 in / 200 out tokens
ModelPer request
deepseekDeepSeek V3 (chat)
$0.280/M$0.420/M$0.000105$3.14131K
deepseekDeepSeek R1 (reasoner)
$0.280/M$0.420/M$0.000105$3.14131K
openaiGPT-4o mini
$0.150/M$0.600/M$0.000131$3.93128K
mistralCodestral
$0.300/M$0.900/M$0.000202$6.07128K
metaLlama 3.3 70B (Together)
$1.04/M$1.04/M$0.000285$8.55131K
mistralMistral Large 2
$0.500/M$1.50/M$0.000337$10.11262K
openaiGPT-3.5 Turbo
$0.500/M$1.50/M$0.000337$10.1116K
openaio3-mini
$1.10/M$4.40/M$0.000961$28.84200K
openaiGPT-4o
$2.50/M$10.00/M$0.002185$65.55128K
openaiGPT-4 Turbo
$10.00/M$30.00/M$0.006740$202128K
openaio1
$15.00/M$60.00/M$0.0131$393200K
Pricing source: litellm· last fetched 16h ago

Tips & Best Practices

  • ▸Input tokens are typically 3-5× cheaper than output tokens; long system prompts hurt total cost most when the response is short.
  • ▸Cache reads (Anthropic / OpenAI prompt caching) can cut input cost by 90%+ for repeated system prompts.
  • ▸Batch API (OpenAI) is 50% cheaper but responses are delivered asynchronously within 24 hours.

Frequently Asked Questions

Where do the prices come from?

Prices are refreshed daily from the BerriAI/litellm public pricing catalog, which itself mirrors each provider's official pricing page. When our automated fetch fails we fall back to a manually maintained snapshot so the tool never shows blank values.

How accurate is the token count?

Token counts use a fast statistical estimator that matches official tokenizers within ±3% for typical English/code prompts. For billing-critical estimates, verify with the provider's own tokenizer.

Does the calculator support prompt caching and batch discounts?

Yes. Toggle 'Cached input' to price the input tokens at the cache-read rate (available on GPT-4o, Claude 3.5, DeepSeek and others). Toggle 'Batch API' to apply the 50%-off batch rate where the provider supports it.

Is my prompt sent to any server?

No. Token estimation runs entirely in your browser. The tool only fetches the public pricing catalog from our server; your prompt text never leaves the tab.

Try Next

Text Chunker

Split long text into overlapping chunks for embedding and RAG pipelines. Preview recursive, paragraph, sentence, or fixed strategies with live token counts. Runs 100% in your browser.

Related Tools

Reference & Guides