Query Task
curl --request GET \
--url https://www.token-nova.com/v1/video/query \
--header 'Authorization: Bearer <token>'import requests
url = "https://www.token-nova.com/v1/video/query"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://www.token-nova.com/v1/video/query', 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/query",
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://www.token-nova.com/v1/video/query"
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://www.token-nova.com/v1/video/query")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.token-nova.com/v1/video/query")
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": "48038932-0ff5-4251-8b4b-7a76c09fd114",
"status": "processing",
"progress": 50,
"created_at": 1774494511
}
{
"id": "48038932-0ff5-4251-8b4b-7a76c09fd114",
"status": "completed",
"progress": 100,
"created_at": 1774494511,
"completed_at": 1774494622,
"video_url": "https://example.com/video/aigcVideoGenFile.mp4",
"thumbnail_url": "https://example.com/thumbnail/thumb.png"
}
Unified Video
Query Task
Use GET /v1/video/query to query the status and result of a Jimeng unified video task.
GET
https://www.token-nova.com
/
v1
/
video
/
query
Query Task
curl --request GET \
--url https://www.token-nova.com/v1/video/query \
--header 'Authorization: Bearer <token>'import requests
url = "https://www.token-nova.com/v1/video/query"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://www.token-nova.com/v1/video/query', 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/query",
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://www.token-nova.com/v1/video/query"
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://www.token-nova.com/v1/video/query")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.token-nova.com/v1/video/query")
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": "48038932-0ff5-4251-8b4b-7a76c09fd114",
"status": "processing",
"progress": 50,
"created_at": 1774494511
}
{
"id": "48038932-0ff5-4251-8b4b-7a76c09fd114",
"status": "completed",
"progress": 100,
"created_at": 1774494511,
"completed_at": 1774494622,
"video_url": "https://example.com/video/aigcVideoGenFile.mp4",
"thumbnail_url": "https://example.com/thumbnail/thumb.png"
}
Query Task
After submitting a Jimeng unified video task, query its progress and result viaGET /v1/video/query. The query parameter uses id, whose value is the task ID returned by Create Video.
- The route entry is
GET /v1/video/query. - The task ID is passed in through the Query parameter
id. - The returned structure includes fields such as
status,progress, andvideo_url.
Method and Path
GET /v1/video/query?id={task_id}
Request Example
curl "https://www.token-nova.com/v1/video/query?id=48038932-0ff5-4251-8b4b-7a76c09fd114" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Accept: application/json"
import requests
resp = requests.get(
"https://www.token-nova.com/v1/video/query",
params={"id": "48038932-0ff5-4251-8b4b-7a76c09fd114"},
headers={
"Authorization": "Bearer YOUR_API_KEY",
"Accept": "application/json",
},
timeout=30,
)
print(resp.json())
const params = new URLSearchParams({
id: "48038932-0ff5-4251-8b4b-7a76c09fd114",
});
const response = await fetch(
`https://www.token-nova.com/v1/video/query?${params.toString()}`,
{
headers: {
Authorization: "Bearer YOUR_API_KEY",
Accept: "application/json",
},
}
);
console.log(await response.json());
Response Example
{
"id": "48038932-0ff5-4251-8b4b-7a76c09fd114",
"status": "processing",
"progress": 50,
"created_at": 1774494511
}
{
"id": "48038932-0ff5-4251-8b4b-7a76c09fd114",
"status": "completed",
"progress": 100,
"created_at": 1774494511,
"completed_at": 1774494622,
"video_url": "https://example.com/video/aigcVideoGenFile.mp4",
"thumbnail_url": "https://example.com/thumbnail/thumb.png"
}
Authentication
Authorization: Bearer YOUR_API_KEY
Query Parameters
string
required
Task ID, which is the same as the
task_id returned by the creation API.Response
string
Task ID.
string
Task status; common values include
processing, failed, and completed.integer
Progress percentage (0-100).
integer
Creation time (Unix timestamp).
integer
Completion time (Unix timestamp), returned only when the task is completed.
string
Video download URL, returned only when the status is
completed.string
Thumbnail URL, optional field.
