This article was originally published on XINGOD.ME. This DEV edition keeps the implementation complete while adapting the explanation for automation builders.

Video generation APIs are asynchronous by design. The first request does not return a finished MP4. It returns a task identifier that you must preserve while the provider queues, processes, and eventually completes—or fails—the job.

That changes the automation problem. A production-ready workflow must do more than “poll until done.” It must:

submit exactly once;

preserve task_id and loop configuration across every node;