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
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
api_key_id | string | ❌ No | - | Filter to a single API key. When omitted, all keys with attributed usage in the window are returned. |
from | string | ❌ No | - | ISO datetime; window start. |
to | string | ❌ No | - | ISO datetime; window end. |
days | integer | ❌ No | - | Window in days (1-366). Mutually exclusive with from/to. |