Most people building agents can tell you what the client pays. Almost none of them can tell you what the run costs.
Your AI agent cost per run is the total money you spend every time the workflow fires once, start to finish: model tokens, tool calls, and your share of the platform bill. It is the number that decides whether a retainer is a business or a slow leak, and it is the number almost nobody measures before they quote.
I spent 16 years doing enterprise automation before I built anything for myself. In that world you do not ship a process without a unit cost attached to it. Finance asks. Every time. Solo builders skip that step because no finance department is standing there asking, and then they wonder why the margin feels thin.
Here is the process I use to get the real number, with live pricing and worked math you can copy.
Key takeaways
- AI agent cost per run is the total spend for one complete execution of an agent workflow, covering model tokens, tool calls, and the platform slice.
- The METER Method measures it in five steps: Map, Estimate, Track, Extend, Rate.
- As of August 2026, OpenAI lists GPT-5.6 Terra at $2.00 per million input tokens and $12.00 per million output tokens, and GPT-5.6 Luna at $0.20 input and $1.20 output.
- OpenAI’s hosted web search tool is priced at $10.00 per 1,000 calls, which works out to one cent per call and can cost more than the model call it supports.
- n8n Cloud bills by workflow execution rather than by step, and at low volume that subscription costs more per run than the tokens do, which reverses what most builders assume.
- OpenAI prompt caching needs a prefix of at least 1,024 tokens on GPT-5.6 and later, bills cache writes at 1.25 times the standard input rate against reads at 0.1 times, and expires entries 30 minutes after last use, so caching only pays on agents that fire in bursts.
Why most builders never measure AI agent cost per run
Three reasons, and none of them are laziness.
The first is that the bills arrive separately and late. Your model provider invoices monthly. Your automation platform invoices monthly. Neither one tells you what a single run cost, so you see a lump sum thirty days after the fact and move on.
The second is that the numbers look too small to matter. A tenth of a cent feels like a rounding error until you multiply it by 20,000 runs and it turns into a real line item.
The third is the one that actually hurts. Agents are not static. A prompt tweak that adds 900 tokens of instructions raises the cost of every future run, silently, forever. You changed the fuel burn and nobody told you.
You cannot manage a cost you have never calculated once.
The METER Method: five steps to real AI automation cost tracking
METER is the sequence I run on every agent before it goes anywhere near a client. Five steps, in order.
M: Map every billable step in the run
Open the workflow and write down every step that costs money when it fires. Not every step. Only the billable ones.
Three categories cover almost everything: model calls, hosted tool calls (web search, code execution, file retrieval), and third party API calls that meter usage. A step that reads a spreadsheet row or formats a date is free. A step that asks a model to summarize that row is not.
Most agents surprise their builder here. If you built the workflow over several sessions, you probably have more model calls in it than you remember. This is the same discipline behind a good AI agent QA process: you cannot check what you have not inventoried.
E: Estimate the tokens before you build
A token is roughly three quarters of an English word, so 1,000 tokens is about 750 words. For each model call, estimate two numbers: input tokens (your system prompt, the incoming data, and any conversation history you pass in) and output tokens (what you ask the model to write back).
Output is where people get hurt. Providers charge a large multiple for output compared to input. On OpenAI’s published rates for GPT-5.6 Terra, output runs six times the input price. An agent that writes a 900 word reply costs far more than one that returns a three word routing decision.
Watch history separately. If you are carrying AI agent memory into each run, that memory is input tokens you pay for on every single call, and it grows.
T: Track the real spend for seven days
Estimates are a starting point, not an answer. Let the agent run for a week, then pull the actual usage.
OpenAI exposes a usage dashboard in the platform account, and you can set a monthly budget in billing settings that stops serving requests once you cross it. That budget cap is your seatbelt, and you should set it on day one rather than after a runaway loop teaches you why.
On the platform side, n8n’s Insights dashboard reports production execution counts, so you can divide spend by runs instead of guessing.
Compare the seven day actuals against your Step E estimate. If they are off by more than a third, something in the workflow is running more often than you think, usually a retry.
E: Extend the number to real volume
Take your measured cost per run and multiply it by the volume the client actually has, not the volume they described in the discovery call. Then multiply again by three and look at that number too.
Clients grow, seasons spike, and an agent priced only for today’s volume becomes a problem at triple. Better to find the breaking point on a spreadsheet than on an invoice.
R: Rate the margin against what you charge
Divide your total monthly delivery cost by whatever you charge for that agent. That percentage is your cost ratio.
My personal working threshold is 20 percent. Above that, I go back and cut cost before I go back and raise price. That is my own rule of thumb from running these builds, not an industry benchmark, so treat it as a starting line and set your own. If you have not built the pricing side yet, start with the framework for pricing AI automation services and come back to this step with a real number in hand.
Worked example: the lead reply agent
Example scenario, using published August 2026 pricing. An agent watches a form, reads the lead record, and drafts a reply. One model call per run on GPT-5.6 Terra, running on n8n Cloud Pro at 50 euro per month billed annually for 10,000 executions.
Estimate 3,000 input tokens and 400 output tokens per run.
- Input: 3,000 divided by 1,000,000, times $2.00, equals $0.006
- Output: 400 divided by 1,000,000, times $12.00, equals $0.0048
- Model cost per run: about $0.0108, or a little over one cent
- Platform sticker math: 50 euro divided by 10,000 executions, equals 0.005 euro per run
So the run costs about one and a half cents. Except it does not, and this is the part worth slowing down for.
You do not run 10,000 executions. You run 800. You still pay the full 50 euro, because the plan is a floor, not a meter. Your real platform cost per run is 50 divided by 800, which is 0.0625 euro. That is roughly twelve times the sticker math, and it is larger than the entire model cost.
At low volume, unused platform capacity is your biggest cost driver, not tokens.
That single fact changes what you do next. Chasing a cheaper model saves you a penny. Putting a second and third client’s agents onto the same n8n instance spreads that 50 euro floor across three revenue lines and cuts the per run platform cost by two thirds. Same subscription, three times the utilization. If you are building toward an AI agent retainer model, this is the lever that makes the second client dramatically more profitable than the first.
Three places the cost hides
Hosted tool calls. OpenAI lists web search at $10.00 per 1,000 calls, which is one cent per call. Add one web search to the agent above and you have nearly doubled the run cost with a single node. Tool calls deserve their own line in your map.
Retries and error loops. A workflow that retries three times on a flaky API call bills three times. Your estimate assumed one. Check your execution logs for the gap between runs you intended and runs that actually happened.
Prompt drift. Every time you paste another rule into the system prompt, you raise the input token count on every run from that point forward. Date your prompt versions and note the token count. Ten small additions across a month are a real cost increase nobody approved.
Three ways to cut the number this week
Once you have a measured cost, these are the levers, ordered by effort.
- Cache the stable part of your prompt, but only if the agent runs in bursts. OpenAI’s prompt caching is on by default and needs a prefix of at least 1,024 tokens on GPT-5.6 and later. Reads cost 0.1 times the standard input rate, which is why GPT-5.6 Terra cached input lists at $0.20 per million against $2.00 standard. The part people miss is the write. The first request that stores a prefix is billed at 1.25 times the standard rate, and the entry stays eligible for only 30 minutes after its last use. In the example above, a warm run with a 2,500 token cached prefix drops the model cost from $0.0108 to about $0.0063, roughly 42 percent off the token slice. A cold run costs about $0.01205 instead, which is around 12 percent more than not caching at all. An agent firing once an hour never gets a hit and pays that write premium every single time. An agent handling twenty leads in a ten minute burst writes once and reads nineteen times.
- Right size the model per step. Not every call needs the expensive model. A routing decision or a yes/no classification can run on GPT-5.6 Luna at $0.20 input and $1.20 output, one tenth the Terra rate. Same 3,000 in and 400 out costs about $0.00108 instead of $0.0108. Keep the strong model for the step that writes the thing a human will read.
- Batch anything that is not time sensitive. OpenAI’s Batch API is listed at 50 percent off input and output for asynchronous work processed over 24 hours. Nightly reports, backlog enrichment, and weekly digests do not need a real time response. Half price for waiting is a good trade.
Your action steps
- Pick one agent you already have running. Just one.
- Open it and list every billable step. Model calls, tool calls, metered APIs.
- Estimate input and output tokens for each model call.
- Set a monthly budget cap in your provider’s billing settings today, before you do anything else.
- Let it run seven days, then pull actual spend and actual execution count and divide.
- Divide the monthly total by what you charge. Write the percentage down where you will see it.
That is one afternoon of work and it permanently changes how you scope every future build. If you have not built an agent yet, start by learning how to build an AI agent with n8n, then run METER on it before you show it to anyone.
Frequently asked questions
What is a good AI agent cost per run?
There is no universal target, because the right number depends entirely on what one run is worth to the client. A run that drafts a reply to a sales lead can justify far more cost than a run that tags an email. Measure the value of one successful run first, then judge the cost against it.
How do I calculate token cost by hand?
Divide your token count by 1,000,000, then multiply by the published per million rate. Do input and output separately, because they are priced differently, then add them. For 3,000 input tokens at $2.00 per million: 3,000 divided by 1,000,000 equals 0.003, times $2.00 equals $0.006.
Does prompt caching always save money?
No. Caching only pays when the same prefix is reused before the cache entry expires. On GPT-5.6 and later, OpenAI bills a cache write at 1.25 times the standard input rate and keeps an entry eligible for 30 minutes after its last use, so an agent firing less often than that pays the write premium on every run and never collects a read discount. Check how closely spaced your runs are before you build around caching.
Does n8n charge per step or per run?
Per run. n8n states that an execution is a single run of your entire workflow regardless of how many steps it contains or how much data it processes. That makes the platform side of your AI automation cost tracking simple to model, since a 40 step workflow and a 4 step workflow bill identically.
Should I self host to cut cost?
Sometimes, but run the math before you assume it. Self hosting moves the platform fee to a server bill plus your own time for updates, backups, and uptime. If you are running a handful of agents, your hours are usually worth more than the subscription you are trying to avoid. Revisit the question when execution volume, not principle, is what is driving the bill.
How often should I re-measure AI agent cost per run?
Monthly, and any time you change a prompt or add a step. Provider pricing also moves, so a number you calculated six months ago is a historical record, not a current cost.
Recap
To recap: your AI agent cost per run is model tokens plus tool calls plus your slice of the platform bill, measured for one complete execution. Run METER on it. Map the billable steps, estimate the tokens, track seven days of real spend, extend to actual volume, and rate the result against what you charge.
The counterintuitive part is worth repeating. At the volumes most solo operators run, the platform subscription costs more per execution than the model does, which means utilization is a bigger lever than model choice. Fill the capacity you already bought before you go shopping for a cheaper model.
Mission control does not fly the ship on vibes. It flies on fuel numbers. Get yours.
If this is the kind of build detail you want more of, follow along at @AllenDavis-AI and subscribe to the blog for the next one.
References
n8n. (2026). n8n plans and pricing. Retrieved August 26, 2026, from https://n8n.io/pricing/
OpenAI. (2026a). API pricing. Retrieved August 26, 2026, from https://openai.com/api/pricing/
OpenAI. (2026b). Prompt caching. Retrieved August 26, 2026, from https://developers.openai.com/api/docs/guides/prompt-caching
Responses to “AI Agent Cost Per Run: Measure It Before You Sell”
[…] Observe the numbers. Capture the before and after on three axes: time spent, error rate, and running cost. Cost matters more than beginners think, because a system that saves an hour and burns more than the hour is worth is not a win. I walked through how to measure this properly in cost per run. […]
[…] of service attack on your own budget. Every retry is another billable model call, which is why your AI agent cost per run has to be measured with retries included, not on the happy […]
[…] run duration, and any per action fees. This is the same number you need for pricing, which is why cost per run belongs in the log rather than in a separate […]