Metered spend against the invoice
A nightly job checks what was metered against what the provider actually billed, so the dashboard and the bill do not quietly drift apart.
ai-tally meters what an AI feature actually burns across every layer, attributes that spend to the feature and to your own customers, and joins it to revenue. So you can answer what your AI costs all-in, and whether it pays for itself.
● The problem
Tokens are the part you can already see, and they are less than half of it. Everything a finance conversation actually turns on is missing from the invoice.
● All-in cost
Pivot the same month by layer, feature, model, or customer account. Nothing is modelled or marked up: tokens, tools and embeddings come off instrumented spans, vector cost off wrapped clients, compute and egress off daily cloud-billing connectors.
● Recoverable cost
Each detector names where the waste is, bounds what is recoverable, and drills through to the runs behind it. Findings are hypotheses with evidence, not verdicts, and two of the five below refuse to put a number on themselves.
● Forecast
A day-of-week-weighted median projection with an 80% confidence cone. It will not draw a line below a 14-day settled-history floor: a volatile number early in the month is worse than no number at all.
● Compare
Opt-in sampling captures real requests with their resolved context, replays them against candidate providers under a daily budget cap, and scores the results with a pairwise judge. Win rates carry Wilson 95% intervals, so a tie reads as a tie.
● Cost per customer
Direct spend lands on an account by hashed account id. The shared layers cannot be attributed that way, so they are allocated, and the rule is named on screen rather than buried: pro-rata on direct spend. You are told which half of each number was measured and which was derived.
● Also on the spine
Every surface reads the same spans and the same attribution join, which is why cost per customer reconciles with cost per feature and both reconcile with the invoice.
A nightly job checks what was metered against what the provider actually billed, so the dashboard and the bill do not quietly drift apart.
Joined on a hashed user id against Stripe webhooks or your own revenue API. Margin per provider, not just spend per provider.
The AI cost of serving a customer folded into the unit economics you already report, so the AI line stops being a separate conversation.
Per-agent run distribution at p50 and p99, with the pathological tail surfaced rather than averaged away.
Per-tenant and per-scope monthly budgets. Guardrails default to recording what would have fired; they never hard-kill customer state.
AWS Cost Explorer, GCP Billing, Vercel and Cloudflare on a daily cadence, reconciled against metered spend.
● The rule
A cost tool that fabricates is worse than no cost tool, because you will act on it. So a number that cannot be defended is not rounded down, not estimated, and never rendered as zero. It is rendered blank, with the reason on hover.
● Wiring it up
Built on OpenTelemetry gen_ai.* conventions, with extensions namespaced under the same. If you already emit OTel, most of this is a config change.
# tag the span with the feature and the customer it serves. # cost is resolved from the pricing catalog at ingest. import tally tally.init(feature="doc-search", account_id=user.org_id)
● Get started
Early access is open to teams running AI in production. Bring one feature and a month of traffic; you will see the all-in number the same afternoon.
Already have an account? Sign in.