Feature Requests
Open

Usage billing: average / min / unique meters and per-event cost tracking for margin

We run an AI product with usage-based billing. Meters today support count, sum, max and last. We also need to know whether each customer is profitable, not only what to charge them.

Use cases

  • Unique count: bill for monthly active users or active projects. The same user sending 1,000 events should count once. This is the most common per-seat-by-activity model.
  • Average and min: bill for average storage (GB) or average concurrent instances over the cycle, instead of the peak.
  • Cost per event: attach our underlying cost to each ingested event (for example LLM tokens cost us $0.0021). Then show cost, gross margin and margin % per customer, per product and over time on the dashboard.
  • Get an alert when a customer's cost per period jumps unusually, for example an abusive or looping client.

What we need

  • Expose unique-count publicly and add avg and min aggregations on meters.
  • A reserved cost field on usage events, for example metadata._cost = {amount, currency}.
  • Cost and margin metrics in analytics: cost, cost per customer, gross margin, LTV net of cost. Also a ranking of the most expensive customers.

0 Comments

Sign in to comment

No comments yet. Be the first to share your thoughts.