Skip to main content
GET

Introduction

The download video endpoint is used to retrieve completed video file data.
This endpoint is only supported by Sora 2 model. Other models (Veo, Doubao Seedance) return the video URL directly in the query task response, no additional download step required.

Authentication

Bearer Token, e.g., Bearer sk-xxxxxxxxxx

Query Parameters

string
required
Video ID, the task_id returned by the query task endpoint

cURL Example

Response Example

Response Fields

Usage Guide

Using data_url in Frontend

The data_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

Response:

2. Query Task Status (Poll Until Success)

When the status is 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