Hanzo
OpenapiEvent

Timeseries returns the caller org's LLM usage over time as an evenly-spaced…

Timeseries returns the caller org's LLM usage over time as an evenly-spaced series.

GET /v1/event/timeseries

Addresshttps://api.hanzo.ai/v1/event/timeseries
MethodGET
Operationget_event_timeseries
AuthAuthorization: Bearer $HANZO_API_KEY

Timeseries returns the caller org's LLM usage over time as an evenly-spaced series. One point per hour or per day — the bucket the window implies, 24h giving hours and 7d/30d giving days — carrying requests, total tokens and spend in cents. Empty buckets are filled with zeros so a client charts a continuous line.

The org is the validated principal's — never a parameter. 403 without a validated bearer, 400 on an unknown range, 503 when the warehouse is unreachable.

Request

3 fields.

FieldInTypeRequiredDescription
rangequerystringRange is a relative window: a count and a unit — 24h, 7d, 90d, any <N>h or <N>d — or day, week, month, all. Default 24h.
startquerystringStart is the inclusive lower bound of a custom window, RFC3339.
endquerystringEnd is the exclusive upper bound of a custom window, RFC3339.

Response

StatusBodyMeaning
200Timeseriesok

200 body — 12 fields.

FieldInTypeAlwaysDescription
endbodystringEnd is the window's exclusive upper bound, RFC3339 UTC.
intervalbodystringInterval is the bucket width: hour or day.
rangebodystringRange is the window that was actually applied: 24h, 7d, 30d or custom.
scopebodyScope
scope.orgbodystringOrg is the IAM org slug the rows were read under: the validated principal's, resolved server-side.
seriesbodyUsagePoint[]Series is one point per bucket, oldest first, with empty buckets zero-filled.
series[].requestsbodyintegerRequests is how many LLM calls fell in this bucket.
series[].spendCentsbodyintegerSpendCents is what they cost, in cents.
series[].tbodystringT is the bucket's start, RFC3339 UTC, aligned to the interval.
series[].tokensbodyintegerTokens is prompt plus completion tokens over those calls.
sourcebodystringSource is the warehouse table the series read.
startbodystringStart is the window's inclusive lower bound, RFC3339 UTC.

Failure carries the platform error shape — see Errors.

Examples

hanzo has no subcommand for this operation — the CLI serves only what cloud's live route table confirms. Use HTTP or an SDK.


Event API · All Hanzo APIs · Interactive reference

How is this guide?

On this page