BroadRouter

Agent run cost estimator

Updated

In short: An agent resends its whole history on every step, so input grows each step: total input = steps × starting context + growth × steps × (steps − 1) ÷ 2. A 50-step run that starts at 10,000 tokens and adds 2,000 a step sends 2,950,000 input tokens. Enter your loop for the cost per step and in total.

Free, no sign-up, runs in your browser: nothing you type is sent anywhere.

Agent loop

Cost per run—
Input per run—
Output per run—
Last step input—

Input per step and cumulative cost

Input tokens sent on each step, cost of that step and cumulative cost of one run
StepInput tokensStep costCumulative

Same work on a DeepSeek session

See the plansGet started

Estimates before tax. BroadNet prices synced 2026-11-14; other models use the cheapest standard price listed on a provider's own page in our database. Retries, failed calls, compaction and parallel sub-agents are not included. Session time counts generation only, at BroadNet's typical figure of about 100 tokens a second, not a guarantee.

Report a wrong price or number (email to info@broadnet.ai, with this page's link and your inputs filled in).

How it works

  1. Enter the number of steps (model calls) in one run, the starting context (system prompt, tool definitions and task) and the tokens appended per step: tool output and the model's visible reply.
  2. Add reasoning tokens per step if the model reasons (billed as output, not resent) and the share of input you measured as cached. Caching starts at 0%.
  3. Pick a BroadNet model, any model from our price database, or type custom prices. Set how many runs to price.
  4. Read the total, the step-by-step table of input growth and cumulative cost, the context-window check and the DeepSeek session estimate.

The formula

growth per step = tool output + model output (if kept in history)
input on step i = start + (i − 1) × growth
total input     = steps × start + growth × steps × (steps − 1) / 2
total output    = steps × (model output + reasoning)
cost            = input × (1 − cache) × input_price
                + input × cache × cached_price
                + output × output_price          (prices per 1M tokens)

The quadratic term is why long runs get expensive: doubling the steps roughly quadruples the input once growth dominates the starting context. When a model publishes no cached price, the cache share is ignored and all input is billed at the input price.

Worked example

A 50-step coding run starts with a 10,000-token context, and each step appends 1,500 tokens of tool output and a 500-token reply, with 300 reasoning tokens. It sends 2,950,000 input tokens and 40,000 output tokens. On DeepSeek V4.1 Flash at pay-as-you-go prices that is $0.5371 with no cache hits and $0.137 if 80% of input is cached. Generating 40,000 output tokens at about 100 tokens a second takes roughly 7 minutes, so one Meteor session hour ($1) covers the generation time, if tool calls and prompt processing also fit in the hour.

Pay per token or buy a session?

  • Per token wins for short or occasional runs, and when cache hits are high.
  • A session wins when one agent works for hours: the price is per period, with no token meter, and it covers one request at a time.
  • Parallel agents need one session each. Sessions do not guarantee throughput or uptime.

For a monthly view across many runs, use the flat-rate vs per-token calculator or the session planner.

Questions

Why does an AI agent cost more per step as it runs?

Chat APIs are stateless, so an agent sends the whole conversation on every call: the system prompt, tool definitions, the task and every tool result and reply so far. Input therefore grows by the tokens appended each step, and total input grows with the square of the number of steps.

How do I estimate tokens added per step?

Log one real run. For each call, read usage.prompt_tokens; the difference between consecutive calls is the growth per step (tool output plus the previous reply). Reasoning tokens are billed as output but are usually not sent back, so enter them separately.

How much does prompt caching help an agent?

A lot, because each step resends the previous steps unchanged. Cached input on DeepSeek V4.1 Flash costs $0.0055 per 1M tokens against $0.175. The share that is actually cached varies by provider and by how stable your prompt is, so measure prompt_tokens_details.cached_tokens. The tool starts at 0% cache so you do not count savings you have not measured.

Is a flat DeepSeek session cheaper for agents?

Sometimes. A Full Moon, Orbit or Meteor session has no token meter, but it runs one request at a time, so one agent loop per session. The tool estimates how long the run takes at BroadNet's typical 100 tokens a second and prices it as session hours. A lower estimated charge does not prove the work finishes in the period.

What happens when the context window fills up?

The request fails or the provider truncates, depending on the API. Long-running agents summarise or drop old tool output (compaction). The tool shows the step where your history passes the model's context window; it does not model compaction, so costs after that step are an upper bound. Context management for long agents.

Does this tool say whether my agent will finish the task?

No. It prices the tokens you describe. Whether an agent completes a task depends on the model, the prompt and the tools, and no cost estimate can promise that.

Go deeper

Read as MarkdownAsk ChatGPTAsk ClaudeAsk Perplexity