Video Generation API
Download the Video
Download the generated video file
After a task completes, there are two ways to get the video: call the download endpoint (proxied by the gateway), or fetch it directly from result_url in the query response.
Option 1: Download Endpoint (Recommended)
GET /v1/videos/{task_id}/content
Download the video file (MP4 binary stream) of a completed task. Only available when the task status is SUCCESS.
Path Parameters
| Field | Type | Description |
|---|---|---|
task_id | string | The ID of a task whose status is SUCCESS |
Example
BASE_URL="https://yunjizi.cn" # Domestic; overseas use https://api.yunjizi.cn
curl "$BASE_URL/v1/videos/task_9f3a2b7c/content" \
-o result.mp4Option 2: Use result_url from the Query Response
Query a Task returns the video address in the data.result_url field once the task succeeds; you can issue a GET request to that URL directly:
curl "<result_url>" -o result.mp4⚠️ The form of result_url (gateway-proxied address or upstream direct link) and its validity period are subject to official confirmation — download and save results promptly.
Notes
- Both options return the same video; the download endpoint is proxied by the gateway, so you do not need to care where the address comes from
- Calling the download endpoint before the task completes returns
400with the current status - Result retention period is subject to official confirmation — download and save promptly