Home / Passwords & API keys / API keys, one company at a time / Claude API key
Claude API key
Updated Sep 18, 2026
console.anthropic.com, a key that starts with sk-ant-, then ANTHROPIC_API_KEY in .env. Pro is not this.
You will leave with ANTHROPIC_API_KEY in .env and in Vercel. A Claude Pro or Max subscription is not this key. Install Claude Code on Pro should log in with the subscription. Only mint an API key if something actually needs sk-ant- in server code.
Step 1: Open the console, not claude.ai
Go to console.anthropic.com. Sign in. This is the API console. claude.ai is the chat product. Same company, different bill.
Step 2: Create a key
API keys → Create key. Name it after the repo, like first-app. Copy it immediately. It starts with sk-ant-. Anthropic will not show the full value again.
Step 3: Two files, one name
In the repo, .env.example (safe to commit):
ANTHROPIC_API_KEY=
.env (gitignored):
ANTHROPIC_API_KEY=sk-ant-your-real-key
No quotes. No spaces around =. Do not prefix this with NEXT_PUBLIC_.
Vercel → project → Settings → Environment Variables. Same name, Production. Redeploy.
Tell the agent:
Read .env.example for names. Do not ask me to paste values. I put ANTHROPIC_API_KEY in .env myself.
Need a ChatGPT key instead? OpenAI API key. Still installing the harness? Install Claude Code.
Checklist
Saved in this browser. No account. Clearing site data wipes it.
Next: OpenAI API key · Install Claude Code
Get new guides and videos by email
One email when something new is up. No spam. Unsubscribe anytime.