usage

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

Request

  • Base URL
    https://api.cyberdesk.io
  • URL
    https://api.cyberdesk.io/v1/usage/aggregate
  • Auth
    HTTP bearer

Query parameters

from_datestring date-time required

Start of period (inclusive, ISO format)

to_datestring date-time required

End of period (exclusive, ISO format)

mode'simulated' | 'billed'

Mode for counting usage steps.

Usage counting mode: 'simulated' or 'billed'

Response

Successful Response

total_agentic_stepsinteger required
total_cached_stepsinteger required
period_startstring date-time required
period_endstring date-time required
mode'simulated' | 'billed' required

Mode for counting usage steps.

runs_countedinteger required

Changes

No recorded changes to this operation across all 2 revisions of this API.