Skip to main content

Retrieve Time Series Stats - AI

GET 

/api/v1/stats/timeseries/ai

Retrieve AI credit usage as time series data for the Dashboard UI charts.

Bucketing

The backend buckets data by day for ranges > 7 days, and by hour for ranges < 7 days. Follows the same bucketing logic as other time series stats endpoints.

Authorization

  • Admin users can query any user or omit user_id for group-wide consolidated stats.

Response

{
"usergroup_id": 100,
"stat_type": "ai",
"stat_subtype": "AI_CREDITS_USED",
"start_time": "1742507272",
"end_time": "1743111672",
"data": {
"*": [
{ "timestamp": 1742507272, "value": 45 },
{ "timestamp": 1742593672, "value": 62 },
{ "timestamp": 1742680072, "value": 38 }
]
}
}

Request

Responses

Successful operation