Get Direct Download URL
Turn a KIE Temp Link Into a Real Download URL (4o Image)
- image
- url
- all_urls_json
- task_id
- raw_json
- credits_consumed
- credits_left
What it's for
API image gen hands you a URL, not a file. Usually it points at a temp bucket - tempfile.aiquickdraw.com in KIE's docs - and temp means exactly what it says. Come back tomorrow and that link may well be a 404, which is a fun way to discover that your archive of 300 generated images was actually an archive of 300 dead links.
Get Direct Download URL is the pack's answer to that. It takes the transient URL from a 4o Image generation task, along with the task ID it belongs to, and asks KIE to mint a proper direct-download URL for it. Then you can save the file, hand it to another service, or park it somewhere that isn't going to expire out from under you.
The important framing: this node downloads nothing and displays nothing. It converts one URL into a better URL. Everything else - actually fetching the bytes, saving them, uploading them somewhere - happens in other nodes.
How it works
Under the hood it's a POST to the 4o Image API's download-url endpoint (/api/v1/gpt4o-image/download-url in the bundled catalog), with your key from the pack's saved Connection settings. Both fields are real documented request parameters rather than the placeholder fields you see on some of this pack's status nodes - which is a good sign this one was resolved from KIE's docs properly.
One thing to know about the pack's transport: nodes like this run the request, then attempt to hand back native ComfyUI media when the endpoint looks like it's feeding media into the graph. The image output on this node means the returned URL goes through the pack's image downloader, so if the resolved URL is a valid image you get an IMAGE tensor on that socket too, not just a string. If you only wanted the URL, use the url socket and ignore the tensor.
Inputs and outputs
Two required strings, both straight from the tooltips:
taskId- "the task ID associated with the image generation." Default is the documented placeholdertask12345; replace it with the real ID from your 4o Image generation run. The pack's generation nodes exposetask_idas an output, which is the easy way to wire this instead of copy-pasting.url- "the original image URL that needs to be converted to a direct download URL." Again the default is KIE's doc example (https://tempfile.aiquickdraw.com/v/xxxxxxx.png). This wants the URL your generation returned for that same task.
timeout_seconds is the only optional input: default 1200, minimum 30, maximum 7200. It caps how long the node will wait on the request. The default is generous; leave it unless you're on a bad link.
Outputs follow the pack's image signature:
image- the IMAGE tensor, ready to feed a Save Image or a downstream upscale.url- the direct download URL as a STRING. This is the actual point of the node.all_urls_json- every result URL the response contained, as JSON.task_id- the task identifier, passed through.raw_json- the full provider response, pretty-printed. Your debug surface.credits_consumedandcredits_left- floats, shown as a receipt on the node body. This call is a utility conversion, so expect zero spent.
Wire url into a download/save node or a text output; wire image into anything pixel-based.
Installing
cd ComfyUI/custom_nodes
git clone https://github.com/felipederosilva/ComfyUI-KIE-Nodes-Next
pip install -r ComfyUI-KIE-Nodes-Next/requirements.txt
Restart ComfyUI, then set the key at Settings → KIE.ai Nodes Next → Connection. No models, no GPU footprint - requirements.txt is requests, Pillow, numpy, PyYAML, and every node is an HTTP client over KIE's API. Windows users can take the one-click installer from the repo's dist/ folder instead if they'd rather not hand-place the folder.
Where people get burned
The trap is task/URL mismatch. The 4o Image endpoint wants a URL that belongs to the task ID you passed. Pair a URL from Task A with the ID from Task B and you get an error, not a guess - KIE won't helpfully figure out what you meant. Always pair them from the same generation.
Second, this is the 4o Image family's own download endpoint. It is not a universal URL-rewriter. If you're holding a link from a different KIE model, use the pack's generic Get Download URL for Generated Files node instead - that one is the general-purpose conversion endpoint and takes a single URL with no task ID.
Third, an expiring link is not a solvable-after-the-fact problem. If the temp URL has already aged out before you run this node, there's nothing left to convert. Run the conversion while the link is fresh - or better, wire it in the same graph as the generation so it happens automatically.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| taskId | STRING | task12345 | The task ID associated with the image generation |
| url | STRING | https://tempfile.aiquickdraw.com/v/xxxxxxx.png | The original image URL that needs to be converted to a direct download URL |
| timeout_secondsopt | INT | 120030–7200 | — |
Outputs (7)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| url | STRING | — |
| all_urls_json | STRING | — |
| task_id | STRING | — |
| raw_json | STRING | — |
| credits_consumed | FLOAT | — |
| credits_left | FLOAT | — |