·Updated ·12 min read·Pricing Guide

AI API Pricing Guide 2026: Complete Cost Breakdown

OpenAI API pricing July 2026 update: GPT-5.5 remains the OpenAI flagship at $2.00/1M input, $8.00/1M output. GPT-5.4 Low holds the sweet spot for cost-efficient production workloads at $0.25/1M input, $1.00/1M output. o3 Mini High delivers strong reasoning at $0.30/1M input, $1.20/1M output. OpenAI batch pricing offers 50% discounts for non-real-time workloads across all current models. AI API pricing is complex — input tokens, output tokens, cached tokens, batch pricing, and more. This guide breaks down costs across every major provider so you can make informed decisions. All data is live and updated hourly.

How AI API Pricing Works

AI APIs charge per token — roughly 0.75 words. Every request has two costs:

📥 Input Tokens

What you send to the model (prompt, context, system instructions). Usually cheaper.

📤 Output Tokens

What the model generates (response text). Usually 2-5x more expensive than input.

Prices are quoted per 1 million tokens ($/M). A typical conversation uses 1,000-5,000 tokens total.

Provider-by-Provider Pricing

Flagship model pricing per provider. Use our calculator for exact costs.

ProviderFlagship ModelInput $/MOutput $/MBlendedModels
OpenAI
GPT-5.5 (xhigh)$5.00$30.00$11.2563
Anthropic
Claude Fable 5 (Adaptive Reasoning, Max Effort, Opus 4.8 Fallback)$10.00$50.00$20.0034
Google
Gemini 3.5 Flash (high)$1.50$9.00$3.3856
DeepSeek
DeepSeek V4 Pro (Reasoning, Max Effort)$0.43$0.87$0.5431
Mistral
Mistral Medium 3.5$1.50$7.50$3.0032
xAI
Grok Build 0.1 0616$1.00$2.00$1.2522
Alibaba (Qwen)
Qwen3.7 Max$2.50$7.50$3.7581

💰 Cheapest AI Models (Overall)

1
Gemma 3n E4B InstructGoogle$0.025/M
2
Sarvam 30B (high)Sarvam$0.047/M
3
Llama 3.2 Instruct 1BMeta$0.050/M
4
LFM2 24B A2BLiquid AI$0.052/M
5
Qwen3.5 4B (Non-reasoning)Alibaba$0.060/M

Budget Options by Provider

OpenAI
Cheapest: gpt-oss-20b (high)
$0.050/M in · $0.200/M out
Anthropic
Cheapest: Claude 3 Haiku
$0.250/M in · $1.250/M out
Google
Cheapest: Gemma 3n E4B Instruct
$0.020/M in · $0.040/M out
DeepSeek
Cheapest: DeepSeek V4 Flash (Reasoning, High Effort)
$0.140/M in · $0.280/M out
Mistral
Cheapest: Ministral 3 3B
$0.100/M in · $0.100/M out
xAI
Cheapest: Grok 4 Fast (Non-reasoning)
$0.200/M in · $0.500/M out
Alibaba (Qwen)
Cheapest: Qwen3.5 4B (Non-reasoning)
$0.030/M in · $0.150/M out

Cost Optimization Tips

1.

Use cached input pricing. If you send the same system prompt or context repeatedly, enable prompt caching. Most providers offer 50-90% discounts on cached input tokens.

2.

Right-size your model. Don't use GPT-5.5 for tasks a smaller model handles well. Use our recommender to find the right model for your use case.

3.

Use batch APIs. OpenAI and other providers offer 50% discounts for non-real-time batch processing. Great for data processing, content generation, and classification tasks.

4.

Monitor your token usage. Output tokens cost 2-5x more than input tokens. Reduce output by requesting concise responses, using max_tokens limits, and structuring prompts efficiently.

5.

Consider open-source models. For high-volume workloads, self-hosting models like Llama or Qwen can be cheaper at scale. But factor in infrastructure and engineering costs.

Calculate Your Exact Costs

Use our free calculator to compare costs across all 540+ models.

Open Cost Calculator →

Related