Flux Retrieve Tasks (Ace Data Cloud)
Getting a whole batch back without paying twice
- status
- task_id
- media_urls_json
- first_media_url
- result_json
- trace_id
You queued eight generations overnight, closed the tab, and now you have a pile of task IDs and no images. Or you want to know what last week's runs actually cost. Flux Retrieve Tasks is the plural of the retrieve node - one request, many task IDs, one aggregated answer. It never submits anything, so it never bills anything.
What it is
Feed it a list of task IDs and it queries them in a single call, returning the combined status, every media URL it can find, and the per-task detail as JSON. This is your recovery and reconciliation node.
Inputs
ids_json - a JSON array of task IDs, as text. Multiline widget, so it's readable:
["3f2a1c88-...", "9b0e77d1-...", "c41a05ee-..."]
It must be an array, it must be non-empty, and a bare string like "3f2a1c88-..." won't do - the node checks for a JSON list and otherwise throws "ids_json must be a nonempty JSON array of task IDs." Whitespace-newline-separated IDs are not accepted here, unlike free-text array fields elsewhere in the ecosystem.
parameters_json - leave it {}. Note that there's no wait_seconds on this node, deliberately: a batch is a snapshot. If the whole set isn't finished, you re-queue the node yourself.
Outputs and how the aggregation works
The interesting part is what the pack does with a mixed result set, because the semantics are not obvious:
statusispendingif any task is still running; otherwisefailedif any one of them failed; otherwisesucceeded. In other words, one straggler holds the whole batch atpending, and a single failure anywhere in the list drags the batch status tofailedeven if the other seven images rendered beautifully.media_urls_jsoncollects the URLs from every finished task into one array, deduplicated, in the order they were found. This is the output to actually use - parse it and iterate.first_media_urlis the first URL of the whole set. For a batch it's a convenience/thumbnail, not a mapping back to a specific task. Wiring it intoFlux Load Imagegets you whichever one landed first.result_jsonis the structured version: the pack normalizes each task and wraps them as{"items": [...]}, each item carrying its own status, task ID, media URLs and cleaned data. This is the one to log or diff.trace_idcomes back empty here, which is expected - a batch has no single request trace. Use the individual task IDs if you need to ask support about one job.
Tasks the service can't resolve show up as a failed item inside the batch rather than killing the call, which is friendlier than it sounds when you're reconciling a messy week.
The reason to reach for it
Two real uses. First, recovery: an image job whose ID you saved but whose URL you never grabbed. Second, audit: pull the last N task IDs and see which ones returned media, which ones failed and which are still running, before you queue another paid submission. The pack's whole design philosophy is "don't pay twice for something you already bought" - this is the node that implements it.
Install
Same pack, same steps. ComfyUI Manager → search Flux → publisher acedatacloud, package Flux by Ace Data Cloud → install → restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/AceDataCloud/FluxComfyUI
python -m pip install -r requirements.txt
Then set ACEDATACLOUD_API_KEY (or ACEDATACLOUD_API_TOKEN) in the ComfyUI process environment and restart. Retrieval needs the key because tasks are scoped to your account - these lookups can't see anyone else's jobs, including a colleague's on a shared instance.
Common issues
"ids_json must be a nonempty JSON array of task IDs." Either you pasted a single ID as a bare string, used single quotes, or the array is empty. Wrap it in [ ] with double-quoted strings.
Everything reports pending forever. At least one ID is a job that never completed, or one is a typo that resolves to nothing. Test IDs one at a time with Flux Retrieve Task and the individual error will be clearer.
Batch says failed but most URLs are there. One task genuinely failed. Check the per-item statuses inside result_json before assuming the run was a loss.
first_media_url gave you the wrong image. Expected - it's "first across the set", not "this task's image". Iterate media_urls_json.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| parameters_json | STRING | {} | — |
| ids_json | STRING | — |
Outputs (6)
| Name | Type | Description |
|---|---|---|
| status | STRING | — |
| task_id | STRING | — |
| media_urls_json | STRING | — |
| first_media_url | STRING | — |
| result_json | STRING | — |
| trace_id | STRING | — |