KIE • Upload Image
Turning a tensor into a URL the API will accept
- image
- config
- first_url
- urls_json
Every KIE endpoint wants a URL, and ComfyUI only knows how to hand you a tensor. This node bridges that gap: in goes an IMAGE, out comes a hosted URL.
You'll want it whenever you're talking to a KIE field that isn't a native socket. The polished nodes in this pack already do the upload for you - wire an image into an IMAGE socket and the plumbing is invisible - but a lot of endpoints, including the Suno ones, take a URL string, and the Advanced Universal Task node's placeholders need uploaded media to point at. That's the gap this fills.
How it works
It PNG-encodes each image in the batch and multipart-uploads them to KIE's file service, one file per frame, then returns the resulting URLs. If you feed it a batch of eight images you get eight URLs back, in order.
Two details worth internalising. First, the files land on KIE's storage - this is a remote upload, not a local copy, so if the picture shouldn't leave your machine, don't run the node. Second, it's a PNG re-encode, so nothing about the original file survives: no EXIF, no metadata, no JPEG artefacts, just pixels. Great for cleanliness, less great if the downstream model cares about the compression character of its input.
Inputs and outputs
image is the only required input, a native IMAGE socket. Batches are supported and each frame is uploaded separately.
config is optional and expects a KIE_CONFIG connection. Leave it unwired - normal setups use the API key saved once in ComfyUI Settings, and the KIE_API_KEY environment variable takes priority on headless installs.
The outputs are first_url and urls_json, and the naming is not a suggestion. first_url is a plain string with the first image's URL, which is what you wire into a single-URL field like the Suno upload_url inputs or any endpoint that takes one reference image. urls_json is a JSON array of all the URLs in the batch, which is what you want for the plural fields - image reference arrays, or the $image_urls placeholder in Universal Market Task.
One practical trap: urls_json is a string containing JSON, not a list, so don't expect a single-URL field to accept it. If you plugged urls_json into a field that wanted one URL, you sent KIE a wall of JSON, and the provider will reject it with something unhelpful. Wrong output, right node.
Install
ComfyUI Manager, search KIE.ai Nodes Next, install, restart. Or:
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 after installing either way. Then set the key once under Settings → KIE.ai Nodes Next → Connection: the pack validates it against KIE before saving, then shows a masked fingerprint and a CONNECTED status with your balance. The dependency list is just requests, Pillow, numpy and PyYAML - nothing heavy, no models, since there's no inference happening locally.
When it goes wrong
The errors you'll actually see are auth and network ones, and they come from the shared client, so they look identical to a failed generation: no key configured, or an invalid-key rejection. Fix it in Settings, not in the graph.
The subtler one is link lifetime. Uploaded files get hosted somewhere temporary-ish, so a URL you captured into a workflow a month ago is not a durable asset. Re-upload rather than hardcoding a saved URL - that's also why the pack has the Upload File node for arbitrary local paths, if you'd rather push a file from disk than re-encode it from the graph.
And a quick note on provenance that applies to every node in this family: it's a client that carries your API key and sends your media to a third party. This pack stores the key in ComfyUI's user/config area and keeps the full value backend-only, which is the right behaviour. Prefer packs you can see evidence people actually use - there are at least two KIE packs in circulation, and API wrappers are the one category where a fresh, unknown node with your credential deserves scrutiny before its first run.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| configopt | KIE_CONFIG | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| first_url | STRING | — |
| urls_json | STRING | — |