This article explains how to connect Claude (Anthropic) to n8n by generating an API key from the Anthropic Console, adding API credits, and saving the credential inside n8n so you can use Claude LLM models in your automation workflows.
Before you begin
You will need:
- An Anthropic Console account (free to create)
- A credit card to add API credits (minimum $5)
- Access to your n8n instance
💡 Recommendation: If you want to use a large language model directly, you can connect via the Anthropic API as described below. However, we recommend using OpenRouter instead — it gives you access to Claude and many other up-to-date models from a single credential. See the Connecting OpenRouter to n8n article for details.
Step 1 — Create your Anthropic account and add credits
- Open your browser and go to console.anthropic.com.
- Create a Claude Developer Account and log in.
- Click Add Credits in the dashboard.
- Add at least $5 in API credits (or a custom amount). API calls will not work without a positive credit balance.
Step 2 — Generate your API key
- In the left sidebar, click API Keys.
- Click + Create Key (or + API Keys).
- Select Developer Account as the key type.
- Enter a descriptive name for the key — for example,
n8n-automations. - Click Copy Key to copy the API key to your clipboard.
⚠️ Important: You will only be shown this key once. Save it immediately in a secure location such as 1Password before closing the window.
Step 3 — Add the Anthropic credential in n8n
- Open your n8n instance in the browser and sign in.
- Click the + (plus) icon and select Credential.
- Search for Anthropic and select it.
- Paste your API key into the API Key field.
- Give the credential a clear name — for example,
Anthropic — n8n Automations. - Click Save. You should see a Credential Successfully Saved confirmation.
Step 4 — Use Claude in an n8n workflow
- Create a new n8n workflow and add a trigger node.
- Click + to add a new node and search for Anthropic Chat Model (also listed as Claude — Anthropic API Model).
- In the node settings, select the Anthropic credential you just created.
- Choose your desired Claude model — for example, Claude Opus 4.5 — from the model dropdown.
- Connect the node to your workflow and test it.
Managing your API key and billing
You can view and manage your API keys, monitor usage, and top up credits at any time by returning to console.anthropic.com. It is good practice to rotate API keys periodically and to store them in a password manager rather than in plain text.
Available Claude models
Once your credential is connected, n8n will display the available Claude models in the model dropdown. Common options include:
- Claude Opus 4.5 — most capable, best for complex reasoning tasks
- Claude Sonnet — balanced performance and cost
- Claude Haiku — fastest and most cost-effective for simple tasks
Model availability may change as Anthropic releases updates. Always check the Anthropic model documentation for the latest list.