Usage Stats
GET
/api/v1/usageReturns the current configuration and lifetime request count for the calling API key.
Required scope: none — any valid, non-revoked API key can call this regardless of its scopes.
This is a snapshot of the key itself, not a time-series — there's no days parameter and no
per-day breakdown. For message/session counts over a time window, use Analytics Summary instead.
Response
key_prefixstringThe non-secret prefix of the API key (for identifying it in a list of keys).
scopesarrayThe scopes granted to this key, e.g.
["chat", "read"].allowed_ipsarrayIP allowlist for this key, or
null if unrestricted.request_countintegerLifetime total requests made with this key.
last_used_atstringISO 8601 timestamp of the most recent request, or
null if never used.created_atstringWhen the key was created.
rate_limit_per_minintegerThe per-key rate limit currently in effect (see Rate Limits).
Example
curl "https://api.chatty.personaliai.com/api/v1/usage" \
-H "Authorization: Bearer chatty_sk_your_key"200 OK:
{
"key_prefix": "chatty_sk_7f3a",
"scopes": ["chat", "read"],
"allowed_ips": null,
"request_count": 4821,
"last_used_at": "2026-07-07T14:32:10Z",
"created_at": "2026-05-01T09:00:00Z",
"rate_limit_per_min": 60
}