Skip to content

Bug: Anthropic Chat Model node fails on n8n Cloud 2.10.1 — credential works via HTTP Request #26300

Description

@JulienPharma

Describe the problem/error/question

The native Anthropic Chat Model node (lmChatAnthropic v1.3) fails to authenticate with a valid Anthropic API key. Both the credential test and actual workflow execution fail. However, the exact same API key works perfectly when used via an HTTP Request node calling the same Anthropic API endpoint. This confirms the issue is within n8n's Anthropic node implementation, not with the API key or Anthropic's service.

This appears to be the same issue reported in:

What is the error message (if any)?

Credential test error:
"Couldn't connect with these settings — The resource you are requesting could not be found"

Workflow execution error:
"Error in sub-node 'Anthropic Chat Model'"

NodeOperationError: Error in sub-node Anthropic Chat Model
  at ExecuteContext.getInputConnectionData

Node type: @n8n/n8n-nodes-langchain.lmChatAnthropic
Node version: 1.3 (Latest)

Please share your workflow/screenshots/recording

Failing workflow (native Anthropic node):

{
  "name": "Test Anthropic Credential",
  "nodes": [
    {
      "parameters": {},
      "id": "chat-trigger",
      "name": "When chat message received",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "typeVersion": 1.1,
      "position": [0, 0]
    },
    {
      "parameters": {},
      "id": "llm-chain",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "typeVersion": 1.4,
      "position": [220, 0]
    },
    {
      "parameters": {
        "model": "claude-sonnet-4-20250514",
        "options": {
          "maxTokensToSample": 1024
        }
      },
      "id": "anthropic-model",
      "name": "Anthropic Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
      "typeVersion": 1.3,
      "position": [220, 220]
    }
  ],
  "connections": {
    "When chat message received": {
      "main": [[{"node": "AI Agent", "type": "main", "index": 0}]]
    },
    "Anthropic Chat Model": {
      "ai_languageModel": [[{"node": "AI Agent", "type": "ai_languageModel", "index": 0}]]
    }
  }
}

Working workflow (HTTP Request with same API key):

{
  "name": "Test Anthropic via HTTP",
  "nodes": [
    {
      "parameters": {},
      "id": "chat-trigger",
      "name": "When chat message received",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "typeVersion": 1.1,
      "position": [0, 0]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.anthropic.com/v1/messages",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {"name": "x-api-key", "value": "sk-ant-api03-REDACTED"},
            {"name": "anthropic-version", "value": "2023-06-01"},
            {"name": "content-type", "value": "application/json"}
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={{ JSON.stringify({ model: \"claude-sonnet-4-20250514\", max_tokens: 1024, messages: [{ role: \"user\", content: $json.chatInput }] }) }}"
      },
      "id": "http-request",
      "name": "Call Claude API",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [220, 0]
    }
  ],
  "connections": {
    "When chat message received": {
      "main": [[{"node": "Call Claude API", "type": "main", "index": 0}]]
    }
  }
}

Share the output returned by the last node

HTTP Request node output (proving key works):

{
  "model": "claude-sonnet-4-20250514",
  "id": "msg_01Ax8Lbb9vX7T9HnTac78UFg",
  "type": "message",
  "role": "assistant",
  "content": [{"type": "text", "text": "Hello! I'm working correctly. How can I help you today?"}],
  "stop_reason": "end_turn",
  "usage": {
    "input_tokens": 8,
    "output_tokens": 17
  }
}

Debug info

What I verified:

  • API key format: valid sk-ant-api03-... key
  • Base URL: https://api.anthropic.com
  • Anthropic credit balance: $9.99 USD active
  • Key has no spaces or line breaks
  • Fresh key generated and tested

core

  • n8nVersion: 2.10.1
  • platform: docker (cloud)
  • nodeJsVersion: 24.13.1
  • nodeEnv: production
  • database: sqlite
  • executionMode: regular
  • concurrency: 5
  • license: enterprise (sandbox)

storage

  • success: all
  • error: all
  • progress: false
  • manual: true
  • binaryMode: filesystem

pruning

  • enabled: true
  • maxAge: 168 hours
  • maxCount: 2500 executions

client

  • userAgent: mozilla/5.0 (macintosh; intel mac os x 10_15_7) applewebkit/537.36 (khtml, like gecko) chrome/145.0.0.0 safari/537.36
  • isTouchDevice: false
  • Generated at: 2026-02-26T18:23:19.696Z

Metadata

Metadata

Assignees

No one assigned

    Labels

    status:in-linearIssue or PR is now in Linearstatus:pending-assignmentIssue is waiting for team assignmenttriage:completeTriage has been completed and issue is ready for internal teams

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions