API · Account
Priced usage for a period
/api/v1/usage
Defaults to the last 30 days, grouped by SKU. Only the calling key's mode is included, so a test key never shows live spend and vice versa. Amounts are micro-USD; quantity (on rows grouped by sku) is pages for pages.* SKUs and tokens for swift.*, summit.* and compass.* SKUs. Rows grouped by day carry count and amount_micro only.
Query parameters
-
fromstring optionalStart of the period. An ISO 8601 datetime, or a plain
YYYY-MM-DDdate (treated as UTC midnight).Example:
from=2026-09-01 -
tostring optionalEnd of the period, same formats, inclusive: a bare date covers the whole of that day. Defaults to now.
Example:
to=2026-09-30 -
group_bysku | day optional default skuskuto see what you are spending it on,dayto see it over time.Example:
group_by=day
Returns 200
Charges for the period, grouped.
-
objectstringAlways
usage. -
fromstringStart of the period.
-
group_bysku | dayHow
rowsare grouped. -
modelive | testThe calling key's mode; only its usage is counted.
-
rowsarray of objectOne per SKU or day.
4 fields
-
amount_microintegerCharged, in micro-USD.
-
countintegerHow many usage records.
-
keystringThe SKU (like
pages.layout) or the day (YYYY-MM-DD). -
quantityintegerPages for
pages.*SKUs, tokens for the rest.
-
-
tostringEnd of the period.
-
totalobjectThe whole period.
1 fields
-
amount_microintegerTotal charged, in micro-USD.
-
Errors
-
401Missing, revoked or expired key
-
422Body or options failed validation (
detailslists the fields), or the document is too large (document_too_large) -
429Per-second burst limit for the plan exceeded; retry after
Retry-Afterseconds
Every error has the same shape. See Errors.