Vuncloud Blog
← Back to the journal

How much does an AI agent cost per month? API tokens, tool calls, and the cloud server

Three lines, added apart · four turns stretch the input · a worksheet you can editAbout 12 min read

A code editor open on a two-screen desk, for splitting an AI agent’s API tokens, tool calls, and cloud server into one monthly bill

“How much is this agent per month” usually collapses into one number. The invoice is three lines: model tokens, tool calls, and the machine that keeps the process awake. On a cheap model, tools often cost more than the model. On a flagship model, tokens dwarf the machine. Fold the three lines into one “agent monthly fee” and you cut the wrong line at both ends.

Today is 12 October 2026. Model unit prices follow this site’s check of maker standard endpoints on 10 October, and the Claude Opus 5.5 check on 25 September. Search and the hosted sandbox follow the Agents API pricing page opened on 29 September. Check the maker’s pricing page again before you go live. This is a worksheet, not a quote.

$6.60
Luna, four-turn model line
$22
Luna + search + 5-minute sandbox
$249
Sol + the same tools + 16GB Mac

One expression for the month

Pin the expression first. Every table below fills these three cells. A cell that did not happen is 0. Do not invent a number so the sheet looks complete.

Monthly operating cost
month = model + tools + machine

model = million input tokens × input price
      + million output tokens × output price

tools = search calls × price per call
      + sandbox minutes × price per minute for that memory tier

machine = 0                 (you are at the computer)
        or Cloud Mac rent   (the command must run on macOS)

Model tokens

Input and output prices differ, and an agent’s input is usually an order of magnitude above its output. Counting only output underprices a flagship model. Counting only “how many characters the user typed” underprices the loop. Cache reads are cheaper. A cache write is a separate charge the first time a prefix enters the cache. Until that prefix is warm, do not treat the cache price as a bill that has already happened.

Tool calls

Tools land on two kinds of bill. One is per call or per minute, on the vendor’s tool line: web search, and an openai_hosted container. The other has no price of its own: a custom function puts the result back into the conversation, the next input grows, and the money is on the model line. Both are “tool calls.” Do not add them twice.

The cloud server

If the process that calls the API lives only until you close the lid, the machine line is $0. An overnight process needs a machine that does not sleep. That machine can be small. It only sends requests. The machine line becomes Cloud Mac rent when the command has to run xcodebuild, a simulator, or signing, which a Linux sandbox cannot do. On the day this was written, the homepage price pills said: M4 · 16GB / 256GB from $101.7 per month, M4 · 24GB / 512GB from $200.3 per month. Checkout follows the plan page. A starting price is not a contract price.

Why four turns stretch the input

The single-call sheet on this site from 10 October uses 20,000 input and 4,000 output tokens, 880 times. That is the price of one user message going in and out once. An agent is not one pass. The four turns below are this article’s base: plan, search, leave the tool result in context, finish. Per session that is 60,000 input tokens and 3,000 output tokens.

TurnInput tokensOutput tokensWhat this turn adds
18,000500Plan
212,0004001 web search
318,000600The tool result is already in context
422,0001,500Finish
Total60,0003,000Input is 3× a single 20k call

Twenty-two working days, 40 sessions a day, is still 880 sessions, the same count as the earlier notes, so the sheets can be compared. Input totals 52.8M (880 × 60,000). Output totals 2.64M (880 × 3,000). Output is actually below the single-call sheet’s 3.52M. What costs more is input that gets sent back.

A hanging board with a flowchart beside a code badge, for an agent sending each tool result back into the next turn’s context
Each turn’s input already contains the earlier tool results. That cost is in the longer context. Do not add it again as a per-function fee.
The single-call sheet still matches, but the multiple moves

GPT-6 Luna is $3.52 on the single-call sheet and $6.60 on the four-turn sheet, about 1.9×. Gemini 3.8 Flash’s input and output prices are both 7.5× Luna, so both sheets are 7.5×. DeepSeek off-peak was about 1.35× on the single-call sheet. On this input-heavier four-turn sheet it is about 1.44× ($9.50 / $6.60). The multiple follows the input/output mix. Do not copy the previous article’s multiple onto this one.

Same volume, how far the model lines sit

The table is the model only, short context, no cache, in dollars. Prices are the maker’s standard endpoint: Luna, Sol, Astra, Gemini 3.8 Flash, and DeepSeek V4.1 Flash as checked on 10 October; Opus 5.5 as checked on 25 September at $4 / $20. Buying OpenRouter credits adds 5.5%. That fee is not in the table.

ModelInput / output, per million52.8M in + 2.64M outVersus Luna
GPT-6 Luna$0.10 / $0.50$6.601×
DeepSeek V4.1 Flash · off-peak$0.15 / $0.60$9.501.44×
DeepSeek V4.1 Flash · peak$0.30 / $1.20$19.012.9×
Gemini 3.8 Flash$0.75 / $3.75$49.507.5×
GPT-6 Sol$2 / $10$132.0020×
Claude Opus 5.5$4 / $20$264.0040×
GPT-6 Astra$10 / $50$660.00100×

Luna’s $6.60 is 52.8 × $0.10 plus 2.64 × $0.50. Sol’s input and output prices are both 20× Luna, so the whole line is 20×, not “expensive only on output.” Astra is 100×. DeepSeek off-peak output is $1.584; rounded and added to $7.92 of input it is written as $9.50. Peak is $15.84 + $3.168, written as $19.01. Gemini’s $0.75 / $3.75 already includes the discount that was on the endpoint. It is not another half off.

Above about 272K input tokens, a GPT-6 standard request moves entirely onto long-context prices. The surcharge is not limited to the overflow. Each turn here stays at or below 22,000 input tokens, so the sheet uses short context. Stuff the whole repo into every turn and this table no longer holds.

Tool calls on their own line

The search and sandbox prices below come from OpenAI’s pricing page. Add them only to an invoice that actually called those tools. Code execution on Claude or DeepSeek is a different invoice. Do not paste OpenAI’s container price onto it.

Web search is about $10 per thousand calls. One search on each of 880 sessions is $8.80. Retrieved text is then billed as input tokens. That $8.80 does not include the text. If only one session in ten searches, the line becomes $0.88. If you did not search, write 0.

Sandbox, per minute

An openai_hosted container is priced by memory tier. The tiers visible when this was written were 1 / 4 / 16 / 64 GB at about $0.03 / $0.12 / $0.48 / $1.92 per 20 minutes, per container. Billing can be per minute, with a 5-minute minimum. All 880 sessions at 5 minutes and 1 GB is 880 × $0.0075 = $6.60. At 4 GB that is 4×, $26.40. A full 20 minutes every time is $26.40 at 1 GB and $105.60 at 4 GB. The public example does not pick a memory tier. Before the invoice arrives, keep both a 1 GB column and a 4 GB column.

Tool lineAll 880 sessionsOnly 10% of sessions
Web search (excluding retrieved text)$8.80$0.88
Sandbox, 5 minutes · 1 GB$6.60$0.66
Sandbox, 5 minutes · 4 GB$26.40$2.64
Sandbox, 20 minutes · 1 GB$26.40$2.64
Sandbox, 20 minutes · 4 GB$105.60$10.56

Function calls hide in the next input

A custom function usually has no “$0.0x per call” line. The text it returns enters the input of every later turn. The 60,000 input tokens in this sheet already include that growth: turn 3 is 18,000 and turn 4 is 22,000, longer than turn 1, because the result is still in context. Adding another fee per function call counts it twice.

Do not bill two machines for one command

If the command runs in the vendor sandbox, bill sandbox minutes and keep the machine line at $0, or only at the small process that sends the request. If the command runs on your own Mac, bill the Cloud Mac and write the sandbox line as 0. Keep both lines only when the two machines do different work: scripts in the sandbox, signing on the Mac.

When the cloud server shows up

  • You are at the computer. The machine is $0. Close the lid and it stops. It cannot take an overnight job.
  • You need a webhook 7×24, and every tool is in the vendor sandbox or is a plain API. The process that sends requests is light. If you already have a machine that stays on, do not rent a Mac just to send HTTP. This article does not write a contract price for a third-party Linux VPS.
  • The tool must be macOS. Add a Cloud Mac. The 16GB tier starts near $101.7 / month on the homepage. It does not replace tokens. It replaces the step that cannot run without a Mac.

Once sub-agents are on, tokens add up per agent context, not per user message. A failed retry still bills tokens and any tool that already ran. Neither item is in the table above. They make the count of 880 larger. They do not raise the unit price.

Three monthly bills, side by side

All three use the 880 four-turn sessions above. The tool line is added only when OpenAI search and a 1 GB, 5-minute sandbox were actually called. The Mac is the 16GB starting price.

A · LunaB · SolC · Astra
Model$6.60$132.00$660.00
Search + 5-minute 1 GB sandbox$15.40$15.40$15.40
16GB Cloud Macnot added$101.7not added
Total$22.00$249.10$675.40
  • A, the cheap model. Tools at $15.40 are 2.3× the $6.60 model line. To cut this bill, search less and stop letting the sandbox idle out to the 5-minute floor, before you change models. If this stack also needs a Mac, the total is $22.00 + $101.7 = $123.70, and the machine becomes the largest line.
  • B, a daily coding loop plus one Mac. $249.10. Remove the Mac and $147.40 remains. While the Mac stays awake, Sol output is still $10 per million. Do not let the rent “include” the API.
  • C, the flagship model, the same tools, no Mac. $675.40. The model is most of this bill. Adding the same tools and the Mac is $660 + $15.40 + $101.7 = $777.10, and the model is still about 85%. To cut this bill, drop the default model to Sol or Luna.

One more common wiring: the model is DeepSeek off-peak at $9.50, and the tools run on the Cloud Mac, so there is no OpenAI sandbox and no $8.80 of search. The total is $9.50 + $101.7 = $111.20. That is not “DeepSeek plus an OpenAI sandbox.” Change where the command runs, and the tool line and the machine line change together.

A warm cache cuts Sol’s model line by about half

If 70% of the 52.8M input is a Sol cache read ($0.20 per million), the uncached 15.84M × $2 = $31.68, the cached 36.96M × $0.20 = $7.39, and output is still $26.40. The model line is about $65.47, not $132. The first write of the prefix is extra and is not in that number. When the system prompt and the repo map repeat, look at cache hits before you step up a tier.

Swap in your own three numbers

Change only three numbers: session count, input tokens per session, output tokens per session. Model line = (million input × input price) + (million output × output price). If 880 sessions become 88, the model line and the tool lines that happen every session divide by about 10. Cloud Mac rent does not.

  • Drop search: subtract $8.80 from A or B.
  • Move the sandbox from 1 GB to 4 GB, still 5 minutes: replace the $6.60 inside the tool line with $26.40.
  • Only one session in ten uses tools: use the right column of the tool table, not the left.
  • Buy credits through OpenRouter: multiply the model line by 1.055. Whether tools are extra depends on that route’s invoice.

FAQ

Which formula is the monthly operating cost?

Model tokens, plus tool calls that actually happened, plus the machine that stays awake. Add the three lines separately. If you call the API from the computer in front of you, the machine line is $0.

Why not multiply one user message by the unit price?

The next turn sends the previous output and the tool result back in. These four turns are 60,000 input tokens and 3,000 output tokens per session, not the single-call 20,000 in and 4,000 out.

How are tool calls priced?

Web search is about $10 per thousand calls, plus input tokens for the retrieved text. An openai_hosted container is billed by memory tier and time. A custom function usually has no per-call fee; the cost is in the next turn’s input tokens. If you did not call it, do not write the line.

Can a hosted sandbox and a Cloud Mac be added together?

Not for the same command. If the command runs in the vendor sandbox, bill the sandbox minutes and not the Mac. If the command must run on macOS, bill the Cloud Mac and not a sandbox for that command. Keep both lines only when the two machines do different work.

How far does cache cut the bill?

On Sol, if 70% of input is a cache read, the model line falls from $132 to about $65.47. That figure does not include the first cache write. Read it after the prefix is warm.

Split the three lines before you decide what to cut

On a cheap model, cut search count and sandbox time first. On an expensive model, drop the tier first, and leave Astra for cases a fixed eval has already compared. Add the Mac only for the step that cannot run once it leaves macOS. Do not fold the three lines into one “agent monthly fee.”

Put the overnight loop on a machine that stays awake

The laptop is for getting one session through. The overnight agent loop, and xcodebuild, go on a Cloud Mac that does not sleep. The laptop only looks at the diff and the three lines above.

View Cloud Mac plans

Journal · Monthly cost

Put the overnight loop on a machine that stays awake

Tokens · tool calls · Cloud Mac

View Cloud Mac plans
Limited offer View plans