Query usage data and compute cost for a specific cost configuration. To retrieve summaries for all costs belonging to a merchant, first call listCosts to obtain cost IDs, then call this endpoint in parallel for each ID.
API key authentication
The unique identifier of the cost Unique identifier for a cost
^cst_[a-zA-Z0-9]+$Filter usage to a specific subject (billing entity). When provided, only cost events matching this subject are included. When omitted, usage is aggregated across all subjects for the merchant.
Start of the query window (ISO 8601). Required together with 'to'.
End of the query window (ISO 8601). Required together with 'from'.
Comma-separated dimension keys to group results by.
Time window granularity for time-series breakdown.
MINUTE, HOUR, DAY JSON-encoded dimension filter (e.g. {"model":"gpt-4","region":"us-east"}). Keys must match those defined in the cost's groupBy configuration. Retrieve the cost first to determine valid keys.
Usage and cost data
cost Unique identifier for a cost
^cst_[a-zA-Z0-9]+$metered Total cost for the query window. Null if usage data could not be computed.
CloudEvents type for metered costs.
Total usage quantity (metered costs only). Null when usage was not computed.
Per-group breakdown (present when groupBy is specified).
Time-series breakdown (present when window is specified).