Pilotran
TemplatesPricingHow-toBlog
  1. Home
  2. Blog
  3. How to get a Claude API key in 2026 (step-by-step)
Product

How to get a Claude API key in 2026 (step-by-step)

Sign up at console.anthropic.com, verify your account, top up credits, create a key, and start building. What the key looks like, how to store it safely, and what to do when the console shows a different flow than tutorials describe.

PPPavan PolineniFounder
Sep 17, 2026·6 min read

A Claude API key is what lets your code — or any tool that supports Claude — call the Claude models programmatically. This walkthrough is the shortest complete path: from a new browser tab to a working `sk-ant-api03-...` key you can drop into an environment variable in under ten minutes.

1. Go to console.anthropic.com and sign up

Open console.anthropic.com and click Sign up. Anthropic supports Google, GitHub, and email signup — pick whichever your team already uses. If you already have a Claude Pro or Team subscription, note that the browser Claude account and the API console are the same identity, but the billing is separate. Signing in with your existing Claude account is fine.

2. Verify your phone number

Anthropic requires a working mobile number for every API account. Enter it, wait for the SMS code, paste it back. This is a one-time step. Skip it and you can't create keys.

3. Add a payment method (or claim the free credit)

You need credits on your account before the API will respond to real requests. Two paths: add a credit card and pre-load credits ($5 minimum, top-ups from there), or claim any free credits Anthropic is offering to new signups at the time you register. Free credit amounts and eligibility rules change — check the console's Billing tab for what's currently on offer. Once you have a positive balance, requests will process.

Note
The console also supports auto-recharge — when your balance drops below a threshold, Anthropic charges your card for a top-up automatically. Turn this on for anything running unattended.

4. Create the API key

Open Settings → API keys in the console. Click Create Key. Give the key a name — something that identifies what will use it ("Pilotran production", "cold-email-service", "local-dev-alice"). Optionally attach it to a workspace if your organization uses them.

The full key is shown once, at creation. It looks like `sk-ant-api03-` followed by a long random string. Copy it now — the console won't display it again. You'll only ever see the first characters and a masked suffix after this point.

5. Store the key safely

  • Never commit the key to git. Use a `.env` file that's in your `.gitignore`, or a secrets manager (Doppler, 1Password Secrets Automation, AWS Secrets Manager, your platform's env-var UI).
  • The Anthropic SDKs read from the environment variable `ANTHROPIC_API_KEY` by default. Set that and every official SDK finds the key automatically — no explicit config needed.
  • If you leak a key (paste in Slack, commit to a public repo, share in a screenshot), rotate immediately. In the console, delete the leaked key and create a fresh one. Anthropic's abuse detection is fast but not foolproof.

6. Make your first request

The fastest smoke test is a raw curl:

  • Set: `export ANTHROPIC_API_KEY=sk-ant-api03-...`
  • Run: `curl -H 'x-api-key: '"$ANTHROPIC_API_KEY" -H 'anthropic-version: 2023-06-01' -H 'content-type: application/json' https://api.anthropic.com/v1/messages -d '{"model":"claude-sonnet-5","max_tokens":128,"messages":[{"role":"user","content":"Hi"}]}'`
  • You should get JSON back with a Claude response. If it errors with `authentication_error`, the key is wrong. If it errors with `insufficient_quota`, top up credits.

Console differences from older tutorials

Older articles describe a different flow — email-only signup, no phone verification, keys shown in a different UI location, or a free tier that no longer exists. Anthropic has iterated the console several times. If a tutorial mentions a step that doesn't match what you see, trust the current console. The workflow above is current as of 2026 and follows Anthropic's official signup path.

Now that you have a key
Claude API pricing explainedWhat you actually payHow Anthropic API credits workBilling & top-upsClaude API vs Claude subscriptionWhich one to pay forAutomate on your own key with PilotranBYO-key on every plan
Try the platform

Read one, then run one.

Every post pairs with a real Pilotran template. Activate one in a minute — it runs on a schedule and reports back.

Start free trial →Browse templates

Keep reading

  • Product

    The best Zapier alternatives in 2026 for AI-native workflows

    8 min read
  • Product

    The best workflow automation tools in 2026 (honest, not sponsored)

    10 min read
  • Product

    How to use AI for sales prospecting (2026): the workflow that actually works

    8 min read
Pilotran

AI workflow automation on autopilot. Pick a template, connect your apps, let Claude do the rest.

Product

  • Features
  • Templates
  • Pricing

Learn

  • How-to guides
  • Blog

Compare

  • vs Zapier
  • vs n8n
  • vs Make
  • vs Relay
  • vs Gumloop

Company

  • About
  • Contact
  • Privacy
  • Terms
  • DPA
© 2026 Pilotran