OpenAI API Key Manager
Set the Key Once, Stop Pasting It Everywhere
- STRING
The OpenAI nodes in this pack need a key, and the bad ways to handle that are hardcoding it into prompts or pasting it into a chat node every time you build a workflow. The Key Manager is the pack's answer: a one-field node that validates your key and saves it to a config.json inside the pack folder, where the OpenAI Chat GPT node reads it automatically. Run it once and forget about it.
Given that this is an API-key-carrying node, a word on trust first. Custom nodes run arbitrary Python on your machine - true of every pack - and the security frame is worth repeating here: LLM/API nodes are exactly the shape an attacker hides credential theft in (the ComfyUI_LLMVISION node shipped malware under the guise of an "LLM vision" tool). This pack is tiny and has essentially zero community footprint. I read the source before writing this: the Key Manager only validates and writes config.json, and the Chat node only reads that file and calls the official OpenAI API. That's the whole network surface. Whether that's enough trust for your machine is your call, but the code does what it says.
How it works
One required input, api_key (STRING). Run the node and it checks that the value isn't empty, isn't the placeholder text, and contains sk-. If it passes, it writes - or merges into - ComfyUI/custom_nodes/comfyui-storyboard/config.json as {"openai_api_key": "..."} and returns a status message. If validation fails, you get a message instead of a write, and nothing is stored.
The output
- STRING - a status message telling you whether the key was saved.
This is a setup node. The Chat GPT node's error message literally tells you to create this config file if it's missing; this node is just the friendly way to do it.
Install & setup
Install the pack first:
# ComfyUI Manager → search "comfyui-storyboard" → Install → Restart
# or
cd ComfyUI/custom_nodes
git clone https://github.com/laubsauger/comfyui-storyboard
Then add the Key Manager node, paste a key from platform.openai.com, and queue once. That's the entire setup. The pack's only pip dependencies are python-dotenv and openai, which Manager installs for you.
Where people get burned
- The key is plaintext on disk.
config.jsonsits in the pack folder, readable by anyone with access to the machine, its backups, or a compromise of your user account. That's the tradeoff of file-based storage over an environment variable. - Don't share workflows with this node filled in. The api_key widget value rides along in the saved workflow JSON. Post a workflow publicly with the Key Manager still populated and you've handed out a live key. Delete the node or blank the field before exporting.
- No rotation story. Change your OpenAI key and you have to run the node again to overwrite the file.
It does the one job it advertises. The interesting part of the pack is what you do with the key afterward.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| api_key | STRING | Enter your OpenAI API key here | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | — |