Retrieve current usage

The current usage endpoint retrieves real-time usage data for the current open billing period. Because this billing period is still ongoing, invoice details are subject to change as new usage continues to accrue.Whether it’s fetched from the UI or the API, the response includes:
  1. Aggregated usage data for the current period: Total units consumed and total customers’ cost (so far)
  2. Detailed breakdowns per metric: Units and amounts by metric and optional sub-breakdowns by filters or groupings (e.g., per project, environment, or AI models)
Note: Since the billing period is not yet finalized, the retrieved data should be treated as provisional. Final invoice values may differ.

Retrieving current usage

Retrieve projected usage

The current usage endpoint also provides an estimate of usage and billing amounts projected through the end of the current billing period. It uses current consumption trends and billing configuration to forecast the likely totals at period close. Projected usage leverages the same underlying endpoint as current usage to ensure consistency in data structure and interpretation.Whether it’s fetched from the UI or the API, the response includes:
  1. Projected total usage units and estimated billing amount for the full billing period
  2. Per-metric projections, including: Forecasted units and amounts for each billable metric and projections broken down by optional sub-filters or groups (e.g., per project, environment, or AI models)
Note: Recurring metrics, such as Seats, typically remain stable over time, unlike metered metrics which fluctuate. Therefore, the projected usage for a recurring metric is assumed to be equal to its current usage.

Retrieving projected usage

Retrieve past usage

The past usage endpoint allows you to retrieve customer usage data for closed billing periods. Once a billing period has ended and is marked as closed, the associated usage data becomes final and immutable, ensuring consistency in billing and reporting.Modifying the price of a metric, or even deleting a metric, has no effect on past usage or previously issued invoices. Once a billing period is closed and its associated invoice is finalized, the past usage quantities, pricing, and resulting fees are locked.