# Credential OpenAI problem

**URL:** <https://community.n8n.io/t/credential-openai-problem/295026>\
**Category:** Questions\
**Tags:** node\
**Created:** [May 8, 2026, 3:22pm UTC](https://community.n8n.io/t/credential-openai-problem/295026 "2026-05-08T15:22:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Giuseppe\_Scarpenti](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/giuseppe_scarpenti/32/173059_2.png) [@Giuseppe\_Scarpenti](https://community.n8n.io/u/Giuseppe_Scarpenti)\
**Post date:** [May 8, 2026, 3:22pm UTC](https://community.n8n.io/t/credential-openai-problem/295026/1 "2026-05-08T15:22:54Z")

</div>

The AI Agent node throws a `NodeApiError: config.headers.setContentType is not a function` when configured with OpenAI API credentials (added via n8n’s built-in credential system). No HTTP Request node is involved — the error occurs exclusively through the AI Agent node.  
**Environment**

- **n8n version:** latest (n8n Cloud – app.n8n.cloud)
- **Node type:** AI Agent
- **Authentication method:** OpenAI API credentials (via n8n credential store)
- **Hosting:** n8n Cloud  
Requesting confirmation that this is a known issue and an ETA for the fix to be deployed to Cloud instances.  
Thank you!

## Describe the problem/error/question

## What is the error message (if any)?

## Please share your workflow

```auto
(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:**

---

<div class="post-metadata">

**Author:** ![tamy.santos](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/tamy.santos/32/153776_2.png) [@tamy.santos](https://community.n8n.io/u/tamy.santos)\
**Post date:** [May 8, 2026, 3:43pm UTC](https://community.n8n.io/t/credential-openai-problem/295026/2 "2026-05-08T15:43:32Z")

</div>

welcome to the n8n community @Giuseppe_Scarpenti  
[HTTP Request node fails with “config.headers.setContentType is not a function” when calling api.openai.com · Issue #29471 · n8n-io/n8n](https://github.com/n8n-io/n8n/issues/29471)

its a know issue  
I don’t see a safe user-side workaround for this specific error  
If you are self-hosted, the only practical temporary options reported by the community are downgrading to 2.18.5 or testing another OpenAI-compatible provider/base URL if your workflow allows it, but on Cloud this should be handled through n8n support with the workspace URL, node details, and debug info.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/system/32/36532_2.png) [@system](https://community.n8n.io/u/system)\
**Post date:** [August 6, 2026, 4:49pm UTC](https://community.n8n.io/t/credential-openai-problem/295026/4 "2026-08-06T16:49:32Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
