C
Chatty

Usage Stats

GET/api/v1/usage

Returns 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_prefixstring
The non-secret prefix of the API key (for identifying it in a list of keys).
scopesarray
The scopes granted to this key, e.g. ["chat", "read"].
allowed_ipsarray
IP allowlist for this key, or null if unrestricted.
request_countinteger
Lifetime total requests made with this key.
last_used_atstring
ISO 8601 timestamp of the most recent request, or null if never used.
created_atstring
When the key was created.
rate_limit_per_mininteger
The per-key rate limit currently in effect (see Rate Limits).

Example

cURL
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
}