Video Series
Download Video
Download completed video file data
GET
Introduction
The download video endpoint is used to retrieve completed video file data.Authentication
Bearer Token, e.g.,Bearer sk-xxxxxxxxxx
Query Parameters
Video ID, the
task_id returned by the query task endpointcURL Example
Response Example
Response Fields
| Field | Type | Description |
|---|---|---|
success | boolean | Whether the request was successful |
generation_id | string | Generation ID (same as videoId) |
task_id | string | Task ID |
format | string | Video format (fixed to "mp4") |
size | number | Video file size (bytes) |
base64 | string | Base64 encoded video data |
data_url | string | Data URL format video data, can be used directly in frontend <video> tag |
Usage Guide
Using data_url in Frontend
Thedata_url field can be used directly in HTML <video> tag:
Download and Save File
JavaScript Example
Python Example
Complete Workflow Example (Sora 2)
1. Submit Video Generation Task
2. Query Task Status (Poll Until Success)
succeeded, proceed to the next step.
3. Download Video File
Notes
- The download endpoint returns Base64 encoded video data, suitable for direct display in frontend or saving
- For large files, consider using streaming download or direct URL download
- Video format is fixed to MP4