Skip to main content
GET
Per-customer cost aggregates
Requires an External App credential; the customer must be linked to the calling app. Each item carries exactly bucket, bucketStart, totalInputTokens, totalOutputTokens, totalTokens, totalCost, eventCount and computedAt.

Authorizations

Authorization
string
header
required

An External App: the JWT it obtains from POST /oauth/token with OAuth2 client_credentials. Pass as Authorization: Bearer <jwt>. An app's static companion key also authenticates as the app, but is deprecated and is not protected by Idempotency-Key.

Path Parameters

customerId
string
required

Customer to report on. Must be linked to the calling application.

Query Parameters

bucket
enum<string>

Defaults to daily.

Available options:
hourly,
daily,
weekly,
monthly
limit
integer
default:100

Page size, 1 to 500. Defaults to 100. A value above 500 is 400 too_big; a malformed value (non-integer, zero, or negative) is a 400 rather than a silent coercion.

Required range: 1 <= x <= 500

Response

Customer cost aggregate rows

data
object[]
required
meta
object
required