Wait for jobs
wait_for_jobsWait for jobs you started, all in one call. A generation (generate_image, generate_video, generate_speech, generate_music, copy_motion, replace_person, edit_video, lip_sync) answers at once with a Job ID and runs in the background; a long tool (tracking, a cutout, an analysis, an import) answers with a Job ID when it runs longer than one call; render_video answers with its render's id, which works here too. Pass every Job ID you are waiting for. It returns when all of them have finished or after timeoutSeconds, whichever comes first, with each job's own result: an Asset ID to place, a render's status and download link (as read_render gives them), or why it failed. A generation's Asset ID comes once it is placeable (its file encoded, its size and length known), with its source facts, what fit="cover" does to it in the film, a READY line and the use line: patch_film can place it at once. untilPlaceable false answers when the generation ends instead, and an output not placeable yet says NOT PLACEABLE YET with the wait_for_asset call that waits for it. A job still running is listed with its Job ID, its progress (percent done, time left and queue position when its record holds them, else unknown) and when to look again: call wait_for_jobs again with the ones still running. Never start a job again to get its result. projectId is the project the jobs were started in: null (or leaving it out) uses the open project.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| jobIds | Yes | The Job IDs to wait for, 1 to 20. | |
| projectId | Yes | The project this call runs on without changing the open project. null (or leaving it out) uses the open project. wait_for_jobs takes the projectId of the calls that started the jobs. | |
| timeoutSeconds | Yes | How long to wait at most, 1 to 50. Normally 50: it returns as soon as every job is done. | |
| untilPlaceable | Yes | null or true: a generation is answered once its output is placeable (encoded, size and length known), so patch_film can place it at once. false: answered when the generation ends, maybe before its output is placeable. |