Home / Learn / Connecting Claude to n8n
Connecting Claude to n8n — n8n Guide

Connecting Claude to n8n

n8n's Anthropic node has a Base URL field, so a purchased Claude key drops straight in — no Anthropic account, no approval. Buy a key, paste it, point the Base URL at the gateway, and your workflows reason with Claude.

Buy a key and build the credential

Get a key on ClaudeAPIKey.dev (register, add credit, generate). In n8n, create an Anthropic credential, paste the key (sent as x-api-key), and set the Base URL to the gateway host root. Attach it to the Anthropic Chat Model node.

Enter the host root only — n8n appends /v1/messages and /v1/models. Adding /v1 yourself doubles the path.

The '/v1/models' credential fix

If you see 'n8n Claude API key not working', it's usually not the key. n8n's credential test calls GET {BaseURL}/v1/models; a gateway without it fails the test even though chat works. Our gateway implements /v1/models, so the credential saves.

Auth scheme is the other cause — n8n sends x-api-key; a Bearer gateway 401s. Use Add Custom Header for Bearer.

Why a bought key suits n8n

You skip the Anthropic account entirely and pay as you go — ideal for automations where you want a predictable per-call cost and instant setup. Top up with card or crypto as your workflows grow.

A single key powers every Anthropic node across all your workflows.

Start automating

With the credential saved, feed the Anthropic Chat Model into an AI Agent or LLM Chain and your scheduled or webhook-triggered workflows run on Claude.

New accounts get a free credit to test the connection first.

# n8n -> Credentials -> Anthropic
# API Key:  <your gateway key>
# Base URL: https://claudeapikey.dev        (host root, NO /v1)
# Attach to: Anthropic Chat Model -> AI Agent node
# If gateway needs Bearer: 'Add Custom Header'
#   Authorization: Bearer <key>

Frequently asked questions

How do I connect Claude to n8n without an Anthropic account?
Buy a key on ClaudeAPIKey.dev, create an Anthropic credential in n8n, set the Base URL to the gateway host root, and paste the key.
Why does n8n say my key isn't working?
Its test calls /v1/models; a gateway lacking it fails the test. Ours implements it. Bearer-vs-x-api-key is the other cause.
Does the Base URL include /v1?
No — host root only; n8n appends the paths.
Is there a free credit?
Yes — new accounts get WELCOME5 to test before topping up.
Start using Claude in minutes

Get an API key — no Anthropic account or waitlist required.

Get your API key

AI Prime Tech is an independent API gateway. It is not affiliated with, endorsed by, or a reseller of Anthropic. Claude and related model names are trademarks of their respective owners.

More Claude API guides

How to Get a Claude API KeyClaude API Pricing, ExplainedThe Cheapest Way to Use the Claude APIUnlimited Cursor with the Claude APIUnlimited Claude Code AccessClaude API Gateway vs. Anthropic DirectUsing Claude Through an OpenAI-Compatible APIClaude Models ComparedWhat 'Unlimited' Claude API Access MeansPaying for the Claude API with CryptoClaude API Access Without a WaitlistHow to Reduce Claude Token UsageUnlimited Cline with the Claude APIUnlimited Roo Code with the Claude APIUnlimited Claude in JetBrains IDEsUnlimited Aider with the Claude APIUnlimited Claude in VS CodeUnlimited OpenCode with the Claude APIRunning an Unlimited Hermes Agent on ClaudeRunning Unlimited OpenClaw on ClaudeWhat an Anthropic-Compatible API MeansClaude Code API Key — How to Get and Set UpClaude Code API Costs — Pricing and How to Cut ThemClaude API Errors — Rate Limits, 400, 500, 529 FixesHow to Buy Claude API CreditsUnlimited Claude Usage — Plans and PricingUnlimited Claude Opus 4.8 AccessClaude API Free Trial — Get $5 Free CreditClaude API vs Claude Pro/Max Subscription — Which to ChooseUnlimited Claude Code Usage — No Token LimitsHow to Get Unlimited Claude UsageHow to Get an Unlimited Claude API KeyUsing Claude in CodexUsing LiteLLM with a Claude KeyUsing Claude in Kilo CodeClaude in GitHub Copilot — No Anthropic Account NeededClaude in Zed — Instant Key, No WaitlistClaude in Cherry Studio — Buy a Key, Start ChattingClaude in LangChain — Just Add a KeyFactory Droid on Claude — No Anthropic Account