获取视频生成任务状态
curl --request GET \
--url https://model-api.skyengine.com.cn/v1/videos/{video_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://model-api.skyengine.com.cn/v1/videos/{video_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://model-api.skyengine.com.cn/v1/videos/{video_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://model-api.skyengine.com.cn/v1/videos/{video_id}"
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://model-api.skyengine.com.cn/v1/videos/{video_id}")
.header("Authorization", "Bearer <token>")
.asString();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://model-api.skyengine.com.cn/v1/videos/{video_id}",
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;
}{
"id": "video_123456789",
"object": "video",
"created_at": 1741570283,
"completed_at": 123,
"model": "sora-2",
"status": "pending",
"progress": 50,
"expires_at": 123,
"seconds": "<string>",
"size": "720x1280",
"remixed_from_video_id": "<string>",
"error": {
"code": "<string>",
"message": "<string>",
"type": "<string>"
}
}视频生成
/v1/videos/{video_id}
查询视频生成任务的当前状态和进度
GET
/
v1
/
videos
/
{video_id}
获取视频生成任务状态
curl --request GET \
--url https://model-api.skyengine.com.cn/v1/videos/{video_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://model-api.skyengine.com.cn/v1/videos/{video_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://model-api.skyengine.com.cn/v1/videos/{video_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://model-api.skyengine.com.cn/v1/videos/{video_id}"
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://model-api.skyengine.com.cn/v1/videos/{video_id}")
.header("Authorization", "Bearer <token>")
.asString();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://model-api.skyengine.com.cn/v1/videos/{video_id}",
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;
}{
"id": "video_123456789",
"object": "video",
"created_at": 1741570283,
"completed_at": 123,
"model": "sora-2",
"status": "pending",
"progress": 50,
"expires_at": 123,
"seconds": "<string>",
"size": "720x1280",
"remixed_from_video_id": "<string>",
"error": {
"code": "<string>",
"message": "<string>",
"type": "<string>"
}
}Authorizations
OpenAI API密钥认证。在 Authorization HTTP Header 中包含您的 API-Key,格式为 Bearer {API_KEY}
Path Parameters
视频ID
Example:
"video_123456789"
Response
200 - application/json
成功获取任务状态
视频ID
Example:
"video_123456789"
对象类型
Available options:
video 创建时间戳
Example:
1741570283
完成时间戳
使用的模型名称
Example:
"sora-2"
任务状态
Available options:
pending, in_progress, completed, failed 生成进度百分比(0-100)
Required range:
0 <= x <= 100过期时间戳
视频时长(秒)
视频分辨率
Available options:
720x1280, 1280x720 Example:
"720x1280"
源视频ID(如果是remix)
错误信息
Show child attributes
Show child attributes

