AI API Pricing Calculator

Estimate costs across Google Gemini, OpenAI, xAI Grok & Anthropic Claude. Supports text, images, audio & video.

🔷 18 Gemini Models 🟢 7 OpenAI Models ⚡ 3 Grok Models 🟠 3 Claude Models 📷 Image Tokens 🎵 Audio Tokens 🎬 Video Tokens

⚙️ Configure Your Workload

📝 Text Input
📷 Image Input
🎵 Audio Input
⚠ This provider does not natively support audio input via the standard API.
🎬 Video Input
⚠ This provider does not natively support video input via the standard API.
🔁 Request Volume
💡 Cost Optimizations

📊 Cost Estimate

Per Request
$0.00
Daily Cost
$0.00
Monthly Cost
$0.00
Yearly Cost
$0.00
No optimizations applied

🔢 Token Breakdown

Text Input Tokens0
Text Output Tokens0
Image Tokens0
Audio Tokens0
Video Tokens0
Total Input Tokens0
Total Output Tokens0
Grand Total Tokens0

📏 Context Window Usage

0 / 0 tokens (0%)
⚠️ Your input exceeds 200K tokens — long-context pricing applies (2× standard rates) for this model.

All Models Compared (Sorted by Cost)

Provider Model Total Tokens Per Request Daily Monthly + Caching + Batch

AI API Pricing Per Million Tokens — June 2026 Quick Reference

Choosing the right AI model depends on your workload and budget. Below is a complete, static reference of current per-million-token pricing across the four major API providers as of June 2026. Use the interactive calculator above to estimate monthly costs for your exact request volumes, or refer to this table for a quick side-by-side comparison.

Provider Model Input / 1M Tokens Output / 1M Tokens Context Window
GoogleGemini 2.5 Flash-Lite$0.10$0.401M
OpenAIGPT-4.1 Nano$0.10$0.401M
xAIGrok 4.1 Fast$0.20$0.502M
GoogleGemini 3.1 Flash-Lite$0.25$1.501M
GoogleGemini 3 Flash$0.50$3.001M
AnthropicClaude Haiku 4.5$1.00$5.00200K
xAIGrok 4.3$1.25$2.501M
GoogleGemini 3.5 Flash$1.50$9.001M
OpenAIGPT-4.1$2.00$8.001M
GoogleGemini 3.1 Pro$2.00$12.001M
AnthropicClaude Sonnet 4.6$3.00$15.001M
OpenAIGPT-5.5 Pro$5.00$30.001M
AnthropicClaude Opus 4.7$5.00$25.001M

Prices sourced from official provider documentation. Last verified June 2026. Use the calculator above for real-time cost estimates including caching and batch discounts.

How to Use This AI API Pricing Calculator

This free tool is designed for developers, tech leads, and product managers who need to estimate AI API costs before committing to a provider. Here's how to get the most accurate results:

  1. Select a provider tab (Google Gemini, OpenAI, xAI Grok, or Anthropic Claude) and choose a specific model from the dropdown.
  2. Enter your text workload — estimate input words (your prompt) and output words (the model's response). A typical chatbot uses 500 input / 200 output words.
  3. Add multimodal inputs if applicable — images, audio minutes, or video minutes. The calculator automatically converts these to tokens using each provider's official tokenization rates (e.g., Gemini uses 258 tokens per 768×768px image tile).
  4. Set your daily request volume — how many API calls you expect per day. The calculator then projects daily, monthly, and yearly costs.
  5. Toggle cost optimizations — enable Prompt Caching (up to 90% savings on repeated input) and/or Batch API (50% savings with 24-hour turnaround) to see discounted pricing.
  6. Click "Compare All Models" to see a sorted comparison table of every model's cost for your exact workload — instantly identifying the cheapest option.

Which AI API Model Is the Cheapest in June 2026?

For pure text workloads, Gemini 2.5 Flash-Lite and GPT-4.1 Nano are tied at $0.10 per million input tokens — making them the absolute cheapest production-grade AI models available from any major provider. For developers needing a larger context window, Grok 4.1 Fast offers an industry-leading 2 million token context window at just $0.20/1M input.

For multimodal workloads involving images, audio, or video, Google Gemini models are typically the most cost-effective because they process all modalities as tokens within the same API call — no separate endpoint pricing.

The biggest cost savings come from combining Prompt Caching (saving up to 90% on repeated input context) with the Batch API (50% discount for non-urgent workloads). Together, these optimizations can reduce your AI API bill by up to 95%. Use the calculator above to see the exact impact on your projected costs.

Detailed Pricing Guides by Provider

For in-depth breakdowns of each provider's pricing — including real-world cost examples, hidden charges, long-context surcharges, and optimization strategies — explore our comprehensive guides:

Frequently Asked Questions

How much does 1 million tokens cost on different AI APIs?

Costs vary significantly by provider and model. Budget models like Gemini 2.5 Flash-Lite cost $0.10/1M input tokens, while flagship models like GPT-5.5 Pro cost $5.00/1M input tokens. Use our calculator above to compare exact costs for your specific use case.

How many tokens does an image consume when sent to an AI API?

Token consumption varies by provider. Google Gemini uses 258 tokens per image tile (768×768px). OpenAI charges 85 tokens for low-detail images and 765+ tokens for high-detail. Anthropic Claude estimates roughly (width×height)/750 tokens per image.

How are audio and video tokens calculated for AI APIs?

Google Gemini processes audio at 32 tokens per second and video at 263 tokens per second. Most other providers (OpenAI, Claude, Grok) do not natively support audio/video input through their standard text APIs — they use separate endpoints with per-minute pricing.

Which AI API is the cheapest for high-volume text processing?

For high-volume simple tasks, Gemini 2.5 Flash-Lite ($0.10/1M input) and GPT-4.1 Nano ($0.10/1M input) are the cheapest options. Grok 4.1 Fast at $0.20/1M input is also very competitive with a massive 2M token context window.

How can I reduce my AI API costs by 50-90%?

Use Prompt Caching to save up to 90% on repeated input context, and the Batch API (available on most providers) to save 50% on non-urgent workloads. Combining both strategies can reduce costs by up to 95%.

What is the best AI model for coding and complex reasoning?

For coding, GPT-4.1 and Gemini 3.1 Pro offer the best balance of capability and cost. For maximum reasoning, o3-Pro ($20/$80 per 1M tokens) and Claude Opus 4.7 ($5/$25) are top choices, though significantly more expensive.