AI API Cost Calculator

Estimate your monthly AI API spend across all major providers. Adjust your token volume and input/output ratio to see real-time cost comparisons.

Configure Your Usage

Input: 70%Output: 30%

700K input tokens + 300K output tokens per month

For general tasks, mid-tier models like Claude Sonnet, GPT-4o, or Gemini 2.5 Pro offer a strong balance of quality and cost.

Estimated Monthly Costsfor 1M tokens/month

ProviderModelMonthly Cost
MetaLlama 4 ScoutCheapestOpen Source$0.00
MetaLlama 4 MaverickOpen Source$0.00
MistralMistral SmallBest Value$0.160
GoogleGemini 2.0 Flash$0.190
OpenAIGPT-4o-mini$0.285
CohereCommand R$0.285
AnthropicClaude Haiku 4.5$1.76
OpenAIo3-mini$2.09
MistralMistral Large$3.20
GoogleGemini 2.5 ProMost Capable$3.88
OpenAIGPT-4oMost Capable$4.75
CohereCommand R+$4.75
AnthropicClaude Sonnet 4.6$6.60
OpenAIo1$28.50
AnthropicClaude Opus 4.6Most Capable$33.00

Cost breakdown for Mistral Small:

700K input tokens x $0.10/1M + 300K output tokens x $0.30/1M = $0.160/month

Frequently Asked Questions

How much does the Claude API cost?
Claude API pricing varies by model tier. Claude Opus 4.6 costs $15/1M input tokens and $75/1M output tokens. Claude Sonnet 4.6 is $3/1M input and $15/1M output. Claude Haiku 4.5 is the most affordable at $0.80/1M input and $4/1M output. All Claude models support 200K context windows.
What is the cheapest AI API?
The cheapest AI APIs include Google Gemini 2.0 Flash at $0.10/1M input tokens, Mistral Small at $0.10/1M input, and GPT-4o-mini at $0.15/1M input. Open-source models like Llama 4 Scout and Llama 4 Maverick are free to self-host, though you will pay for compute infrastructure.
How are AI API tokens counted?
AI tokens are the basic units of text that language models process. One token is roughly 4 characters or about 0.75 words in English. A 1,000-word article is approximately 1,333 tokens. Pricing is typically quoted per 1 million tokens, with input (prompt) and output (completion) priced separately.
Which AI API is best for production?
The best AI API for production depends on your use case. Claude Sonnet 4.6 and GPT-4o offer strong all-around performance at moderate cost. For budget-sensitive applications, GPT-4o-mini and Gemini 2.0 Flash deliver solid results at a fraction of the price. For tasks requiring deep reasoning, Claude Opus 4.6 or o1 are top choices, though they cost significantly more.