Getting a Claude API Key
Anthropic issues Claude API keys through its developer console. Here's the exact path, plus a cheaper way to use Claude if that's your actual goal.
Step by Step
- Go to console.anthropic.com and sign up / log in.
- Open Settings → API Keys.
- Click Create Key, name it, and copy it. Store it in a secrets manager or
.env— treat it like a password. - Add credits under Billing (Anthropic's API is prepaid pay-as-you-go). Without credits, calls return a billing error.
Good Practices
- Use separate keys per environment/project so you can revoke one without breaking others.
- Never commit keys to Git or ship them in a mobile/web client — proxy through your backend (see AI API for mobile apps).
- Set spend limits so a runaway loop can't drain credits.
Looking specifically for free credits? See free Anthropic API key.
The Cheaper Way to Call Claude
If you want Claude in your app, you can skip Anthropic-specific billing and call it through a gateway. With LinkModel, one key calls the full Claude family plus GPT, Gemini and DeepSeek — up to 30% below official, with zero data retention by default:
curl -X POST https://api.linkmodel.ai/v1/chat/completions \
-H "Authorization: Bearer $LINKMODEL_API_KEY" -H "Content-Type: application/json" \
-d '{ "model": "claude-sonnet-4-6", "messages": [{"role":"user","content":"Review this PR: ..."}] }'Confirm the exact chat endpoint in the docs.
Which Claude to Use
- Hardest tasks → Claude Opus 4.8 ($5/$25)
- Production default → Claude Sonnet 4.6 ($3/$15)
- Cheap, fast, high-volume → Claude Haiku 4.5 ($1/$5)
Default to Sonnet, escalate to Opus for the hard 5–10%, drop to Haiku for bulk — the tiered pattern in how to reduce AI API costs.
Bottom Line
Create a Claude key at console.anthropic.com and add credits to use it. For production, one cheaper key can call Claude and every other model. Need Gemini or OpenAI too? See how to get an API key.
Start free with a $1 credit and call Claude in a minute.
