Cost overview
The per-tenant cost dashboard — daily AI, email, and infra spend with totals and anomaly markers, derived from real ledgers.
Cost overview
The cost overview is your tenant's all-in spend dashboard: a daily series of AI, email, and infrastructure cost, with totals and anomaly markers, so cost is something you watch on a dashboard rather than reconstruct at quarter-end.
It is backed by core.cost_tracker.tenant_cost_breakdown and served by
GET /v1/admin/costs.
Derived from real ledgers
AI spend comes from the ai_usage ledger, email from real send
volume, and the series is scanned for outliers via a rolling mean ± 2σ. These
are actuals, not modeled placeholders.
API
Admin/owner only, tenant-scoped from the auth context:
GET /v1/admin/costs?days=30 # days: 7…180, default 30
Returns a CostBreakdown: a per-day series split by AI / email / infra, running
totals, and anomaly markers where a day's spend deviates more than two standard
deviations from the rolling mean.
The route is gated on both require_module("admin") and a legacy admin-role
check — belt-and-suspenders, so the dashboard can never leak across tenants even
if the modules feature flag is toggled off for a tenant.
How it relates to the other cost surfaces
The cost overview is the tenant-facing roll-up. Two narrower surfaces drill in:
- AI — AI cost caps for per-feature and per-provider AI spend, and AI budget to actually cap it.
- Enrichment — enrichment spend is metered separately in
enrichment_costs; see enrichment pricing for provider unit rates.
Platform-wide rollup is separate
A cross-tenant, per-provider platform cost rollup (core.cost_rollup,
Wave R) exists for operators — with explicit measured /
operator_pinned / estimate source badges so a typed-in
invoice figure never masquerades as a measured actual. That surface is an
internal operator view, distinct from this per-tenant dashboard.