Query Video Task Status
curl --request GET \
--url https://api.powertokens.ai/v1/videos/{task_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.powertokens.ai/v1/videos/{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.powertokens.ai/v1/videos/{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.powertokens.ai/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.powertokens.ai/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.powertokens.ai/v1/videos/{task_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.powertokens.ai/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_abc123",
"object": "video",
"model": "MiniMax-Hailuo-2.3",
"status": "completed",
"progress": 100,
"created_at": 1742515200,
"completed_at": 1742515235,
"metadata": {
"url": "https://api.example.com/v1/videos/task_abc123/content"
}
}{
"code": "access_denied",
"message": "Invalid token",
"data": null
}{
"code": "task_not_found",
"message": "Task does not exist or has expired",
"data": null
}{
"code": "insufficient_user_quota",
"message": "Insufficient account quota, please try again later",
"data": null
}{
"code": "gen_relay_info_failed",
"message": "Internal processing failed, please try again later",
"data": null
}{
"code": "bad_response_status_code",
"message": "The upstream provider returned an invalid response",
"data": null
}{
"code": "get_channel_failed",
"message": "No available channel for the current model, please try again later",
"data": null
}Video Models
Query Video Task Status
Query the latest status of an asynchronous video task by task ID.
Once the task is completed, metadata.url in the response can be used to access the result URL. To download the final file directly, call /v1/videos/{task_id}/content.
GET
/
v1
/
videos
/
{task_id}
Query Video Task Status
curl --request GET \
--url https://api.powertokens.ai/v1/videos/{task_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.powertokens.ai/v1/videos/{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.powertokens.ai/v1/videos/{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.powertokens.ai/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.powertokens.ai/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.powertokens.ai/v1/videos/{task_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.powertokens.ai/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_abc123",
"object": "video",
"model": "MiniMax-Hailuo-2.3",
"status": "completed",
"progress": 100,
"created_at": 1742515200,
"completed_at": 1742515235,
"metadata": {
"url": "https://api.example.com/v1/videos/task_abc123/content"
}
}{
"code": "access_denied",
"message": "Invalid token",
"data": null
}{
"code": "task_not_found",
"message": "Task does not exist or has expired",
"data": null
}{
"code": "insufficient_user_quota",
"message": "Insufficient account quota, please try again later",
"data": null
}{
"code": "gen_relay_info_failed",
"message": "Internal processing failed, please try again later",
"data": null
}{
"code": "bad_response_status_code",
"message": "The upstream provider returned an invalid response",
"data": null
}{
"code": "get_channel_failed",
"message": "No available channel for the current model, please try again later",
"data": null
}Authorizations
Pass Authorization: Bearer <token> in the request header.
Path Parameters
Public video task ID.
⌘I