Nodes/KIE.ai Nodes Next/KIE • Advanced Connection Override
ComfyUI Node

KIE • Advanced Connection Override

The Node You Almost Certainly Don't Need

By felipederosilva·Created about a month ago·Updated about 22 hours ago· 3
KIE • Advanced Connection Override
    • config
    ◄use_saved_keytrue►
    ◄api_key►
    ◄api_basehttps://api.kie.ai►
    ◄upload_basehttps://kieai.redpandaai.co►
    ◄request_timeout90►
    ◄max_retries4►

    The author's own description says it plainly: "Optional advanced override. Normal KIE Next nodes automatically use the API key saved once in ComfyUI Settings." That's not modesty, it's the architecture. Every ordinary node in this pack builds its client with no config at all and resolves credentials from the saved key (or KIE_API_KEY). This node exists for the cases where that isn't what you want.

    When you'd actually wire one in

    • Two accounts. One node pack, two KIE keys, different credit pools. The saved key is the fallback; this overrides it for one branch.
    • A different endpoint. api_base and upload_base are exposed, so you can point the pack at a mirror, a proxy, or a self-hosted relay that speaks KIE's API. That's the only sane reason to change them - and if you do, know that authenticated raw requests are hard-restricted to KIE-owned hosts (api.kie.ai and the upload host) by an explicit guard in the client, so a random domain in an override field will get refused rather than leak your key.
    • Slow video jobs. request_timeout defaults to 90 seconds and goes to 600. A long generation is polled, not held open, but the upload of a fat reference video is a real request that can exceed a default timeout.
    • Flaky network. max_retries defaults to 4 (range 0–10), retrying 408/425/429/500/502/503/504 with exponential backoff plus a Retry-After honour. Crank it if you're behind something unreliable.

    What it looks like

    Required widgets: use_saved_key (default on), api_key, api_base (https://api.kie.ai), upload_base (https://kieai.redpandaai.co). Optional: request_timeout (90, clampable 10–600) and max_retries (4, 0–10).

    The mechanism is one line: the node hands those values to the config factory, which resolves the key as saved key first if use_saved_key is on, otherwise the literal api_key, and raises a clear "No KIE API key configured" error if neither exists. The env var still wins over the saved file for headless setups.

    Output: a single config socket of type KIE_CONFIG.

    Where that socket actually plugs in

    This is the part worth knowing, because it isn't everything. Nodes with a config input are the utility and transport layer: KIE • Credits, the upload nodes (Upload Image, Upload Video, Upload Audio, Upload File), the download nodes (Download Image, Download Video, Download File), Wait for Task, Task Status, and the advanced Universal Market Task.

    The model and LLM nodes - every Claude, Seedance, Kling, Suno node in the tree - do not take a config input. They construct their client themselves from the saved key or environment variable. So if your goal was "give this one Claude node a different key", the override node won't do it, and the honest workaround is the environment variable on a second ComfyUI instance.

    A warning about the api_key field

    The pack's entire credential design is built to keep your full key out of the workflow: it validates a replacement key before overwriting a working one, writes the settings file with restrictive permissions where the OS allows, shows the frontend only a masked fingerprint like ••••••••••••A1B2, and never serialises the key into graph JSON.

    A widget on a node is, by definition, serialised into the graph. If you type a key into api_key here and share that workflow, the key travels with it. If you're doing this for a two-account setup, at least leave use_saved_key handling the common case and treat the pasted key as a secret that now lives in a PNG's metadata.

    Install

    ComfyUI Manager → ComfyUI-KIE-Nodes-Next. Registry publishing is prepared-but-not-shipped as of the README's current revision, so the fallback:

    cd ComfyUI/custom_nodes
    git clone https://github.com/felipederosilva/ComfyUI-KIE-Nodes-Next
    cd ComfyUI-KIE-Nodes-Next
    pip install -r requirements.txt
    

    Restart, then Settings → KIE.ai Nodes Next → Connection for the normal one-time key. The settings file itself lives under ComfyUI's user directory (<user>/KIE-Nodes-Next/kie_nodes_next.json), overridable with KIE_NODES_NEXT_CONFIG_DIR - that's what you'd inspect when a key isn't being picked up.

    Common issues

    "No KIE API key configured" even with the node wired. Your override is empty and use_saved_key is on but nothing was ever saved. Run KIE • Connection Status - its source output tells you whether the key came from environment, saved, or none.

    Override ignored. You wired it into a model node, which doesn't take a config input. See above.

    Timeout errors on big uploads. Raise request_timeout. Every polling loop has its own separate timeout on the nodes themselves (timeout_seconds, default 1200).

    Keys in a shared workflow. Check api_key before you post a graph anywhere. The design avoids this trap by default; this node is the one place you can walk into it.

    CategoryKIE Next/Advanced/Connection

    Inputs (6)

    NameTypeDefaultDescription
    use_saved_keyBOOLEANtrue—
    api_keySTRING—
    api_baseSTRINGhttps://api.kie.ai—
    upload_baseSTRINGhttps://kieai.redpandaai.co—
    request_timeoutoptFLOAT9010–600—
    max_retriesoptINT40–10—

    Outputs (1)

    NameTypeDescription
    configKIE_CONFIG—