Home / Guides / How to estimate your monthly AI API bill

How to estimate your monthly AI API bill

Count tasks, not tokens. A worked example and a calculator that does the math for every model.

By Piotr Olszewski · Oct 11, 2026 · prices as of Oct 18, 2026

To estimate your monthly AI API bill, multiply how many times each task runs per month by what one run of that task costs on your chosen model, then add the totals. Cost per task depends on the model and the task, not just on text length. Reasoning tokens, retries and caching can each move the result a lot, so build in margin for them.

The formula

For each task type in your workflow:

  • Monthly cost = (tasks per month / 1,000) x cost per 1,000 tasks
  • Total monthly bill = the sum of that line across all task types

You need two inputs:

  • Your volume. Count it from logs, or estimate it from users.
  • Per-task cost on the model you plan to use. TaskCents task pages list cost per task and per 1,000 tasks, along with the token counts behind each figure.

You can also run your own numbers in the calculator.

Keep the basis of each figure in mind. Measured numbers come from one run per task with default settings through OpenRouter, with output capped at 16,000 tokens. Other numbers are estimated. The methodology page explains the difference.

Worked example: 3,000 chats, 500 emails, 100 PDF summaries

Say your product handles 3,000 chat answers, 500 customer email replies and 100 summaries of 20-page PDFs each month. The inputs below are per-1,000-task costs from my task pages (prices as of 2026-10-11, USD). For each model, multiply each cost by the volume divided by 1,000, then add the three lines.

ModelChat, per 1,000 (x 3)Email, per 1,000 (x 0.5)PDF summary, per 1,000 (x 0.1)
GPT-6 Luna$0.59$0.07$1.57
Claude Sonnet 5.5$12.68$3.97$44.58
Claude Opus 5.5$25.36$7.95$89.16

The multipliers come from your volumes: 3,000 chats is 3 thousand, 500 emails is 0.5 thousand, and 100 summaries is 0.1 thousand.

Two things stand out:

  • Chat volume drives the bill on the pricier models because it is the largest task count.
  • A PDF summary costs far more per task than a chat or an email. On Claude Sonnet 5.5, a summary costs 4.5¢ per task, against 0.40¢ for an email reply. Check per-task figures before assuming a small task count means a small bill.

For the chat task alone, the spread across models is wide. Here are popular models for answering a chat question:

#ModelCost per taskText scoreTokens in / outBasis
1Z.ai logo
GLM 5.3 FlashZ.ai
0.04¢$0.36 / 1,000
147448 / 1,782measured best value
2OpenAI logo
GPT-6 LunaOpenAI
0.06¢$0.59 / 1,000
144345 / 1,179measured
3Anthropic logo
Claude Haiku 5.5Anthropic
0.07¢$0.66 / 1,000
-61 / 1,299measured
4Alibaba Qwen logo
Qwen3.8 FlashAlibaba Qwen
0.08¢$0.76 / 1,000
-88 / 1,598measured
5Mistral logo
Mistral Small 4Mistral
0.08¢$0.83 / 1,000
-40 / 1,377estimated

The full breakdown is on the chatbot answer task page.

Pitfall 1: Reasoning tokens

Many current models reason before they answer, and reasoning tokens are billed as output tokens. They do not show up in the visible reply, so they are easy to miss when you look at prompt and response lengths.

My data shows how much this varies:

  • In the chat task, GPT-6 Luna uses 639 reasoning tokens per run and costs $0.59 per 1,000 tasks.
  • DeepSeek V4.1 Flash uses 5,461 reasoning tokens for the same task and costs $7.60 per 1,000 tasks.
  • In the PDF summary task, Claude Sonnet 5.5 used 0 reasoning tokens, while Gemini 3.1 Pro Preview used 1,079.

Two practical steps follow. Read the reasoning-token column for each task before you choose a model. Also check each model's reasoning mode (default, always or none), which is listed on the model pages, for example GPT-6 Luna.

Pitfall 2: Retries and repeated calls

Your bill counts every call, not every successful answer. If your app retries on timeouts, re-asks when output fails validation, or calls the model again after a user edits a request, your real volume is higher than your product metrics suggest.

My per-task figures reflect one run per task and do not include retries. Add a margin for them, and log how often calls fail in production so you can replace the guess with a real number after a few weeks.

Agent workflows are a larger version of the same problem. Each step re-sends context, so input grows with every step. My agent scenario assumes:

  • an 8,000-token system prompt
  • 50 steps
  • 1,500 extra context tokens per step
  • 300 visible output tokens per step

A single agent run is therefore many billable calls, not one. Estimate per step and multiply, rather than estimating per user session.

Pitfall 3: Caching

Cached input tokens cost much less than fresh input tokens, but only when prompts share a repeated prefix, such as a long system prompt or a document that many requests reuse. List prices in my data show the gap:

ModelInput per 1MCached input per 1M
Claude Sonnet 5.5$2.00$0.10
Gemini 3.1 Pro Preview$2.00$0.20

If your system prompt is long and stable, caching can cut your input bill. If every request is different, it will not help. Check the cached input price on the model page, and confirm with your provider how caching is triggered before you build it into your estimate.

Pitfall 4: Tokenizers differ

The same English text does not produce the same number of tokens on every provider. With OpenAI set to 1.00, Anthropic comes in at 1.39. A document that takes 1,000 tokens on OpenAI takes about 1,390 on Claude. Mistral is at 1.03 and xAI at 1.07, while Google (0.98), DeepSeek (1.00) and Qwen (1.01) sit close to OpenAI.

So do not compare models by word count alone. Compare cost per task, which already reflects each provider's tokenizer. If you estimate from your own text, count tokens with the provider's tokenizer before you multiply.

A simple process

  1. List your task types and how many of each you run per month.
  2. Pick candidate models and look up cost per 1,000 tasks for each task.
  3. Multiply, sum, and note which figures are measured and which are estimated.
  4. Add a margin for reasoning, retries and agent steps.
  5. Run a small batch in production, compare the real bill to your estimate, and adjust.

See the plans page for plan options, and the news section for updates when prices or model behavior change.

FAQ

How accurate is a monthly AI cost estimate?

It is only as good as your volume numbers and your per-task figures. A single default run is a useful baseline, but production results vary with prompt length, reasoning and retries. Compare your first month of real usage with the estimate and adjust.

Why is my bill higher than my estimate?

Common causes are uncounted reasoning tokens, retries and repeated calls, and agent workflows that re-send long context on every step. Log the token counts your provider reports, not just response sizes, to find the gap.

Should I always pick the cheapest model?

No. The cheapest model per task may not give answers good enough for your product. Test a sample of real inputs and weigh cost against quality before you switch.