wait_for_video
Wait for a video to reach a terminal state (completed / failed / preview), then return it. Polls safely at the API-suggested interval for up to ~20 seconds per call (HTTP requests are time-capped). If it does not finish in time it returns { timed_out: true } with the latest status — simply call it again with the same id to keep waiting. It never blocks indefinitely or over-polls.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| timeout_seconds | No | Max wait per call (default 20, cap 20). |