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
| Provider | Model | Monthly Cost |
|---|---|---|
| Meta | Llama 4 ScoutCheapestOpen Source | $0.00 |
| Meta | Llama 4 MaverickOpen Source | $0.00 |
| Mistral | Mistral SmallBest Value | $0.160 |
| Gemini 2.0 Flash | $0.190 | |
| OpenAI | GPT-4o-mini | $0.285 |
| Cohere | Command R | $0.285 |
| Anthropic | Claude Haiku 4.5 | $1.76 |
| OpenAI | o3-mini | $2.09 |
| Mistral | Mistral Large | $3.20 |
| Gemini 2.5 ProMost Capable | $3.88 | |
| OpenAI | GPT-4oMost Capable | $4.75 |
| Cohere | Command R+ | $4.75 |
| Anthropic | Claude Sonnet 4.6 | $6.60 |
| OpenAI | o1 | $28.50 |
| Anthropic | Claude 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.