Skip to main content

Retrieve Video

Get the current status and details of a video generation job.

Request

Path Parameters

Headers

Response

Success (200 OK)

Returns the video object with current status:

Response Fields

Video Statuses

Examples

Basic Retrieval

Polling with Timeout

Polling with Progress Callback

Error Responses

404 Not Found - Video Doesn’t Exist

Possible causes:
  • Invalid video ID
  • Video belongs to different organization
  • Video was deleted
Solution: Verify the video ID is correct and belongs to your account.

410 Gone - Video Expired

Cause: Video is >1 hour old and was not persisted to R2 storage. Solution:
  • Videos are automatically persisted after 45 minutes
  • This error only occurs for very old videos that failed persistence
  • Create a new video instead

Failed Video Response

When status is "failed", the response includes an error object:
Common error codes:
  • content_policy_violation - Prompt violated usage policies
  • generation_failed - Technical error during generation
  • timeout - Generation took too long
  • insufficient_quota - Credits were refunded (shouldn’t happen)

Video URL Lifecycle

OpenAI Storage (0-45 minutes)

Immediately after completion, videos are served from OpenAI:
Characteristics:
  • Available for 1 hour only
  • Fast access
  • Temporary storage

R2 Storage (45 minutes+)

After 45 minutes, videos are persisted to Cloudflare R2:
Characteristics:
  • Available permanently
  • CDN-backed
  • Lower cost
The url field automatically updates to point to R2 storage after persistence. Your application doesn’t need to handle this transition.

Polling Best Practices

✅ Good: Exponential Backoff

✅ Good: Use Webhooks

Instead of polling, use webhooks for real-time notifications:
See the Webhooks Guide for setup instructions.

❌ Bad: Aggressive Polling

Problems:
  • Wastes API quota
  • May hit rate limits (429 errors)
  • Increases latency for other users
  • No benefit (videos don’t generate faster)
Rule of thumb: Poll no more than once every 5 seconds.

Progress Tracking

The progress field shows generation progress (0-100):
Progress milestones:
  • 0% - Queued, not started
  • 1-25% - Initializing generation
  • 25-75% - Actively generating frames
  • 75-99% - Finalizing video
  • 100% - Complete
Progress is an estimate and may not increase linearly. Don’t rely on precise progress values for timing.

Required Scopes

This endpoint requires the following API key scopes:
  • video:read - Retrieve video status
See the Authentication Guide for more details.

Next Steps

Download Video

Download the completed video file

List Videos

List all your videos

Delete Video

Delete a video

Webhooks

Use webhooks instead of polling