Skip to main content
GET
Get usage time series

Authorizations

Authorization
string
header
required

An admin API key. Personal admin keys reach the API key, billing and Account endpoints for the creator's personal account; the other endpoints need an organization admin key. Security requirement entries list the permission a scoped key needs for the operation.

Query Parameters

time
enum<string>

Time window. period is the account's current token billing period. Ignored when start and end are set.

Available options:
5m,
15m,
30m,
1h,
24h,
today,
7d,
30d,
60d,
90d,
180d,
365d,
3mo,
6mo,
12mo,
all,
period
start
string<date-time>

Start of an explicit range. Send it with end.

end
string<date-time>

End of an explicit range. Send it with start. A future value is clamped to now, and the range cannot exceed two years.

key_id
string

Only count usage of the inference key with this public_id.

Pattern: ^[0-9a-f]{64}$

Response

Usage series

data_points
object[]
required

One point per bucket, oldest first. Empty buckets are included with zero values.

interval
string
required

Bucket width, for example 15m0s.