Skip to main content
GET
Get current-period consumption

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

budget_id
string
required

Budget id whose counters should be returned.

Response

200 - application/json

OK

budget_id
string

Budget id whose counters are reported.

period
enum<string>

Period the cost / tokens counters bucket against.

Available options:
BUDGET_PERIOD_UNSPECIFIED,
BUDGET_PERIOD_DAILY,
BUDGET_PERIOD_WEEKLY,
BUDGET_PERIOD_MONTHLY,
BUDGET_PERIOD_YEARLY,
BUDGET_PERIOD_ONE_TIME
period_date
string

Period bucket label (e.g. "2025-05-27" for DAILY, "2025-05" for MONTHLY). Empty when no counters exist for the current period.

cost
number<double>

Cost accumulated in the current period, in USD.

tokens
number<double>

Tokens accumulated in the current period. Carried as a double (not int64) so it serializes as a JSON number rather than a quoted string, matching BudgetUsage.tokens and limits.token_limit.

requests_in_window
integer<int32>

Requests counted in the current 60-second rolling window.