Pricing

AI Agent Cost: What a Running Agent Actually Bills (2026)

Per-token list prices do not tell you what an agent costs. Seat prices do not either. An agent is a loop, so the bill is per-call cost × turns × runs, and the per-call cost is not the sticker price — reasoning tokens, resent context and tool schemas all land on it. On our executed 9-task benchmark, measured cost per 1,000 tasks ranged from $0.10 to $8.83 among models that all scored 9/9. Multiply that by a 20-turn loop and the gap stops being an accounting detail. Everything below is built from those measured per-call numbers. One caveat stated up front and repeated: our harness is single-turn. It does not run agents. Every multi-turn and monthly figure on this page is arithmetic on measured per-call data, not a measured agent run.

Projected cost of one 20-turn agent run across five models, built from measured per-call benchmark numbers

Almost every page that answers this question quotes one of two numbers. The first is a per-token list price, which tells you what one call costs if you know the token counts, and you do not. The second is a seat or subscription price, which tells you what a human sitting at a keyboard costs, which is a different product. Neither one is the cost of a running agent.

The formula, and why list prices miss it

An agent bill has three multipliers and one of them is hidden.

Monthly cost = per-call cost × turns per run × runs per month.

Runs per month you know. Turns per run you can log today. Per-call cost is the one people get wrong, because they estimate it from their prompt. Their prompt is not what gets billed. What gets billed on turn n is: the system prompt, every tool definition, the entire transcript so far, the current step, plus whatever reasoning tokens the model decides to emit before it answers — and reasoning tokens bill at the output rate.

That last item is the one we can put a measured number on, and the number is uncomfortable.

Step 1: your real per-call cost

We ran thirteen models through the same executed benchmark in one sitting: nine Python tasks, temperature 0, a 4,000-token ceiling, every answer scored by executing the returned code against assertions the model never sees. Same work, same settings.

Reasoning-token counts on identical work ranged from 0 to 933 per call. Zero for Qwen3 Coder Next, Mistral Medium 3.5, Claude Sonnet 5 and Claude Opus 4.8 — all of which scored 9/9. Gemini 3.6 Flash, run later on the same harness, emitted 933 per call and also scored 9/9.

Those 933 tokens are not free and they are not in your prompt. Gemini 3.6 Flash lists at $1.50 input / $7.50 output per 1M tokens, so 933 reasoning tokens is roughly $0.0070 per call before the visible answer costs anything. In a 20-turn loop that is about $0.14 per run of pure invisible thinking. Against a model that emits zero, the entire line item disappears.

Rather than reconstruct per-call cost from token counts, we use the measured figure directly. Our harness reports measured cost per 1,000 tasks, computed as the reported token counts multiplied by that model's list price — a single number that already contains input, output and reasoning tokens. Each task is one scored call, so per 1,000 tasks is per 1,000 calls. Divide by 1,000 and you have a per-call anchor. That division is arithmetic, not a second measurement:

ModelScoreMeasured cost / 1,000 tasksPer call (÷1,000)Reasoning tokens / call
Qwen3 Coder Next9/9$0.10$0.00010
DeepSeek V4-Flash9/9$0.13$0.00013568
Mistral Medium 3.59/9$0.87$0.000870
Claude Sonnet 59/9$1.67$0.001670
GLM 5.29/9$1.99$0.00199559
Claude Opus 4.89/9$4.05$0.004050
Gemini 3.6 Flash (later run, same harness)9/9$8.02$0.00802933
GPT-5.59/9$8.83$0.00883176

Ten of the thirteen models in that sweep scored a perfect 9/9. The cheapest of them cost $0.10 per 1,000 tasks, the priciest $8.83 — an 88x spread across models that correctness could not separate on this workload. The rows above are the subset used in the models below; the full field is in the coding cost benchmark.

Read this before you reuse those per-call numbers. Our tasks are short: a function signature plus a prose spec. A real agent turn carries a system prompt, tool schemas and a growing transcript, so its input side is far larger. Using our per-call figure as your per-call figure understates absolute cost. What it preserves is the ratio between models, which is the part that decides which model you can afford to loop.

AI agent cost per month: the grid

Here is the whole model in one table. Two models at opposite ends of the reasoning-token spread, three run volumes, three turn counts. Every cell is runs × turns × per-call cost, recomputed rather than scaled.

Assumptions stated inline: per-call cost is held constant at the measured value ($0.0001 for Qwen3 Coder Next, $0.00802 for Gemini 3.6 Flash); every turn is one API call; no retries; no caching; a month is whatever period contains the run count in column one. Our harness is single-turn, so the entire table is a projection.

Runs / monthTurns / runCalls / monthQwen3 Coder Next
$0.0001 / call, 0 reasoning tok
Gemini 3.6 Flash
$0.00802 / call, 933 reasoning tok
1005500$0.05$4.01
100202,000$0.20$16.04
100505,000$0.50$40.10
1,00055,000$0.50$40.10
1,0002020,000$2.00$160.40
1,0005050,000$5.00$401.00
10,000550,000$5.00$401.00
10,00020200,000$20.00$1,604.00
10,00050500,000$50.00$4,010.00

Three things fall out of that grid.

The two multipliers are interchangeable. 1,000 runs of 50 turns and 10,000 runs of 5 turns are the same 50,000 calls and the same bill. Cutting turns per run is worth exactly as much as cutting traffic, and it is usually easier.

The model choice is worth 80x here, not 8x. $8.02 against $0.10 is a factor of 80.2 on every single cell, applied to a number that turns and volume have already multiplied. At 1,000 runs of 20 turns it is the difference between $2.00 and $160.40.

Turn count is where a small number becomes a large one. Going from 5 turns to 50 turns is a 10x bill for one product decision — usually the decision to let the agent keep going instead of failing fast.

Where the $20 and $100 crossover sits

The comparison people actually want is against a flat subscription. Claude Code and Claude Cowork are both included in any paid Claude plan — Pro at $20/mo, Max at $100 to $200/mo — so $20 and $100 are the two numbers worth anchoring on.

State the caveat first: this is not an apples-to-apples comparison. A subscription is a rate-limited seat for a human driving an interactive tool. An API key is metered capacity for software you run unattended. You cannot serve customers off a seat, and you do not get an IDE with an API key. What the crossover tells you is how much unattended agent work costs the same as a seat — which is the right sanity check before you build.

Below, each cell is the budget divided by the per-call cost. The runs column assumes 20 turns per run.

Model (all scored 9/9)Per-call costCalls for $2020-turn runs for $20Calls for $10020-turn runs for $100
Qwen3 Coder Next$0.0001200,00010,0001,000,00050,000
Mistral Medium 3.5$0.0008722,9891,149114,9435,747
Claude Sonnet 5$0.0016711,97659959,8802,994
Gemini 3.6 Flash$0.008022,49412512,469623
GPT-5.5$0.008832,26511311,325566

$20 of API spend buys 125 twenty-turn agent runs on Gemini 3.6 Flash, or 10,000 on Qwen3 Coder Next. Same 9/9 score on the same nine tasks. That is the whole argument for measuring before you commit — and the reason a single crossover number does not exist. The crossover is a function of which model you loop.

Practical reading: if your agent runs a few times a day and a human is watching it, a subscription is almost certainly cheaper and the API arithmetic is irrelevant. If it runs unattended more than about a hundred times a month at twenty turns, you are past the $20 line on any of the expensive models and model choice starts to dominate everything else on this page.

AI agent cost comparison: one 20-turn run

Strip out volume entirely and look at a single run. This is the number to carry in your head, because it is what a product decision — add a step, allow one more retry, let it re-read the file — actually costs.

Projected cost of one 20-turn agent runMeasured cost per 1,000 tasks ÷ 1,000 × 20 turns. All five models scored 9/9 on the same nine tasks.Qwen3 Coder Next$0.0020Mistral Medium 3.5$0.0174Claude Sonnet 5$0.0334Gemini 3.6 Flash$0.1604GPT-5.5$0.1766One scale throughout: 2,400 px per dollar. Bar height 22 px and label offset 8 px are constant on every row.Projection, not a measured agent run: our harness is single-turn and holds per-call cost constant across turns.
Chart: DataLLM Lab. The per-1,000-task figures behind every bar — $0.10, $0.87, $1.67, $8.02, $8.83 — are measured on our executed 9-task benchmark. The 20-turn multiplication is our arithmetic on those measured numbers. Method: our methodology.

The two most expensive bars are 88x and 80x the cheapest one, and all five models scored the same 9/9. Note also that Gemini 3.6 Flash and GPT-5.5 land less than two cents apart ($0.1604 against $0.1766) by two completely different routes: GPT-5.5 has the higher list price, Gemini 3.6 Flash has 933 reasoning tokens per call against 176. You cannot rank per-call cost by reading list prices. That is exactly why the number has to be measured.

What actually drives the bill, and the fix

Five things move the number. They are covered in depth, with symptoms you can check today, in AI agent traps — here is the cost arithmetic for each.

DriverHow it scalesThe fix
Turn countLinear. Every cell in the grid above is directly proportional to it.Cap turns in the harness, not the prompt. Fail fast instead of looping. Give the agent a tool that returns the answer in one call rather than three.
Context resent each turnQuadratic in turns. The default loop resends the whole transcript, so cumulative input tokens grow with the square of turn count.Drop tool output once acted on, summarise settled turns into a state object, and cache the stable prefix. See prompt caching and context engineering.
Tool definitionsConstant per turn × turns. Schemas ship on every request whether or not a tool is called, including turns that call none.One-sentence descriptions, drop parameters you never pass, load definitions on demand, and split one fat agent into two narrow ones. Background: function calling.
RetriesMultiplier. Nested retry layers compound: three layers of three attempts is nine calls for one logical step.Retry on transport errors and 5xx only, never on a wrong answer. Cap attempts per step and emit the count as a metric. See LLM API error codes.
Model choiceMultiplier on everything else. Measured: 88x between the cheapest and priciest 9/9 model in our sweep.Measure your own workload, not a leaderboard. Route routine steps cheap and escalate hard ones. See best LLM for AI agents.

Ordering matters. Model choice and turn count are multipliers on the whole bill and can be changed in an afternoon. Context and tool-schema work is real engineering that pays back over weeks. Retries are usually a one-line bug that is quietly doubling a number nobody is watching.

Using an AI agent cost calculator honestly

A calculator is only as good as the token counts you feed it, and for an agent almost everyone feeds it the wrong ones. The three mistakes, in order of how much they distort the answer:

Counting your prompt instead of the request. The billed input on turn 12 is the system prompt plus every tool schema plus eleven turns of transcript. Your prompt is a small fraction of it. Take the number from a real request log, not from the text you wrote.

Ignoring reasoning tokens. They bill at the output rate and they do not appear in the response text. Measured range on identical work across our runs: 0 to 933 per call. If your calculator has one output field, a high-reasoning model will read as cheap and bill as expensive.

Multiplying by runs instead of calls. One run is not one call. Multiply by turns first. This is the single most common order-of-magnitude error, and at 20 turns it is a 20x error.

Once you have honest per-turn token counts, plug them into the LLM cost calculator and multiply the result by turns and runs. If you want the estimating method spelled out before you have any logs to work from, how to estimate LLM API costs covers it.

AI agent cost optimization, in order

Do these in sequence. Each one is cheaper to implement than the one after it, and the first two are usually worth more than everything below them combined.

1. Instrument first. Log input tokens, output tokens and reasoning tokens as three separate fields, per turn, per run. Then plot them across one real run. A flat high floor is tool-schema bloat. A rising line is transcript growth. Duplicate requests seconds apart are retries. An output count far exceeding the visible answer is reasoning spend. One chart, four diagnoses — see LLM observability.

2. Re-measure model choice on your workload. Not on a leaderboard. Ten of the thirteen models in our sweep tied at 9/9 while their cost spread 88x, which means correctness alone will not pick for you. Run your own tasks against three or four candidates and compare cost per completed run.

3. Cut turns. Cap them in the harness. Look at the transcript of a long run and count how many turns did no useful work — re-reading a file, re-planning, confirming something it already knew. Those are pure bill.

4. Cache the stable prefix. System prompt and tool definitions are identical on every turn, which is exactly what caching is for.

5. Trim what repeats. Tool schemas and stale transcript. Detailed reductions are in cutting token costs for coding agents and how to cut LLM API costs.

6. Route by step. Most turns in an agent run are routine. Send those to a cheap model and escalate only the hard ones. Mixing is how you get most of the 88x without giving up capability where it matters. The structural pattern is in what is an AI agent harness.

What this model excludes

Token cost is the part that is easy to measure, which is why it is the part everyone writes about. It is frequently not the largest number.

Infrastructure. Whatever runs the loop, the queue, the vector store, the sandbox your agent executes code in, the logging. None of it is in any figure on this page.

Human review time. If every agent run needs five minutes of a person checking the output, that person costs more per run than the tokens do at nearly every cell in the grid above. At 1,000 runs a month of 20 turns, the expensive model bills $160.40 — roughly two hours of an engineer. The review time on those 1,000 runs is 83 hours. The tokens are a rounding error against the labour.

The cost of the agent doing the wrong thing. This one can dwarf everything else and it is not measurable in advance. A sent email, a deleted branch, a wrong refund, a migration run against production. The correct comparison is not $2.00 against $160.40 per month — it is whether the cheaper configuration makes a costly mistake more often. We did not measure that and neither has anyone else on your workload. Ceilings on turns, wall clock and spend, plus a human gate on anything irreversible, are cheap insurance against a number no model can quote you.

What we measured and what we projected

Being explicit about this is the point of publishing numbers at all.

Measured. Nine executed Python tasks — two_sum, valid_parentheses, merge_intervals, roman_to_int, lcs_len, flatten, top_k_words, token_bucket, parse_csv_line — at temperature 0 with a 4,000-token ceiling. The model gets a signature and a prose spec and never sees the tests. Returned code is executed against hidden assertions in an isolated python3 -I subprocess with a 12-second timeout. All asserts pass or it fails: no partial credit, no human grader, no LLM judge. One scored attempt per task; retries up to three times only on an API error, never on a wrong answer. Scores, latencies and reasoning-token counts come from that run.

Computed, not invoiced. Cost is the token counts the API reported multiplied by that model's list price. It is a measured cost, not a vendor bill. Calls went through OpenRouter's OpenAI-compatible endpoint, deliberately not through the DataLLM Lab gateway, so the numbers do not depend on our infrastructure and you do not need to be our customer to reproduce them.

Projected. Every multi-turn, per-run and monthly figure on this page. Our harness is single-turn. It does not run agents, does not use tools, and does not observe how cost behaves across a loop. The projection holds per-call cost constant across turns, which is deliberately conservative on absolute cost — a real agent's input grows every turn — and preserves the between-model ratio, which is the decision-relevant part.

Out of scope for the harness entirely. Long-context reasoning, multi-file refactoring, agentic and multi-turn tool use, non-Python work, and vision. The 4,000-token ceiling can also truncate a verbose model and score it as a miss.

Not tested. Any Gemini other than 3.6 Flash. GPT-5-mini and GPT-5-nano. Ollama and any locally-run model. Grok 3, Grok 4, Grok 4.5, Grok 4.20, grok-build-0.1. Claude Haiku 4.5, Claude Opus 4.7, Claude Sonnet 4.6. VibeThinker is not on OpenRouter, so we could not run it. If a first-party number for any of those appears on this site, it is an error.

Measure your own agent before you commit to a model

One OpenAI-compatible endpoint, 300+ models, one key. Swap the model id, rerun your loop, compare the bill — the only cost model that predicts your costs is yours.

FAQ

How much does an AI agent cost per month?

It depends on three multipliers, and the honest answer is a range rather than a number. Using our measured per-call costs: 1,000 runs a month at 20 turns each is $2.00 on Qwen3 Coder Next and $160.40 on Gemini 3.6 Flash, both of which scored 9/9 on the same nine tasks. Same workload, 80x apart. Compute your own by multiplying runs by turns by your measured per-call cost — and note that our harness is single-turn, so those monthly figures are projections from measured per-call data.

Is an API cheaper than a $20 or $100 subscription for agents?

Below roughly a hundred 20-turn runs a month, the subscription wins on almost any model. Above that it depends entirely on model choice: $20 of API spend buys 113 twenty-turn runs on GPT-5.5, 125 on Gemini 3.6 Flash, 599 on Claude Sonnet 5, or 10,000 on Qwen3 Coder Next. They are also different products — a subscription is a rate-limited seat for a person at a keyboard, an API key is metered capacity for unattended software. If your agent serves customers, the subscription is not an option regardless of price.

Why is per-token list price not enough to estimate agent cost?

Three reasons. Reasoning tokens bill at the output rate and are invisible in the response — measured range on identical work across our runs was 0 to 933 per call. Input grows every turn because the transcript and tool schemas are resent. And you pay per call, not per run, so a 20-turn loop multiplies everything by 20. Gemini 3.6 Flash and GPT-5.5 illustrate the trap: very different list prices ($1.50/$7.50 against $5/$30 per 1M tokens), yet measured cost per 1,000 tasks lands close together at $8.02 and $8.83.

Did you measure any of this on a real multi-turn agent?

No. Our harness is single-turn: one prompt, one scored attempt, code executed against hidden tests. The measured numbers are per-call — 0 to 933 reasoning tokens, $0.10 to $8.83 per 1,000 tasks, 2.9 s to 19.2 s latency. Every turn count, run cost and monthly total on this page is arithmetic we performed on top of those. We would rather publish that boundary than a multi-turn number we did not run.

What is the fastest way to cut agent cost?

Two moves, both doable in a day. Cap turns in the harness rather than asking for brevity in the prompt — the bill is directly proportional to turn count. Then re-measure model choice on your own tasks: ten of the thirteen models in our sweep tied at 9/9 while costing $0.10 to $8.83 per 1,000 tasks, so correctness will not pick for you and the leaderboard will not either. Caching and context trimming come after those.

Do reasoning tokens buy better agent output?

Not on our workload. Four models emitted zero reasoning tokens and still scored 9/9 — Qwen3 Coder Next, Mistral Medium 3.5, Claude Sonnet 5 and Claude Opus 4.8 — while heavy reasoners did not score higher. That is a statement about nine short Python tasks, not about reasoning in general; on genuinely hard multi-step work the trade may go the other way. It does mean you should check the count on your own tasks before you put a high-reasoning model inside a loop that runs it twenty times.

Written by

Founder of DataLLM Lab, the unified LLM gateway. Kevin tests models the boring way — same prompts, real costs, unedited outputs — and writes up what the runs actually show. Articles are drafted with AI assistance and published under his name; every first-party number comes from an executed run.

One API for every model

One API, every model.

Get a single API key for Claude Opus 4.7, GPT-5.4, and 300+ more — with automatic price comparison and routing to the best model for every request.