Get usage
Returns spend/requests/token totals for a given window, broken down by model, by API key, and by app name, plus a daily time series. Unlike /v1/insights, this endpoint has no top-models ranking, cache stats, or year heatmap — it's the lighter-weight aggregate endpoint, and it supports a custom date range (period=custom).
/api/v1/usageAuthorizations
AuthorizationrequiredAPI key as bearer token in the Authorization header.
Query parameters
periodThe time window, defaults to month. Three families: legacy calendar words (day/week/month/year), rolling windows ending now (15m…1y), calendar-aligned windows (today…prev_year), or custom (requires from/to). An unrecognized value returns 400.
dayweekmonthyear15m30m1h3h1d2d1w1mo1ytodayyesterdaythis_weekprev_weekthis_monthprev_monththis_yearprev_yearcustom"month"fromStart of the custom window (ISO 8601). Only used with period=custom.
"2026-07-01T00:00:00.000Z"toEnd of the custom window (ISO 8601). Only used with period=custom.
"2026-07-27T00:00:00.000Z"