Get itemised usage
Usage per metric over a date range — by default the current UTC
month. from is inclusive and to is exclusive, so
from=2026-10-01&to=2026-11-01 is October.
With group_by=day, the answer has one entry per day that has
usage, oldest first, each with its total EHU and its metrics.
Otherwise it has one row per metric for the whole range.
Requires the billing:usage:read scope.
Authorization
Parameters
Query parameters
fromstring (date)First day,YYYY-MM-DD. Default the first day of the current month.tostring (date)The day after the last one,YYYY-MM-DD. Default the first day of next month.group_bystringdayfor a per-day breakdown; anything else (or nothing) totals per metric.
Responses
200
The usage.
dataUsageByMetric | UsageByDay- UsageByMetric
Show UsageByMetric properties
fromstring (date)tostring (date)metricsarray of UsageRowShow UsageRow properties
metric_keystringquantitynumberHow many of the metric's units were used.ehunumberTheir EHU, exact.
- UsageByDay
Show UsageByDay properties
fromstring (date)tostring (date)daysarray of objectdaystring (date)ehunumbermetricsarray of UsageRowShow UsageRow properties
metric_keystringquantitynumberHow many of the metric's units were used.ehunumberTheir EHU, exact.
400
from or to is not YYYY-MM-DD (INVALID_FROM, INVALID_TO), or to is not after from (INVALID_RANGE).
errorobject requiredcodestring requiredmessagestring requiredrequest_idstring
401
No API key was sent, or it is unknown, revoked or expired (UNAUTHORIZED).
errorobject requiredcodestring requiredmessagestring requiredrequest_idstring
403
The key lacks the scope this endpoint needs (FORBIDDEN).
errorobject requiredcodestring requiredmessagestring requiredrequest_idstring
429
Too many requests (RATE_LIMITED). Wait for Retry-After seconds.
Retry-AfterintegerSeconds to wait before retrying.
errorobject requiredcodestring requiredmessagestring requiredrequest_idstring
500
Usage could not be loaded (USAGE_FAILED). Retry later.
errorobject requiredcodestring requiredmessagestring requiredrequest_idstring
Example request
curl -X GET 'https://evohub.io/api/v1/billing/usage' \
-H 'Authorization: Bearer <TOKEN>'
