BazaarLinkBazaarLink
Sign in
DocsAPI ReferenceSDK ReferenceAgentic UsageAI Skills
Management Keys

Get API key activity

Returns activity statistics for one API key over a selected period. period accepts day, week, month, or year; every boundary is UTC: day at 00:00 UTC, week on Monday at 00:00 UTC, month on the first day at 00:00 UTC, and year on January 1 at 00:00 UTC. With an organization Management Key, the caller may query only keys in that organization. The figures are that key's own spend, request count, token count, model breakdown, and time series, not the organization total; a key outside the caller's scope returns 404. Use format=csv for a CSV export.

GET/v1/keys/:id/activity

Authorizations

Authorizationrequired
string · header

API key as bearer token in the Authorization header.

Path parameters

idrequired
string

The ID of the API key whose activity should be returned.

Query parameters

period
string

Statistics period. day, week, month, and year all use UTC boundaries; defaults to month.

dayweekmonthyear
format
string

Optional. Set to csv for a CSV export; omitted returns JSON.

csv
GET /v1/keys/:id/activity
curl "https://api.bazaarlink.ai/v1/keys/key_demo_01/activity?period=month" \
  -H "Authorization: Bearer $BAZAARLINK_MANAGEMENT_KEY"
Response examples

Success. totals contains this key's spend, request count, and token count for the period.

{
  "keyName": "worker-a",
  "period": "month",
  "since": "2026-09-01T00:00:00.000Z",
  "totals": {
    "spend": 9.37,
    "requests": 205,
    "tokens": 48200
  },
  "byModel": [
    {
      "model": "example-model",
      "spend": 9.37,
      "tokens": 48200,
      "requests": 205
    }
  ],
  "timeSeries": [
    {
      "date": "2026-09-30",
      "model": "example-model",
      "cost": 2.12,
      "tokens": 10400,
      "requests": 18
    }
  ]
}
Support
Support
Hi! How can we help you?
Send a message and we'll get back to you soon.