Keys / Anthropic

ANTHROPIC_API_KEY

The Claude API key your app calls Claude with.

Starts with
sk-ant-
Expires
you choose, or never
API
list, disable and archive, with an Admin API key; no create

Get it

Create one on platform.claude.com/settings/keys. The steps aren't recorded yet.

Set it

ANTHROPIC_API_KEY=sk-ant-...

The Python, TypeScript and Go SDKs read it from this variable when you don't pass a key. Or keep it out of .env with keypin: keypin run -- npm run dev

Replace it

  1. Create a new key for the same workspace and linked account.
  2. Deploy it everywhere that reads ANTHROPIC_API_KEY.
  3. Confirm requests succeed with the new key, then disable or delete the old one. Disable can be undone; delete can't.

Set rotate_every on the key in keypin.toml and a rotated date on its vault item, and keypin status shows when it's due.

Sources, checked 2026-11-16