Anthropic

Anthropic is the vendor behind Claude. ZombieLicenseHunter connects directly to an Anthropic Console organization with an Admin API key — there is no OAuth redirect — to track per-credential token usage, per-workspace cost, and which credentials are spending. Organization members are ingested as accounts, so zombie detection (dormant members, unused credentials) works the same way it does for a directory integration.

Prerequisites

  • Console admin access to create an Admin API key.
  • A decision about key scope, stated honestly: an Admin API key can add and remove organization members, not only read them. If you would rather not grant that, supply a non-admin key instead. ZombieLicenseHunter still works — usage and cost are tracked — but the integration runs in spend-only mode: no member list, no per-person attribution.

Setup Instructions

Step 1: Create an Admin API Key

  1. In the Anthropic Console, go to Settings → Organization → Admin API Keys.
  2. Create a new key. Grant it full admin scope if you want member sync and per-person attribution; grant a narrower, non-admin key if you want spend tracking only.
  3. Copy the key — it is shown once.

Step 2: Connect in ZombieLicenseHunter

  1. Go to Integrations → Add Integration and select Anthropic as the Provider. Category is set to Usage automatically when Anthropic is selected — leave it there, and it is enforced on save regardless of what the form shows.
  2. Paste the key into the Admin API Key field.
  3. Click Save Integration. ZombieLicenseHunter probes the key against the organization members endpoint to determine whether it has admin access, then encrypts and stores it.
  4. An initial background sync begins immediately.

Step 3: Let the Backfill Complete

The first sync backfills 90 days of usage and cost history, fetched in 31-day windows because that is the vendor's maximum per request. Every sync after that refreshes a trailing window rather than the full 90 days.

Usage made in the Console playground carries no API key; Anthropic attributes it to the member who ran it, and ZombieLicenseHunter records it as that member's activity. Usage through an API key is attributed to the key, with the member behind the request linked when Anthropic names one.

Anthropic reports only completed time buckets. Past days are fetched as daily buckets; the current day is fetched hour by hour and summed, so today's tokens appear with at most an hour's delay and grow through the day. The cost report has no hourly option, so today's cost appears tomorrow.

Step 4: Rotate the Key Later

To rotate the key, open the integration's edit page and enter a new Admin API Key — the current one is never displayed, only replaced.

What Gets Synced

Field Description
Members (full mode only) Organization members, ingested as accounts for zombie detection
Usage Tokens per credential, per model, per day
Cost Spend per workspace and per cost description; Priority Tier spend is not included
Credentials Every organization API key, with its owner (where attributable) and last-used date

Not metered: code execution shows up in cost but not in usage. Traffic through Bedrock, Vertex, or Foundry never appears in these reports at all — only usage and spend through the Anthropic Console itself.

Retention

Usage and cost rows are kept for 90 days and trimmed nightly after that. A member's last-active date is not trimmed with them — it persists on the account record beyond the 90-day window. If the nightly sweep would delete more than a fifth of a table, it refuses: nothing is deleted that night and the operator is alerted to trim the backlog in steps.

Troubleshooting

"The key was rejected (401 authentication_error). The Admin API accepts only an Admin API key…"

The key you pasted is a workspace API key (sk-ant-api…), or an Admin API key that has been revoked. Workspace keys authenticate against the Messages API but not the Admin API, whatever role their owner holds, so they cannot read organization members, usage or cost. Create an Admin API key (sk-ant-admin01-…) under Organization settings → Admin keys and enter it on the integration's edit page.

Sync fails with an invalid or revoked key

Confirm the Admin API key is still active in the Anthropic Console. If it was rotated or revoked there, generate a new one and replace the key on the integration's edit page.

"This key cannot read members. Spend is tracked; accounts and per-person attribution are not."

This is spend-only mode, by design — the configured key authenticates but does not have permission to read organization members. Usage and cost continue to sync normally. To get member sync and per-person attribution, supply an admin key on the edit page.

"No usage between ..." versus a page that says the integration has never synced

"No usage in this range" means a sync has completed but found nothing for the selected dates — widen the date range. "Never synced" means no sync has completed yet; check that the initial sync finished.

"Over 200 active credentials: usage for this window is grouped by scope and model, not per credential."

Above 200 active API keys, ZombieLicenseHunter stops requesting per-credential and per-member attribution (the vendor documents performance limits for breaking cost down across many keys at once) and groups usage by workspace and model instead. Usage and cost totals are still correct; the per-credential and per-member breakdown is unavailable for that window.

Vendor rate limits (429 errors)

The sync retries with backoff on rate-limited requests. A single 429 does not fail the sync; sustained rate limiting across retries will.