Usage Stats
GET
/api/v1/usageReturns per-day message and API call counts for the API key. Useful for building usage dashboards or tracking against quotas.
Required scope: read
Stats are scoped to the API key — multiple keys sharing the same bot each have independent usage counters.
Query parameters
daysintegerquerydefault: 30Number of days to look back. Min 1, max 90.
Response
key_idstringThe API key identifier these stats belong to.
daysintegerNumber of days covered.
totalsobjectAggregated across all days.
dailyarrayPer-day breakdown, newest first.
Example
curl "https://api.personaliai.com/api/v1/usage?days=7" \
-H "Authorization: Bearer chatty_sk_your_key"200 OK:
{
"key_id": "key-uuid-001",
"days": 7,
"totals": { "messages": 512, "api_calls": 89 },
"daily": [
{ "date": "2026-07-07", "messages": 98, "api_calls": 14 },
{ "date": "2026-07-06", "messages": 103, "api_calls": 17 },
{ "date": "2026-07-05", "messages": 67, "api_calls": 11 }
]
}