AI spend

AI spend

AI spend shows what every call to an AI model cost, in money, and lets you cap it with budgets. The AI module records each call: who made it, from which module and feature, with which model, and how many tokens of each kind. AI spend prices those calls at the rates you set, adds them up, and stops calls that would go past a budget.

In the sidebar under Admin → AI spend. Handles money: when an agent changes a price or a budget, a person approves it first.

Every tab opens straight on itself from a link or from quick search.

Overview

Without aispend:manage, every figure on the page is your own calls only. With it, you see the whole workspace.

  • A month to look at, and Break down by: Person, Model, Module, Feature, Project, Agent, Provider, Connection or Day.
  • Spent, per currency. It is marked incomplete when some calls have no price, since the real figure is then higher.
  • Model calls (and how many failed), Input tokens (and how many were read from cache) and Output tokens.
  • Spend per day, as a chart.
  • The breakdown table. A line with unpriced calls carries a *. Open a line to see the calls behind it.

A call made with no stated purpose is shown on an Unattributed line rather than dropped, so the lines always add up to the total. Spend on projects you may not see is folded into one "Other projects" line. AI cost per project also shows on each project's costs.

Calls

The model calls behind a figure, newest first, 50 at a time: when, who, which module and feature, the project, the model and the cost. A call with no figure says "unpriced". Open one to see its tokens by kind, the rates applied, and the cost or why it has none:

  • no price for this model;
  • the provider did not say which model answered;
  • the provider reported no token counts;
  • its kinds are priced in different currencies.

Each call is one attempt, so a call that failed over to a backup shows both.

Prices

The price per million tokens in force now, for each model and each kind of token: input, output, cache read and cache write. With history on, every price ever set, with when it took effect.

  • Suggested starter prices, read from each vendor's pricing page on the date shown. Nothing is priced from them until somebody confirms them.
  • Unpriced this month: calls with no figure, by model and reason.
  • Aliases: a model name a provider reports, priced as another model.

Confirm the starter prices

  1. Open Admin → AI spend → Prices.
  2. Check each suggested price against your own contract with the vendor.
  3. Confirm each one you accept, or confirm them all. They apply from now.

Add or end a price

  1. On Prices, press Add price.
  2. Give the Model exactly as the provider names it, the Kind, the Currency, the price Per million tokens, and optionally From (empty means now) and the Source it came from.
  3. To stop pricing a model without replacing it, end its price. Calls after that are unpriced. Costs already recorded keep their figures.

Price a reported name as another model

Press Add alias and give the name as Reported as and the model it should be Priced as. One hop, exact names only.

Price calls that had no price

After adding a price, use Backfill under Unpriced this month, for every model or one. Only calls with no figure are priced, at the rate in force when each was made. A call already priced is never repriced.

How prices work

  • A call is priced at the price in force at the moment it was made.
  • A cost, once recorded, never changes. A new price applies from its own start onward.
  • Zero is a price: the model is free. No price means the cost is unknown, and the call has no figure rather than a guessed one.
  • Totals are never added across currencies.
  • An agent run on an outside runtime is priced once it has finished, when its counts are final.

Budgets

The workspace budget and any person's own budget for this UTC month, each with bars for money and tokens against the cap. A budget can have:

  • a Money cap in one currency. 0 stops every call;
  • a Token cap, counting every kind of token, cached input included;
  • Warn at %, 80 by default;
  • Stop models with no price: while a money cap is set, calls to a model with no price in its currency are refused, because their cost would not count toward the cap.

The Web budget caps what agents spend searching the web and reading pages. Without a workspace budget, AI use is not limited.

Set a budget

  1. On Budgets, edit the workspace budget, or press Add a person's cap.
  2. Set a money cap, a token cap, or both, and when to warn.
  3. Save. It is checked before every model call from then on.

A call that would start past a cap is refused before it is sent. An agent run is refused before it starts, and one already going stops at its next turn. Testing a connection is never blocked. Removing a person's cap leaves the workspace budget applying to them.

Shared AI connections

When someone shares an AI connection with you, its owner can cap and price what you use of it. You never see what the owner's key cost them. A share's cap warns the same way a budget does.

Who can do what

PermissionWhat it lets you do
aispend:read — See your own AI usage and costOpen the page and see your own calls, the prices and the budgets.
aispend:manage — See everyone's AI usage; set prices and budgetsSee every call in the workspace, set and end prices, confirm starter prices, manage aliases, backfill, and set or remove budgets.

What happens on its own

JobWhenWhat it does
sweepEvery minutePrices finished model calls that were missed when they were made, including outside runtime runs that finished later.
reconcileEvery day at 03:17 UTCChecks that every finished call, and every web cost, has a cost record, and tells administrators about any gap. It never fills a gap in by itself.
budget-warnEvery 10 minutesSends budget and shared-connection warnings that are due and have not been sent yet.
share-holdsEvery 15 minutesClears old holds left by calls made on a capped shared connection, so the list does not keep growing.

Each new call is also priced the moment it is recorded; the sweep is the safety net. A warning goes to the workspace's administrators, and for a person's own budget to that person too, once a month when spend reaches the warning level. See Notifications and alerts.

Needs

Nothing else switched on. It prices calls recorded by AI.

What agents can do

An agent can report what AI cost, find the calls behind a figure, and price or cap spending. AI spend handles money, so every change an agent makes goes to a person first, and no "Always allow" rule can wave it through. See Agents and approvals.

Read (run straight away): aispend.summary, aispend.calls, aispend.call, aispend.runCost, aispend.prices, aispend.budgets

Prices (need approval): aispend.setPrice, aispend.endPrice, aispend.confirmSuggested, aispend.addAlias, aispend.removeAlias, aispend.backfill

Budgets (need approval): aispend.setBudget, aispend.removeBudget

Without aispend:manage, the reading tools answer with the caller's own calls only. Over MCP the same tools are named aispend__summary and so on.

AI spend · maxsuite · MaxDoc