Free Calculator

AI API Pricing Calculator

Compare token pricing across OpenAI, Anthropic, Google, Mistral, and Meta AI APIs. Enter your expected monthly usage and see cost breakdowns per model, sorted cheapest-first.

18+ models5 providersInstant cost breakdownNo signup needed

Prefer the main AI Wins product? Visit aiwins.news

How it works

Compare AI API costs in three steps

1

Enter your usage

Input your expected monthly token counts for both input and output, or pick a preset to get started quickly.

2

Compare costs

See a side-by-side cost breakdown for 18+ models across five providers, sorted from cheapest to most expensive.

3

Pick the best value

Filter by provider, sort by total cost, and identify the model that delivers the best performance for your budget.

Calculator

Enter your expected monthly usage

Tokens you send to the API (prompts, context, instructions)

Tokens the model generates in response (completions)

Quick presets

Filter by provider

Sort by:

Results

Cost breakdown by model

Showing 18 of 18 models

ModelProviderInput CostOutput CostTotal / MonthContext
Ministral 8BCheapest
Mistral$0.10$0.05$0.15128K
Gemini 1.5 Flash
Google$0.07$0.15$0.221M
Llama 3.1 8B
Meta$0.18$0.09$0.27128K
Gemini 2.0 Flash
Google$0.10$0.20$0.301M
GPT-4o Mini
OpenAI$0.15$0.30$0.45128K
Mistral Small
Mistral$0.20$0.30$0.50128K
Llama 3.1 70B
Meta$0.88$0.44$1.32128K
Claude 3.5 Haiku
Anthropic$0.80$2.00$2.80200K
o3-mini
OpenAI$1.10$2.20$3.30200K
Gemini 1.5 ProPopular
Google$1.25$2.50$3.752M
Mistral LargePopular
Mistral$2.00$3.00$5.00128K
Llama 3.1 405B
Meta$3.50$1.75$5.25128K
GPT-4oPopular
OpenAI$2.50$5.00$7.50128K
o1-mini
OpenAI$3.00$6.00$9.00128K
Claude 3.5 SonnetPopular
Anthropic$3.00$7.50$10.50200K
GPT-4 Turbo
OpenAI$10.00$15.00$25.00128K
o1
OpenAI$15.00$30.00$45.00200K
Claude 3 Opus
Anthropic$15.00$37.50$52.50200K

Visual comparison

Monthly cost at a glance

Ministral 8B
$0.15
Gemini 1.5 Flash
$0.22
Llama 3.1 8B
$0.27
Gemini 2.0 Flash
$0.30
GPT-4o Mini
$0.45
Mistral Small
$0.50
Llama 3.1 70B
$1.32
Claude 3.5 Haiku
$2.80
o3-mini
$3.30
Gemini 1.5 Pro
$3.75
Mistral Large
$5.00
Llama 3.1 405B
$5.25
GPT-4o
$7.50
o1-mini
$9.00
Claude 3.5 Sonnet
$10.50
GPT-4 Turbo
$25.00
o1
$45.00
Claude 3 Opus
$52.50

FAQ

Common questions about AI API pricing

How is AI API pricing calculated?

AI API providers charge based on the number of tokens processed. Tokens are pieces of text (roughly 4 characters or 0.75 words each). You pay separately for input tokens (what you send to the model) and output tokens (what the model generates). Multiply your token count by the per-token rate to get the total cost.

What is the difference between input and output tokens?

Input tokens are the text you send to the API, including your prompt, system instructions, and any context. Output tokens are the text the model generates in response. Output tokens typically cost 2-5x more than input tokens because generation requires more compute.

Which AI API is cheapest?

For simple tasks, Google Gemini 1.5 Flash and Mistral's Ministral 8B offer some of the lowest per-token rates. For complex reasoning, GPT-4o Mini and Claude 3.5 Haiku provide strong performance at budget-friendly prices. The cheapest option depends on your quality requirements and use case.

How do I estimate my monthly token usage?

A typical API call uses 500-2,000 input tokens and generates 200-1,000 output tokens. Multiply by your expected number of requests per month. For example, 10,000 requests at 1,000 input and 500 output tokens each equals 10M input tokens and 5M output tokens per month.

Are there free tiers for AI APIs?

Yes, most providers offer free credits or trial tiers. Google provides a generous free tier for Gemini, OpenAI gives new accounts starter credits, and Anthropic offers trial credits. Meta's Llama models are open-source and free to self-host, though hosted inference providers charge for compute.

What affects the total cost beyond token pricing?

Beyond token pricing, costs can vary based on rate limits (needing a higher tier for more throughput), fine-tuning fees, image or audio inputs, batch vs real-time pricing, and whether you use prompt caching. Some providers also offer volume discounts for committed usage.

Related tools

Keep exploring