SP
SpendProof
AI FINOPS

AI Provider Invoice ↔ Tagged-Usage Reconciliation

BROWSER-LOCAL DETERMINISTIC|DECLARED RATE CARD · 0.5% TOLERANCE

Close the AI bill against the usage you can actually attribute

The provider bills one undifferentiated line per model; the tags live in your own instrumentation. Paste the invoice's declared line items and your tagged-usage ledger: every line is recomputed at the rate the invoice itself declares, each variance is classified, and a clean close is withheld whenever a bucket does not reconcile or usage carries no tag — never estimated, never attributed by guess.

Invoice ↔ usage reconciliation
Provider invoicedeclared lines + rateDeclared rate cardRounding≤ 1¢ per rowPeriod boundaryrows outside windowMissing usageledger undershootsUntagged spendunattributed → holdPrice drift≥ 2 declared ratesClean close0 blockers · 0 unattributed

Expected charge = ledger quantity × the invoice's own declared unit price. The engine holds no price list: a rate the invoice does not state cannot be invented, and a period with two declared rates publishes price drift instead of a phantom variance.

1 · Your two records

The provider's own line-item export and your tagged-usage ledger. The reconciliation runs in this page — the same deterministic engine the agent tool calls — and no rate is ever looked up: every line is recomputed at the rate the invoice itself declares.

Worked examples are the PRD's own test vectors, run by the same deterministic engine the agent tool calls. The invoice document is read as DECLARED fields — this browser preview takes the provider's own line-item export, so nothing leaves the page.

5 · Read a PDF invoice (extraction)

Upload the invoice PDF (or a scan) — a document parse turns it into text, then a model reads that text into the declared field set. Every field is labelled extracted, unreadable or unstated, and anything that is not extracted withholds the verdict. The model reads the document; it never computes a figure. Pasting the text instead skips the parse service entirely.

|invoice.pdf.txt
The pasted text will be read directly. The extraction keys live server-side only and are never sent to this page.

Agent Surface & WebMCP Integration

How a FinOps agent invokes the reconciliation, with the extraction layer in front of the deterministic engine.

reconcile_ai_invoiceMETERED $1.50+
|agent-close-call.ts
CLIENT-SIDE ONLY • ZERO EGRESS
// 1. In any browser with WebMCP support (auto-registered on page load):const close = await navigator.modelContext.executeTool("reconcile_ai_invoice", {  invoice: invoiceText,   // the invoice document text (PDF text layer, HTML or CSV export)  ledger: ledgerCsv,      // bucket,service,model,sku,quantity,timestamp  tolerance_bps: 50       // declared reconciliation tolerance (0.50% of the invoice total)}); console.log("Close ready:", close.report.closeReady);console.log("Blockers:", close.report.blockers);       // e.g. ["sp-untagged-spend"]console.log("Extracted fields:", close.extraction.labels); // every field labelled

JSON Schema Parameters Contract

invoiceRequired

The provider invoice as document text. Read into the declared field set provider, period, service, model, quantity, unit_price, amount, sku; every field is labelled and anything not extracted withholds the verdict.

ledgerRequired

Your tagged-usage ledger as CSV (bucket,service,model,sku,quantity,timestamp). A blank bucket is the unattributed case and blocks a clean close.

tolerance_bpsOptional

Reconciliation tolerance in basis points of the invoice total. Defaults to 50 (0.5%).

Metered per successful call, billed monthly to your Stripe customer.Get Agent Key / Manage Billing (/billing)/.well-known/mcp.json

Pricing

Use it free in the browser. Pay only for exports, the suite, or agent calls.

Free

Reconcile one invoice against your tagged-usage ledger and read every variance — free, in your browser. No account and no card.

$9.00 one-off

Close pack — the per-bucket variance trail and the findings for one period, or unlock every export with Pro.

$29.00/month

Factory Pro: unlimited browser use and exports across every live product. Cancel any time.
Agent (WebMCP) rates for this product
Agent toolMetered rate
reconcile_ai_invoice$1.50 per successful call

Agent calls are metered per successful call and billed monthly to your Stripe customer. Billing shows your usage, history and spend cap.

Manage Billing & API Keys (/billing) →

The five variance classes — what each one means

  • Roundingsp-rounding-driftA difference inside half a cent per contributing ledger row. Reported, and never a reason to withhold a close.
  • Period-boundary overlapsp-period-overlapUsage timestamped just outside the billing window (clock skew, timezone edges). The rows exist — they are reported instead of being folded in or blamed on a rate.
  • Missing or late usagesp-missing-usageThe tagged ledger undershoots the invoice and nothing else explains the gap: a dropped export, a batch that never logged. The affected bucket is reported unmatched.
  • Untagged spendsp-untagged-spendCalls made before a tag was attached. The invoice charged for usage no bucket can claim, so the close is withheld outright.
  • Price driftsp-price-driftThe provider changed the rate mid-period. Two declared rates mean the ledger cannot be recomputed at one rate — so no variance is published at all, because picking a rate would invent a number.

Agent surface: reconcile_ai_invoice is registered as a WebMCP tool and advertised in /.well-known/mcp.json at $1.50 per successful call. The extraction layer it needs has to be configured in the deploy environment first — until then the tool answers with an explicit unconfigured error rather than an estimated invoice.