AI API cost calculator
Estimate what the API of the main AI models will cost you. Enter the tokens per request and the number of requests.
Estimated cost
Share the link and it will open with these same values.
Price table per million tokens
Prices in USD. Last verified: 11 July 2026.
| Model | Provider | Input / 1M | Output / 1M |
|---|---|---|---|
| Claude Fable 5 | Anthropic | $10 | $50 |
| Claude Opus 4.8 | Anthropic | $5 | $25 |
| Claude Sonnet 5 | Anthropic | $3 | $15 |
| Claude Haiku 4.5 | Anthropic | $1 | $5 |
| GPT-5.6 Sol | OpenAI | $5 | $30 |
| GPT-5.6 Terra | OpenAI | $2.5 | $15 |
| GPT-5.6 Luna | OpenAI | $1 | $6 |
| GPT-5.2 | OpenAI | $1.75 | $14 |
| Gemini 3.1 Pro | $2 | $12 | |
| Gemini 3.5 Flash | $1.5 | $9 | |
| Gemini 3.1 Flash-Lite | $0.25 | $1.5 |
Why input and output are billed separately
Input is everything you send the model: the question, the instructions and any document or history you attach. Output is what it replies. They are billed separately because generating costs more than reading, and output is typically worth three to five times more per token. If your service produces long texts, that is where most of your spend goes even when the questions are short.
The cost almost nobody estimates correctly
In a conversation, every message resends the entire prior history as input. A thirty-turn chat does not cost thirty requests but considerably more, because the last one resends the whole conversation. The same applies to the system prompt: those fixed 500-token instructions are paid on every call, not once. When budgeting, multiply by turns, not by users.
How to lower the bill without losing quality
What saves most is trying a small model first: for classifying, extracting data or summarising they give an equivalent result at a fraction of the price, and moving up to a large one only makes sense where reasoning is genuinely needed. After that come two things: summarising older turns instead of resending the full conversation, and asking for replies the length you need, because "be brief" translates directly into money.
Bear in mind too that Spanish uses roughly 20-30 % more tokens than English to say the same thing, so a service with identical volume costs more to run in Spanish. You can check it with your own text in the token counter.