Skip to main content
Every generation is a task with an id like task_0a17552fb8dbea3a74bc42048e5212e1.

Status

Waiting without a loop

Add ?wait=<seconds> to the create call or to GET /v1/tasks/{id}. The service holds the call open until the task finishes or the time runs out, up to 60 seconds, and then returns the task as it stands.
The header Prefer: wait=30 does the same as the query parameter. For a video that takes several minutes, repeat the status call with ?wait=60 until status is completed or failed. Each call returns as soon as the task finishes, so there is no delay to tune.
The command-line tool runs this loop for you.

The task object

The link in result is a temporary signed link to the file. Download the file soon after the task completes and keep your own copy. Do not store the link as a permanent address.

Listing tasks

GET /v1/tasks returns your 20 most recent tasks, newest first.

What is not kept

The prompt is removed from the task record as soon as the task ends.