AI models like Claude, GPT and Gemini are billed by the token when you use them through an API. Once you understand tokens and the difference between input and output prices, estimating a bill is simple arithmetic. This guide explains how pricing works and how to keep costs down. Estimate your own costs with the AI API cost calculator.
Quick answer: APIs charge per million tokens, with separate prices for input (what you send) and output (what the model writes). In English, a token is about 4 characters, so 100 tokens is roughly 75 words. Output is usually priced several times higher than input. To estimate a bill, multiply tokens per request by requests per month, then by the price. Caching repeated input and batch processing can cut costs a lot.
What is a token?
Models read and write text in small chunks called tokens. A token can be a whole word, part of a word or punctuation. OpenAI’s rule of thumb for English is:
- 1 token is about 4 characters
- 100 tokens is about 75 words
- 1,000 words is roughly 1,300 to 1,400 tokens
Other languages often use more tokens for the same amount of text, so they can cost more. Code, numbers and unusual words also tend to use more tokens.
Input and output are priced separately
| What it includes | Typical price | |
|---|---|---|
| Input tokens | Your instructions, the conversation so far, documents you paste in | Lower |
| Output tokens | Everything the model writes back, including any reasoning it shows | Usually several times higher |
For example, Anthropic lists Claude Sonnet 5.5 at $2 per million input tokens and $10 per million output tokens. Prices change often and differ a lot between models, so always check the provider’s pricing page.
Worked example
A customer support assistant handles 1,000 requests a day. Each request sends 2,000 input tokens (instructions plus the customer’s message and history) and gets back 500 output tokens. At $2 input and $10 output per million tokens:
| Per request | Per day (1,000) | Per month (30 days) | |
|---|---|---|---|
| Input | $0.004 | $4.00 | $120.00 |
| Output | $0.005 | $5.00 | $150.00 |
| Total | $0.009 | $9.00 | $270.00 |
Even though there are four times as many input tokens, output is over half the cost, because it’s priced five times higher.
Ways to cut costs
- Choose the right model. Smaller, faster models can cost a tenth or less of the largest ones and are often good enough for simple tasks like sorting or extracting data.
- Cache repeated input. If every request starts with the same long instructions or document, prompt caching lets you pay a fraction of the normal input price for that part. Anthropic charges cache reads at a small fraction of the base input price.
- Use batch processing for work that doesn’t need an instant answer. Anthropic’s Batch API is 50% cheaper on both input and output.
- Limit output. Ask for short answers and set a maximum output length.
- Trim the conversation. Long chat histories are sent as input every time. Summarise or drop old messages.
Check the value, not just the cost
A few hundred dollars a month can be cheap if it saves staff time, or expensive if nobody uses the feature. Compare the cost with what it replaces using the ROI calculator. For better results per request, see how to write better AI prompts. More tools are in the AI tools guide.
Prices change often. The worked example uses Claude Sonnet 5.5 list prices in November 2026 for illustration only. Check each provider’s pricing page before you budget.
Frequently asked questions
How are AI APIs priced?
Per million tokens, with separate prices for input tokens you send and output tokens the model writes.
How many words is a token?
In English, about three-quarters of a word. 100 tokens is roughly 75 words, and a token is about 4 characters.
Why are output tokens more expensive?
Generating text takes more computing than reading it, so providers usually price output several times higher than input.
How do I estimate my monthly AI API bill?
Multiply input and output tokens per request by requests per month, then by the price per million tokens for each, and add them together.
What is prompt caching?
A feature that stores repeated input, such as long instructions, so later requests pay a much lower price for that part.
How can I reduce AI API costs?
Use a smaller model where it’s good enough, cache repeated input, batch non-urgent work, limit output length and trim long conversations.
Sources
Last updated: