How to create a Claude API key (Anthropic): step by step
You create a Claude API key in Anthropic's Claude Console. Here is how, step by step, with credits, prices and a monthly limit, so you keep costs and risks under control.
Lees in het Nederlands →
You create a Claude API key in Anthropic's console at platform.claude.com: sign in, go to Settings and API keys, click Create key, give the key a name and an expiry date, and copy it straight away. You only see the full key once. Then you buy credits under Billing, because the API runs on prepaid credit.
Our article on the OpenAI API key has been the most-read piece on this blog for years. More and more people now ask the same question about Claude: how do you create a Claude API key, and what should you watch out for? Here are the steps, as of 23 November 2026.
Not quite sure what an API key is yet? Read What is an API key? An explanation for non-programmers first. The rest will go much faster.
When do you need a Claude API key?
You don't need a key to chat with Claude in the browser or the app. A subscription such as Claude Pro covers that. You need an API key when another tool or your own program has to talk to Claude. Think of an automation in n8n or Make, a chatbot on your website, or a script that summarises invoices.
How to create a Claude API key, step by step
- Go to platform.claude.com and create an account or sign in. This is the Claude Console (formerly console.anthropic.com).
- Open the keys page: Settings, then API keys, or go straight to platform.claude.com/settings/keys.
- Click Create key. If the button is greyed out, your role in the organisation doesn't have that permission. Ask an admin.
- Give the key a clear name, such as "n8n-invoices" or "website-chatbot". Later you'll know which key does what.
- Choose an expiry date. A key that stops on its own can't be misused unnoticed for years.
- Under Linked account, choose whether the key belongs to you or to a service account, and optionally pick a workspace (see below).
- Copy the key right away. It starts with sk-ant-. The console shows the full key only once. Lost it? Create a new one.
Store the key in a password manager or a secrets manager, as Anthropic itself recommends. Not in an email, a Word document or a shared chat.
Which type of key should you choose?
Anthropic distinguishes three types:
- Personal key: acts as you and stops working when you leave the organisation. Handy for your own tests.
- Service account key: for a permanent integration, a website or an agent that has to keep running, even when an employee leaves.
- Workspace key: the older type, without an owner. Anthropic now recommends the other two.
For a small or mid-sized business the rule of thumb is simple: test with a personal key, run everything in production with a service account. That way your chatbot doesn't go silent the day the colleague who built it leaves.
Buying credits: how payment works
The Claude API runs on prepaid credit:
- Go to Billing (platform.claude.com/settings/billing). You need the Admin or Billing role.
- Click Buy credits, enter the amount and confirm. The credit is available immediately.
- Don't want to run dry? Turn on auto-reload: you choose at which balance credits are topped up automatically, and up to which amount.
Three things to remember, according to the Claude Help Center:
- Credits expire one year after purchase.
- Credit purchases are non-refundable.
- When your credit runs out, your API calls stop until you top up.
According to the pricing page, new users receive free credits to test the API. The amount isn't stated.
What does the Claude API cost?
You pay per million tokens (roughly pieces of words), separately for what you send (input) and what Claude writes back (output). Base prices on Anthropic's pricing page as of 23 November 2026:
- Claude Haiku 5.5: $0.10 input and $0.50 output (up to 100,000 tokens per prompt; above that $0.50 and $2.50).
- Claude Sonnet 5.5: $2 input and $10 output.
- Claude Opus 5.5: $4 input and $20 output.
- Claude Fable 5.2: $8 input and $40 output.
For most everyday business tasks, such as summarising, sorting email or rewriting text, Haiku or Sonnet will take you a long way. Save Fable for genuinely hard tasks. More on that model in Claude Fable 5.2: what's new?.
How to keep costs under control
Set a monthly spend limit right away under platform.claude.com/settings/spend-limits (Set limit next to "Monthly spend limit"). Anthropic also applies its own cap per tier: $500 a month in the Start tier, $1,000 in Build. Your own limit can never exceed your tier's cap.
Working on several projects or for several clients? Create a workspace per project and tie each key to its workspace. You'll see what each project costs, and a leaked key only affects one project.
Your first test
If you want to try it: most tools simply ask you to paste the key. If you write code yourself, put it in the environment variable ANTHROPIC_API_KEY. Anthropic's official Python and TypeScript libraries read it from there automatically, so the key never sits in your code.
My take?
The difference with OpenAI is small: account, key, credit, done. What I do like about Anthropic is that the console nudges you towards an expiry date and a service account. Those are exactly the two things that most often go wrong at smaller companies: a key that never expires, and an integration that hangs on one person's account.
My advice: create a separate key per application with an expiry date, set a monthly limit, and buy a small amount first to test. Credits expire after a year and aren't refunded, so stocking up makes little sense. 😉
Frequently asked questions
Is a Claude API key free?
Creating the key is free. You pay for usage with prepaid credits. According to Anthropic, new users get free test credits, but the pricing page doesn't state the amount.
I lost my key. Can I find it again?
No. The console shows the full key only once. Create a new key and disable the old one.
What do I do if my key has leaked?
Disable the key in the console immediately, create a new one and check your usage. An expiry date and a monthly limit reduce the damage in advance.
Sources
- Get an API key, Claude Docs (Anthropic), read on 23 November 2026
- Get started, Claude Docs (Anthropic)
- Pricing, Claude Docs (Anthropic)
- Rate limits, Claude Docs (Anthropic)
- How do I buy API credits, Claude Help Center


