Skip to main content
Returns the current quota snapshot plus consumption over the requested period (at most 92 days). With usage:view_all the figures cover the whole team; a caller holding only usage:view_self receives their own usage (including their API keys), and scope says which. bucket_width=1d adds a per-day series; group_by=member adds a per-member breakdown and requires usage:view_all.
Permission required: usage:view_all (whole team) or usage:view_self (your own only)
  • When you pass group_by=member: usage:view_all

Query Parameters

string
First day to include, YYYY-MM-DD, in the timezone stated by period.timezone. Defaults to six days before end_date.
string
Last day to include, YYYY-MM-DD, in the timezone stated by period.timezone. Defaults to today.
string
Set to 1d to also receive buckets: a per-day time series over the period.
array
Repeatable. by_model is always returned for the period; member adds by_member (requires usage:view_all). With bucket_width=1d, each bucket also carries the breakdowns listed here.

Response

object

Errors

Errors answer with success: false, a message and an error_code. See Error Codes for every code.