Skip to main content
GET
Get per-model consumption timeseries (Admin only)

Authorizations

Authorization
string
header
required

JWT access token for user authentication (Authorization: Bearer <jwt_token>). Create via POST /users/me/access_tokens.

Query Parameters

start
string

Start of time range (ISO 8601). Defaults to 30 days ago.

end
string

End of time range (ISO 8601). Defaults to now.

granularity
string

Time granularity: hour (≤31d), day (≤366d, default), week (≤3y), month (≤5y)

top_n
integer<int64>

Top-N models to return as separate series (1-20, default 15); rest → 'Other'

Response

Model consumption timeseries retrieved successfully

Per-model consumption timeseries response.

Top N models by total period cost are returned as separate series; the rest are collapsed into a single "Other" series. The frontend can zero-fill missing (bucket, model) pairs — the query only emits rows where usage > 0.

data
object[]
required
granularity
string
required
model_labels
string[]
required

Ordered list of model labels in the response (top-N + "Other" if present)

period_end
string<date-time>
required
period_start
string<date-time>
required