How to get an Anthropic (Claude) API key for n8n

Last updated: June 10, 2026 ~5 min n8n setup guide

If you're running an AI automation we built in n8n — or one of our templates — it likely uses Claude (by Anthropic) for the AI steps. To connect it, you need your own Anthropic API key. This walkthrough gets you from zero to a working key pasted into n8n in about five minutes.

One thing to know up front: the Anthropic API is separate from a Claude.ai chat subscription. A Claude Pro plan does not include API access — you set up API billing separately, and it's pay-as-you-go (you only pay for what your automation actually uses).

Video walkthrough coming soon — watch on YouTube
The short version
  1. Create an account at console.anthropic.com
  2. Add prepaid credits under Billing
  3. Go to API KeysCreate Key, then copy it (shown once)
  4. In n8n, add an Anthropic credential and paste the key

1. Create your Anthropic Console account

Go to console.anthropic.com and sign up (or log in). This is the developer console — a different place from the Claude.ai chat app. If you already chat with Claude, you'll still need to register here for API access.

2. Add credits (set up billing)

The API runs on prepaid credits. In the Console, open Billing (sometimes under Settings) and buy an initial batch of credits — a small amount like $5 is plenty to test an automation. Without credits, your API key will work but every request fails with a "credit balance too low" error.

Cost is per token (input + output) and depends on which model you use. For current rates, check Anthropic's pricing page — most lead-gen and admin automations cost cents per run.

3. Create the API key

In the Console, go to API Keys (under Settings) and click Create Key. Give it a recognizable name — e.g. n8n-production — so you know what it's for later.

Anthropic shows you the full key exactly once. It starts with sk-ant-. Copy it immediately and paste it somewhere safe (a password manager). If you close the dialog without copying, you'll have to revoke it and create a new one — you can't view it again.

Treat the key like a password. Anyone with it can spend your credits. Never paste it into a chat, email, or screenshot. To send it to us securely, use the method we agreed on (a password manager share link or our secure form) — not a plain message.

4. Connect the key to n8n

In n8n, the key goes on an Anthropic credential, which the AI nodes then reuse:

  1. Open your workflow and click the Anthropic Chat Model node (it sits under an AI Agent node) — or add an Anthropic node.
  2. In the node's Credential dropdown, choose Create New Credential.
  3. Paste your key (sk-ant-…) into the API Key field and save.
  4. Back on the node, pick a model from the dropdown (the model is set here, not on the credential).
  5. Click Execute / Test step — if it returns a response, you're connected.

That's it — every AI step in the workflow now uses your key and your credits.

Official reference

Anthropic's dashboards change from time to time. If a screen looks different from this guide, their own docs are the source of truth: the Anthropic Console and Anthropic API docs. For the n8n side, see n8n's Anthropic credential docs.

FAQ

Is the Claude API free?

No — it's pay-as-you-go. You add prepaid credits and are billed per token. It's separate from a Claude.ai chat subscription, which does not include API access.

I lost my key. Where do I find it again?

You can't — Anthropic shows the full key only once. Revoke the old one under API Keys in the Console and create a new key.

Which Claude model should I pick in n8n?

The latest model that fits your budget. A Sonnet model is the usual default (good balance of capability and cost); Opus is the most capable; Haiku is fastest and cheapest for simple tasks. Set it on the node, not the credential.

Want us to set it up for you?

We build AI lead-gen and CRM automations in n8n — and handle the wiring, keys, and scopes so you don't have to.

Book a Free Strategy Call

← Back to all guides