AI API Cost Calculator
Calculate and compare AI API costs across models
| Provider | Model | Total Cost |
|---|---|---|
| Gemini 1.5 FlashCheapest | $0.225 | |
| Gemini 2.0 Flash | $0.300 | |
| OpenAI | GPT-4o mini | $0.450 |
| Anthropic | Claude 3.5 Haiku | $2.80 |
| Gemini 1.5 Pro | $3.75 | |
| OpenAI | GPT-4o | $7.50 |
| OpenAI | o1-mini | $9.00 |
| Anthropic | Claude 3.5 Sonnet | $10.50 |
| OpenAI | GPT-4 Turbo | $25.00 |
| OpenAI | o1 | $45.00 |
| Anthropic | Claude 3 Opus | $52.50 |
Prices per million tokens from official provider documentation. Pricing may change — always verify with the provider.
About AI API Cost Calculator
Calculate and compare API costs for OpenAI GPT-4, GPT-3.5, Anthropic Claude, Google Gemini, and other popular AI models. Enter your expected token usage and see real-time cost estimates. Compare pricing across models to find the most cost-effective option for your use case. Includes input and output token pricing for all major providers.
Use Cases
- Estimating monthly API costs for a new AI-powered feature
- Comparing pricing across OpenAI, Anthropic, and Google models
- Budgeting token usage for production AI applications
- Finding the most cost-effective model for your use case
Frequently Asked Questions
How accurate are these prices?
Prices reflect publicly available pricing from each provider. API pricing can change, so always verify with the official provider documentation for the most current rates.
What's the difference between input and output tokens?
Input tokens are what you send to the model (your prompt), and output tokens are what the model generates in response. Most providers charge different rates for each.
Which model is cheapest?
It depends on your use case. Smaller models like GPT-3.5 Turbo and Claude Haiku are cheapest per token, but larger models may need fewer calls to achieve the same quality. Use this calculator to compare.
Does this include fine-tuning costs?
This calculator covers standard API inference costs (input + output tokens). Fine-tuning, embeddings, and image generation have separate pricing structures.