Nodes/gpt-image-2-comfyui/πŸ”‘ GPT-Image-2 API Key
ComfyUI Node

πŸ”‘ GPT-Image-2 API Key

The key node you can probably skip β€” and that's the point

By Anil-matchaΒ·Created about a month agoΒ·Updated about a month agoΒ· 1
πŸ”‘ GPT-Image-2 API Key
    • api_key
    β—„api_keyβ–Ί

    The πŸ”‘ GPT-Image-2 API Key node is the least exciting node you'll ever wire up, and that's kind of the point. It does zero networking. You type a string into it, it hands that same string out the other side, and you connect the output to the api_key input of the text-to-image or image-to-image node. That's the entire job - a glorified string holder so you paste your muapi.ai key in one place instead of everywhere.

    Here's the twist nobody tells you until it bites: you don't actually need this node. Every generation node in this pack runs its key through a loader that checks the wired api_key field first, then silently falls back to ~/.muapi/config.json. That file is what the MuAPI CLI writes when you run muapi auth configure --api-key YOUR_KEY once in a terminal. Do that, and every api_key field in every workflow can stay blank - the nodes pick it up automatically, and you can delete the key node entirely.

    So when would you keep it? Two cases. You don't want the CLI as an extra moving part, or you're sharing a workflow with someone who hasn't run it. A single key node makes the setup legible: the other person sees exactly where the key goes. It's also handy if you manage a couple of muapi accounts and want to swap keys without editing three nodes.

    What it takes in and out

    The full info_schema is one input and one output:

    • api_key (STRING) - your muapi.ai API key. The author's tooltip says it plainly: get one at muapi.ai β†’ Dashboard β†’ API Keys.
    • Output api_key (STRING) - the same string, wired to any generation node's api_key input.

    That's it. Nothing to configure, nothing to tune, no model to download.

    The one gotcha

    Because the node is a passthrough, it never fails auth itself - the generation nodes do that. The error you can hit here is earlier: if you leave the field blank and there's no ~/.muapi/config.json, the pack raises RuntimeError: No API key found. Either paste your key into the api_key field, or run muapi auth configure.... Fix it either way and move on. If you do get a 401 later, it means the key itself is wrong or expired, not that the wiring is broken.

    Honestly, for a single-key setup I'd skip the node, run the CLI once, and let the config file do the work. The node earns its keep when your workflow is going to be used by someone else - then it's the difference between "paste this key here" and "why is it 401ing."

    CategoryπŸ–ΌοΈ GPT-Image-2

    Inputs (1)

    NameTypeDefaultDescription
    api_keySTRINGYour muapi.ai API key. Get one at muapi.ai β†’ Dashboard β†’ API Keys

    Outputs (1)

    NameTypeDescription
    api_keySTRINGβ€”