How to Connect Anthropic Claude as the Model in n8n Workflows
Add an Anthropic credential and use a Claude chat model in n8n nodes and agents so you can compare or switch providers freely.
n8n is provider-agnostic, so you are not locked into one LLM vendor. Adding Anthropic's Claude alongside OpenAI lets you pick the best model per task or fail over if one provider has an outage. This guide wires Claude in and uses it as the chat model in an AI Agent.
What you need
- A running n8n instance
- An Anthropic account with API access and billing enabled
- A workflow where you want to use Claude (new or existing)
Step 1: Create an Anthropic API key
Sign in at console.anthropic.com, open API Keys, and create a new key. Copy it now, since the console only shows the full value once.
Step 2: Add the credential in n8n
In n8n go to Credentials, click Add credential, search for Anthropic, and paste your key into the Anthropic API credential. Save and let n8n test the connection.
Step 3: Use a Claude chat model
In any LangChain-based flow, add an Anthropic Chat Model sub-node, choose your credential, and pick a model such as claude-sonnet-4. Connect it into an AI Agent or Basic LLM Chain exactly where you would connect an OpenAI chat model.
Step 4: Run a quick comparison
Send the same prompt through an OpenAI model and a Claude model in two parallel branches, then eyeball the outputs side by side. This is the fastest way to decide which provider fits a given task.
Result
Claude is now a first-class model option in your instance. Any node or agent can use it, and switching providers is a one-dropdown change rather than a rebuild.
Watch related tutorials
32:08
21:45
34:10
26:40
32:15
40:20