Skip to main content
GET
get_usage

Authorizations

X-API-Key
string
header
required

Query Parameters

period_start
string<date>
required

Start of the billing window, inclusive.

period_end
string<date>
required

End of the billing window, inclusive.

workspace_id
string<uuid> | null

Restrict to one workspace. Omit to aggregate all jobs for this API key.

group_by
enum<string>
default:day

Aggregation key: calendar day, job kind, or workspace. tenant is for a partner key sent without X-NDI-Tenant: one bucket per child tenant, keyed by its external_ref.

Available options:
day,
kind,
workspace,
tenant

Response

Successful Response

Usage report covering [period_start, period_end].

units_total is the sum of all bucket units for the period so a caller can read its budget consumption without summing the page itself.

buckets
UsageBucket · object[]
required
credits_total
integer
required

Sum of credits across all buckets: final credits for the period.

group_by
string
required
period_end
string<date>
required
period_start
string<date>
required
units_total
integer
required