Skip to main content
Every generation is a task. Creating one returns at once with status: queued; the video is produced in the background and the task moves through its statuses until it reaches a terminal one.

Lifecycle

A task never leaves a terminal status.

The task object

Members that have no value are omitted, except error. New fields may appear at any time: ignore the ones you don’t know.

Get the result

You have two ways to learn that a task finished.

List tasks

GET /v1/tasks returns the tasks of your account, newest first, across all of its keys. Filter with status, model and created_after, and page with limit (1–100, default 20) and starting_after:
Keep paging while has_more is true. Requests that were rejected at creation (for example with 402) never became tasks and are not listed.

Cancel a task

A queued or processing task becomes cancelled immediately and its held credits return to your balance in the same step. A task.cancelled webhook follows. If the model finishes the video after the cancel, the result is discarded and never charged. Cancelling a task that is already cancelled answers 200 again. Cancelling a completed or failed task answers 409 task_already_terminal.

Retention

  • output and the video file stay available until expires_at, 7 days after completion.
  • After that the task is still readable, but without output, and the file URL stops working.
  • Download the video (and cover_url if you use it) as soon as the task completes, and keep your own copy.