---
title: "Estimate LLM API cost before launch - step by step | BroadRouter"
description: "A step-by-step cost model for a new AI feature: users times actions times calls times tokens, with cache, reasoning, retries, rate limits and a worked monthly table."
url: https://broadrouter.com/blog/estimate-llm-api-cost-before-launch/
lang: en
updated: 2026-11-14
publisher: BroadRouter (a BroadNet site); API by BroadNet Inference, https://inference.broadnet.ai
---

# How to estimate LLM API cost before you launch a feature

By the BroadNet Inference team · 6 min read · Published 2026-11-14 · Updated 2026-11-15

Estimate LLM API cost by modelling one user action, not one API call: count calls per action, measure input, cached and output tokens per call on real samples, then multiply by users and actions per month. Add reasoning and retries, and price low, expected and high scenarios. Our worked example on DeepSeek V4.1 Flash comes to $42.67 a month.

## Key takeaways

-   Model the unit of work your user triggers, then count every LLM call behind it, including retries and agent steps.
-   Measure tokens on 20 to 50 real samples and read the usage block. Do not guess from word counts.
-   Split input into new and cached tokens and include reasoning in output, because each has a different price.
-   Our example: 60,000 actions a month at 5,000 input and 500 output tokens, half the input cached, costs $42.67.
-   Check the volume against rate limits and concurrency, not just the budget.

**On this page**

1.  What is the formula for LLM API cost?
2.  How do you build the cost model, step by step?
3.  What does a worked estimate look like? A support reply drafter
4.  How wide should the low and high scenarios be?
5.  What moves the estimate the most?
6.  Does the volume fit the rate limits?
7.  Should this feature run on a flat plan?
8.  How do you turn the estimate into a budget?
9.  Where BroadNet Inference fits

To estimate LLM API cost before launch, price one user action rather than one API call. Count the calls behind it, measure new input, cached input and output tokens on 20 to 50 real samples, multiply by monthly actions, then add reasoning and retries. Our worked support-reply example on DeepSeek V4.1 Flash comes to $42.67 a month.

It is a pre-launch forecast for one feature; once you have paying users, [LLM cost per user for SaaS](https://broadrouter.com/blog/llm-cost-per-user-saas/) covers margins and pricing tiers.

## What is the formula for LLM API cost?

```text
monthly cost = actions per month × calls per action
             × ( new input tokens × input price
               + cached input tokens × cached price
               + output tokens × output price ) / 1,000,000
```

[Output tokens](https://broadrouter.com/glossary/input-and-output-tokens/) include reasoning. [Cached tokens](https://broadrouter.com/glossary/cached-input-tokens/) are input the provider reuses at a lower price. Everything else is measurement. The free [LLM API cost calculator](https://broadrouter.com/tools/llm-api-cost-calculator/) applies this formula to any model’s list price.

## How do you build the cost model, step by step?

1.  **Name the unit of work.** “Draft a support reply”, “summarise a call”, “fix a failing test”. Price that, not “a request”.
2.  **Count calls per action.** A retrieval answer may be one call. An agent that plans, edits and checks may be ten. Add your retry rate: a timeout that you retry is billed again.
3.  **Measure tokens per call on real samples.** Take 20 to 50 realistic inputs, not clean demos. For a first rough count before you call any API, paste them into the [token counter](https://broadrouter.com/tools/token-counter/). Read `usage.prompt_tokens`, `usage.prompt_tokens_details.cached_tokens` and `usage.completion_tokens` from each response. With streaming, set `stream_options: {"include_usage": true}`; [the streaming guide](https://broadrouter.com/guides/streaming-chat-completions/) shows where it appears.
4.  **Separate new and cached input.** The system prompt, tool list and shared documents can be cached if they come first and stay identical. User text cannot.
5.  **Include reasoning in output.** DeepSeek V4.1 Flash, GLM 5.3 and Qwen3.8 27B think before answering. Those [reasoning tokens](https://broadrouter.com/glossary/reasoning-tokens/) are billed as output, and they are often larger than the visible reply. [Why reasoning costs more than you see](https://broadrouter.com/blog/reasoning-tokens-cost/).
6.  **Estimate volume.** Active users × actions per user per day × 30.
7.  **Multiply and total.** Convert token totals to millions and apply the price per 1M.
8.  **Price three scenarios.** Low, expected and high. Launch traffic is uncertain, and prompts grow over time.
9.  **Check limits, not only money.** Peak requests per minute and requests in flight must fit your key’s [rate limits](https://broadrouter.com/glossary/rate-limit/).
10.  **Decide the billing model.** Per token for spiky, user-driven traffic; a flat plan for always-on agents.

## What does a worked estimate look like? A support reply drafter

A help-desk app adds “Draft reply”. The numbers below are assumptions for illustration. Replace each one with your measurements.

| Input | Value | Where it comes from |
| --- | --- | --- |
| Support agents (staff) using the feature | 500 | Product plan |
| Drafts per agent per day | 4 | Pilot usage |
| Days a month | 30 |  |
| Actions a month | 60,000 | 500 × 4 × 30 |
| Calls per action | 1 | One call with retrieved articles |
| Input tokens per call | 5,000 | System prompt, ticket thread, three help articles |
| Share of input cached | 50% | Stable system prompt and article prefix |
| Output tokens per call | 500 | About 200 visible, 300 reasoning |
| Model | DeepSeek V4.1 Flash | $0.175 / $0.0055 / $0.52 per 1M |

Now the totals:

| Line | Tokens a month | Price per 1M |
| --- | --- | --- |
| New input | 150M | $0.175 |
| Cached input | 150M | $0.0055 |
| Output, including reasoning | 30M | $0.52 |
| **Expected monthly cost** |  | **$42.67** |

That is 300M input and 30M output tokens: 60,000 × 5,000 and 60,000 × 500.

## How wide should the low and high scenarios be?

| Scenario | Actions a month | Input / output tokens | Monthly cost |
| --- | --- | --- | --- |
| Low: slow adoption | 20,000 | 100M / 10M | $14.23 |
| Expected | 60,000 | 300M / 30M | $42.67 |
| High: 3× adoption | 180,000 | 900M / 90M | 3 × $42.67 |

All three keep the same 50% cache share. If the cache share falls, the bill rises: new input costs $0.175 per 1M on this model against $0.0055 cached. [How to keep the cache share high](https://broadrouter.com/blog/cached-input-tokens-explained/).

## What moves the estimate the most?

-   **Context length.** Retrieval that pulls ten articles instead of three can double input. Measure tokens after every prompt change.
-   **Reasoning.** Setting `reasoning_effort` to `low` on simple drafts shrinks hidden output. [Reasoning and max\_tokens](https://broadrouter.com/guides/reasoning-tokens-empty-response/).
-   **Retries and loops.** A 5% retry rate adds 5% to every line. An agent loop with no step cap has no ceiling at all. [Spend control for LLM APIs](https://broadrouter.com/blog/llm-api-spend-control/).
-   **Model choice.** Gemma 4 VL 26B costs $0.10 input and $0.22 output per 1M, but its context is 32,768 tokens and BroadNet does not list reasoning for it. Test quality before switching to save money.
-   **Language.** The same content can need far more tokens in Arabic or Hindi than in English, and the gap depends on the tokenizer. Our [real cost by language dataset](https://broadrouter.com/data/real-cost-by-language/) shows the price per 1M characters for each language on each model and provider.
-   **Prompt growth.** Prompts tend to grow after launch as edge cases get handled. Re-run the measurement each release.
-   **Price changes.** List prices rarely move, but they can rise. In archived pricing pages from 11 providers, we recorded 52 list-price rises between 2024 and November 2026, each a model’s price compared with its own earlier price (against 100 cuts); the median rise was 40% on a blended price. See [how to budget for LLM API price rises](https://broadrouter.com/blog/llm-api-price-increases/).

If the estimate comes out too high, work through the [10-step checklist to reduce LLM API costs](https://broadrouter.com/blog/how-to-reduce-llm-api-costs/) before you change the feature.

## Does the volume fit the rate limits?

60,000 actions a month is about 2,000 a day. If a tenth of a day’s drafts land in the busiest hour, that is 200 an hour, or about 3 a minute. A BroadNet pay-as-you-go key allows 30 requests a minute and 4 in flight, so this fits one key. Check the high scenario too, or run your own peak through the [rate limit calculator](https://broadrouter.com/tools/llm-rate-limit-calculator/). For the math between rate and requests in flight, see [concurrency](https://broadrouter.com/glossary/concurrency/). If you hit 429s, [back off and retry](https://broadrouter.com/guides/errors-and-retries/).

## Should this feature run on a flat plan?

Probably not. A Full Moon session is $60 a month, but a session runs one request at a time, and many users clicking “Draft” at once need parallel requests. Flat plans fit agents that work continuously, such as a coding agent. [The break-even math](https://broadrouter.com/blog/flat-rate-vs-pay-per-token-llm-api/) shows a full-time coding agent at $65.40 a month per token, above the plan price.

## How do you turn the estimate into a budget?

1.  Put the expected figure in your plan and the high figure in your alert threshold.
2.  Log tokens per action in production and compare with the model every week.
3.  Set hard caps in code: `max_tokens`, step limits and retry limits.
4.  Re-run the estimate whenever you change the model, the prompt or the retrieval settings.

You can redo the per-token math with your own numbers in the [LLM API cost calculator](https://broadrouter.com/tools/llm-api-cost-calculator/), or check plan against per-token on the [pricing page](https://broadrouter.com/pricing/).

## Where BroadNet Inference fits

BroadNet Inference publishes per-token prices for every chat and transcription model it serves in one [price file](https://inference.broadnet.ai/pricing.json?utm_source=broadrouter&utm_medium=referral&utm_campaign=blog-estimate-llm-api-cost-before-launch&utm_content=body), so the estimate above can be kept in code. New accounts get $5 of starting credit, which works on Gemma 4 VL 26B and the two transcription models, so you can measure your samples on Gemma; DeepSeek, GLM and Qwen need a top-up. If your feature needs a closed frontier model, BroadNet is not the right provider for that part.

Free tools for this

-   [LLM API cost calculator](https://broadrouter.com/tools/llm-api-cost-calculator/) Price a workload on every model at once, with cache hits, reasoning and a flat-plan check.
-   [Flat-rate vs per-token LLM cost calculator](https://broadrouter.com/tools/flat-rate-vs-per-token-calculator/) Break-even between an unlimited plan and paying per token, per agent.
-   [Prompt caching savings calculator](https://broadrouter.com/tools/prompt-caching-calculator/) Bill with and without caching, by prefix share and hit rate.
-   [Prompt token diff](https://broadrouter.com/tools/prompt-token-diff/) Two prompt versions side by side: changed lines, exact token delta and the monthly cost difference.

[All free tools](https://broadrouter.com/tools/)

## Terms in this article

[Token](https://broadrouter.com/glossary/token/)

A token is the unit of text a language model reads and writes: a word, part of a word, a punctuation mark or a byte sequence produced by the model's tokenizer. LLM APIs count, limit and usually bill usage in tokens.

[Pay-as-you-go](https://broadrouter.com/glossary/pay-as-you-go/)

Pay-as-you-go is a pricing model in which you pay only for what you use, metered per unit such as tokens, requests or audio minutes, with no subscription or minimum commitment. Most LLM APIs bill this way, from a prepaid balance or a periodic invoice.

[Input and output tokens](https://broadrouter.com/glossary/input-and-output-tokens/)

Input tokens are the tokens a language model reads in a request, including the system prompt, conversation history, tool definitions and images. Output tokens are the tokens it generates in reply, including any reasoning. LLM APIs usually price them separately, and output usually costs more.

[Rate limit](https://broadrouter.com/glossary/rate-limit/)

A rate limit is a cap an API places on how much a client can use it in a time window, such as requests per minute or tokens per minute. Requests over the limit are refused, usually with HTTP 429 Too Many Requests, until usage falls back under it.

[Concurrency](https://broadrouter.com/glossary/concurrency/)

Concurrency is the number of requests a client has in flight at the same time. LLM APIs often cap it per key or plan, separately from requests per minute, because each open request holds GPU capacity until its response has finished.

[Tool calling](https://broadrouter.com/glossary/tool-calling/)

Tool calling, also called function calling, is an LLM API feature in which the model returns a structured request to run a function the developer has defined, with JSON arguments. The application runs the function and sends the result back; the model never runs code itself.

[System prompt](https://broadrouter.com/glossary/system-prompt/)

A system prompt is the instruction text an application sends to a language model ahead of the conversation, usually as a message with the system or developer role. It sets the model's role, rules, tone and output format, and the model is meant to follow it over conflicting user messages.

[AI coding agent](https://broadrouter.com/glossary/coding-agent/)

An AI coding agent is a software tool in which a language model works on a codebase in a loop: it reads files, edits them, runs commands such as tests, reads the output and decides the next step until the task is done or a limit is reached.

## Questions

### How do I estimate the number of tokens before I have users?

Build 20 to 50 realistic inputs, run them through the model you plan to use and read prompt\_tokens, cached\_tokens and completion\_tokens from the usage block. Average them per call.

### How many tokens is a typical chat request?

It varies widely. A short chat turn can be a few hundred tokens, while a request with retrieved documents or a long history can be tens of thousands. Measure your own prompts.

### Should I add a safety margin to my LLM cost estimate?

Yes. Price a high scenario at two to three times expected volume, and budget for retries and longer prompts as the feature grows. Then set hard limits so a bug cannot exceed it.

### When should I consider a flat-rate plan instead?

When one agent or worker runs most of the day on one model. For DeepSeek V4.1 Flash on BroadNet, a Full Moon session costs $60 a month with no token meter, one request at a time.

## Keep reading

-   [LLM API pricing explained: input, cached, output and reasoning](https://broadrouter.com/blog/llm-api-pricing-explained/)
-   [Flat-rate vs pay-per-token LLM API: the break-even math](https://broadrouter.com/blog/flat-rate-vs-pay-per-token-llm-api/)
-   [Cached input tokens: how to cut an LLM API bill](https://broadrouter.com/blog/cached-input-tokens-explained/)
-   [LLM API spend control: budgets, key limits and loop protection](https://broadrouter.com/blog/llm-api-spend-control/)
-   [Free LLM API credit: how far a starting credit really goes](https://broadrouter.com/blog/free-llm-api-credit/)
-   [LLM cost per user: unit economics for a SaaS AI feature](https://broadrouter.com/blog/llm-cost-per-user-saas/)
-   [LLM API price changes in October 2026: 3 rises, no cuts](https://broadrouter.com/blog/llm-api-price-changes-october-2026/)
-   [Do LLM API prices only go down? 52 rises and how to budget for them](https://broadrouter.com/blog/llm-api-price-increases/)
-   [Guide: Stream chat completions and handle dropped connections](https://broadrouter.com/guides/streaming-chat-completions/)
-   [Guide: BroadNet Inference error codes and when to retry](https://broadrouter.com/guides/errors-and-retries/)

Try it on your real workload. New accounts start with $5 of credit for Gemma and transcription. DeepSeek, GLM and Qwen3.8 need a top-up.

[Get started](https://inference.broadnet.ai/account/?utm_source=broadrouter&utm_medium=referral&utm_campaign=blog-estimate-llm-api-cost-before-launch&utm_content=page-cta) ·

**Sources**

-   [BroadNet Inference machine-readable prices (pricing.json) (checked 2026-11-15)](https://inference.broadnet.ai/pricing.json?utm_source=broadrouter&utm_medium=referral&utm_campaign=blog-estimate-llm-api-cost-before-launch&utm_content=sources)
-   [BroadNet Inference API reference, limits and usage (checked 2026-11-15)](https://inference.broadnet.ai/docs?utm_source=broadrouter&utm_medium=referral&utm_campaign=blog-estimate-llm-api-cost-before-launch&utm_content=sources#limits)
-   [BroadNet Inference pricing page (checked 2026-11-15)](https://inference.broadnet.ai/pricing?utm_source=broadrouter&utm_medium=referral&utm_campaign=blog-estimate-llm-api-cost-before-launch&utm_content=sources)
