下载视频内容
curl --request GET \
--url https://models.rivus.cn/v1/videos/{video_id}/content \
--header 'Authorization: Bearer <token>'import requests
url = "https://models.rivus.cn/v1/videos/{video_id}/content"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://models.rivus.cn/v1/videos/{video_id}/content', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://models.rivus.cn/v1/videos/{video_id}/content",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://models.rivus.cn/v1/videos/{video_id}/content"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://models.rivus.cn/v1/videos/{video_id}/content")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://models.rivus.cn/v1/videos/{video_id}/content")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body"<string>"{
"error": {
"message": "Invalid request parameters",
"type": "invalid_request_error",
"code": "invalid_parameters"
}
}{
"error": {
"message": "Invalid request parameters",
"type": "invalid_request_error",
"code": "invalid_parameters"
}
}视频
视频下载
下载生成的视频文件
GET
/
v1
/
videos
/
{video_id}
/
content
下载视频内容
curl --request GET \
--url https://models.rivus.cn/v1/videos/{video_id}/content \
--header 'Authorization: Bearer <token>'import requests
url = "https://models.rivus.cn/v1/videos/{video_id}/content"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://models.rivus.cn/v1/videos/{video_id}/content', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://models.rivus.cn/v1/videos/{video_id}/content",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://models.rivus.cn/v1/videos/{video_id}/content"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://models.rivus.cn/v1/videos/{video_id}/content")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://models.rivus.cn/v1/videos/{video_id}/content")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body"<string>"{
"error": {
"message": "Invalid request parameters",
"type": "invalid_request_error",
"code": "invalid_parameters"
}
}{
"error": {
"message": "Invalid request parameters",
"type": "invalid_request_error",
"code": "invalid_parameters"
}
}当视频生成任务完成后,你可以通过下载接口获取视频文件。
下载视频文件
使用视频 ID 直接下载生成的视频:curl -L "https://models.rivus.cn/v1/videos/$VIDEO_ID/content" \
-H "Authorization: Bearer $TOKEN" \
--output "$VIDEO_ID.mp4"
注意使用
-L 参数以支持重定向,视频文件可能托管在 CDN 上。路径参数
video_id:视频任务的唯一标识符
响应
- 成功(200):返回 MP4 格式的视频文件流
- 未找到(404):视频任务不存在或尚未完成
注意事项
- 下载不消耗额外配额,可以多次下载同一视频
- 建议在下载后保存到本地存储,避免依赖临时链接
时长与文件大小提示
- 当前支持的视频时长档位:10 秒、15 秒、25 秒(具体可用档位取决于所选模型与渠道)。
- 同等内容下,时长越长文件越大、生成时间越久;下载时间也会相应增加。
- 若需更快下载与预览,建议先生成 10 秒版本进行效果确认,再发起更长时长的正式生成。
视频文件过期时间较短,请在任务完成后及时下载。视频 URL 可能包含临时访问令牌,请勿公开分享。
⌘I
