Skip to main content

Get consumption by API key (admin)

Per-key credit consumption with per-tool breakdown for the calling org. Includes deleted/rotated keys (with deleted: true) for historical attribution. Without api_key_id: all keys with attributed usage. Requires an admin-scoped API key.

Parameters

NameTypeRequiredDefaultDescription
api_key_idstring❌ No-Filter to a single API key. When omitted, all keys with attributed usage in the window are returned.
fromstring❌ No-ISO datetime; window start.
tostring❌ No-ISO datetime; window end.
daysinteger❌ No-Window in days (1-366). Mutually exclusive with from/to.