OpenAI API Config
The one node every ERPK OpenAI workflow starts with
- client
The name undersells it. OpenAI API Config doesn't do anything flashy - it has no inputs and one output - but every OpenAI-powered workflow in the ERPK Collection hangs off it. It's the node that builds the client object that the vision, image, text, and chat nodes consume. Think of it as the power brick in the chain: boring, essential, and the thing you'll blame first when nothing else lights up.
It ships in the ERPK Collection (eRepublik-Labs/comfyui-nodes-erpk), the community monorepo that wraps OpenAI, Claude, Gemini, Grok, and WaveSpeed APIs for ComfyUI.
How it works
When the workflow runs, the node constructs an OpenAIClient using the official openai SDK. It outputs that client on a single client socket of type OPENAI_API_CLIENT - wire it into the client input of any other ERPK/OpenAI node (Vision, Image Generation, Text Generation, Chat) and they share the same authenticated handle.
The crucial detail: in the current version this node takes no inputs at all. There's no api_key widget on it, even though older docs show one. The key resolves from higher-priority sources instead:
- ComfyUI Settings - right-click the canvas > ERPK Settings, or Settings > ERPK > API Keys. Recommended. Keys are stored per-user and never embedded in your workflow JSON, so sharing a workflow doesn't leak them.
config.ini-openai/config.iniinside the pack, under an[openai]section.
That means the Config node is genuinely optional: with a key in Settings, the downstream OpenAI nodes can run standalone without it. You typically still drop it in because it makes the dependency explicit and gives you one place to reason about "is my key set up at all."
Install
cd ComfyUI/custom_nodes
git clone https://github.com/eRepublik-Labs/comfyui-nodes-erpk.git erpk
cd erpk
pip install -r requirements.txt
Or search erpk in ComfyUI Manager and install ERPK Custom Nodes. Then grab an OpenAI API key from platform.openai.com and put it in Settings > ERPK > API Keys.
Common issues
- "OpenAI API key not found" / auth errors on downstream nodes - your key isn't in Settings or config.ini. This node doesn't set the key for you; it resolves it from those two places.
- Key leaking into a shared workflow - shouldn't happen if you use Settings. If you inherited an old workflow with a key in a widget, delete it from the workflow and re-add via Settings; the current node doesn't even expose that widget anymore.
- Multi-user setups - keys resolve per user, so one machine can have different keys per account without cross-talk. If results look like "the wrong user," check which user's ComfyUI settings are active.
It's two minutes of setup that unblocks every other node in this pack's OpenAI half. Worth doing once, carefully, with a key that has spending limits.
Inputs (0)
No inputs
Outputs (1)
| Name | Type | Description |
|---|---|---|
| client | OPENAI_API_CLIENT | — |