HTTP Request node returns 404/400 for Anthropic API on self-hosted instance

Describe the problem/error/question

What is the error message (if any)?

Please share your workflow

(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.)

Share the output returned by the last node

Information on your n8n setup

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

@Sergej_Kul does the native node behave the same with those credentials?

good day @Sergej_Kul
Could you share the node configuration with secrets redacted, the full node output, your n8n version, and how you’re running n8n? Also please include your n8n version, how you’re running it, and whether the same request works with curl from inside the same server/container.400/404 usually points to request configuration rather than the self-hosted n8n instance itself

Describe the problem/error/question

What is the error message (if any)?

Please share your workflow

(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.)

Share the output returned by the last node

Information on your n8n setup

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
    
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Hi n8n team, here is the technical ‘meat’ regarding the 404 error with the Anthropic node:

  • n8n Version: 2.16.0

  • The Issue: The native Anthropic node (Message a model) returns 404 Not Found when using Claude 3 models (claude-3-haiku-20240307), even with verified credentials.

  • Symptoms: The model dropdown fails to load. Manual ID entry leads to 404.

  • Validation: I successfully connected using the HTTP Request node with the same API key and endpoint (https://api.anthropic.com/v1/messages), which confirms the issue is within the native node’s URL construction in this version.

Workflow JSON (Redacted):

```json

{
“name”: “My workflow 2 (Clean)”,
“nodes”: [
{
“parameters”: {},
“type”: “n8n-nodes-base.manualTrigger”,
“typeVersion”: 1,
“position”: [-32, -128],
“id”: “1500a53d-4591-4828-86a2-90aacec32b63”,
“name”: “When clicking ‘Execute workflow’”
},
{
“parameters”: {
“url”: “https://api.supadata.ai/v1/youtube/transcript”,
“authentication”: “genericCredentialType”,
“genericAuthType”: “httpHeaderAuth”,
“sendQuery”: true,
“queryParameters”: {
“parameters”: [
{
“name”: “url”,
“value”: “https://www.youtube.com/watch?v=fIKUYgzVedM”
},
{
“name”: “text”,
“value”: “true”
}
]
},
“sendBody”: true,
“contentType”: “={{ { “model”: “claude-3-haiku-20240307”, “max_tokens”: 1024, “messages”: [ { “role”: “user”, “content”: "Сделай сценарий для Shorts на основе этого текста: " + $json.content } ] } }}”,
“options”: {}
},
“type”: “n8n-nodes-base.httpRequest”,
“typeVersion”: 4.4,
“position”: [112, -112],
“id”: “1f982020-13ec-4f30-a76d-dbb77c2badf8”,
“name”: “HTTP Request”,
“credentials”: {
“httpHeaderAuth”: {
“id”: “REDACTED”,
“name”: “Header Auth account”
}
}
},
{
“parameters”: {
“modelId”: {
“__rl”: true,
“value”: “claude-3-haiku-20240307”,
“mode”: “id”
},
“messages”: {
“values”: [
{
“content”: “=Проанализируй этот транскрипт видео и создай сценарий для вирального Shorts.\nТекст видео: {{ $json.content }}\n\nИнструкция:\n1. Выдели самую интересную и провокационную мысль.\n2. Сделай мощный “Хук” (первые 3 секунды).\n3. Напиши динамичный основной текст (Body).\n4. Добавь в конце призыв к действию (CTA).\n\nОтвет дай СТРОГО в формате JSON.”
}
]
},
“options”: {}
},
“type”: “@n8n/n8n-nodes-langchain.anthropic”,
“typeVersion”: 1,
“position”: [336, -304],
“id”: “a0c02d7d-c3e2-4d95-a5ca-4c9c7caa468c”,
“name”: “Message a model”,
“credentials”: {
“anthropicApi”: {
“id”: “REDACTED”,
“name”: “Anthropic account”
}
}
},
{
“parameters”: {
“method”: “POST”,
“url”: “https://api.anthropic.com/v1/messages”,
“sendHeaders”: true,
“headerParameters”: {
“parameters”: [
{
“name”: “x-api-key”,
“value”: “REDACTED_API_KEY”
},
{
“name”: “anthropic-version”,
“value”: “2023-06-01”
}
]
},
“sendBody”: true,
“specifyBody”: “json”,
“jsonBody”: “={\n “model”: “claude-3-haiku-20240307”,\n “max_tokens”: 1024,\n “messages”: [\n {\n “role”: “user”,\n “content”: “Сделай сценарий для Shorts на основе этого текста: {{$json.content}}”\n }\n ]\n}”,
“options”: {}
},
“type”: “n8n-nodes-base.httpRequest”,
“typeVersion”: 4.4,
“position”: [224, -288],
“id”: “4ed61fcb-e0b0-40c9-9c78-eb9f934fd371”,
“name”: “HTTP Request1”
}
],
“connections”: {
“When clicking ‘Execute workflow’”: {
“main”: [[{“node”: “HTTP Request”,“type”: “main”,“index”: 0}]]
},
“HTTP Request”: {
“main”: [[{“node”: “HTTP Request1”,“type”: “main”,“index”: 0}]]
}
},
“settings”: {
“executionOrder”: “v1”,
“instanceId”: “REDACTED”
}
}

```

png

Значок PNG-файла

good day @Sergej_Kul
I’d treat the 400/404 as a request-shape issue first, not a self-hosting issue. I’d verify the HTTP Request node is doing a POST to https://api.anthropic.com/v1/messages, with x-api-key, anthropic-version: 2023-06-01, and content-type: application/json. Then I’d send the body as JSON with model, max_tokens, and messages. I’d also double-check the model ID and make sure the URL isn’t accidentally pointing to another endpoint.

Yeah this actually looks like an issue with the native Anthropic node rather than your setup.

The key signal is that your HTTP Request node works fine with the same API key and endpoint — so auth and API access are clearly OK.

I’ve seen similar behavior where the Anthropic node in certain n8n versions doesn’t fully support Claude 3 models yet (or uses an outdated internal endpoint/format), which ends up returning a 404.

The fact that the model dropdown isn’t loading is another hint that the node isn’t properly fetching available models.

For now, your workaround (using the HTTP Request node) is actually the safest option.

If you want to try fixing it on the native node side, you could:

  • test with an older model (if available)

  • or upgrade n8n to a newer version if possible

But honestly, I’d stick with HTTP Request for now since it’s already working reliably.

Salvation has finally come!
Thank you all for your participation!!!