Skip to content

Summary

GET /analytics/summary

Returns a summary of your organization’s usage with a comparison to the previous period.

ParameterTypeDefaultDescription
rangestring"7days"Time range: "1h", "24h", "7days", "30days", "3months"
{
"current": {
"requests": 1250,
"input_tokens": 542000,
"output_tokens": 128000
},
"previous": {
"requests": 980,
"input_tokens": 410000,
"output_tokens": 95000
},
"timeseries": [
{
"timestamp": "2025-01-15T00:00:00Z",
"tokens": 15200
}
]
}
FieldDescription
currentTotals for the selected time range
previousTotals for the equivalent preceding period (for comparison)
timeseriesToken usage over time within the current range
Terminal window
curl "https://api.aiand.com/analytics/summary?range=30days" \
-H "Authorization: Bearer sk-your-api-key"
  • Display usage trends on a dashboard
  • Calculate period-over-period growth ((current - previous) / previous)
  • Visualize token consumption over time with the timeseries data