Get team credit usage over time
Analytics API
Get team credit usage over time
Query your team AI credit consumption over time. Filter by group, project, or API key with day, week, month, or year granularity.
POST
Get team credit usage over time
Authorizations
Your Magnific API key. Required for authentication. Learn how to obtain an API key
Body
application/json
Time bucket granularity for aggregation. Defaults to day if omitted.
Available options:
day, week, month, year Example:
"month"
Start date for the query range (YYYY-MM-DD). Defaults to 7 days ago.
Example:
"2026-01-01T00:00:00.000Z"
End date for the query range (YYYY-MM-DD). Defaults to today.
Example:
"2026-03-31T00:00:00.000Z"
Filter by specific project references.
Example:
["a1b2c3d4-1111-4000-8000-000000000001"]Filter by specific API key IDs.
Example:
["api-key-1", "api-key-2"]Filter by specific team group IDs. Members of these groups are included in the results.
Required range:
x >= 1Example:
[10, 20]Response
OK