API reference, Console usage
Account usage as a time series
GET/v1/console/usage/seriesoperation id getUsageSeries
Authentication. Console session cookie (__Host-dex_session). State-changing routes also need the x-dex-csrf header.
Parameters
startquery · stringrequiredformat date
endquery · stringrequiredformat date
granularityquery · stringone of "day", "hour"default "day"
group_byquery · stringone of "none", "key", "model", "served_by"default "none"
Responses
200One series per group.
Headers: x-request-id
objectstringrequiredalways "usage_series"
startstringrequiredformat date
endstringrequiredformat date
granularitystringrequiredone of "day", "hour"
group_bystringrequiredone of "none", "key", "model", "served_by"
seriesarray of objectrequiredseries[].groupstring | nullrequiredseries[].pointsarray of UsageBucketrequiredseries[].points[].startstringrequiredformat date-time
series[].points[].endstringrequiredformat date-time
series[].points[].requestsintegerrequiredseries[].points[].input_tokensintegerrequiredformat int64
series[].points[].charge_micro_centsintegerrequiredformat int64
series[].points[].gpu_requestsintegerrequiredseries[].points[].fallback_requestsintegerrequiredseries[].points[].error_requestsintegerrequired401Missing, unknown, revoked or expired credentials.
Headers: x-request-id, x-client-request-id
Error envelope. See Errors for every type and code.
403The credentials are valid but not allowed to do this (missing scope, suspended account or failed CSRF check).
Headers: x-request-id, x-client-request-id
Error envelope. See Errors for every type and code.
422The request is well-formed JSON but breaks a validation rule. param names the field as a dotted path.
Codes: unknown_field, missing_field, invalid_type (wrong JSON type), invalid_value (right type, value
out of range: an empty or over-long string, a state, instructions, criteria string or option description
of only whitespace, an empty questions or options object, an empty state object or array, a pattern or
allowed-value mismatch such as a label or level with outer whitespace, a state nested deeper than 32 levels, a
bad date or date range), field_not_allowed (options or levels on the wrong question type),
invalid_question_id, too_many_questions, too_many_options, invalid_levels (including two levels equal
after Unicode NFC normalisation and lower-casing), invalid_min_confidence, duplicate_label (two option
labels equal after Unicode NFC normalisation and lower-casing, such as Billing and billing),
state_path_not_found, state_not_json and, on the console, top_up_limit_exceeded.
Headers: x-request-id, x-client-request-id
Error envelope. See Errors for every type and code.
500An unexpected error. Any charge was refunded. Retry with the same idempotency key.
Headers: x-request-id, x-client-request-id
Error envelope. See Errors for every type and code.
503maintenance: the console's database, sign-in or payments are unavailable for a moment. Retry after
retry-after. Nothing was changed.
Headers: x-request-id, retry-after
Error envelope. See Errors for every type and code.
Examples
Illustrative values. Examples show the shape of requests and responses; the numbers in them are not measured results.
Response: Hourly usage split by serving path
{
"object": "usage_series",
"start": "2026-10-20",
"end": "2026-10-21",
"granularity": "hour",
"group_by": "served_by",
"series": [
{
"group": "gpu",
"points": [
{
"start": "2026-10-20T09:00:00Z",
"end": "2026-10-20T10:00:00Z",
"requests": 1204,
"input_tokens": 411380,
"charge_micro_cents": 2056900,
"gpu_requests": 1204,
"fallback_requests": 0,
"error_requests": 1
}
]
},
{
"group": "fallback",
"points": [
{
"start": "2026-10-20T09:00:00Z",
"end": "2026-10-20T10:00:00Z",
"requests": 3,
"input_tokens": 1022,
"charge_micro_cents": 5110,
"gpu_requests": 0,
"fallback_requests": 3,
"error_requests": 0
}
]
}
]
}