Why LLM bills surprise developers
API providers charge by the token, not by the request, so a feature that looks cheap in testing can become expensive at scale. The bill depends on how much text you send in, how much the model writes back, and how the two are priced. Understanding those numbers is enough to forecast a monthly cost with surprising accuracy.
Tokens, not words
A token is roughly four characters of English, so 1,000 words is around 1,300 tokens. Input and output tokens are almost always priced differently, and output is typically three to four times more expensive because generating text is harder than reading it. That single fact explains why a chatty assistant costs far more than a classifier that returns one label. To size a prompt, paste it into the LLM Token Counter or the LLM Context Window Checker.
A five-step estimate
- Measure the average input tokens for one request.
- Measure the average output tokens for one request.
- Look up the model price per million input and output tokens.
- Multiply by the number of requests per day and billing days.
- Add headroom for retries and traffic spikes.
The AI API Cost Calculator performs this arithmetic instantly and shows cost per request, per day and per month. Switch it to custom pricing to use your provider's current rates.
Levers that shrink the bill
| Change | Effect |
|---|---|
| Cap response length | Directly reduces the most expensive token type |
| Route simple tasks to a small model | Drops the per-token price dramatically |
| Cache or trim prompts | Lowers repeated input tokens |
| Summarise long context | Cuts input size for every later request |
Estimate for your busiest user
Average usage hides your risk. A single power user generating long answers twenty times a day can outweigh a hundred light users. Model that profile, then set rate limits and pricing so a heavy user still leaves you a margin.
Compare the estimate with reality
After launch, reconcile your first invoice with actual token usage. Estimates get you in the right order of magnitude fast, and the invoice fine-tunes it. That loop is what keeps an AI feature profitable.