Calculate the actual cost of usage events stored in your account. Unlike the pricing estimate endpoint (which prices synthetic events you send), this endpoint queries your real events from the database and returns accurate costs.
How it works:
eventTypeFilterImportant notes:
customerId or externalCustomerId is requiredusage:readAPI key passed as Bearer token. Requires usage:read scope.
Start of the date range (inclusive). ISO 8601 format.
End of the date range (exclusive). ISO 8601 format.
Internal customer UUID. Provide this or externalCustomerId.
Your external customer reference. Provide this or customerId.
Filter to specific event names. Only meters matching these event names will be queried. When omitted, all active meters are included.
50Additional property filters applied to the query. Each filter adds a WHERE condition on event properties. Useful for tenant isolation (sub_org_id), environment filtering, or feature attribution.
20When provided, converts the USD total to credits. Value is cents per credit (e.g., 750 = $7.50/credit). Response will use unit: credits instead of unit: currency.
x >= 1Usage cost calculated successfully
Total cost. In USD when unit is currency, in credits when unit is credits.
Currency code. Only present when unit is currency.
USD The credit rate used for conversion (cents per credit). Only present when unit is credits.
currency for USD responses, credits when creditRateCents was provided.
currency, credits Start of the queried date range.
End of the queried date range.
Timestamp when the query was executed.