Skip to main content
GET
Este endpoint requiere autenticacion. Inclui tu API key en el header Authorization: Bearer <API_KEY>. Ver Autenticacion para mas detalles.
Returns aggregated consumption metrics for the authenticated organization. Use this endpoint to:
  • 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

string (ISO 8601)
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.
string (ISO 8601)
required
End of the date range. Must be a valid ISO 8601 datetime string.
string
required
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 PostgreSQL date_trunc, sorted chronologically.

Optional

string
Filter events by a specific agent ID before aggregating.
string
Filter events by feature name before aggregating.
string
Filter events by AI provider before aggregating.

Response

string
The grouping criterion used (mirrors the request parameter).
string (ISO 8601)
Start of the queried date range.
string (ISO 8601)
End of the queried date range.
array
Aggregated results per group.

Error Responses