AI agent API spending controls: approval thresholds and daily caps

Follow a Claude Code-compatible walkthrough of tool prices, a settled search charge, human approvals, daily caps and optional auto top-up.

By Scrollport

A robotic hand meters small units of spending through a bounded control device.

In brief

How do I control what an AI agent spends on API calls?

Inspect tool prices before execution, use a human-set per-run approval threshold, and set a daily cap across agents. These controls govern external tool charges, not Claude or other model token bills. With optional auto top-up off, spending is also limited to prepaid funds. The walkthrough pairs a real $0.0098 search receipt with an illustrative larger-request approval.

An AI agent can inspect API pricing before it runs a tool only when the execution layer exposes a machine-readable billing unit, current price and bounded run estimate. Routine runs can then proceed below the approval threshold while exceptional costs pause for approval. Prepaid funds, daily caps and attributable agent connections bound the remaining risk.

Worked example: paid tools with a spending limit in Claude Code

Connect Claude Code through the setup guide, or use the remote MCP instructions if that is your chosen transport. The same Scrollport wallet controls apply. Claude’s own permissions and model bill remain separate.

The search receipt below is real: it comes from our Linear research example, executed through MCP in Codex on 21 October 2026. The $1 threshold, $5 daily cap and $2 larger request below are illustrative settings and amounts, not a second live test or a recorded Claude Code session.

  1. The human sets the controls. In Wallet, choose a $1 approval threshold, a $5 daily cap and leave auto top-up off. Those are example choices, not assumed account defaults. Have the agent read get_wallet and check the actual available funds and remaining allowance.
  2. Inspect before starting. Discover a web-search tool, then call inspect_tool. Our Exa request used numResults: 5 and text: false; the inspected price was $0.0098 per call.
  3. Run the small job and read its receipt. The recorded search succeeded, returned five links and settled at $0.0098, matching its estimate. Re-read a pending run with get_run rather than starting it again. A price estimate is not itself a charge.
  4. Pause a larger request. Suppose a later, separately authorised tool request is estimated at $2. With a $1 threshold and sufficient balance and daily allowance, Scrollport returns confirmation_required, an awaiting_approval run and a human approval link. The agent hands over the link and waits. No money is held or charged while it waits.
  5. Resume the same run only after the human decides. Approval checks the current balance and daily allowance again before queueing it. Read that same run to obtain its final charge; do not submit a replacement. Declining leaves the wallet unchanged, and a failed run releases its reservation without a charge. We did not execute this illustrative $2 request.

What the successful call actually charged

Recorded Exa Search receipt, 21 October 2026
status:         succeeded
cost_estimated:  0.009800 USD
cost_final:      0.009800 USD
result:         5 source links

This is the same search counted in the company brief’s $0.0148 total, not an additional charge. Free discovery, inspection and status reads add nothing to it. The $5 daily cap would count successful tool charges and outstanding reservations across agents; the $1 threshold applies to each run. Neither limits Claude token usage. A task budget written in a prompt is an instruction to the agent, not a separate wallet-enforced workflow cap.

A prompt to use after connecting

Read my Scrollport wallet controls, then inspect a suitable web-search tool.
Show the price and expected total before making one small search for [company].
Keep this task's Scrollport charges below $0.05 and ask before expanding it.
If Scrollport returns an approval link, give it to me and wait. Do not change
controls or split work to avoid approval. Keep each run ID, read pending runs
with get_run, and show the useful result and final charge when complete.

Wallet documentation owns the current controls and the approval guide explains the human decision flow.

API tool spend is different from agent purchasing

This guide covers the operating spend created when an agent calls an API tool: searches, verifications, generated assets and other metered work. It does not cover an agent using a payment card or payment protocol to buy goods and services from outside merchants.

Those purchase systems need merchant, transaction and payment-method controls. API tool execution instead needs a visible billing unit, a bounded estimate, prepaid funds and an approval decision before the external work begins. Treating both as generic “agent payments” hides the different authority and risk in each action.

Start with AI agent spending controls

Start with a visible price, a bounded source of funds, a human-set approval threshold and a revocable agent connection. Then separate the two bills one task can create. Model usage pays for reasoning and generated responses, commonly metered in input and output tokens. Catalog-tool usage pays for external work such as a search, verification, result or generated media asset. The current OpenAI pricing and Anthropic pricingillustrate the model side; Scrollport’s wallet governs published catalog-tool usage.

Keeping the costs distinct prevents an inexpensive model session from hiding a material external action. The live tool catalog, rather than this article, owns each current billing unit and price.

Show the price before execution

The safest time to control cost is before a run. search_tools finds relevant choices and inspect_tool loads the selected tool’s contract, worked example, access state, billing unit and current price. run_tool then estimates the bounded request before execution.

A published unit price and a run estimate are related but different. A price may be per result, verification or generated second; the estimate applies that denominator to the requested quantity. Agents should inspect current pricing instead of relying on a rate remembered from an earlier session. Read theusage-based pricing guide for the model behind those units.

Combine a wallet with approval thresholds

With auto top-up off, a prepaid wallet limits spending to the funds already added. A human-set approval threshold lets predictable runs proceed while pausing a larger estimate for an explicit decision. An optional daily cap controls the aggregate effect of many individually small runs.

Auto top-up is optional and off until a human enables it. A workspace owner or admin can authorise a saved card, balance trigger and top-up amount in the wallet. Agents cannot turn it on. It replenishes funds after successful spending; it does not change the approval threshold or daily cap. See auto top-up for the payment and failure rules.

These are different controls: the approval threshold catches one unexpectedly expensive run; the daily cap bounds cumulative successful captures and unresolved holds. Agents can read the balance and boundaries through get_wallet, but only a signed-in human can change them. The approval guide explains how a paused run returns to the queue after approval.

Settle success and failure differently

Scrollport reserves the estimate with a hold before provider execution. A successful run captures its measured charge and releases any unused remainder. A failed run releases the full hold instead of charging the wallet for an unsettled result.

  1. Calculate the estimate and apply approval and daily-limit rules.
  2. Place a hold when the run enters the execution queue.
  3. Execute the catalog tool.
  4. Capture successful measured usage and release the remainder, or release the full hold on failure.

A run waiting for human approval holds no money. Approval checks the balance again before the hold is placed, so an old approval screen cannot silently spend funds that are no longer available. See wallet and spending for the complete ledger behaviour.

Attribute and revoke authority

Every run remains attributed to the agent connection that requested it, whether that connection uses CLI credentials, a harness secret store or MCP OAuth. A readable connection name and stable slug preserve the history without exposing a raw key. This is connection-level attribution, not a claim that one key proves the identity of one model personality.

A human can pause a connection temporarily, resume it or revoke it permanently. Work already executing against a valid hold can settle, while later calls are refused. Together, visible prices, prepaid funds, human-only spending controls and revocable connections create useful autonomy without unlimited spending authority.

AI agent API spend controls: budgets and approvals — Scrollport