AI APIs generally charge separately for input and output per one million tokens (1M tokens). Choosing models and processing strategies carefully can reduce operating costs.
Prices checked: October 28, 2026. The table lists representative models on the providers' direct APIs, using standard text pricing before cache or batch discounts. Versions, context length and processing time can change the rate.
1. API price comparison
| Provider and model | Input / 1M tokens | Output / 1M tokens | Billing conditions |
|---|---|---|---|
| Google Gemini 3.5 Flash-Lite | $0.30 | $2.50 | Standard paid tier |
| Google Gemini 3.1 Pro Preview | $2.00 / $4.00 | $12.00 / $18.00 | Prompt ≤200K / >200K tokens |
| OpenAI GPT-6 Luna | $0.10 | $0.50 | Standard, short-context tier |
| OpenAI GPT-6.1 Sol | $2.00 | $10.00 | Standard, short-context tier |
| OpenAI GPT-6 Astra | $10.00 | $50.00 | Standard, short-context tier |
| Anthropic Claude Haiku 5.5 | $0.10 / $0.50 | $0.50 / $2.50 | Prompt ≤100K / >100K tokens |
| Anthropic Claude Sonnet 5.5 | $2.00 | $10.00 | Standard rates |
| Anthropic Claude Opus 5.5 | $4.00 | $20.00 | Standard rates |
| DeepSeek Flash (V4.1) | $0.15 / $0.30 | $0.60 / $1.20 | Off-peak / peak; cache-miss input |
| DeepSeek V4 Pro | $0.66 / $1.32 | $1.98 / $3.96 | Off-peak / peak; cache-miss input |
Sources: Google Gemini, OpenAI API, Anthropic Claude and DeepSeek.
Specify the complete model version and service tier. Different generations of mini/nano, Haiku or V3/V4 do not share one price. The OpenAI flagship is named Astra. DeepSeek peak hours are Monday–Friday, 01:00–04:00 and 06:00–10:00 UTC, excluding Chinese public holidays: 09:00–12:00 and 14:00–18:00 in Taiwan. All other times are off-peak.
2. Three core cost optimization techniques
Prompt caching: reuse repeated content
Fixed system instructions and large regulatory documents are candidates for caching. Gemini 3.5 Flash-Lite cached input costs $0.03/1M tokens versus $0.30 normally, a 90% reduction, before storage fees. The discount applies only to input that hits the cache. Cache writes, retention and output follow each provider's rules; a 90% reduction here does not mean a 90% reduction in the total bill. See Gemini pricing.
Batch processing: schedule work that is not urgent
Overnight cleaning, classification and analysis can use batch processing. Supported Google, OpenAI and Anthropic models offer approximately 50% lower batch token rates, subject to their model lists, completion windows and billing conditions. DeepSeek off-peak pricing is time-based and is not the same as a Batch API. See Google, OpenAI and Anthropic.
Two-tier routing: match models to task difficulty
Use a lightweight model for classification and extraction, then escalate difficult or low-confidence cases. An 80%/20% split is an example; 70–80% savings are not guaranteed.
Assume equal input and output token counts per task and a lightweight per-task cost equal to 10% of the advanced model. Routing 80% to the lightweight model and 20% to the advanced model costs 0.8 × 0.1 + 0.2 × 1 = 0.28 of the original total: 72% savings. This conditional calculation excludes routing, retries, escalation and human review costs, which must be added in practice.
3. Evaluate the complete bill
Estimate uncached input × input rate + cached input × cache rate + output × output rate, dividing each token count by one million. Then add cache writing/storage, search tools and other fees. Depending on the model, reasoning tokens may also be billed as output.
Compare quality, latency and cost per successfully delivered task using real work before selecting models and routing thresholds. A price table is the starting point; continued measurement turns optimization into operating savings.
