Load API config
The node that keeps your API key out of your workflow JSON (listen to it)
- STRING
This is the most responsible node in the whole pack, and it's the one beginners skip. NodeGPT's README leads with a warning in caps - "Dont share your workflow with any API keys inside!!!" - and this node is the mechanism that warning is pointing at. Instead of typing your OpenAI key into a widget, you drop it in a plain text file and let LoadAPIconfig hand it to the graph over a wire.
Why bother? ComfyUI bakes workflow JSON into saved images. A key sitting in a widget gets embedded in every PNG you export, and the moment you share that image - on Discord, on Civitai, anywhere - the key ships along inside the metadata. That's a real leak, not a theoretical one. The ecosystem learned this the hard way: the ComfyUI_LLMVISION malware incident showed exactly how much trust custom node graphs carry, and key-leakage via shared workflows is the quieter version of the same story. This node is the pack author's attempt at the fix.
How it works
One required input: API_KEY, which is a dropdown whose only choice is OpenAI.txt. The node reads that file (expected in the pack's directory) and outputs the contents as a STRING. It's a key loader, nothing more. Feed that STRING into the API_Key input on the ChatGPT node and you've got a key that never has to live in the workflow itself.
The trade-off is exactly the kind of thing you should know before you trust it: the key is still traversing the graph, and if you share the workflow file itself (the .json), the wiring reveals which file to read - though not its contents. So it's defense-in-depth, not a vault. It also means the file has to exist on the machine that runs the workflow, which is fine for your own use and a non-starter if you're handing a workflow to someone else.
Installing and using it
The pack installs the old-school way:
cd ComfyUI/custom_nodes
git clone https://github.com/xXAdonesXx/NodeGPT
Restart ComfyUI, let it auto-install requirements, drop a file named OpenAI.txt with your key in it, then wire this node's STRING into the ChatGPT node's API_Key. The only model download is whatever LLM you point at; there's nothing heavy in this node itself.
Reality check before you commit: as of this writing the original repo 404s and the author's GitHub account is gone, so the clone URL above won't work today and ComfyUI Manager won't find the pack. The concept, though, is evergreen and worth stealing even if you never install this pack: keys in text files, not in workflows, ever.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| API_KEY | COMBO | 1 options: OpenAI.txt |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | — |