We’ve run into this before with credential-linked nodes in n8n, especially after container refreshes or credential deletions.
In your case, the OpenAI node is referencing a credential ID (4uSzYTmm6UTdgt9P) that no longer exists or has become invalid. That’s why you’re getting:
Credential with ID “...” does not exist for type “openAiApi”
To fix this:
Go to Credentials → Create new credential → OpenAI API
Use a valid API key and save with a recognizable name (e.g., OpenAI Prod).
In your OpenAI node, reselect this new credential in the “Credential to connect with” dropdown.
Once connected, the model list will auto-load again, and the red error will disappear.
If the node was copied from another instance or template, this is expected, the credential reference breaks because n8n uses unique credential IDs that don’t carry over between environments.
We’ve dealt with this and similar cases across multiple client setups. Happy to assist further if this continues. You can also connect with us on Calendly or explore our site if you need help debugging or scaling AI integrations.
The API key works, i workes on another n8n install, i think the API itself got corrupted for one reason to another, is there a way to reinstall it ? or to fix it ?
Just to double-check: if you’ve already deleted and recreated the credential under a new name and still hit the same issue, then it might be worth checking the environment itself (especially if you’re running via Docker as you mentioned earlier).
We’ve seen a few edge cases where the internal credential mapping gets corrupted even though the API key is valid and works elsewhere. Here’s what we’d typically do to isolate/fix it:
Delete the broken credential entirely in Credentials.
Create a brand new one (don’t reuse the name, use something like OpenAI Prod 2 to ensure a clean ID).
Go to the node and reselect the new credential from the dropdown.
After binding, the model list should repopulate automatically.
If this still fails, especially after recreating clean credentials and you’re on Docker, try:
Rebuilding the container (with --no-cache if needed).
Making sure your volumes aren’t persisting an older corrupted state.
Let us know how it goes, happy to dig deeper. We’ve worked on similar setups with OpenAI + n8n in production (you can connect via Calendly or check us at hashlogics.com if you need help scaling/debugging).