Back to Blog

How Much Does a Claude AI Agent Cost to Run? A Worked Example

Claude API cost for one AI agent, worked out step by step. See cost per run, cost per month, why it grows with each step, and how to cap it.

23 min read
November 12, 2026
30 sec read

TLDR

  • Claude API cost is easy to look up and hard to predict. This post prices one assumed support ticket agent on paper instead of just listing token prices.
  • The agent makes four calls and sends about 21,000 input and 820 output tokens per ticket. On Sonnet 5.5, that's about five cents a ticket, or about $503 a month at 10,000 tickets.
  • Doubling the loop from 4 to 8 calls costs about 2.6x, not 2x, because every call resends the whole history.
  • Caching cuts the example by about 64 percent, and Haiku 5.5 cuts it by about 95 percent. A Max or Ultra subscription includes $100 or $200 a month in API credits, which Anthropic's docs confirm.
  • Unmeshed gives each agent a spend ceiling, a cost on every run, and a downgrade to a cheaper model near the cap. It doesn't replace Anthropic billing, and the post says so.

Claude API cost is easy to look up and hard to predict, because every page gives you a price per million tokens and then leaves the math to you.

So we did the math. We built one agent on paper, a support ticket agent, counted what each call sends and returns, priced it on three models, and scaled it to a month. The agent is assumed, not a customer, and every dollar figure is arithmetic on Anthropic's published prices as of November 11, 2026. Nothing here is a measurement.

If you want the list of ways to cut the bill, we wrote that one separately in our post on cutting costs. This one answers a different question, which is what your agent will cost in the first place.

One idea carries the whole post. Picture a group chat where you have to read the entire thread again before every reply. That's what an agent does on every call, and it's why the cost climbs faster than you'd guess.

A chat is one paid call, and an agent rereads the thread on every call

We build workflow software, so we'll say where Unmeshed fits near the end. Okay, let's get into it.

1. How Much Does the Claude API Cost?

The Claude API cost depends on the model. Per million tokens, Haiku 5.5 is $0.10 in and $0.50 out, Sonnet 5.5 is $2 and $10, Opus 5.5 is $4 and $20, and Fable 5.2 is $8 and $40. You pay for every token sent and every token returned. Prices are as of November 2026.

So how much does Claude API cost for an agent? Everything below comes from Anthropic's pricing docs. The newest model on that page is a step ahead of the consumer pricing page, so we use the docs.

Claude API Pricing Per Million Tokens

Claude API pricing is quoted per million tokens, with input and output priced separately. On the current models, output costs five times input. Cached input is cheaper, and batch work is half price. Anthropic lists the same rates for every request on a given model.

ModelInputOutputCache Read
Fable 5.2$8$40$0.20
Opus 5.5$4$20$0.20
Sonnet 5.5$2$10$0.10
Haiku 5.5 (prompts up to 100,000 tokens)$0.10$0.50$0.01
Haiku 5.5 (prompts over 100,000 tokens)$0.50$2.50$0.05

All figures are dollars per million tokens. If you've seen older Claude token pricing, it's out of date. Sonnet 4.6, for example, is still listed at $3 in and $15 out, so the newer Sonnet is cheaper.

Claude Opus, Sonnet, and Haiku Pricing Side by Side

Claude Opus pricing is $4 in and $20 out per million tokens. Claude Sonnet pricing is $2 and $10. Claude Haiku pricing is $0.10 and $0.50. Opus costs twice Sonnet and forty times Haiku on input, so model choice changes the bill more than most settings.

Anthropic describes Haiku 5.5 as built for classification, extraction, and routing. It describes Sonnet 5.5 as the best mix of speed and intelligence, and Opus 5.5 as built for long-running agentic coding and knowledge work. We'll use all three in the example.

What Claude API Cost Per Token Means in Plain Words

A token is a small piece of text, often a short word or part of one. Claude API cost per token is tiny, a fraction of a cent, but agents use thousands of tokens per task. Newer models also count about 30 percent more tokens for the same text.

In kid terms, tokens are like the syllables a model reads. Count the syllables, multiply by the price, and you have your bill. The 30 percent note comes from Anthropic, and it applies to Claude 4.7 and later models. So don't guess your claude api tokens. Anthropic offers a token counting endpoint that counts them for a specific model.

2. What Goes Into the Cost of a Claude AI Agent?

An AI agent cost has four parts. The tokens you send, the tokens it writes back, the tool definitions that ride along on every call, and extras such as web search or runtime hours. Agents cost more than chats because they make many calls per task.

A chat is one question and one answer. An agent thinks, calls a tool, reads the result, thinks again, and repeats until it's done. Each of those is a paid call. Let's break the bill into its pieces.

The four parts of a Claude AI agent bill

Input Tokens, Output Tokens, and Cache Reads

Input tokens are everything you send, including the system prompt, history, and tool results. Output tokens are what the model writes, and they cost five times more. Cache reads are repeated input served from cache at a small fraction of the input price.

Most of an agent's bill is input, because input piles up. Output is smaller but pricier per token. If you write long prompts, our guide to prompt optimization is a good next read.

Tool Definitions and the Tool Use System Prompt

Every call that includes tools carries the tool definitions, plus a built-in system prompt of 286 tokens on the current models. Some tools add more: 325 tokens for bash and 974 for the text editor. These tokens are sent on every call, so they add up.

Anthropic bills the tools parameter as input. So a tool you never call still costs you tokens if it's in the list. Heavier toolsets cost more. The browser use toolset adds about 6,600 input tokens, and computer use adds about 4,500.

Web Search, Code Execution, and Claude Managed Agents Pricing

Web search costs $10 per 1,000 searches on top of tokens. Web fetch has no extra charge, and code execution gets 1,550 free hours a month. Claude Managed Agents pricing adds $0.08 per session hour while the session is running, plus tokens at the usual rates.

Managed Agents only bills runtime while a session is running, not while it sits idle. Anthropic's own example is a one-hour Opus 5.5 session with 50,000 input and 15,000 output tokens, which comes to $0.58. With 40,000 of those input tokens read from cache, it drops to $0.428. Batch discounts don't apply to Managed Agents.

Our example agent uses plain API calls and no server tools, so none of these extras show up in the numbers. Add them if your agent uses them.

3. What Does One Claude AI Agent Run Cost? A Worked Example

We built a support ticket agent on paper. It makes four model calls per ticket and sends about 21,000 input tokens and 820 output tokens in total. On Sonnet 5.5, that is about five cents per ticket without caching. These are assumptions and arithmetic, not a measurement.

The Claude API cost of one run is the sum of every call, not only the last one. That sounds obvious until you see the numbers.

The Agent and Its Assumptions

The agent reads a ticket, searches a knowledge base, looks up the account, checks an order, and drafts a reply. We assume a 2,000-token system prompt, three tools at 800 tokens, and results of 300 to 1,500 tokens. Your numbers will differ, so swap in yours.

ItemTokens
System prompt2,000
Three tool definitions800
Tool use system prompt286
Fixed prefix on every call3,086
The ticket600
Knowledge base result1,500
Account lookup result400
Order status result300
Tool calls (three, written by the model)120, 100, and 150
Final reply450

Use the token counting endpoint on your own prompts and tools before you trust any of this. We picked round numbers on purpose, so the math is easy to follow.

Token Count for Each Model Call

Each call sends the fixed prefix plus everything that came before it. Call 1 sends about 3,700 input tokens. By call 4, it sends about 6,300. Added up, the four calls send about 21,000 input tokens and generate about 820 output tokens.

Here's the group chat in a table. Each call rereads the whole thread, so the input count only goes up.

CallWhat It DoesInput TokensOutput Tokens
1Reads the ticket, searches the knowledge base3,686120
2Reads the result, looks up the account5,306100
3Reads the account, checks the order5,806150
4Reads the order, writes the reply6,256450
Total21,054820

Call 2 input is call 1 input (3,686) plus the 120 tokens the model wrote plus the 1,500 token result. Call 3 and call 4 follow the same pattern.

Cost Per Run on Haiku, Sonnet, and Opus

At current rates, the same run costs about a quarter of a cent on Haiku 5.5, about five cents on Sonnet 5.5, and about ten cents on Opus 5.5 without caching. Same agent, same steps, a 40-times spread. Opus 5.5 pricing alone moves the bill.

The formula is input tokens times the input price, plus output tokens times the output price, each divided by a million. For Sonnet 5.5, that's 21,054 times $2 plus 820 times $10, divided by a million, which is about $0.050.

ModelInput CostOutput CostCost Per Ticket
Haiku 5.5$0.0021$0.0004about $0.0025
Sonnet 5.5$0.0421$0.0082about $0.050
Opus 5.5$0.0842$0.0164about $0.10

4. What Does That Agent Cost Per Month?

At 10,000 tickets a month, the same agent costs about $25 on Haiku 5.5, $503 on Sonnet 5.5, and $1,006 on Opus 5.5 without caching. With caching, those drop to about $10, $179, and $358. These are arithmetic based on our assumptions, not a forecast.

Per-ticket cost is small enough to ignore. Per month is where people sit up.

Monthly Cost at 1,000, 10,000, and 100,000 Runs

Monthly cost scales with volume in a straight line. At 1,000 tickets, the Sonnet 5.5 agent costs about $50 a month; at 10,000, about $503, and at 100,000, about $5,030, all without caching. Volume is easy to predict. Steps per ticket are the part that surprises people.

Model1,000 Runs10,000 Runs100,000 Runs
Haiku 5.5, no caching$2.52$25$252
Haiku 5.5, caching$0.99$10$99
Sonnet 5.5, no caching$50$503$5,031
Sonnet 5.5, caching$18$179$1,791
Opus 5.5, no caching$101$1,006$10,062
Opus 5.5, caching$36$358$3,583

The caching rows assume the fixed prefix is already warm and each call reads the previous call's input from cache. We explain that in the caching section below.

Costs the Happy Path Leaves Out

Your bill will include runs that fail and run again, test and evaluation runs, and longer tickets than you planned for. We can't tell you your retry rate, so we show a simple scenario. If one in five runs repeats, the monthly figure rises by one-fifth.

Here's what a few changes do to the Sonnet 5.5 agent at 10,000 tickets a month without caching.

ScenarioCost Per TicketMonthly Cost
The base agentabout $0.050about $503
One in five runs repeatsabout $0.060about $604
A knowledge base result twice as longabout $0.059about $593
One extra tool call before the replyabout $0.068about $677

These are scenarios, not findings. To find your own numbers, you need to log actual runs, which is what LLM observability is for.

5. Why Does Agent Cost Grow Faster Than the Number of Steps?

Agent cost grows faster than steps because each call resends the whole history. Step eight carries everything from steps one through seven. In our example, doubling the calls from four to eight raised the Sonnet 5.5 cost per ticket about 2.6 times, not 2 times.

Why agent cost compounds when every call resends the history

It's the single biggest reason an agent bill surprises people. For a deeper look at where tokens go, see our guide to token efficiency.

How Every Call Resends the Full History

A model does not remember earlier calls. The agent sends the system prompt, every earlier message, and every tool result again each time. It's like a group chat where you must reread the whole thread before replying. Longer threads cost more to reread.

In our table, call 4 sends 6,256 tokens even though the new content was only 300 tokens. The rest was the thread. Nobody planned for that. It's how the API works.

Four Calls Versus Eight Calls

Take the same agent and let it loop eight times instead of four. Input tokens rise from about 21,000 to about 60,000, and the Sonnet 5.5 cost per ticket rises from about $0.050 to about $0.133. Twice the steps cost about 2.6 times as much.

Four CallsEight Calls
Input tokens21,05460,148
Output tokens8201,290
Cost per ticket, no cachingabout $0.050about $0.133
Cost per ticket, cachingabout $0.018about $0.038
10,000 tickets, no cachingabout $503about $1,332

For the eight-call version, we assumed each extra step adds a 1,000-token result and 120 tokens of output, with the same 300-token last result and 450-token reply. A long loop is the quiet budget killer, so cap your loops.

6. How Do Caching and Model Choice Change the Claude API Cost?

Caching and model choice are the two biggest levers on the Claude API cost of an agent. In our example, caching cut the Sonnet 5.5 bill by about 64 percent, and moving the same work to Haiku 5.5 cut it by about 95 percent. Quality limits how far you can go.

Caching, Haiku, and batch processing change the example bill

We only look at the numbers here. For the full list of techniques, see our post on cutting costs.

Claude Prompt Caching Pricing and When It Pays Off

Claude prompt caching pricing charges 1.25 times input to write a 5-minute cache and 0.05 times input to read it on Sonnet 5.5 and Opus 5.5. A single read repays the write. Agents that resend history on every call are the best fit.

Here's the assumption behind our caching numbers. Each call reads the previous call's input from cache at 0.05 times the input price, and writes the new tokens at 1.25 times. We also assume the fixed prefix is already warm from earlier tickets. A 1-hour cache costs 2 times to write if your agent runs less often.

On Sonnet 5.5, that brings one ticket from about $0.050 to about $0.018. Your savings will vary with how warm your cache stays.

Picking Haiku, Sonnet, or Opus for Each Step

Not every step needs the strongest model. Anthropic describes Haiku 5.5 as built for classification, extraction, and routing, and Opus 5.5 for long-running agentic coding. Use a smaller model for routine steps and keep the larger one for the step where quality matters.

Be honest with yourself here. We didn't test quality across models, so this is a cost post, not a quality ranking. If you switch models, measure the results with agent evals before you trust the cheaper bill.

Batch Pricing for Work That Can Wait

Batch processing takes 50 percent off input and output for work that can run asynchronously, and it stacks with caching. It suits overnight jobs, not a live agent. Managed Agent sessions and fast mode can't use it.

Our support agent answers customers, so it can't wait. A nightly job that tags old tickets could use claude batch api pricing and pay half.

7. How Does Claude AI API Pricing Compare to a Subscription?

Claude AI API pricing is pay-per-token, billed separately from a Pro or Max subscription. Subscriptions cover chat and Claude Code inside plan limits. The API charges for every token. Max and Ultra include monthly API credits of $100 and $200, and Team includes up to $500 pooled.

If you're after the subscription side, we cover it in our guide to Claude Code cost.

Can You Use a Claude Subscription for the API?

Not directly. A subscription and the API are billed separately. Max, Ultra, and Team plans include monthly API credits you claim by linking a Console organization. Pro and Enterprise plans aren't eligible, and the credits don't cover Claude Code. Beyond the credits, API use is billed per token.

PlanMonthly API Credit
Max$100
Ultra$200
Team standard seat$20 per seat, pooled
Team premium seat$100 per seat, pooled, capped at $500
Pro and EnterpriseNot eligible

Per the API credits docs, the credits cover the Claude API, Managed Agents, and the Agent SDK. They expire at the end of each billing cycle with no rollover, and if they run out, API requests stop until the next credits arrive unless you buy more.

So a Max subscriber could run our $50 a month Sonnet agent at 1,000 tickets inside the credit. At 10,000 tickets, they'd run past it.

Why Does the Claude API Feel Expensive?

The Claude API feels expensive because agents make many calls, each one resends the history, and output tokens cost five times input. A price that looks tiny per token becomes a big monthly number at volume. Most surprises come from step count, not from the rate.

That's the 2.6 times finding again. A price per million tokens looks small. Four calls feel small too. Eight calls at 10,000 runs a month do not.

8. How Does Unmeshed Fit With Claude API Costs?

Unmeshed puts a ceiling on the agents you run as workflow steps. Each agent gets a monthly spend limit, bound tools, and a logged cost for every run. Near the cap, the workflow can throttle the agent or move it to a cheaper model. It orchestrates the Claude API and doesn't replace Anthropic billing.

A spend ceiling stops an agent at the cap, with a cost on every run

Be clear about the line. Anthropic's Console tells you what the invoice says. We help you control what an agent is allowed to spend before it gets there. If you're managing Claude API costs across many agents, a ceiling per agent beats a surprise at month-end. We're also model-agnostic and MCP native, and our free tier includes 1,000 agent calls a month. See our agent governance page for the full model.

A Spend Ceiling for Each Agent

A spend ceiling is a monthly limit set per agent. Unmeshed checks spend against the ceiling before a call goes out, so a runaway loop stops at the cap instead of the invoice. In our example, a ceiling would stop the eight-call version early.

Pair it with approval steps when an output crosses a cost or confidence threshold, and a person decides before it goes out.

A Cost on Every Run

Unmeshed logs every model call, tool call, and cost in the run history. That gives you cost per run for your own agent, which replaces the assumptions in this post with measured numbers. You read one place instead of five.

That's the foundation for the rest, since you can't cap what you can't see. The same logs show up in our agentic workflows model, where AI steps sit next to ordinary steps.

Downgrading the Model Near the Cap

Near its ceiling, an agent can be throttled or automatically moved to a cheaper model tier, so the workflow keeps running instead of failing. That is the Haiku 5.5 lever from this post, applied by rule when spend crosses a line you set.

If you route traffic through a gateway already, our guide to the LLM gateway explains how the two fit together.

Now the honest part. We're not a billing dashboard, and we didn't run this example agent. You still choose the model, the ceiling, and the loop limit.

See What Each Run Costs.

Log every model call and its cost, then set a monthly ceiling per agent so a long loop stops before it reaches the invoice.

Log My Costs

Conclusion

The Claude API cost of an agent is the sum of every call, and each call resends the history, so steps matter more than the price per token. Count your own tokens, price one run, then scale it. Caching and model choice move the total most.

The 2.6 times finding stuck with us. We expected eight calls to cost about twice as much as four, and it didn't, back to the group chat. The longer the thread, the more every reply costs, and an agent never stops rereading.

That's the part Unmeshed handles for the agents you automate, with a ceiling per agent and a cost on every run. This week, pick one agent, count the tokens for a single run, and price it. Then you'll know what you're approving.

Frequently Asked Questions

Agent costs still a guess?

Send us your agent. We'll price one run.

Share the steps and tools your agent uses, and we'll walk through the calls, the tokens, and where a ceiling or a cheaper model would cut the bill.

Recent Blogs