Skip to content

Identity Mappings

Abacus needs to map provider-specific identifiers to user email addresses. This page covers identity mapping for Claude Code API keys.

Claude Code API Key Mappings

The Anthropic Admin API returns usage by API key ID, not user email. Abacus maintains a mapping table to associate keys with users.

View Current Mappings

Terminal window
pnpm cli mappings

Shows all mapped API keys with their associated emails.

Sync from Anthropic

Pull the latest mappings from the Anthropic API:

Terminal window
# Sync recently active keys
pnpm cli mappings:sync
# Sync all keys (slower but complete)
pnpm cli mappings:sync --full

Fix Unmapped Keys

Interactive tool to assign emails to unmapped API keys:

Terminal window
pnpm cli mappings:fix

Prompts you to enter the email address for each unmapped key.

How Mapping Works

  1. Usage data is synced with API key IDs
  2. mappings:sync pulls known mappings from Anthropic
  3. Unmapped keys appear in the Abacus UI
  4. Use mappings:fix or the web UI to manually assign remaining keys

Web UI

Unmapped API keys also appear in the Abacus web interface. Look for the “Mapping Assistant” on the status page to assign keys through the UI.