MiniMax H3
Truy xuất video MiniMax H3
Truy xuất tác vụ video MiniMax H3 theo ID tác vụ, bao gồm trạng thái, tiến độ, dấu thời gian, URL kết quả hoặc thông tin chi tiết về lỗi.
GET
/
v1
/
videos
/
{task_id}
cURL
curl "https://api.cometapi.com/v1/videos/<task_id>" \
-H "Authorization: Bearer $COMETAPI_KEY"import os
import requests
task_id = "<task_id>"
response = requests.get(
f"https://api.cometapi.com/v1/videos/{task_id}",
headers={
"Authorization": "Bearer " + os.environ["COMETAPI_KEY"]
},
timeout=60,
)
response.raise_for_status()
print(response.json())
const taskId = "<task_id>";
const response = await fetch(
`https://api.cometapi.com/v1/videos/${taskId}`,
{ headers: { Authorization: `Bearer ${process.env.COMETAPI_KEY}` } },
);
if (!response.ok) {
throw new Error(await response.text());
}
console.log(await response.json());
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.cometapi.com/v1/videos/{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.cometapi.com/v1/videos/{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.cometapi.com/v1/videos/{task_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cometapi.com/v1/videos/{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{
"id": "<task_id>",
"task_id": "<task_id>",
"object": "video",
"model": "minimax-h3",
"status": "queued",
"progress": 0,
"created_at": 1779938152
}Sử dụng endpoint này sau khi tạo tác vụ video MiniMax H3. Phản hồi bao gồm
video_url khi tác vụ hoàn tất.
Kiểm tra các trường này
statuscó thể làqueued,in_progress,completedhoặcfailed.progresslà tỷ lệ phần trăm hoàn thành ước tính từ0đến100.video_urlxuất hiện khi tác vụ hoàn tất.errorxuất hiện khi tác vụ thất bại.
Thăm dò tác vụ
1
Trước tiên, hãy tạo tác vụ
Bắt đầu bằng Tạo video MiniMax H3 và lưu
id được trả về.2
Truy xuất trạng thái tác vụ
Gửi ID tác vụ đến endpoint này cho đến khi
status là completed hoặc failed.3
Tải xuống tệp MP4
Khi
status là completed, hãy gọi Tải xuống nội dung video MiniMax H3.Phản hồi
200 - application/json
Current MiniMax H3 video task state.
Lần sửa đổi cuối 7 tháng 8, 2026
⌘I
cURL
curl "https://api.cometapi.com/v1/videos/<task_id>" \
-H "Authorization: Bearer $COMETAPI_KEY"import os
import requests
task_id = "<task_id>"
response = requests.get(
f"https://api.cometapi.com/v1/videos/{task_id}",
headers={
"Authorization": "Bearer " + os.environ["COMETAPI_KEY"]
},
timeout=60,
)
response.raise_for_status()
print(response.json())
const taskId = "<task_id>";
const response = await fetch(
`https://api.cometapi.com/v1/videos/${taskId}`,
{ headers: { Authorization: `Bearer ${process.env.COMETAPI_KEY}` } },
);
if (!response.ok) {
throw new Error(await response.text());
}
console.log(await response.json());
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.cometapi.com/v1/videos/{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.cometapi.com/v1/videos/{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.cometapi.com/v1/videos/{task_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cometapi.com/v1/videos/{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{
"id": "<task_id>",
"task_id": "<task_id>",
"object": "video",
"model": "minimax-h3",
"status": "queued",
"progress": 0,
"created_at": 1779938152
}