Consumption Events
Consumption Events - Summary
Get aggregated consumption metrics grouped by entity or time period
GET
Este endpoint requiere autenticacion. Inclui tu API key en el header
Authorization: Bearer <API_KEY>. Ver Autenticacion para mas detalles.- Get total credits, tokens, and event counts grouped by agent, feature, provider, or model
- Analyze consumption trends over time by grouping by day, week, or month
- Filter aggregations by agent, feature, or provider
Query Parameters
Required
Start of the date range. Must be a valid ISO 8601 datetime string (e.g.
2025-01-01T00:00:00.000Z). Must be before endDate.End of the date range. Must be a valid ISO 8601 datetime string.
How to group the results. Valid values:
agent, feature, provider, model, day, week, month.- Entity grouping (
agent,feature,provider,model): groups by the corresponding field, sorted by total credits descending. - Temporal grouping (
day,week,month): groups by time period using PostgreSQLdate_trunc, sorted chronologically.
Optional
Filter events by a specific agent ID before aggregating.
Filter events by feature name before aggregating.
Filter events by AI provider before aggregating.
Response
The grouping criterion used (mirrors the request parameter).
Start of the queried date range.
End of the queried date range.
Aggregated results per group.
Error Responses
| Status Code | Type | Description |
|---|---|---|
| 400 | INVALID_REQUEST | startDate is after endDate, or invalid groupBy value |
| 401 | UNAUTHORIZED | Missing or invalid authentication |

