Docs

How per-developer cost tracking works

Five-minute read. Read this BEFORE you tell your team to sign up.

The problem

Claude Code, Cursor, Aider, and Cline all hit Anthropic or OpenAI's API directly. None of those tools embed a per-developer identifier in the request. Anthropic and OpenAI both bill at the API-key level — they show you a total, not a breakdown by who-spent-what.

That's why your CFO can't answer "why $3,200 last month?" You don't have the data. It doesn't exist anywhere in the providers' world.

The TrackCost model

Every request that flows through TrackCost is tagged with the API key that authenticated it. When you create keys named after each developer, the dashboard groups spend by key name automatically. That's the entire mechanism — no headers, no magic, no Claude-Code-side configuration.

The right shape

  • One TrackCost API key per developer
  • Name each key after the developer ("Sarah laptop", "Marcus desktop", "CI runner")
  • Optional: tag each key with the developer's email for chargeback CSV
  • Each developer sets ANTHROPIC_BASE_URL + ANTHROPIC_AUTH_TOKEN to their personal TrackCost key

The wrong shape (the wedge collapses here)

  • Share one TrackCost key across all 10 developers
  • Result: dashboard shows one giant blob of cost, no per-developer signal
  • The "By Developer" tab will literally have one row labelled with whatever name you used

If your team is set up like this, fix it before launching. It takes 5 minutes per developer.

Two-minute setup per developer

  1. You (account owner) sign up at trackcost.ai/signup
  2. Go to /connect, create one API key per developer. Name each one. Optionally add their email.
  3. Send each developer their key + one of these env-var lines:
    # Claude Code
    export ANTHROPIC_BASE_URL="https://api.trackcost.ai/api/v1"
    export ANTHROPIC_AUTH_TOKEN="acl_their_key_here"
  4. They run claude (or cursor, or aider) as usual
  5. You log in to /dashboard → "By Developer" tab to see per-developer spend, week-over-week deltas, and the top spender flag

What happens to the provider's API key?

You paste your real Anthropic / OpenAI key into /providers once, on the account owner's account. TrackCost encrypts it with AES-256-GCM, stores it, and uses it to forward every developer's request to the actual provider. Developers never see or hold the real provider key — they only have their personal TrackCost key. That's also a security win: when Sarah leaves, you revoke her TrackCost key and you're done. No rotating Anthropic keys, no scrambling.

FAQ

What if one developer uses both Cursor AND Claude Code?

Same TrackCost key works for both. The dashboard groups by key, so "Sarah" appears once with combined cost across all tools she uses. That's the cross-tool unified view nobody else can give you.

What if I want to track per-project, not per-developer?

Same mechanism: create one key per project ("trackcost-backend", "customer-app") instead of per-developer. Mix & match if you want both axes.

Can I rotate a developer's key without affecting the rest of the team?

Yes. Revoke the old key, generate a new one with the same name, send it to that developer. Historical cost stays attributed to the old key.

CI runners and bots?

Create a separate key named after the runner ("ci-runner", "eval-bot"). They'll show up alongside human developers — so "Sarah burned $200 but CI burned $1,800 because someone left an eval loop running" becomes obvious.

Does this break if I'm using Cursor's cloud mode?

No. Cursor still hits Anthropic with your configured key — they don't run their own model. Setting Cursor's OpenAI/Anthropic key fields to your TrackCost key routes the traffic through us.

Ready to set up your team?

Open /connect and create one API key per developer. The page has copy-paste setup snippets for Claude Code, Cursor, Aider, Cline, and direct cURL/SDK use.

Go to /connect