Query Task
curl --request GET \
--url https://octopusx.ai/v1/video/generations/{task_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://octopusx.ai/v1/video/generations/{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://octopusx.ai/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://octopusx.ai/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_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://octopusx.ai/v1/video/generations/{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://octopusx.ai/v1/video/generations/{task_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://octopusx.ai/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>'
response = http.request(request)
puts response.read_body{
"code": "success",
"data": {
"task_id": "task_xxxxx",
"status": "IN_PROGRESS",
"progress": "50%",
"submit_time": 1775908082,
"start_time": 1775908086,
"finish_time": 0,
"data": {
"status": "processing",
"duration": 5,
"resolution": "720p",
"ratio": "16:9",
"content": {},
"usage": {}
}
}
}
{
"code": "success",
"data": {
"task_id": "task_xxxx",
"status": "SUCCESS",
"progress": "100%",
"submit_time": 1775908082,
"start_time": 1775908086,
"finish_time": 1775908321,
"data": {
"status": "succeeded",
"duration": 5,
"resolution": "720p",
"ratio": "16:9",
"content": {
"video_url": "https://example.com/output.mp4"
},
"usage": {
"completion_tokens": 108900,
"total_tokens": 108900
}
}
}
}
{
"code": "success",
"data": {
"task_id": "task_xxxx",
"status": "FAILURE",
"progress": "100%",
"submit_time": 1775908082,
"start_time": 1775908086,
"finish_time": 1775908200,
"fail_reason": "Content safety check failed",
"data": {
"status": "failed",
"duration": 5,
"resolution": "720p",
"ratio": "16:9",
"content": {},
"usage": {}
}
}
}
{
"error": {
"code": "NotFound",
"message": "task not found",
"type": "new_api_error"
}
}
Seedance-2
Query Task
Use GET /v1/video/generations/{task_id} to query the status and result of a Seedance 2.0 video generation task.
GET
https://octopusx.ai
/
v1
/
video
/
generations
/
{task_id}
Query Task
curl --request GET \
--url https://octopusx.ai/v1/video/generations/{task_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://octopusx.ai/v1/video/generations/{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://octopusx.ai/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://octopusx.ai/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_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://octopusx.ai/v1/video/generations/{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://octopusx.ai/v1/video/generations/{task_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://octopusx.ai/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>'
response = http.request(request)
puts response.read_body{
"code": "success",
"data": {
"task_id": "task_xxxxx",
"status": "IN_PROGRESS",
"progress": "50%",
"submit_time": 1775908082,
"start_time": 1775908086,
"finish_time": 0,
"data": {
"status": "processing",
"duration": 5,
"resolution": "720p",
"ratio": "16:9",
"content": {},
"usage": {}
}
}
}
{
"code": "success",
"data": {
"task_id": "task_xxxx",
"status": "SUCCESS",
"progress": "100%",
"submit_time": 1775908082,
"start_time": 1775908086,
"finish_time": 1775908321,
"data": {
"status": "succeeded",
"duration": 5,
"resolution": "720p",
"ratio": "16:9",
"content": {
"video_url": "https://example.com/output.mp4"
},
"usage": {
"completion_tokens": 108900,
"total_tokens": 108900
}
}
}
}
{
"code": "success",
"data": {
"task_id": "task_xxxx",
"status": "FAILURE",
"progress": "100%",
"submit_time": 1775908082,
"start_time": 1775908086,
"finish_time": 1775908200,
"fail_reason": "Content safety check failed",
"data": {
"status": "failed",
"duration": 5,
"resolution": "720p",
"ratio": "16:9",
"content": {},
"usage": {}
}
}
}
{
"error": {
"code": "NotFound",
"message": "task not found",
"type": "new_api_error"
}
}
Query Task
Query the task status, progress, and result video URL based on thetask_id returned by Create Video.
Method and Path
GET /v1/video/generations/{task_id}
Request Example
curl https://octopusx.ai/v1/video/generations/cgt-20260412163502-x8k2m \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Accept: application/json"
import requests
resp = requests.get(
"https://octopusx.ai/v1/video/generations/cgt-20260412163502-x8k2m",
headers={
"Authorization": "Bearer YOUR_API_KEY",
"Accept": "application/json",
},
timeout=30,
)
print(resp.json())
Response Example
{
"code": "success",
"data": {
"task_id": "task_xxxxx",
"status": "IN_PROGRESS",
"progress": "50%",
"submit_time": 1775908082,
"start_time": 1775908086,
"finish_time": 0,
"data": {
"status": "processing",
"duration": 5,
"resolution": "720p",
"ratio": "16:9",
"content": {},
"usage": {}
}
}
}
{
"code": "success",
"data": {
"task_id": "task_xxxx",
"status": "SUCCESS",
"progress": "100%",
"submit_time": 1775908082,
"start_time": 1775908086,
"finish_time": 1775908321,
"data": {
"status": "succeeded",
"duration": 5,
"resolution": "720p",
"ratio": "16:9",
"content": {
"video_url": "https://example.com/output.mp4"
},
"usage": {
"completion_tokens": 108900,
"total_tokens": 108900
}
}
}
}
{
"code": "success",
"data": {
"task_id": "task_xxxx",
"status": "FAILURE",
"progress": "100%",
"submit_time": 1775908082,
"start_time": 1775908086,
"finish_time": 1775908200,
"fail_reason": "Content safety check failed",
"data": {
"status": "failed",
"duration": 5,
"resolution": "720p",
"ratio": "16:9",
"content": {},
"usage": {}
}
}
}
{
"error": {
"code": "NotFound",
"message": "task not found",
"type": "new_api_error"
}
}
Authentication
Authorization: Bearer YOUR_API_KEY
Path Parameters
Video generation task ID, consistent with the
task_id returned by the creation endpoint.Response
Response code,
success on success.Task ID.
Task status:
SUBMITTED, IN_PROGRESS, SUCCESS, FAILURE.Progress string, such as
50% or 100%.Reason for failure, present only when
status=FAILURE.Upstream native status:
queued, pending, processing, succeeded, failed.Generated video URL (usually a temporary signed link, valid for about 12 hours by default).
Token usage related to billing.
Related Pages
⌘I