analytics
Time-binned credits and USD spend across an org, grouped by product surface.
get/orgs/{org_id}/analytics/costs
Path parameters
org_idstring required
Query parameters
group_by'minute' | 'hour' | 'day'
Bucket size for aggregation (minute, hour, or day).
frominteger nullable
Inclusive range start (epoch milliseconds). Defaults: 1h / 1d / 30d before to by group_by.
tointeger nullable
Exclusive range end (epoch milliseconds). Defaults to now.
user_idstring nullable
Restrict to spend attributed to a specific user.
project_idstring nullable
Restrict to spend attributed to a single project. Omit for org-wide totals.
resource_typestring nullable
Restrict to one product surface (e.g. composer, app_run, kb_query, kb_file_parsing); legacy selects spend recorded before source attribution existed.
Response
Costs analytics