Nodes/comfy-api-liberation/πŸ”‘ API Key Manager
ComfyUI Node

πŸ”‘ API Key Manager

Drop in Your Own API Keys

By holo-qΒ·Created 7 months agoΒ·Updated 5 months agoΒ· 48
πŸ”‘ API Key Manager
    • status
    β—„providergoogleβ–Ί
    β—„actioncheckβ–Ί
    β—„api_keyβ–Ί
    β—„pass_pathβ–Ί

    Here's the situation this whole pack exists for: ComfyUI's built-in API nodes don't actually call Google, OpenAI, or Stability directly. Every request routes through api.comfy.org, which bundles your auth into a credit system. You pay Comfy, Comfy pays the vendor, and you never see the real per-call price. That's convenient, but it's also a billing chokepoint between you and the models you're renting.

    APIKeyManager is where you break that link. It's the node that stores your own vendor API keys so comfy-api-liberation can intercept those proxied calls and rewrite them to go straight to the vendor with your key. You run it once per provider, it saves the key to disk, and from then on your existing workflows just work - no nodes to swap, nothing to rebuild.

    What it actually does

    The node has four actions, and that's the whole job:

    • set - store a provider key locally
    • set_pass - store a pass path instead of the key itself
    • check - report whether a provider is configured
    • clear - wipe a provider's entry

    So it's less "node" and more "a small form wearing a node costume." You don't wire it into your generation pipeline. It's marked as an output node, which means it runs on its own and just shows you a status string. Paste a key in, hit set, done.

    The important design detail: keys are stored in api_keys.json inside the extension folder, never in your workflow file. That's deliberate - workflow JSONs get shared around constantly, and the last thing you want is your OpenAI key embedded in one you paste into Discord. If you use the set action, your key goes into that local config file and nowhere else.

    Inputs that matter

    • provider - which vendor you're configuring. Defaults to google, but the dropdown covers the ~30 providers the pack maps: OpenAI, Stability, BFL (Flux), ElevenLabs, Kling, Luma, Meshy, Tencent, and friends.
    • action - the four options above, defaulting to check.
    • api_key - paste the key when action is set.
    • pass_path - a pass entry path (like ai/openai) when action is set_pass.

    One provider breaks the mold: Tencent Hunyuan 3D doesn't take a single bearer token, so the tencent entry expects secretId:secretKey (optionally with a region, e.g. secretId:secretKey:na-ashburn). If you're setting up Tencent, don't paste your key and wonder why it 400s.

    The pass option, for the paranoid among us

    pass is the CLI password manager. Instead of storing the key itself, you store only a path like ai/openai, and Liberation resolves the actual secret at request time with pass show ai/openai. On a shared box - or just out of principle - this is the mode I'd reach for. It's also the fix for the pack's most legit criticism (see below).

    Installing

    Via ComfyUI Manager, search "comfy-api-liberation". Or the manual route:

    cd ComfyUI/custom_nodes
    git clone https://github.com/holo-q/comfy-api-liberation.git
    

    Then restart ComfyUI. That's it - the pack has no requirements.txt and no Python dependencies, and the web UI ships prebuilt, so there's no npm build step lurking either. It monkey-patches Comfy's API client on import, so a restart is genuinely all it needs.

    Where people get burned

    • pass shows "⚠ pass path set but not resolved." That means either pass isn't installed or pass show <path> failed. The pack resolves the key at request time, and if it can't, the call silently falls back to Comfy's proxy. Fix the pass setup first.
    • Plaintext keys. A sharp-eyed reviewer on the pack's launch thread flagged that api_keys.json is written with default permissions - world-readable on multi-user systems. On a single-user desktop this is a non-issue. On a shared server, use pass mode or chmod 600 the file. The author's response ("only a problem if you already have a virus") is a bit dismissive, but the fix is easy either way.
    • Not everything is tested. The author admits only the Google Gemini node got real-world testing at launch; the other 29 providers are mapped but unproven. If a provider fails, that's the first thing to suspect - file a ticket rather than assuming your key is wrong.

    And one honest counterpoint: Comfy's own team says the native API nodes don't mark up vendor prices and exist for one-login convenience. If you'd rather not hand a third-party node your keys at all, the credit system is genuinely simpler. APIKeyManager is for when you want your own keys, your own rates, and your data to stop passing through a middleman - not a moral panic about Comfy. It just does the one job well.

    Categoryapi-liberation

    Inputs (4)

    NameTypeDefaultDescription
    providerCOMBOgoogle30 options: bfl, bria, byteplus, elevenlabs, freepik, google, +24
    actionCOMBOcheck4 options: check, set, set_pass, clear
    api_keyoptSTRINGβ€”
    pass_pathoptSTRINGβ€”

    Outputs (1)

    NameTypeDescription
    statusSTRINGβ€”