I am trying to execute a workflow that incorporates the use of PerplexityAI API. I have have created the relevant credentials but keep getting the following error " Header name must be a valid HTTP token [“Header Auth account”]"
And here is a more detailed breakdown of the error message
{
“errorMessage”: “Header name must be a valid HTTP token ["Header Auth account"]”,
“errorDetails”: {
“rawErrorMessage”: [
“Header name must be a valid HTTP token ["Header Auth account"]”
],
“httpCode”: “ERR_INVALID_HTTP_TOKEN”
},
“n8nDetails”: {
“nodeName”: “PerplexityAI API”,
“nodeType”: “n8n-nodes-base.httpRequest”,
“nodeVersion”: 4.2,
“itemIndex”: 0,
“time”: “12/03/2025, 15:16:25”,
“n8nVersion”: “1.81.4 (Cloud)”,
“binaryDataMode”: “filesystem”,
“stackTrace”: [
“NodeApiError: Header name must be a valid HTTP token ["Header Auth account"]”,
" at ExecuteContext.execute (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/HttpRequest/V3/HttpRequestV3.node.js:525:33)“,
" at WorkflowExecute.runNode (/usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/execution-engine/workflow-execute.js:660:19)”,
" at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/execution-engine/workflow-execute.js:891:51",
" at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/execution-engine/workflow-execute.js:1224:20"
]
}
}
When i create the credentials i pasted the API Key into the value section.