列出视频任务
curl --request GET \
--url https://api.aiohub.org/v1/contents/generations/tasks \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.aiohub.org/v1/contents/generations/tasks"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.aiohub.org/v1/contents/generations/tasks', 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://api.aiohub.org/v1/contents/generations/tasks",
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://api.aiohub.org/v1/contents/generations/tasks"
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://api.aiohub.org/v1/contents/generations/tasks")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aiohub.org/v1/contents/generations/tasks")
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{
"total": 1,
"items": [
{
"id": "task_ADQ5XK6AKWg36WePoJ3sZRyDvWl1ogGZ",
"model": "doubao-seedance-2-5-260628",
"status": "succeeded",
"error": null,
"content": {
"video_url": "https://api.aiohub.org/v1/videos/task_ADQ5XK6AKWg36WePoJ3sZRyDvWl1ogGZ/content"
},
"usage": {
"completion_tokens": 87300,
"total_tokens": 87300
},
"output_format": "mp4",
"framespersecond": 24,
"resolution": "720p",
"ratio": "16:9",
"duration": 4,
"generate_audio": true,
"priority": 0,
"service_tier": "default",
"execution_expires_after": 172800,
"created_at": 1791275108,
"updated_at": 1791275315
}
]
}{
"error": {
"message": "<string>",
"type": "<string>",
"param": "<string>",
"code": "<string>"
}
}列出视频任务 · Ark
按时间倒序列出最近 7 天的任务,支持分页和状态过滤。
GET
/
v1
/
contents
/
generations
/
tasks
列出视频任务
curl --request GET \
--url https://api.aiohub.org/v1/contents/generations/tasks \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.aiohub.org/v1/contents/generations/tasks"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.aiohub.org/v1/contents/generations/tasks', 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://api.aiohub.org/v1/contents/generations/tasks",
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://api.aiohub.org/v1/contents/generations/tasks"
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://api.aiohub.org/v1/contents/generations/tasks")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aiohub.org/v1/contents/generations/tasks")
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{
"total": 1,
"items": [
{
"id": "task_ADQ5XK6AKWg36WePoJ3sZRyDvWl1ogGZ",
"model": "doubao-seedance-2-5-260628",
"status": "succeeded",
"error": null,
"content": {
"video_url": "https://api.aiohub.org/v1/videos/task_ADQ5XK6AKWg36WePoJ3sZRyDvWl1ogGZ/content"
},
"usage": {
"completion_tokens": 87300,
"total_tokens": 87300
},
"output_format": "mp4",
"framespersecond": 24,
"resolution": "720p",
"ratio": "16:9",
"duration": 4,
"generate_audio": true,
"priority": 0,
"service_tier": "default",
"execution_expires_after": 172800,
"created_at": 1791275108,
"updated_at": 1791275315
}
]
}{
"error": {
"message": "<string>",
"type": "<string>",
"param": "<string>",
"code": "<string>"
}
}GET /v1/contents/generations/tasks?page_num=1&page_size=20 列出最近 7 天的任务,支持 filter.status、filter.model 和 filter.task_ids 过滤。
列表中的任务对象与 查询单个任务 相同。授权
API key (sk-xxx)
查询参数
页码
必填范围:
1 <= x <= 500每页条数
必填范围:
1 <= x <= 500按状态过滤
可用选项:
queued, running, succeeded, failed, cancelled, expired 按模型过滤
按任务 ID 过滤,可重复