Skip to content

Anthropic Can't Connect through native node, "requires x-api-key header" #20730

Description

@JQuinnC

Describe the problem/error/question

When using an AI Agent and connecting the native Anthropic node, attempting to open a list of models results in "x-api-key" header required and 400 error. The API Key is confirmed as working.

What is the error message (if any)?

400

Please share your workflow/screenshots/recording

https://link.nldrive.ai/ltuos

(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)
⚠️ WARNING ⚠️ If you have sensitive data in your workflow (like API keys), please remove it before sharing.

{
"nodes": [
{
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "claude-sonnet-4-20250514",
"cachedResultName": "Claude 4 Sonnet"
},
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
"typeVersion": 1.3,
"position": [
2864,
2992
],
"id": "524e420e-8ca4-4edc-809f-d39665f05d5b",
"name": "Anthropic Chat Model",
"credentials": {
"anthropicApi": {
"id": "Kv4ZfLJR1g1OvG1F",
"name": "Anthropic N8N API"
}
}
}
],
"connections": {
"Anthropic Chat Model": {
"ai_languageModel": [
[]
]
}
},
"pinData": {},
"meta": {
"templateCredsSetupCompleted": true,
"instanceId": "08adab7c8b63de84efe734bd94412c66db38f295025c1987dffd566a19d60abe"
}
}

Share the output returned by the last node

Environment Information

n8n Version: 1.113.3
Platform: GCP Kubernetes
Node.js Version: 22.19.0
Environment: production
Database: PostgreSQL
Execution Mode: queue (not "scaling single-main")
Concurrency: -1
License: Community (self hosted)

Storage Configuration:

  • Success executions: all
  • Error executions: false
  • Progress: false
  • Manual executions: true
  • Binary mode: memory

Pruning Configuration:

  • Enabled: true
  • Max age: 48 hours
  • Max count: 10,000 executions

Security:

  • Secure cookie: false

Client:

  • User agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36
  • Touch device: false

Generated at: 2025-10-13T13:46:28.312Z}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions