Get Task Status
curl --request GET \
--url https://www.token-nova.com/v1/video/generations/{task_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"task_id": "<string>"
}
'import requests
url = "https://www.token-nova.com/v1/video/generations/{task_id}"
payload = { "task_id": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.get(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({task_id: '<string>'})
};
fetch('https://www.token-nova.com/v1/video/generations/{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://www.token-nova.com/v1/video/generations/{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_POSTFIELDS => json_encode([
'task_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://www.token-nova.com/v1/video/generations/{task_id}"
payload := strings.NewReader("{\n \"task_id\": \"<string>\"\n}")
req, _ := http.NewRequest("GET", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://www.token-nova.com/v1/video/generations/{task_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"task_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.token-nova.com/v1/video/generations/{task_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"task_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"code": "success",
"message": "",
"data": {
"task_id": "task-video-abc123",
"status": "queued",
"url": "",
"format": "mp4",
"metadata": null,
"error": null
}
}
{
"code": "success",
"message": "",
"data": {
"task_id": "task-video-abc123",
"status": "succeeded",
"url": "https://...",
"format": "mp4",
"metadata": {
"duration": 5,
"width": 1280,
"height": 720,
"fps": 24
},
"error": null
}
}
{
"code": "success",
"message": "",
"data": {
"task_id": "task-video-abc123",
"status": "failed",
"url": "",
"format": "mp4",
"metadata": null,
"error": {
"code": "content_policy",
"message": "Content policy violation"
}
}
}
{
"code": "task_not_exist",
"message": "task_not_exist",
"data": null
}
{
"code": "invalid_api_key",
"message": "Invalid token",
"data": null
}
Get Task Status
Query the execution progress and result of the unified video task interface, and learn the corresponding OpenAI video-compatible query path.
GET
https://www.token-nova.com
/
v1
/
video
/
generations
/
{task_id}
Get Task Status
curl --request GET \
--url https://www.token-nova.com/v1/video/generations/{task_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"task_id": "<string>"
}
'import requests
url = "https://www.token-nova.com/v1/video/generations/{task_id}"
payload = { "task_id": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.get(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({task_id: '<string>'})
};
fetch('https://www.token-nova.com/v1/video/generations/{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://www.token-nova.com/v1/video/generations/{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_POSTFIELDS => json_encode([
'task_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://www.token-nova.com/v1/video/generations/{task_id}"
payload := strings.NewReader("{\n \"task_id\": \"<string>\"\n}")
req, _ := http.NewRequest("GET", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://www.token-nova.com/v1/video/generations/{task_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"task_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.token-nova.com/v1/video/generations/{task_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"task_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"code": "success",
"message": "",
"data": {
"task_id": "task-video-abc123",
"status": "queued",
"url": "",
"format": "mp4",
"metadata": null,
"error": null
}
}
{
"code": "success",
"message": "",
"data": {
"task_id": "task-video-abc123",
"status": "succeeded",
"url": "https://...",
"format": "mp4",
"metadata": {
"duration": 5,
"width": 1280,
"height": 720,
"fps": 24
},
"error": null
}
}
{
"code": "success",
"message": "",
"data": {
"task_id": "task-video-abc123",
"status": "failed",
"url": "",
"format": "mp4",
"metadata": null,
"error": {
"code": "content_policy",
"message": "Content policy violation"
}
}
}
{
"code": "task_not_exist",
"message": "task_not_exist",
"data": null
}
{
"code": "invalid_api_key",
"message": "Invalid token",
"data": null
}
Get Task Status
This endpoint is used to query the status of asynchronous tasks submitted through the unified video task entry point. The returned structure is wrapped withcode, message, and data.
- The query targets the platform-exposed
task_id, not the upstream real task ID. - A successful response always returns
code = success. - Suitable for use together with
/v1/video/generations. - The same task can also be queried via
/v1/videos/{task_id}in the OpenAIvideoobject format.
Method and Path
GET /v1/video/generations/{task_id}
Request Example
curl https://www.token-nova.com/v1/video/generations/task-video-abc123 \
-H "Authorization: Bearer YOUR_API_KEY"
import requests
resp = requests.get(
"https://www.token-nova.com/v1/video/generations/task-video-abc123",
headers={"Authorization": "Bearer YOUR_API_KEY"},
timeout=30,
)
print(resp.json())
const response = await fetch(
"https://www.token-nova.com/v1/video/generations/task-video-abc123",
{
headers: { Authorization: "Bearer YOUR_API_KEY" },
}
);
console.log(await response.json());
Response Example
{
"code": "success",
"message": "",
"data": {
"task_id": "task-video-abc123",
"status": "queued",
"url": "",
"format": "mp4",
"metadata": null,
"error": null
}
}
{
"code": "success",
"message": "",
"data": {
"task_id": "task-video-abc123",
"status": "succeeded",
"url": "https://...",
"format": "mp4",
"metadata": {
"duration": 5,
"width": 1280,
"height": 720,
"fps": 24
},
"error": null
}
}
{
"code": "success",
"message": "",
"data": {
"task_id": "task-video-abc123",
"status": "failed",
"url": "",
"format": "mp4",
"metadata": null,
"error": {
"code": "content_policy",
"message": "Content policy violation"
}
}
}
{
"code": "task_not_exist",
"message": "task_not_exist",
"data": null
}
{
"code": "invalid_api_key",
"message": "Invalid token",
"data": null
}
Authentication
Authorization: Bearer YOUR_API_KEY
Path Parameters
string
必填
The public task ID returned by the unified video task entry point.
Response
string
Business status code. Fixed as
success on success.string
Error or supplementary information. Usually an empty string on success.
string
Task ID.
string
Task status. Common values are
queued, processing, succeeded, and failed.string
Final video result URL. Some channels may return a platform proxy URL.
object
Error details for failed tasks.
Use Cases
Poll Until Completion
It is recommended to poll every5 to 10 seconds until status becomes succeeded or failed.
Switch to the OpenAI Query Structure
If the client is already parsing results according to the OpenAIvideo object, you can directly query:
curl https://www.token-nova.com/v1/videos/task-video-abc123 \
-H "Authorization: Bearer YOUR_API_KEY"
Notes
/v1/video/generations/{task_id} and /v1/videos/{task_id} query the same type of video task, but return different structures. The former is a unified task wrapper, while the latter is an OpenAI video object.