Skip to the entry

Compute vs model token cost of a browser agent run, a calculator

Answer
A browser agent run costs its compute (hourly price times hours open) plus its model tokens (input and output tokens times their rates per million). These grids work out both and the share each takes, at example rates you replace with your model's price.
SI prefixes used to convert token counts and per-million rates
PrefixSymbolFactor (times)SourceChecked
kilok1,000physics.nist.gov/cuu/Units/prefixes.html
megaM1,000,000physics.nist.gov/cuu/Units/prefixes.html
Model cost of one run's input tokens, from tokens per run and a rate per million input tokens (Input token cost per run, USD)
Rate per million input tokens (USD)
Input tokens per run, thousands (k)0.250.512510
250.00630.01250.02500.05000.12500.2500
500.01250.02500.05000.10000.25000.5000
1000.02500.05000.10000.20000.50001.0000
2500.06250.12500.25000.50001.25002.5000
5000.12500.25000.50001.00002.50005.0000
1,0000.25000.50001.00002.00005.000010.0000
2,0000.50001.00002.00004.000010.000020.0000

Formula: k_input * kilo * rate / mega, where kilo = 1,000 times (kilo, Factor); mega = 1,000,000 times (mega, Factor).

Model cost of one run's output tokens, from tokens per run and a rate per million output tokens (Output token cost per run, USD)
Rate per million output tokens (USD)
Output tokens per run, thousands (k)125102040
10.00100.00200.00500.01000.02000.0400
20.00200.00400.01000.02000.04000.0800
50.00500.01000.02500.05000.10000.2000
100.01000.02000.05000.10000.20000.4000
250.02500.05000.12500.25000.50001.0000
500.05000.10000.25000.50001.00002.0000

Formula: k_output * kilo * rate / mega, where kilo = 1,000 times (kilo, Factor); mega = 1,000,000 times (mega, Factor).

Compute as a share of a run's total cost (Compute share of the run's cost, %)
Model cost per run (USD)
Compute cost per run (USD)0.010.050.10.250.51
0.0019.12.01.00.40.20.1
0.00533.39.14.82.01.00.5
0.0150.016.79.13.82.01.0
0.0583.350.033.316.79.14.8
0.190.966.750.028.616.79.1

Formula: 100 * compute / (compute + model).

How do I split the cost of one browser agent run?

Split the cost of one run into two sums and add them:

compute  = hourly price x run seconds / 3600
tokens   = input tokens  x input rate  / 1,000,000
         + output tokens x output rate / 1,000,000
run cost = compute + tokens

Model prices are usually quoted per million tokens; mega means a factor of 1,000,000 (NIST, SI prefixes, read 2026-11-26). The first two grids give the token sums, the third the share of the run's cost that is compute. Every rate in the grids is an example: use your model's published price.

What does a worked example look like?

A worked example with example inputs: a browser agent takes 30 steps. Each step sends about 8,000 input tokens (instructions, page content, history) and gets back about 300 output tokens. The run keeps a 2 vCPU, 4 GiB environment open for 300 seconds. Example rates: 1 USD per million input tokens, 5 USD per million output tokens, and 0.12 USD an hour for the environment.

Table: Worked example of compute and model cost for one run, at example rates

PartSumResult
Input tokens30 x 8,000 = 240,000240,000 x 1 / 1,000,000 = 0.24 USD
Output tokens30 x 300 = 9,0009,000 x 5 / 1,000,000 = 0.045 USD
Compute0.12 x 300 / 36000.01 USD
Run cost0.24 + 0.045 + 0.010.295 USD
Compute share0.01 / 0.2953.4%

At these example numbers, halving the compute saves 0.005 USD a run; cutting the input tokens by a quarter saves 0.06 USD. That is why it pays to know the split before optimising.

Where do the token counts come from?

The token counts come from the usage your model API reports with each response, summed over every call in the run. If you trace agent runs with OpenTelemetry, its generative AI conventions define gen_ai.usage.input_tokens and gen_ai.usage.output_tokens, and say the input count "SHOULD include all types of input tokens, including cached tokens" (OpenTelemetry semantic conventions, gen_ai attributes, read 2026-11-26). The same conventions list a separate gen_ai.usage.cache_read.input_tokens, which lets you price cached input apart.

Sum per run, then take the median and the slowest runs over a sample: long runs carry long histories, so their input tokens grow faster than their step count.

When does compute matter more than tokens?

Compute matters more than tokens when the run spends little on the model and a lot of time in the environment. Three common cases:

  1. Scripted browser tests with no model at all: compute is the whole bill. Use the cost per test run calculator.
  2. Long environment work between model calls, such as builds, test suites or data processing the agent starts.
  3. Environments left open while the agent waits for the model or a person. That time is paid at the full hourly price; see what idle time costs.

How do I lower each part?

Lower each part with the lever that moves it.

Table: Levers for each part of a browser agent run's cost

PartLever
Input tokensSend less page content per step, trim old history, reuse cached prefixes
Output tokensAsk for short actions rather than long explanations
ComputeSize the environment to the task, close it as soon as the run ends
BothFewer steps per task: better tools or instructions cut tokens and seconds together

What we read for this page

Method

The prefixes were read from NIST's table of SI prefixes on the checked date. Token counts, rates per million tokens and costs per run in the grids are example inputs, not any model's published price.

Common questions

Which costs more in a browser agent run, compute or model tokens?

It depends on your numbers, so work both out. In the worked example on this page, at example rates, the model tokens cost about 28 times the compute, because every step sends the page and the history back to the model.

How do I calculate the token cost of one run?

Multiply input tokens by the rate per million input tokens and output tokens by the rate per million output tokens, divide each by 1,000,000, and add the two.

Where do I get the token counts?

From the usage your model API reports on each call, summed over the run. If you trace runs with OpenTelemetry, the GenAI conventions name the attributes gen_ai.usage.input_tokens and gen_ai.usage.output_tokens.

Do cached input tokens change the sum?

They can. Many model price lists charge cached input at a different rate, so split input tokens into cached and uncached and price each at your model's published rate.