Skip to main content
GET
Usage of the whole account
Requires an ADMIN key. An API key gets 403 with code: insufficient_permissions — see API Keys.
Return the cost, number of requests and number of errors of the whole account over a time window — the same data as the Usage screen in the Dashboard. Group the figures by day, hour, type, model or key. With group_by=key, each group’s key is the id of an existing key, panel for jobs started from the Dashboard itself (such as the Playground), deleted for all keys that have since been deleted, or null when the source of a request is unknown.

Authorizations

Authorization
string
header
required

Sanctum personal access token, sent as Authorization: Bearer <token>. The token is opaque — it carries no claims and no embedded expiry, so do not attempt to decode it. Issue and revoke tokens from your account dashboard.

Headers

Accept
enum<string>
default:application/json
required
Available options:
application/json

Query Parameters

from
string<date-time>

Start of the range, UTC, inclusive. Default: 7 days before to. Cannot be older than the data retention (90 days).

Example:

"2026-09-15T00:00:00Z"

to
string<date-time>

End of the range, UTC, exclusive. Default: now. An hourly breakdown covers at most 31 days.

Example:

"2026-09-22T00:00:00Z"

group_by
enum<string>
default:day
Available options:
day,
hour,
type,
model,
key

Response

The report.

data
object