Last Updated: October 19, 2026
AI API Pricing Guide: Every Provider Compared
As of October 19, 2026, the lowest-priced model TensorFeed tracks is Nemotron 3.5 Lightning from NVIDIA, at $0.08 per 1M input tokens and $0.20 per 1M output tokens. Among 39 flagship models, prices run from MiMo-V2.6-Pro ($0.43 input, $0.87 output) to o1 ($15.00 input, $60.00 output).
AI API pricing in 2026 ranges from free open-source models to around $60 per million output tokens for premium reasoning models. At the frontier, Claude Fable 5.1 and GPT-6 Astra both list $10 input and $50 output per million tokens, while Claude Opus 5.5, released September 22, 2026 and now Anthropic's recommended starting point, runs $4 and $20 (Claude Opus 5 stays at $5 and $25). Meta's Muse Wonder uses the same $4 and $20 rate card. GPT-6 Sol and GPT-6.1 Sol match Claude Sonnet 5.5 at $2 and $10, and Gemini 4 Argon, generally available since October 13, lists $2 and $10 at an introductory rate through November 30 before rising to $4 and $20 on December 1. Budget models such as GPT-6 Luna ($0.10 input), Claude Haiku 5.5 ($0.10 input for prompts up to 100K tokens), and NVIDIA Nemotron 3.5 Lightning ($0.08 input) sit at the other end.
AI API pricing can be confusing. Every provider uses slightly different units, some charge differently for input and output tokens, and prices change frequently. This guide breaks it all down in one place, with real cost examples so you can estimate what your project will actually cost. All prices are in USD per 1 million tokens unless noted otherwise.
Pricing Overview: All Models
Here is every major API model with its current pricing, sorted by provider. Prices are per 1 million tokens. For context, 1 million tokens is roughly 750,000 words, or about 4-5 full-length novels.
| Provider | Model | Input $/1M | Output $/1M | Context |
|---|---|---|---|---|
| Anthropic | Claude Opus 5.5 | $4.00 | $20.00 | 1M |
| Anthropic | Claude Opus 5 | $5.00 | $25.00 | 1M |
| Anthropic | Claude Fable 5.1 | $10.00 | $50.00 | 1M |
| Anthropic | Claude Mythos 5.1 | $10.00 | $50.00 | 1M |
| Anthropic | Claude Fable 5 | $10.00 | $50.00 | 1M |
| Anthropic | Claude Sonnet 5.5 | $2.00 | $10.00 | 1M |
| Anthropic | Claude Sonnet 5 | $2.00 | $10.00 | 1M |
| Anthropic | Claude Opus 4.8 | $5.00 | $25.00 | 1M |
| Anthropic | Claude Opus 4.7 | $5.00 | $25.00 | 1M |
| Anthropic | Claude Opus 4.6 | $5.00 | $25.00 | 1M |
| Anthropic | Claude Sonnet 4.6 | $3.00 | $15.00 | 1M |
| Anthropic | Claude Haiku 5.5 | $0.10 | $0.50 | 1M |
| Anthropic | Claude Haiku 4.5 | $1.00 | $5.00 | 200K |
| OpenAI | GPT-6 Astra | $10.00 | $50.00 | 1M |
| OpenAI | GPT-6.1 Sol | $2.00 | $10.00 | 1M |
| OpenAI | GPT-6 Sol | $2.00 | $10.00 | 1M |
| OpenAI | GPT-6 Luna | $0.10 | $0.50 | 1M |
| OpenAI | GPT-5.6 Sol | $4.00 | $20.00 | 1M |
| OpenAI | GPT-5.6 Terra | $2.00 | $12.00 | 1M |
| OpenAI | GPT-5.6 Luna | $0.20 | $1.20 | 1M |
| OpenAI | GPT-5.5 | $5.00 | $30.00 | 1M |
| OpenAI | GPT-4o | $2.50 | $10.00 | 128K |
| OpenAI | GPT-4o-mini | $0.15 | $0.60 | 128K |
| OpenAI | o1 | $15.00 | $60.00 | 200K |
| OpenAI | o3-mini | $1.10 | $4.40 | 200K |
| Gemini 4 Argon | $2.00 | $10.00 | 1M | |
| Gemini 2.5 Pro | $1.25 | $10.00 | 1M | |
| Gemini 3.1 Flash-Lite | $0.25 | $1.50 | 1M | |
| Gemini 3.8 Flash | $0.75 | $3.75 | 1M | |
| Gemini 3.6 Flash | $0.75 | $3.75 | 1M | |
| Gemini 3.5 Flash-Lite | $0.30 | $2.50 | 1M | |
| Meta | Muse Wonder | $4.00 | $20.00 | 1M |
| Meta | Muse Spark Open | $1.25 | $4.25 | 1M |
| Meta | Muse Glimmer 30B | $0.35 | $1.50 | 131K |
| Meta | Muse Spark 1.3 | $1.25 | $4.25 | 1M |
| Meta | Muse Spark 1.3 Contributor | $0.10 | $0.20 | 1M |
| Meta | Muse Spark 1.2 | $1.25 | $4.25 | 1M |
| Meta | Muse Spark 1.2 Contributor | $0.10 | $0.20 | 1M |
| Meta | Muse Spark 1.1 | $1.25 | $4.25 | 1M |
| Meta | Llama 4 Scout | Free* | Free* | 10M |
| Meta | Llama 4 Maverick | Free* | Free* | 1M |
| Mistral | Mistral Large 4 | $0.68 | $2.09 | 1M |
| Mistral | Mistral Medium 3.5 | $1.50 | $7.50 | 256K |
| Mistral | Mistral Large | $0.50 | $1.50 | 262K |
| Mistral | Mistral Small | $0.15 | $0.60 | 262K |
| Cohere | Command R+ | $2.50 | $10.00 | 128K |
| Cohere | Command R | $0.50 | $1.50 | 128K |
| DeepSeek | DeepSeek V4 Pro | $1.32 | $3.96 | 1M |
| DeepSeek | DeepSeek V4.1 Flash | $0.30 | $1.20 | 1M |
| Alibaba | Qwen3.8 27B | $0.50 | $3.00 | 1M |
| Alibaba | Qwen3.8 2.4T-A95B | $2.00 | $6.00 | 1M |
| Alibaba | Qwen3.8-Max | $2.00 | $6.00 | 1M |
| Alibaba | Qwen3.8 Max Prime | $4.00 | $12.00 | 1M |
| Alibaba | Qwen3.7-Max | $2.50 | $7.50 | 1M |
| Alibaba | Qwen3.8-Omni-Flash | $0.15 | $0.47 | 1M |
| Alibaba | Qwen3.8-Flash | $0.15 | $0.47 | 1M |
| xAI | Grok 4.7 | $2.00 | $6.00 | 500K |
| xAI | Grok 4.6 | $2.00 | $6.00 | 500K |
| xAI | Grok 4.5 | $2.00 | $6.00 | 500K |
| xAI | Grok 4.3 | $1.25 | $2.50 | 1M |
| NVIDIA | Nemotron 3.5 Lightning | $0.08 | $0.20 | 262K |
| NVIDIA | Nemotron 3 Nano Omni | Free* | Free* | 256K |
| Microsoft | MAI-Code-1.1-Flash | $0.20 | $1.20 | 256K |
| MiniMax | MiniMax M3 | $0.30 | $1.20 | 1M |
| Meituan | LongCat-2.0 | $0.75 | $2.95 | 1M |
| Meituan | LongCat-2.5-Preview | $0.30 | $1.20 | 1M |
| Z.ai (Zhipu AI) | GLM-5.3 | $1.40 | $4.40 | 1M |
| Z.ai (Zhipu AI) | GLM-5.2 | $1.40 | $4.40 | 1M |
| Z.ai (Zhipu AI) | GLM-5.3-FlashX | $0.37 | $1.25 | 1M |
| Z.ai (Zhipu AI) | GLM-5.3 Flash | $0.15 | $0.50 | 1M |
| Moonshot AI | Kimi K3 | $3.00 | $15.00 | 1M |
| Fireworks AI | Ember-1 | $3.00 | $15.00 | 1M |
| Sakana AI | Fugu Ultra v2.0 | $5.00 | $30.00 | 1M |
| Sakana AI | Fugu Max | $2.00 | $6.00 | 1M |
| poolside | Laguna S 2.1 | $0.10 | $0.20 | 1M |
| Unbiased | Pareto | $2.50 | $7.50 | 262K |
| Tencent | Hy4 preview | $0.83 | $2.50 | 1M |
| Xiaomi | MiMo-V2.6-Pro | $0.43 | $0.87 | 1M |
| Xiaomi | MiMo-V2.6-Flash | $0.14 | $0.28 | 1M |
| Institute of Foundation Models (MBZUAI) | Jais 3 375B-A23B | Free* | Free* | 512K |
* Open source models are free to self-host. Hosted API pricing varies by provider (e.g., Together, Fireworks, Groq). Prices are subject to change. Check provider websites for the most current pricing.
Pricing by Provider
Anthropic
| Model | Input | Output | Context | Capabilities |
|---|---|---|---|---|
| Claude Opus 5.5 | $4.00 | $20.00 | 1M | text, vision, tool-use, code, reasoning |
| Claude Opus 5 | $5.00 | $25.00 | 1M | text, vision, tool-use, code, reasoning |
| Claude Fable 5.1 | $10.00 | $50.00 | 1M | text, vision, tool-use, code, reasoning |
| Claude Mythos 5.1 | $10.00 | $50.00 | 1M | text, vision, tool-use, code, reasoning |
| Claude Fable 5 | $10.00 | $50.00 | 1M | text, vision, tool-use, code |
| Claude Sonnet 5.5 | $2.00 | $10.00 | 1M | text, vision, tool-use, code, reasoning |
| Claude Sonnet 5 | $2.00 | $10.00 | 1M | text, vision, tool-use, code, reasoning |
| Claude Opus 4.8 | $5.00 | $25.00 | 1M | text, vision, tool-use, code |
| Claude Opus 4.7 | $5.00 | $25.00 | 1M | text, vision, tool-use, code |
| Claude Opus 4.6 | $5.00 | $25.00 | 1M | text, vision, tool-use, code |
| Claude Sonnet 4.6 | $3.00 | $15.00 | 1M | text, vision, tool-use, code |
| Claude Haiku 5.5 | $0.10 | $0.50 | 1M | text, vision, tool-use, code, reasoning |
| Claude Haiku 4.5 | $1.00 | $5.00 | 200K | text, vision, tool-use, code |
OpenAI
| Model | Input | Output | Context | Capabilities |
|---|---|---|---|---|
| GPT-6 Astra | $10.00 | $50.00 | 1M | text, vision, tool-use, code, reasoning |
| GPT-6.1 Sol | $2.00 | $10.00 | 1M | text, vision, tool-use, code, reasoning |
| GPT-6 Sol | $2.00 | $10.00 | 1M | text, vision, tool-use, code, reasoning |
| GPT-6 Luna | $0.10 | $0.50 | 1M | text, vision, tool-use, code, reasoning |
| GPT-5.6 Sol | $4.00 | $20.00 | 1M | text, vision, tool-use, code, reasoning |
| GPT-5.6 Terra | $2.00 | $12.00 | 1M | text, vision, tool-use, code, reasoning |
| GPT-5.6 Luna | $0.20 | $1.20 | 1M | text, vision, tool-use, code, reasoning |
| GPT-5.5 | $5.00 | $30.00 | 1M | text, vision, tool-use, code, reasoning |
| GPT-4o | $2.50 | $10.00 | 128K | text, vision, tool-use, code |
| GPT-4o-mini | $0.15 | $0.60 | 128K | text, vision, tool-use, code |
| o1 | $15.00 | $60.00 | 200K | text, reasoning, code |
| o3-mini | $1.10 | $4.40 | 200K | text, reasoning, code |
| Model | Input | Output | Context | Capabilities |
|---|---|---|---|---|
| Gemini 4 Argon | $2.00 | $10.00 | 1M | text, vision, audio, video, tool-use, code, reasoning |
| Gemini 2.5 Pro | $1.25 | $10.00 | 1M | text, vision, tool-use, code, reasoning |
| Gemini 3.1 Flash-Lite | $0.25 | $1.50 | 1M | text, vision, tool-use, code, reasoning |
| Gemini 3.8 Flash | $0.75 | $3.75 | 1M | text, vision, audio, video, tool-use, code, reasoning |
| Gemini 3.6 Flash | $0.75 | $3.75 | 1M | text, vision, audio, video, tool-use, code, reasoning |
| Gemini 3.5 Flash-Lite | $0.30 | $2.50 | 1M | text, vision, tool-use, code, reasoning |
Meta
| Model | Input | Output | Context | Capabilities |
|---|---|---|---|---|
| Muse Wonder | $4.00 | $20.00 | 1M | text, tool-use, code, reasoning |
| Muse Spark Open | $1.25 | $4.25 | 1M | text, vision, tool-use, code, reasoning |
| Muse Glimmer 30B | $0.35 | $1.50 | 131K | text, vision, tool-use, code, reasoning |
| Muse Spark 1.3 | $1.25 | $4.25 | 1M | text, vision, tool-use, code, reasoning |
| Muse Spark 1.3 Contributor | $0.10 | $0.20 | 1M | text, vision, tool-use, code, reasoning |
| Muse Spark 1.2 | $1.25 | $4.25 | 1M | text, vision, tool-use, code, reasoning |
| Muse Spark 1.2 Contributor | $0.10 | $0.20 | 1M | text, vision, tool-use, code, reasoning |
| Muse Spark 1.1 | $1.25 | $4.25 | 1M | text, vision, tool-use, code, reasoning |
| Llama 4 Scout | Free* | Free* | 10M | text, vision, code |
| Llama 4 Maverick | Free* | Free* | 1M | text, vision, code |
Mistral
| Model | Input | Output | Context | Capabilities |
|---|---|---|---|---|
| Mistral Large 4 | $0.68 | $2.09 | 1M | text, vision, tool-use, code, reasoning |
| Mistral Medium 3.5 | $1.50 | $7.50 | 256K | text, code, tool-use, reasoning |
| Mistral Large | $0.50 | $1.50 | 262K | text, vision, tool-use, code |
| Mistral Small | $0.15 | $0.60 | 262K | text, tool-use, code |
Cohere
| Model | Input | Output | Context | Capabilities |
|---|---|---|---|---|
| Command R+ | $2.50 | $10.00 | 128K | text, tool-use, RAG |
| Command R | $0.50 | $1.50 | 128K | text, tool-use, RAG |
DeepSeek
| Model | Input | Output | Context | Capabilities |
|---|---|---|---|---|
| DeepSeek V4 Pro | $1.32 | $3.96 | 1M | text, tool-use, code, reasoning |
| DeepSeek V4.1 Flash | $0.30 | $1.20 | 1M | text, vision, tool-use, code, reasoning |
Alibaba
| Model | Input | Output | Context | Capabilities |
|---|---|---|---|---|
| Qwen3.8 27B | $0.50 | $3.00 | 1M | text, vision, tool-use, code, reasoning |
| Qwen3.8 2.4T-A95B | $2.00 | $6.00 | 1M | text, tool-use, code, reasoning |
| Qwen3.8-Max | $2.00 | $6.00 | 1M | text, vision, video, code, reasoning, tool-use |
| Qwen3.8 Max Prime | $4.00 | $12.00 | 1M | text, vision, video, code, reasoning, tool-use |
| Qwen3.7-Max | $2.50 | $7.50 | 1M | text, code, reasoning, tool-use |
| Qwen3.8-Omni-Flash | $0.15 | $0.47 | 1M | text, vision, audio, video, tool-use, code, reasoning |
| Qwen3.8-Flash | $0.15 | $0.47 | 1M | text, vision, video, tool-use, code, reasoning |
xAI
| Model | Input | Output | Context | Capabilities |
|---|---|---|---|---|
| Grok 4.7 | $2.00 | $6.00 | 500K | text, vision, tool-use, code, reasoning |
| Grok 4.6 | $2.00 | $6.00 | 500K | text, vision, tool-use, code, reasoning |
| Grok 4.5 | $2.00 | $6.00 | 500K | text, vision, tool-use, code, reasoning |
| Grok 4.3 | $1.25 | $2.50 | 1M | text, vision, tool-use, code |
NVIDIA
| Model | Input | Output | Context | Capabilities |
|---|---|---|---|---|
| Nemotron 3.5 Lightning | $0.08 | $0.20 | 262K | text, tool-use, code, reasoning |
| Nemotron 3 Nano Omni | Free* | Free* | 256K | text, vision, audio, video, code, reasoning, tool-use |
Microsoft
| Model | Input | Output | Context | Capabilities |
|---|---|---|---|---|
| MAI-Code-1.1-Flash | $0.20 | $1.20 | 256K | text, vision, code, tool-use |
MiniMax
| Model | Input | Output | Context | Capabilities |
|---|---|---|---|---|
| MiniMax M3 | $0.30 | $1.20 | 1M | text, vision, video, code, tool-use |
Meituan
| Model | Input | Output | Context | Capabilities |
|---|---|---|---|---|
| LongCat-2.0 | $0.75 | $2.95 | 1M | text, code, tool-use, reasoning |
| LongCat-2.5-Preview | $0.30 | $1.20 | 1M | text, vision, tool-use, code, reasoning |
Z.ai (Zhipu AI)
| Model | Input | Output | Context | Capabilities |
|---|---|---|---|---|
| GLM-5.3 | $1.40 | $4.40 | 1M | text, tool-use, code, reasoning |
| GLM-5.2 | $1.40 | $4.40 | 1M | text, code, tool-use, reasoning |
| GLM-5.3-FlashX | $0.37 | $1.25 | 1M | text, vision, video, tool-use, code, reasoning |
| GLM-5.3 Flash | $0.15 | $0.50 | 1M | text, vision, video, tool-use, code, reasoning |
Moonshot AI
| Model | Input | Output | Context | Capabilities |
|---|---|---|---|---|
| Kimi K3 | $3.00 | $15.00 | 1M | text, vision, code, tool-use, reasoning |
Fireworks AI
| Model | Input | Output | Context | Capabilities |
|---|---|---|---|---|
| Ember-1 | $3.00 | $15.00 | 1M | text, vision, tool-use, code, reasoning |
Sakana AI
| Model | Input | Output | Context | Capabilities |
|---|---|---|---|---|
| Fugu Ultra v2.0 | $5.00 | $30.00 | 1M | text, vision, tool-use, code, reasoning |
| Fugu Max | $2.00 | $6.00 | 1M | text, tool-use, code, reasoning |
poolside
| Model | Input | Output | Context | Capabilities |
|---|---|---|---|---|
| Laguna S 2.1 | $0.10 | $0.20 | 1M | text, code, tool-use, reasoning |
Unbiased
| Model | Input | Output | Context | Capabilities |
|---|---|---|---|---|
| Pareto | $2.50 | $7.50 | 262K | text, vision, tool-use, code |
Tencent
| Model | Input | Output | Context | Capabilities |
|---|---|---|---|---|
| Hy4 preview | $0.83 | $2.50 | 1M | text, code, tool-use, reasoning |
Xiaomi
| Model | Input | Output | Context | Capabilities |
|---|---|---|---|---|
| MiMo-V2.6-Pro | $0.43 | $0.87 | 1M | text, vision, audio, video, tool-use, code, reasoning |
| MiMo-V2.6-Flash | $0.14 | $0.28 | 1M | text, vision, audio, video, tool-use, code, reasoning |
Institute of Foundation Models (MBZUAI)
| Model | Input | Output | Context | Capabilities |
|---|---|---|---|---|
| Jais 3 375B-A23B | Free* | Free* | 512K | text, tool-use, code, reasoning |
Cost Calculator Examples
Abstract token prices are hard to reason about. Here are concrete examples showing what common tasks actually cost with different models. These assume typical token counts for each task type.
Example 1: Chatbot Application (10,000 conversations/month)
Assuming each conversation averages 2,000 input tokens and 1,000 output tokens:
| Model | Input Cost | Output Cost | Total/month |
|---|---|---|---|
| Claude Fable 5.1 | $200.00 | $500.00 | $700.00 |
| Claude Opus 5 | $100.00 | $250.00 | $350.00 |
| Claude Opus 5.5 | $80.00 | $200.00 | $280.00 |
| Gemini 4 Argon (from Dec 1) | $80.00 | $200.00 | $280.00 |
| GPT-5.6 Terra | $40.00 | $120.00 | $160.00 |
| Claude Sonnet 5.5 | $40.00 | $100.00 | $140.00 |
| GPT-6 Sol | $40.00 | $100.00 | $140.00 |
| Gemini 3.8 Flash* | $15.00 | $37.50 | $52.50 |
| DeepSeek V4.1 Flash (peak) | $6.00 | $12.00 | $18.00 |
| Claude Haiku 5.5** | $2.00 | $5.00 | $7.00 |
| GPT-6 Luna | $2.00 | $5.00 | $7.00 |
The takeaway: there is roughly a 100x cost difference between the most expensive and cheapest options for the same workload. Choosing the right model matters enormously. *Gemini 3.8 Flash is at an introductory rate through December 31, 2026; Google has published that both rates double on January 1, 2027. Gemini 4 Argon is shown at its December 1 price of $4/$20 (it is $2/$10 until then). **Claude Haiku 5.5 bills $0.10/$0.50 for prompts up to 100K tokens; its newer tokenizer produces roughly 30% more tokens for the same text, so its real bill runs somewhat higher than this like-for-like estimate.
Example 2: Document Summarization (1,000 documents/month)
Assuming each document is 10,000 input tokens and the summary is 500 output tokens:
| Model | Total/month |
|---|---|
| Claude Opus 5 | $62.50 |
| Claude Opus 5.5 | $50.00 |
| Claude Sonnet 5.5 | $25.00 |
| GPT-6 Sol | $25.00 |
| Gemini 3.8 Flash | $9.38 |
| DeepSeek V4.1 Flash (peak) | $3.60 |
| Gemini 3.1 Flash-Lite | $3.25 |
| Claude Haiku 5.5 | $1.25 |
| GPT-6 Luna | $1.25 |
Example 3: Code Generation (500 requests/day)
Assuming 1,500 input tokens (prompt + context) and 2,000 output tokens (generated code) per request:
| Model | Total/month |
|---|---|
| GPT-6 Astra | $1,725.00 |
| Claude Opus 5 | $862.50 |
| Claude Opus 5.5 | $690.00 |
| GPT-5.6 Terra | $405.00 |
| Claude Sonnet 5.5 | $345.00 |
| GPT-6 Sol | $345.00 |
| GLM-5.3 | $163.50 |
| DeepSeek V4.1 Flash (peak) | $42.75 |
| Claude Haiku 5.5 | $17.25 |
| GPT-6 Luna | $17.25 |
Free Tier Comparison
Free API access has narrowed, and the terms differ a lot by provider. Here is what you get without spending anything:
| Provider | Free Tier Details | Models Available | Limits |
|---|---|---|---|
| OpenAI | No free API tier on its pricing page | None free; GPT-6 Luna ($0.10/$0.50) is the cheapest current model | Usage-based billing |
| Anthropic | A small amount of free credits for new users | Claude API models; Haiku 5.5 ($0.10/$0.50 up to 100K tokens) is the cheapest | Rate limits set by usage tier |
| Free tier on the Gemini API via AI Studio | Gemini 3.8 and 3.6 Flash, 3.1 Flash-Lite, 2.5 Flash (no Pro models) | Limits vary; shown in AI Studio | |
| Mistral | Free plan includes $10/month in API credits | Mistral models in Studio | Monthly credit allowance |
| Open weights (self-hosted) | Free to download; hosted free tiers vary | DeepSeek V4.1 Flash, Reflection Beam, MiMo-V2.6-Flash, Qwen3.8-27B, Muse Glimmer 30B, Llama 4 | Unlimited if self-hosted |
Pro tip: Google's Gemini API free tier covers its current Flash models, including Gemini 3.8 Flash. If you are prototyping or building a low-traffic application, you can potentially run entirely on that free tier. Gemini 2.0 Flash, the old budget default, was shut down on June 1, 2026, and Gemini 3.7 Flash and 3.5 Flash were deprecated on October 8, 2026 (requests now route to 3.8 Flash and 3.6 Flash).
Price Per Task Estimates
Here is roughly what common tasks cost per individual request using different model tiers. These are estimates based on typical token counts.
| Task | Tokens (in/out) | Frontier Model | Mid-tier Model | Budget Model |
|---|---|---|---|---|
| Summarize an article | 3K / 300 | $0.045 | $0.009 | $0.0005 |
| Translate 1 page | 500 / 600 | $0.035 | $0.007 | $0.0004 |
| Generate a function | 1K / 500 | $0.035 | $0.007 | $0.0004 |
| Write a blog post | 500 / 3K | $0.155 | $0.031 | $0.0016 |
| Analyze a spreadsheet | 10K / 1K | $0.150 | $0.030 | $0.0015 |
| Chat response (avg) | 2K / 500 | $0.045 | $0.009 | $0.0005 |
Frontier tier = Claude Fable 5.1 or GPT-6 Astra ($10/$50). Mid-tier = Claude Sonnet 5.5 or GPT-6 Sol ($2/$10). Budget = GPT-6 Luna or Claude Haiku 5.5 ($0.10/$0.50).
Tips for Reducing API Costs
API costs can add up quickly, especially at scale. Here are practical strategies for keeping them under control:
1. Use the smallest model that works
This is the single most impactful optimization. For many tasks, GPT-6 Luna, Claude Haiku 5.5, or Gemini 3.8 Flash produces results that are nearly as good as frontier models at a fraction of the cost. Test your use case with cheaper models first and only upgrade if quality is genuinely insufficient. A model that is 10x cheaper and 95% as good is almost always the right choice.
2. Implement caching
If users ask similar questions, cache the responses. Both Anthropic and OpenAI offer prompt caching that cuts the cost of repeated prefixes by 90% or more (cache reads on Claude Fable 5.1 cost just 2.5% of the base input price, and on Claude Opus 5.5 they cost 5%, or $0.20 per million tokens). Even simple application-level caching (storing responses for identical inputs) can save significant money.
3. Optimize your prompts
Shorter prompts cost less. Remove unnecessary instructions, examples, and context. Use system prompts efficiently. If you are including few-shot examples, test whether you really need all of them. Often 1-2 examples work nearly as well as 5-6.
4. Set max token limits
Always set a max_tokens parameter to prevent unexpectedly long (and expensive) responses. For a summarization task, you probably do not need more than 500 output tokens. For code generation, 2,000 is usually plenty.
5. Use model routing
Route different requests to different models based on complexity. Simple questions go to a cheap model; complex ones go to a frontier model. You can implement this with a classifier (which itself can be a cheap model) or with simple heuristics based on input length or keywords.
6. Batch your requests
Both OpenAI and Anthropic offer batch APIs with 50% discounts. If your use case does not require real-time responses (e.g., processing a backlog of documents), batching can cut your costs in half.
7. Consider open source models
For high-volume applications, self-hosting an open source model like DeepSeek V4.1 Flash or Qwen3.8-27B can be dramatically cheaper than API calls. The upfront infrastructure cost is higher, but per-request costs approach zero. See our open source LLM guide for details.
Understanding Tokens
Tokens are the fundamental unit of AI API pricing. A token is roughly three-quarters of a word in English. Here are some helpful benchmarks:
- 1 token = roughly 4 characters or 0.75 words in English
- 100 tokens = roughly 75 words (a short paragraph)
- 1,000 tokens = roughly 750 words (about 1.5 pages)
- 10,000 tokens = roughly 7,500 words (a long article)
- 100,000 tokens = roughly 75,000 words (a short novel)
- 1,000,000 tokens = roughly 750,000 words (several novels)
Important: input tokens and output tokens are priced differently, with output tokens typically costing 3 to 6 times more than input tokens. This is because generating text is more computationally intensive than processing it. When estimating costs, always account for both sides. Tokenizers also differ by vendor: Anthropic says the tokenizer in Claude 4.7 and later models produces roughly 30% more tokens for the same text, so identical prompts can bill differently across models.
Frequently Asked Questions
How much does the OpenAI API cost?
OpenAI API pricing varies by model. GPT-6 Astra, the current flagship, costs $10 per 1M input tokens and $50 per 1M output tokens. GPT-6 Sol ($2/$10) and GPT-6 Luna ($0.10/$0.50) launched on September 22, 2026 at permanent rates, with prompts above 272K input tokens billed at a higher tier. The GPT-5.6 family runs from Sol at a promotional $4/$20 to Terra at $2/$12 and Luna at $0.20/$1.20, and GPT-6.1 Sol arrived on September 29 at $2/$10. Older models are on the way out: OpenAI's October 14 notice shuts down o1, o1-pro, and o3-mini on October 23, 2026 and removes the GPT-4o, GPT-4o-mini, GPT-4.1, and GPT-4.1-mini snapshots on January 14, 2027.
What is the cheapest AI API?
In our pricing data, NVIDIA's Nemotron 3.5 Lightning is among the cheapest at $0.08 per 1M input tokens, with poolside's Laguna S 2.1, OpenAI's GPT-6 Luna, and Anthropic's Claude Haiku 5.5 (for prompts up to 100K tokens) all at $0.10. Gemini 2.0 Flash, long a budget default at $0.10, was shut down on June 1, 2026. Open-weight models like DeepSeek V4.1 Flash and Qwen3.8-27B are free to self-host.
How are AI API tokens counted?
Roughly, 1 token equals about 4 characters or 0.75 words in English. A 1,000-word document is approximately 1,333 tokens. Most APIs charge separately for input (prompt) and output (completion) tokens.
Which AI API is best for production?
For reliability and quality, Anthropic (Claude Opus 5.5 and Sonnet 5.5) and OpenAI (GPT-6 Astra, GPT-6.1 Sol, and GPT-6 Sol) are the most popular choices, with Google's Gemini 4 Argon, generally available since October 13, now in the same conversation. For cost-sensitive applications, Gemini 3.8 Flash, GPT-6 Luna, Claude Haiku 5.5, or self-hosted open-weight models offer the best value.