# Comfy Ui api automation

**URL:** <https://forum.comfy.org/t/comfy-ui-api-automation/4251>\
**Category:** Custom Nodes\
**Tags:** issue\
**Created:** [February 2, 2026, 9:56am UTC](https://forum.comfy.org/t/comfy-ui-api-automation/4251 "2026-02-02T09:56:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Noodle.exe](https://avatars.discourse-cdn.com/v4/letter/n/9e8a1a/32.png) [@Noodle.exe](https://forum.comfy.org/u/Noodle.exe)\
**Post date:** [February 2, 2026, 9:56am UTC](https://forum.comfy.org/t/comfy-ui-api-automation/4251/1 "2026-02-02T09:56:44Z")

</div>

**Title:** API automation cannot retrieve SaveVideo output although video is generated in ComfyUI UI

Hi, I’m trying to automate a WanCamera Image-to-Video workflow via the ComfyUI HTTP API.

**What works:**

- Workflow runs successfully in the UI

- Video is generated and saved correctly via `SaveVideo`

- Video is visible in ComfyUI `output/assets`

- GPU is A100 and generation completes

**What fails:**

- When polling `/history/{prompt_id}`, the job sometimes:

- Attempting to download via `/view?filename=...` often results in 404 / timeout

- This happens even though the video is already saved and visible in the UI

**Notes:**

- I am queuing the workflow using `/prompt`

- Polling `/history/{prompt_id}` until completion

- Looking specifically for the `SaveVideo` node output

- This is consistent across runs (not intermittent)

**Question:**  
Is there a reliable API-supported way to:

1. Detect that `SaveVideo` has completed

2. Programmatically retrieve the final video file

3. Or query ComfyUI’s output directory directly via API

If this is a known limitation of `/history` or `SaveVideo`, guidance would really help.

Thanks!
