Skip to content

How to get an Anthropic (Claude) API key

Sign in to the Claude Console at platform.claude.com, buy credits on the Billing page, then open API keys and press Create key. Copy the key straight away, because the Console shows it only once.

Updated

You need two things from Anthropic: credit on your account and an API key. Both live in the Claude Console, Anthropic’s site for developers. Then you paste the key into WLN once.

Before you start

  • A Claude subscription doesn’t pay for the API. Anthropic says a paid Claude plan improves the chat apps and the API is billed separately (Anthropic help, checked 5 Dec 2026).
  • Max, Ultra and Team plans come with monthly API credit. It’s $100 a month on Max, $200 on Ultra, and up to $500 pooled on Team. Free, Pro and Enterprise plans don’t get it. You claim it on claude.ai under Settings › Billing by linking a Console organization, and unused credit expires at the end of each billing cycle (Anthropic docs, checked 5 Dec 2026).
  • Otherwise you pay before you use it. API usage comes out of prepaid credits. Bought credits expire one year after purchase, and when they run out, API calls stop until you add more (Anthropic help, checked 5 Dec 2026).

Anthropic renames Console pages now and then. If a button below has a new name, the linked page will have the current one.

Step 1: Sign in to the Claude Console

Go to platform.claude.com and sign in, or create an account. In WLN, the Get a key link under the Anthropic key field opens the Console too.

Step 2: Add credit

With an Admin or Billing role, open the Billing page and choose Buy credits (Anthropic help, checked 5 Dec 2026).

The same page has auto-reload, which buys more credit when your balance drops below a level you pick. Turn it on if you never want replies to stop. Leave it off if you’d rather decide each top-up yourself.

If you have a Max, Ultra or Team plan, link it first. Its monthly credit is spent before any credit you buy.

Step 3: Create the key

Open the API keys page and press Create key. If the dialog offers other ways to connect, choose Somewhere else or Continue with an API key. Then:

  • Name the key so you’ll know it later, such as “WLN on my MacBook”.
  • Expires sets how long the key lasts. You can’t change it afterwards.
  • Scope is the workspace the key works in. Pick one workspace, not Organization: an organization-wide key needs a workspace named in every request.

Copy the key as soon as it appears. The Console shows the full key only once. If you lose it, make a new one. Claude keys start with sk-ant-.

Source, checked 5 Dec 2026: Get your Claude API key.

Step 4: Set a spend limit at Anthropic

Every Anthropic organization already has a monthly cap that depends on its usage tier: $500 on Start, $1,000 on Build and $200,000 on Scale. You can set your own lower limit on the Spend limits page: next to Monthly spend limit, press Adjust limit or Set limit (Anthropic docs, checked 5 Dec 2026).

Workspaces can have their own spend limits too. Anthropic suggests giving a project its own workspace when you want to cap it. We’d do exactly that: make a workspace for WLN, give it a limit you’re comfortable with, and create WLN’s key in it. If that key ever leaks, the damage stops at the limit.

Step 5: Put the key in WLN

  1. In WLN, open Settings › Models and API key and find the Anthropic key section.
  2. Paste the key and press Save. WLN checks it with Anthropic by asking which models it can use, and keeps it in Keychain on your Mac.
  3. WLN asks “Send your chats to Anthropic?”. Press Allow. No chat goes to Anthropic until you do, and you can take it back in Settings › Data and privacy.
  4. When the line turns green and says “Saved. Claude models are ready.”, the key works. The Test button checks it again whenever you like.
The Anthropic key section in WLN with the status Saved. Claude models are ready, and the Remove, Test and Save buttons. The key is blurred.
A saved Anthropic key. We blurred the key in this screenshot.

The consent sheet lists what goes to Anthropic. It also says one thing that only applies to Anthropic: to keep Anthropic’s prompt cache warm, WLN may send a chat’s last request again about every 4.5 minutes while a reply runs or the open chat waits for you. Nothing new is added, and the cost of those resends is part of the reply’s cost.

The Send your chats to Anthropic? sheet, listing messages, project files, browser pages, memories and connector results, with Not now and Allow.
The sheet WLN shows before any chat goes to Anthropic.

Step 6: Give Claude a role in the team

There’s no model menu in the chat. Every reply comes from WLN’s team, a Planner, a Builder and an optional Reviewer, and you choose their models in Settings › Models and API key › Team.

The Balanced, Cheapest and Strongest presets use models on OpenRouter, so they need an OpenRouter key. With only an Anthropic key, choose Custom. Then set a role’s provider to Anthropic and pick a model, for every role you use if this is your only key. The list shows the Claude models your key can use, with WLN’s listed price per million tokens.

When a role runs on Anthropic’s own API, two more controls appear under it:

  • Thinking turns extended thinking on or off. Some models always think, and WLN shows “Always on” for those.
  • Effort sets how hard the model works. WLN offers only the levels that model allows. With Thinking on, Claude Sonnet 5.5 shows Low, Medium, High, Extra high and Max. WLN starts the Planner and Reviewer at High and the Builder at Medium.

WLN’s note under them sums up the trade: “Thinking uses extra output tokens. Turn it off or lower the effort to spend less.”

The Team section with the Custom preset. The Planner uses Claude Sonnet 5.5 on Anthropic at $2 / $10 per 1M, with Thinking on and Effort set to High.
Claude Sonnet 5.5 as the Planner on an Anthropic key. Prices as listed in WLN on 5 December 2026.

Claude models on OpenRouter don’t show these two controls, and WLN doesn’t send the settings to them. If you want to tune thinking, use the Anthropic key.

A team of only Claude models works. So does a mix, for example a Claude Planner with a cheaper Builder from another provider you have a key for. WLN’s own limit works alongside Anthropic’s: every new chat stops at $5 unless you raise it. More in Get started with WLN.

Using the key in your own scripts

Anthropic’s SDKs and its ant command-line tool read the key from an environment variable called ANTHROPIC_API_KEY (Anthropic docs, checked 5 Dec 2026). To set it in every new Terminal window on a Mac, open your shell settings in Terminal:

touch ~/.zshrc && open -e ~/.zshrc

Add this line with your key in place of the placeholder, save, and open a new Terminal window:

export ANTHROPIC_API_KEY='paste-your-key-here'

Pasting the key into the file, not into a Terminal command, keeps it out of your shell history.

That stores the key as plain text in ~/.zshrc, so keep the file out of anything you share. WLN doesn’t read this variable. It uses the copy you saved in Settings, which stays in Keychain. One key per app is still the better habit: give your scripts their own key.

Keep the key safe

  • Don’t share it. Anthropic asks that each person makes their own key.
  • Keep it out of code, support tickets, forums and chats.
  • Use separate keys for separate jobs, so one leak doesn’t take everything down.
  • Check the Console’s Usage page now and then, and keep a spend limit set.
  • If you think a key leaked, delete it on the API keys page right away and make a new one.

Anthropic also works with GitHub’s secret scanning. If a Claude key turns up in a public GitHub repository, Anthropic switches it off and emails you. Anthropic’s advice is to delete that key, not turn it back on.

Sources, checked 5 Dec 2026: API key best practices and if a key is compromised.

When something goes wrong

WLN puts Anthropic’s errors into plain words. These are the messages you’re most likely to see, and what to do about each.

WLN saysWhat it meansWhat to do
Anthropic says it doesn’t recognise this API key. Check the key in Settings.The key is wrong, deleted, switched off or has a stray space.Copy the key again, or make a new one and paste it in Settings.
Anthropic says this account has no credit left. Add credit in the Anthropic Console and try again.The credit balance is empty.Buy credits or turn on auto-reload on the Billing page.
Anthropic says the request wasn’t valid: You have reached your specified API usage limits…The spend limit you set at Anthropic was reached.Raise or remove the limit on the Spend limits page.
Anthropic says too many requests were sent. Try again in about 20 seconds.A rate limit. If it keeps coming back with no wait time, it can also be your tier’s monthly cap.WLN usually tries again by itself, up to twice. If it still fails, wait. If it lasts, check Spend limits in the Console.
Anthropic says it’s overloaded right now. Try again in a moment.Anthropic is busy.WLN retries on its own. If it still fails, press Try again later.
Anthropic says “model name” isn’t available to this account. Choose another model in Settings > Team.Your key can’t use that model.Pick another Claude model in the Team section.
Anthropic says its safety checks declined this request. You can reword it or pick another model.Claude refused the request.Reword it, or give the role another model.
This chat is too long for “model name”…The chat no longer fits in the model’s context window.Start a new chat, shorten a long paste, or pick a model with a bigger window.

The wait time in the rate-limit message comes from Anthropic, so the number changes. The card above the message gives the short version, such as “Check your Anthropic key” or “Not enough Anthropic credit”.

Questions

Does Claude Pro include API access?

No. Anthropic says a paid Claude plan and the Claude API are billed separately (checked 5 Dec 2026). Max, Ultra and Team plans do include a monthly API credit, but Pro doesn’t (checked 5 Dec 2026).

Is the Claude API free?

No. You pay with prepaid credits, and API calls stop when they run out. Anthropic says bought credits expire one year after purchase (checked 5 Dec 2026). WLN’s chat is free, so your only cost is what Anthropic bills.

Can I use Claude in WLN without an Anthropic key?

Yes, through OpenRouter. The Balanced preset’s Planner is Claude Sonnet 5.5 on OpenRouter. With your own Anthropic key you also get the Thinking switch and Effort levels, which WLN shows only for models on Anthropic’s API.

Where does WLN keep my Anthropic key?

In Keychain on your Mac. WLN sends it only to Anthropic, and no chat goes there until you press Allow.

What does a Claude chat in WLN cost?

It depends on the model, the effort level and how long the chat gets. WLN shows the cost under every reply with the words “Billed by Anthropic”, and every new chat stops at $5 unless you raise it.

Anthropic, Claude, Claude Code, OpenRouter, OpenAI, SubQ and GitHub are trademarks of their owners. WLN is an independent app and isn’t affiliated with or endorsed by them.