Nodes/KIE.ai Nodes Next/URL File Upload
ComfyUI Node

URL File Upload

Give KIE a link instead of a file

By felipederosilva·Created about a month ago·Updated about 22 hours ago· 3
URL File Upload
    • raw_json
    • first_url
    • task_id
    ◄timeout_seconds1200►
    ◄expert_override_json{}►

    KIE's upload family has three doors: stream a file up from disk, base64 it, or hand over a URL and let KIE go fetch it. This node is the third one, and it's the one you want when the asset is already online - sitting on your own CDN, in S3, or behind some signed link - and copying it back down to your machine just to push it up again is silly.

    It's also, at the time of writing, a node with almost no published inputs. That's not a mistake on this page; it's how the pack builds it.

    Why the input list is nearly empty

    This pack generates its nodes from KIE's live API documentation. Where a docs page yields a proper request schema, you get typed widgets with real names. Where it yields an endpoint but no usable schema - which is the case for /api/file-url-upload - the node is registered with a method and a path but no documented fields, so the only things you can set are the generic ones: a timeout and the expert override.

    Concretely, the widgets are timeout_seconds (30–7200 seconds, default 1200) and expert_override_json, a {}-defaulted multiline text box. That second one is the whole story: because the pack has no schema to build widgets from, the request body is up to you, written as JSON.

    KIE's page for this endpoint documents a source file URL and a target upload path. In practice that means something like:

    {
      "fileUrl": "https://your-cdn.example.com/reference/clip.mp4",
      "uploadPath": "comfyui/uploads"
    }
    

    Put that in expert_override_json and the pack merges it into the request body. If KIE changes a key name, check the docs page the node points at (docs.kie.ai/file-upload-api/upload-file-url) rather than guessing - you'll get a provider error, not a helpful one.

    Outputs

    Three, and they tell you what the node is: raw_json, first_url and task_id. first_url is the hosted KIE URL for the imported file, which is the thing you actually wanted - wire it into any URL field, or into a placeholder in KIE • Universal Market Task (Advanced). raw_json is the full response, pretty-printed, for when the call fails and you need to know why. task_id exists for consistency with the rest of the pack; a synchronous file import generally won't populate it, and an empty string there is normal, not an error.

    A word on the expert_override_json mechanism, since two other nodes in this pack share it: it overrides keys in a payload the pack already knows how to send. It can't supply a missing endpoint, and it can't add a field the provider doesn't accept. It's a patching tool, not a "make this work" button.

    Install

    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 ComfyUI, then set your API key once under Settings → KIE.ai Nodes Next → Connection. ComfyUI Manager handles the whole install too if you search "KIE.ai Nodes Next". The four dependencies (requests, Pillow, numpy, PyYAML) are all you ship, and there's no local inference here at all - this node just asks KIE to go get a file.

    When you'd actually use it

    The clean case is a pipeline where your media already lives somewhere with a public URL - a render farm output, a shared drive with links, an asset library. Importing by URL skips a pointless round trip through your ComfyUI box and keeps the graph small: one node, no upload step, no temp file.

    If the file is only on your machine, use KIE • Upload File instead - it takes a local path and streams the bytes. And if you're scripting this whole flow, remember that KIE's authenticated raw requests are deliberately locked to KIE-owned hosts; that restriction exists so an API key can't be walked off-domain, and it's the kind of guardrail worth knowing about when you're wiring things by hand.

    CategoryKIE Next/Utility

    Inputs (2)

    NameTypeDefaultDescription
    timeout_secondsoptINT120030–7200—
    expert_override_jsonoptSTRING{}Expert-only payload overrides for APIs whose documentation has no request schema yet.

    Outputs (3)

    NameTypeDescription
    raw_jsonSTRING—
    first_urlSTRING—
    task_idSTRING—