How to Get an Anthropic API Key
How do I get an Anthropic API key?
Sign in to Anthropic's console, create a new API key, and copy it immediately — it is shown only once. No payment method is required to generate the key itself. Set it as ANTHROPIC_API_KEY in your environment; full steps below.
Verified 2026-08-09 — source
Steps
- Sign in at console.anthropic.com and open Settings → API Keys.
- Click "Create Key", name it, and choose which workspace it belongs to.
- Copy the key immediately — Anthropic shows the full value exactly once.
- Add a payment method under Settings → Billing; new accounts start with a small trial credit, not an ongoing free tier.
- Set it as ANTHROPIC_API_KEY in your environment, never committed to source control.
Key facts
| Env var | ANTHROPIC_API_KEY |
| Payment required before first call | No |
| Scoped to project/org | Yes |
| Shown once | Yes |
FAQ
Do I need a credit card to get an Anthropic API key?
No — you can generate the key without a payment method, though usage limits stay low until you add one.
Can I see my Anthropic API key again after closing the page?
No — Anthropic shows the full key value exactly once. If you lose it, revoke it and create a new one.
Is this the same as an All AI Ask API key?
No. This page is about creating an API key with Anthropic directly, for calling their API yourself. For an All AI Ask key — one key that routes to Anthropic and every other provider we support — see /api-keys.
