Vidu 查询任务
curl --request GET \
--url https://octopusx.ai/vidu/ent/v2/task/{task_id}/creations \
--header 'Authorization: Bearer <token>'import requests
url = "https://octopusx.ai/vidu/ent/v2/task/{task_id}/creations"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://octopusx.ai/vidu/ent/v2/task/{task_id}/creations', 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://octopusx.ai/vidu/ent/v2/task/{task_id}/creations",
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://octopusx.ai/vidu/ent/v2/task/{task_id}/creations"
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://octopusx.ai/vidu/ent/v2/task/{task_id}/creations")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://octopusx.ai/vidu/ent/v2/task/{task_id}/creations")
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": "48038932-0ff5-4251-8b4b-7a76c09fd114",
"status": "completed",
"video_url": "https://example.com/video/aigcVideoGenFile.mp4",
"status_update_time": 1774494622
}
官方格式
Vidu 查询任务
使用 GET /vidu/ent/v2/task/{task_id}/creations 查询 Vidu 任务状态与结果。
GET
https://octopusx.ai
/
vidu
/
ent
/
v2
/
task
/
{task_id}
/
creations
Vidu 查询任务
curl --request GET \
--url https://octopusx.ai/vidu/ent/v2/task/{task_id}/creations \
--header 'Authorization: Bearer <token>'import requests
url = "https://octopusx.ai/vidu/ent/v2/task/{task_id}/creations"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://octopusx.ai/vidu/ent/v2/task/{task_id}/creations', 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://octopusx.ai/vidu/ent/v2/task/{task_id}/creations",
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://octopusx.ai/vidu/ent/v2/task/{task_id}/creations"
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://octopusx.ai/vidu/ent/v2/task/{task_id}/creations")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://octopusx.ai/vidu/ent/v2/task/{task_id}/creations")
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": "48038932-0ff5-4251-8b4b-7a76c09fd114",
"status": "completed",
"video_url": "https://example.com/video/aigcVideoGenFile.mp4",
"status_update_time": 1774494622
}
Vidu 查询任务
Vidu 官方格式任务查询接口,用于查询视频生成任务的状态与结果。- 路由入口是
GET /vidu/ent/v2/task/{task_id}/creations。 - 通过路径参数
task_id指定要查询的任务。 - 返回任务状态(
processing、completed、failed)及视频下载地址。
方法与路径
GET /vidu/ent/v2/task/{task_id}/creations
请求示例
curl -X GET https://octopusx.ai/vidu/ent/v2/task/48038932-0ff5-4251-8b4b-7a76c09fd114/creations \
-H "Authorization: Bearer YOUR_API_KEY"
import requests
resp = requests.get(
"https://octopusx.ai/vidu/ent/v2/task/48038932-0ff5-4251-8b4b-7a76c09fd114/creations",
headers={"Authorization": "Bearer YOUR_API_KEY"},
timeout=60,
)
print(resp.json())
请求参数
任务 ID。创建任务时返回的
task_id。认证
Authorization: Bearer YOUR_API_KEY
响应示例
{
"id": "48038932-0ff5-4251-8b4b-7a76c09fd114",
"status": "completed",
"video_url": "https://example.com/video/aigcVideoGenFile.mp4",
"status_update_time": 1774494622
}
Response
任务 ID。
任务状态。可选值:
processing(处理中)、completed(已完成)、failed(失败)。视频下载地址(仅在
completed 状态下返回)。状态更新时间戳(Unix 时间戳)。
状态说明
| 状态 | 说明 |
|---|---|
processing | 任务处理中 |
completed | 任务完成,可获取视频 |
failed | 任务失败 |
相关接口
⌘I