Skip to main content
GET
Bucketed usage metering

Authorization

This route requires the usage:read scope. A key carrying admin also qualifies. A missing or invalid credential returns 401 authentication_error. A valid credential without the scope returns 403 permission_denied, and the problem body names the exact scope required.

Headers

These are request conventions the contract does not declare as parameters, so they do not appear in the schema tables below.

Success responses

Errors

Every error is an RFC 9457 application/problem+json body carrying a stable code, a requestId, and a suggestedAction where Exo has one. See Errors.

Notes

  • Only non-empty buckets come back. No usage in the range is an empty buckets list with a 200, not a 404.
  • This is an organization-wide billing view, which is why it needs usage:read rather than plain read.

Authorizations

X-Exo-API-Key
string
header
required

An Exo API key (exo_...) sent as the X-Exo-API-Key header.

Query Parameters

startTime
string<date-time>
required

Range start, RFC 3339 (inclusive). Naive timestamps are read as UTC.

endTime
string<date-time> | null

Range end, RFC 3339 (exclusive). Defaults to now.

bucketWidth
enum<string>
default:day

Bucket width: hour or day.

Available options:
hour,
day
groupBy
string | null

Comma-separated subset of: subject, capability.

Response

Successful Response

GET /v1/usage: chronological non-empty buckets (empty list when none).

buckets
UsageBucket · object[]
required