下载视频内容
curl --request GET \
--url https://ai.alad.com/v1/videos/{id}/content \
--header 'Authorization: Bearer <token>'import requests
url = "https://ai.alad.com/v1/videos/{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://ai.alad.com/v1/videos/{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://ai.alad.com/v1/videos/{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://ai.alad.com/v1/videos/{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://ai.alad.com/v1/videos/{id}/content")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://ai.alad.com/v1/videos/{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{
"id": "sora-2:task_01k7yhn8vae4ev52cnyxw3gn68",
"object": "video",
"model": "sora-2",
"status": "completed",
"progress": 100,
"url": "https://filesystem.site/cdn/20251019/example.mp4",
"video_url": "https://filesystem.site/cdn/20251019/example.mp4",
"size": "small",
"seconds": "12",
"created_at": 1773220330
}{
"error": {
"message": "任务尚未完成,当前状态:IN_PROGRESS",
"type": "invalid_request_error"
}
}OpenAI
Sora 2 下载视频
在任务完成后下载生成的视频。如果任务仍在进行中,则返回错误。
GET
/
v1
/
videos
/
{id}
/
content
下载视频内容
curl --request GET \
--url https://ai.alad.com/v1/videos/{id}/content \
--header 'Authorization: Bearer <token>'import requests
url = "https://ai.alad.com/v1/videos/{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://ai.alad.com/v1/videos/{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://ai.alad.com/v1/videos/{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://ai.alad.com/v1/videos/{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://ai.alad.com/v1/videos/{id}/content")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://ai.alad.com/v1/videos/{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{
"id": "sora-2:task_01k7yhn8vae4ev52cnyxw3gn68",
"object": "video",
"model": "sora-2",
"status": "completed",
"progress": 100,
"url": "https://filesystem.site/cdn/20251019/example.mp4",
"video_url": "https://filesystem.site/cdn/20251019/example.mp4",
"size": "small",
"seconds": "12",
"created_at": 1773220330
}{
"error": {
"message": "任务尚未完成,当前状态:IN_PROGRESS",
"type": "invalid_request_error"
}
}授权
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
路径参数
视频任务 ID
响应
视频下载信息
示例:
"sora-2:task_01k7yhn8vae4ev52cnyxw3gn68"
示例:
"video"
示例:
"sora-2"
示例:
"completed"
示例:
100
视频下载 URL
示例:
"https://filesystem.site/cdn/20251019/example.mp4"
视频下载 URL(别名)
示例:
"https://filesystem.site/cdn/20251019/example.mp4"
示例:
"small"
示例:
"12"
示例:
1773220330
⌘I

