curl --request GET \
--url https://api.aiid.edu.kg/api/v1/tasks/{task_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.aiid.edu.kg/api/v1/tasks/{task_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.aiid.edu.kg/api/v1/tasks/{task_id}', 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.aiid.edu.kg/api/v1/tasks/{task_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;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.aiid.edu.kg/api/v1/tasks/{task_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://api.aiid.edu.kg/api/v1/tasks/{task_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aiid.edu.kg/api/v1/tasks/{task_id}")
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{
"output": {
"task_id": "<string>",
"task_status": "PENDING",
"submit_time": "<string>",
"scheduled_time": "<string>",
"end_time": "<string>",
"video_url": "<string>",
"code": "<string>",
"message": "<string>"
},
"usage": {
"duration": 123,
"SR": 123,
"video_count": 123
},
"request_id": "<string>"
}Truy vấn tác vụ (HappyHorse và Wan)
Dòng này hỗ trợ định dạng tạo video OpenAI (xem chi tiết tại liên kết Định dạng tương thích với Sora tạo video).
HappyHorse và giao diện tạo video Wan; đường dẫn công khai tuân theo giao thức chính thức của DashScope.
HappyHorse hỗ trợ happyhorse-1.0, happyhorse-1.0-i2v, happyhorse-1.0-t2v, happyhorse-1.0-r2v, happyhorse-1.0-video-edit; Wan hỗ trợ wan-3.0, wan-3.0-480p, wan-3.0-1080p. Trong đó happyhorse-1.0 là mô hình tổng hợp, cần phân biệt t2v, i2v, r2v, video_edit thông qua mode. Ba mô hình của Wan lần lượt cố định ở 720P, 480P, 1080P, hỗ trợ thời lượng 2~30 giây và tối đa 10 ảnh, 5 video, 5 audio tham chiếu.
Giao diện công khai giữ nguyên định dạng endpoint chính thức; tiền tố riêng cho từng kênh chỉ được ghép nội bộ khi gateway gửi yêu cầu tới kênh upstream cụ thể. Client không cần truyền rõ X-DashScope-Async; gateway hoặc lớp thích ứng kênh chính thức sẽ xử lý.
Bổ sung khung yêu cầu công khai, cấu trúc truy vấn tác vụ và mẫu xác thực đề xuất cho định dạng tạo video HappyHorse và Wan; đường dẫn công khai giữ nguyên định dạng endpoint chính thức của DashScope.
Mô hình hỗ trợ: happyhorse-1.0, happyhorse-1.0-t2v, happyhorse-1.0-i2v, happyhorse-1.0-r2v, happyhorse-1.0-video-edit, wan-3.0, wan-3.0-480p, wan-3.0-1080p
Các trường yêu cầu thống nhất:
model(string, bắt buộc): Tên mô hình công khai của HappyHorse hoặc Wan. Wan hỗ trợwan-3.0,wan-3.0-480p,wan-3.0-1080p; mô hình tổng hợp HappyHorsehappyhorse-1.0cần dùng cùngmode.mode(string, tùy chọn): Chế độ mô hình tổng hợp, các giá trị thường dùng làt2v、i2v、r2v、video_edit. Với mô hình con cố định có thể không truyền.input.prompt(string, bắt buộc): Prompt tạo hoặc chỉnh sửa video.input.media(array[object], tùy chọn): Đầu vào đa phương tiện. Hỗ trợfirst_frame,last_frame,reference_image,reference_video,reference_audio; Wan hỗ trợ tối đa 10 ảnh, 5 video, 5 audio.parameters.duration(integer, tùy chọn): Thời gian tạo, tính bằng giây.parameters.resolution(string, tùy chọn): Độ phân giải đầu ra. Ba mô hình của Wan lần lượt cố định ở720P,480P,1080P; các giá trị phổ biến của HappyHorse là720P,1080P.parameters.ratio(string, tùy chọn): Tỷ lệ khung hình đầu ra, thường dùng cho tạo video từ văn bản và từ tham chiếu.parameters.watermark(boolean, tùy chọn): Có thêm watermark hay không.parameters.seed(integer, tùy chọn): Seed ngẫu nhiên.
Khác biệt thường gặp giữa mô hình/chế độ:
HappyHorse 聚合模型: Hỗ trợ mô hình happyhorse-1.0; mô hình tổng hợp phân biệt mô hình cuối cùng qua mode.HappyHorse 文生视频: Hỗ trợ mô hình happyhorse-1.0-t2v; định dạng chính thức tạo video từ văn bản.HappyHorse 首帧图生视频: Hỗ trợ mô hình happyhorse-1.0-i2v; định dạng chính thức tạo video từ ảnh khung đầu.HappyHorse 参考生视频: Hỗ trợ mô hình happyhorse-1.0-r2v; định dạng chính thức tạo video từ nhiều ảnh tham chiếu.HappyHorse 视频编辑: Hỗ trợ mô hình happyhorse-1.0-video-edit; định dạng chính thức chỉnh sửa video.Wan 3.0 720P: Hỗ trợ mô hình wan-3.0; tạo video tham chiếu đa phương thức theo định dạng chính thức của Wan 3.0.Wan 3.0 480P: Hỗ trợ mô hình wan-3.0-480p; lời gọi theo định dạng chính thức của Wan 3.0 với 480P cố định.Wan 3.0 1080P: Hỗ trợ mô hình wan-3.0-1080p; lời gọi theo định dạng chính thức của Wan 3.0 với 1080P cố định.
curl --request GET \
--url https://api.aiid.edu.kg/api/v1/tasks/{task_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.aiid.edu.kg/api/v1/tasks/{task_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.aiid.edu.kg/api/v1/tasks/{task_id}', 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.aiid.edu.kg/api/v1/tasks/{task_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;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.aiid.edu.kg/api/v1/tasks/{task_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://api.aiid.edu.kg/api/v1/tasks/{task_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aiid.edu.kg/api/v1/tasks/{task_id}")
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{
"output": {
"task_id": "<string>",
"task_status": "PENDING",
"submit_time": "<string>",
"scheduled_time": "<string>",
"end_time": "<string>",
"video_url": "<string>",
"code": "<string>",
"message": "<string>"
},
"usage": {
"duration": 123,
"SR": 123,
"video_count": 123
},
"request_id": "<string>"
}Ủy quyền
Sử dụng xác thực Bearer Token.
Định dạng: Authorization: Bearer sk-xxxxxx
Tham số đường dẫn
ID tác vụ, lấy từ id được trả về khi tạo tác vụ.
Phản hồi
Truy vấn thành công
Hide child attributes
Hide child attributes
ID tác vụ được trả về khi tạo tác vụ, dùng để truy vấn tác vụ.
Trạng thái tác vụ, các giá trị thường gặp PENDING, RUNNING, SUCCEEDED, FAILED.
PENDING, RUNNING, SUCCEEDED, FAILED, UNKNOWN URL video được tạo sau khi tác vụ thành công.
