Skip to main content
GET
List API key usage

Authorizations

Authorization
string
header
required

Use a JWT bearer token or a Veryfront API key in the Authorization header.

Query Parameters

preset
enum<string>
default:30d

Whole local days, defaulting to 30d. Explicit from/to bounds take precedence over preset, including SDK-supplied defaults.

Available options:
7d,
30d,
90d
from
string<date-time>

Inclusive start. Supply both from and to; these bounds take precedence over preset.

to
string<date-time>

Exclusive end, no later than the end of today in timezone.

timezone
string
default:UTC
granularity
enum<string>
default:day

UTC hours, or local calendar days, Monday-based weeks and months.

Available options:
hour,
day,
week,
month
group_by
enum<string>[]

Grouping dimensions supported by this operation. Repeat the parameter or use a comma-separated list.

Maximum array length: 4
Available options:
project,
model,
api_key,
member
compare
enum<string>

Compare preceding calendar months for whole-month custom ranges, local days for whole-day ranges and presets, or equal elapsed duration otherwise.

Available options:
previous_period
project_reference
string

Optional project UUID or slug. Scopes the listing to that project’s keys.

Response

AI spending by API key; kind separates individual keys from grouped usage, including requests without API key authentication. With project_reference: the project’s keys, requests without a key, and usage from deleted key records. Without it: the caller’s own keys and requests without a key; usage of a deleted key record cannot be recovered. Read from the AI usage ledger; usd is the customer charge at the credit rate and never provider cost.

scope
object
required

Authorized listing scope. User scope means the caller’s readable keys and keyless activity, not billing-account totals.

timeframe
object
required
attribution
object
required

Whether attribution is complete for the returned usage. Treat it as incomplete if enabled is false, recording_since is null, or the selected period includes an unattributed row.

summary
object
required

Sum of the key and attribution rows below.

series
object[]
required
keys
object[]
required
group_by
enum<string>[]
Available options:
project,
model,
api_key,
member