v1
latestOpenAPI 3.1.02026-07-22136108233.0 KBusage
Get Usage Aggregate
Aggregate usage (agentic and cached steps) for a given date range.
Two modes are supported:
- simulated (default): Uses total_agentic_steps and total_cached_steps from usage_metadata, but excludes runs where billing_outcome is 'infra_failure' (these would have been free). Use this for customers not yet on Stripe billing.
- billed: Uses total_agentic_steps_billed and total_cached_steps_billed. Use this for customers on active Stripe billing.
get/v1/usage/aggregate
Query parameters
from_datestring date-time required
Start of period (inclusive, ISO format)
Start of period (inclusive, ISO format)
to_datestring date-time required
End of period (exclusive, ISO format)
End of period (exclusive, ISO format)
mode'simulated' | 'billed'
Mode for counting usage steps.
Usage counting mode: 'simulated' or 'billed'
Response
Successful Response