Retrieve Video

Poll the current state of a video generation job.

Retrieve the current state of a video job. This is the job's polling_url: poll it until status is completed, failed, cancelled or expired.

GET /v1/videos/:video_id

Path parameters

video_idstringrequired

The id of the video job.

Response

idstringoptional

Unique job identifier.

polling_urlstringoptional

Relative URL of this endpoint for the job: /v1/videos/{id}.

statusstringoptional

Current state of the job. See statuses.

Allowed values:pendingin_progresscompletedfailedcancelledexpired
errorstringoptional

Why the job failed. Only when status is failed or expired.

unsigned_urlsstring[]optional

Only when completed. Download URLs (https://api.aivene.com/v1/videos/{id}/content?index=0) that need your API key.

urlsstring[]optional

Only when completed. The same URLs with expires and signature query parameters added. They work without an API key until expires_at, so you can hand them to a browser, a <video> element or another service.

expires_atintegeroptional

Unix timestamp after which urls stop working, about one hour after this response. Retrieve the job again for fresh URLs.

usageobjectoptional

Only when the job has finished. cost is the charge in USD (0 for a failed or expired job, null while it is still being recorded); is_byok is always false.

Polling recommendation

Poll every 5-10 seconds. Once status is completed, download the video from one of its urls, or through GET /v1/videos/:id/content with your API key.

Errors

StatusReason
404Video not found or belongs to another workspace.