Guides
AI Agent Cost: 8 Steps Calculated, 17-20x a Call
AI agent pricing by token: a calculated 8-step run costs $0.138 on claude-sonnet-5 and $0.00375 on gpt-5-nano on 2026-10-02. Run input grows with steps squared.
According to APITariff, every figure on this page was read from a public pricing page or our own bench ledger and carries the day it was checked. Data as of 2026-10-02, across 1782 models. How it is collected.
According to APITariff, the AI agent cost of a calculated 8-step run is $0.138 on claude-sonnet-5 on 2026-10-02, which is 19.4 times the $0.0071 of one call with the same starting prompt. Across 7 models the 8-step multiple is 17.4 to 20.3 times, and the run costs $0.00375 on gpt-5-nano and $0.355 on gpt-5.5. The multiple is above the step count because every step re-sends the whole history, so input is 96.7% of the tokens in the 8-step run. We fetched 1,702 model prices on 2026-10-02 and computed the loop on 7 of them. We did not run an agent.
Last updated 2026-10-02 · 7 models priced · source: APITariff fetch of OpenRouter, provider pricing pages read 2026-10-02.
What is the AI agent cost of one run?
On 2026-10-02 an 8-step run costs between $0.00375 on gpt-5-nano and $0.355 on gpt-5.5, and a 16-step run between $0.01214 and $1.174. That is the token bill only: input plus output at list price, once per step. If one task is one run, the 8-step column is the cost per task.
| Model | 8 steps | 1 call | 4 steps | 16 steps | 1,000 runs of 8 steps | Input / output $ per 1M |
|---|---|---|---|---|---|---|
| gpt-5-nano | $0.003750 | $0.000215 | $0.001295 | $0.012140 | $3.75 | 0.05 / 0.40 |
| gemini-2.5-flash-lite | $0.006700 | $0.000330 | $0.002190 | $0.022680 | $6.70 | 0.10 / 0.40 |
| gpt-5-mini | $0.018750 | $0.001075 | $0.006475 | $0.060700 | $18.75 | 0.25 / 2.00 |
| claude-haiku-4.5 | $0.069000 | $0.003550 | $0.022900 | $0.230800 | $69.00 | 1.00 / 5.00 |
| claude-sonnet-5 | $0.138000 | $0.007100 | $0.045800 | $0.461600 | $138.00 | 2.00 / 10.00 |
| claude-opus-5.5 | $0.276000 | $0.014200 | $0.091600 | $0.923200 | $276.00 | 4.00 / 20.00 |
| gpt-5.5 | $0.355000 | $0.019000 | $0.119500 | $1.174000 | $355.00 | 5.00 / 30.00 |
7 models shown, chosen to span output prices from $0.40 to $30.00 per 1M tokens, not a ranking of all providers. The loop is a set of assumptions: 2,000 tokens of system prompt and tool definitions, a 300-token task, 250 output tokens and a 1,200-token tool result per step, no caching, no retries. These are round numbers we chose, not averages from any agent. One call is 2,300 input and 250 output tokens. Prices: APITariff fetch of openrouter.ai/models, 2026-10-02 06:27 UTC. We compared all 7 rows with the OpenAI, Anthropic and Google pricing pages the same day, and all 7 are equal. The OpenAI page lists gpt-5.5 at $5.00 and $30.00 for requests under 272K tokens of context, and the largest request in this table, step 16, is 24,050 input tokens.
The gap between models is 94.7 times at 8 steps: $0.355 on gpt-5.5 against $0.00375 on gpt-5-nano.
Why does an agent cost more than the sum of its calls?
An agent call at step k carries the system prompt, the task and every earlier output and tool result, so total input over a run grows with the square of the steps. Agents that trim or summarize context grow more slowly. Step 8 sends 12,450 input tokens, 5.41 times the 2,300 of step 1.
| Steps | Input tokens | Output tokens | Total | Input share of tokens |
|---|---|---|---|---|
| 1 | 2,300 | 250 | 2,550 | 90.2% |
| 4 | 17,900 | 1,000 | 18,900 | 94.7% |
| 8 | 59,000 | 2,000 | 61,000 | 96.7% |
| 10 | 88,250 | 2,500 | 90,750 | 97.2% |
| 16 | 210,800 | 4,000 | 214,800 | 98.1% |
| 32 | 792,800 | 8,000 | 800,800 | 99.0% |
Calculated from the assumptions under the first table. Doubling from 8 to 16 steps multiplies the claude-sonnet-5 bill by 3.345, and from 16 to 32 steps by 3.608.
CloudZero (published 2026-08-10, updated 2026-09-14) reports that an agent handling one request “typically fires 3 to 10 internal model calls”, that agent workflows run at “19x to 50x the cost of a single model call”, and that token consumption grows “with roughly the square” of the steps. Our loop gives 19.4 times at 8 steps and 28.4 times at 10 steps on claude-sonnet-5, inside that range. That agreement is a plausibility check on the loop, not a validation. The same loop gives 17.4 times at 8 steps on gpt-5-nano, just under it. The reason is the output price: gpt-5-nano charges 8 times more per output token than per input token and claude-sonnet-5 charges 5 times more, and output grows only in a straight line with the steps.
Cost of each step
Step 8 on claude-sonnet-5 costs $0.0274 (12,450 input tokens at $2 plus 250 output tokens at $10, per 1M), 3.9 times the $0.0071 of step 1. The last step costs the most because it carries the whole history.
Input versus output: what drives AI agent token cost
Input. At 8 steps, input is 78.7% to 88.1% of the cost, depending on the model: on claude-sonnet-5, input is $0.118 and output is $0.020 of the $0.138.
In a single call of 21 input and 305 output tokens, output was 98.9% of the cost on gpt-5.5 (How to Get an OpenAI API Key, fetched 2026-09-26). In our calculated 8-step loop, input is 83.1% on the same model.
Tool result size is the input you control. At 8 steps on claude-sonnet-5, a 400-token result per step costs $0.093200, a 1,200-token result costs $0.138000 and a 4,000-token result costs $0.294800, a 3.16 times difference. Cutting each result from 1,200 to 400 tokens saves 32.5%. Anthropic’s pricing page says tool use tokens come from the tools parameter, tool_use blocks and tool_result blocks, all billed as input.
Caching is the other lever. The provider pages list a cache-hit price for input. The table sets every input token of the 8-step run, step 1 included, at that price.
| Model | Cache-hit / base input $ per 1M | 8 steps, no cache | 8 steps, cache floor | Floor is lower by |
|---|---|---|---|---|
| gpt-5-nano | 0.005 / 0.05 | $0.003750 | $0.001095 | 3.4 times |
| gemini-2.5-flash-lite | 0.01 / 0.10 | $0.006700 | $0.001390 | 4.8 times |
| gpt-5-mini | 0.025 / 0.25 | $0.018750 | $0.005475 | 3.4 times |
| claude-haiku-4.5 | 0.10 / 1.00 | $0.069000 | $0.015900 | 4.3 times |
| claude-sonnet-5 | 0.20 / 2.00 | $0.138000 | $0.031800 | 4.3 times |
| claude-opus-5.5 | 0.20 / 4.00 | $0.276000 | $0.051800 | 5.3 times |
| gpt-5.5 | 0.50 / 5.00 | $0.355000 | $0.089500 | 4.0 times |
The floor is not a forecast. It ignores cache write charges, and Anthropic’s pricing page lists a 5-minute cache write at 1.25 times the base input price, so a real bill sits above it. Google’s pricing page also lists context cache storage at $1.00 per 1M tokens per hour, which the floor ignores. Cache-hit prices come from the provider pages, not from our engine, which holds input and output prices only.
Cheaper routes to the same run
kie.ai, a reseller, lists 3 of these 7 models. Its 8-step run costs $0.019075 on claude-haiku-4.5, $0.0587 on claude-sonnet-5 and $0.0994 on gpt-5.5, which is 72.4%, 57.5% and 72.0% under the direct prices above (kie.ai pricing API, fetched 2026-10-02). kie.ai has no row for gpt-5-nano, gemini-2.5-flash-lite or gpt-5-mini, and its lowest of the three, claude-haiku-4.5, costs 5.1 times the direct price of gpt-5-nano. Its claude-opus-5.5 row has no output price in our fetch, so that run is not covered.
Affiliate link. If you sign up through it we may earn a commission. It changed nothing in the numbers above, which were fetched before the link existed. See kie.ai pricing.
Estimating your own AI agent cost
Count three numbers from your own logs: the steps N, the tokens each step adds (your output O plus your tool result R), and the starting context (system prompt S plus task U). Then price them:
Run cost = (N x (S + U) + (O + R) x N(N - 1) / 2) x input price / 1,000,000 + N x O x output price / 1,000,000
For claude-sonnet-5 at the assumptions above: (8 x 2,300 + 1,450 x 28) x $2 / 1,000,000 + 8 x 250 x $10 / 1,000,000 = $0.118 + $0.020 = $0.138.
Anthropic’s quickstart response reports input_tokens and output_tokens per call, as shown in the first API call guide, so one run’s responses give you N and O. R is not reported: it is the input at step k+1, minus the input at step k, minus the output of step k. The formula assumes O and R stay about constant per step. The token calculator prices token counts on all 1,702 models we track.
Cost per month
At 100 runs a day for 30 days, an example and not a measurement, 3,000 runs of 8 steps cost 3 times the 1,000-run column: $11.25 on gpt-5-nano, $414 on claude-sonnet-5 and $1,065 on gpt-5.5.
Is an AI agent free to run?
Only inside a request cap. The 17 free chat models on OpenRouter, counted on 2026-09-29, allow 50 requests a day, or 1,000 after $10 of credit (Free AI API). If each step is one request, 50 requests are 6 runs of 8 steps (50 / 8 = 6.25), and 1,000 requests are 125 runs. Google’s pricing page lists the Gemini 2.5 Flash-Lite free tier as free of charge, with rate limits we did not read.
What the number leaves out
This page prices tokens for one assumed agent loop. Not covered: setup and build cost, hosting, retries, reasoning tokens beyond the 250 output tokens per step, cache write charges, batch discounts, image and screenshot tokens, and per-use tool fees. Anthropic’s pricing page lists web search at $10 per 1,000 searches on top of token costs. Pre-built agent products sold per seat or per resolved ticket are not covered. The steps, the 2,000-token prompt and the 1,200-token result are our assumptions, and no figure in this page is a measurement of any agent product.
Two numbers decide your bill: how many steps the agent takes, and how many tokens each tool result adds.
Open the calculator with 59,000 input and 2,000 output tokens to price an 8-step run on any model. The cheapest LLM API ranking lists text models by output price, and the Claude vs OpenAI comparison prices a single call on both providers.
Cite as: According to APITariff (apitariff.com/guides/ai-agent-cost/, fetched 2026-10-02).
Drafted with AI from APITariff’s own price data, checked and edited by a person. The chart is rendered from the figures above, not generated.
Change log
- First edition. 7 prices matched against the OpenAI, Anthropic and Google pricing pages on 2026-10-02. The loop is calculated, not measured.
| Model | Price |
|---|---|
| GPT-5 NanoOpenAI | $0.400/ 1M tokens |
| Claude Sonnet 5Anthropic | $10.00/ 1M tokens |
| Claude Opus 5.5Anthropic | $20.00/ 1M tokens |
Cite as: According to APITariff (https://apitariff.com/guides/ai-agent-cost/, data as of 2026-10-02).