curl --request GET \
--url https://api.example.com/v1/seedance/video/generations/{taskId} \
--header 'Authorization: <authorization>'import requests
url = "https://api.example.com/v1/seedance/video/generations/{taskId}"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://api.example.com/v1/seedance/video/generations/{taskId}', 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.example.com/v1/seedance/video/generations/{taskId}",
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: <authorization>"
],
]);
$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.example.com/v1/seedance/video/generations/{taskId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
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.example.com/v1/seedance/video/generations/{taskId}")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/seedance/video/generations/{taskId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"created_at": 123,
"updated_at": 123,
"framespersecond": 123,
"generate_audio": true,
"safety_identifier": "<string>",
"service_tier": "<string>",
"execution_expires_after": 123,
"draft_task_id": "<string>",
"id": "<string>",
"model": "<string>",
"status": "<string>",
"error": {
"code": "<string>",
"message": "<string>"
},
"content": {
"video_url": "<string>",
"last_frame_url": "<string>"
},
"usage": {
"completion_tokens": 123,
"total_tokens": 123
},
"seed": 123,
"resolution": "<string>",
"ratio": "<string>",
"duration": 123,
"frames": "<string>",
"priority": 123,
"draft": true
}Seedance query video task
Query the status and result of a Seedance-compatible video task
curl --request GET \
--url https://api.example.com/v1/seedance/video/generations/{taskId} \
--header 'Authorization: <authorization>'import requests
url = "https://api.example.com/v1/seedance/video/generations/{taskId}"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://api.example.com/v1/seedance/video/generations/{taskId}', 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.example.com/v1/seedance/video/generations/{taskId}",
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: <authorization>"
],
]);
$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.example.com/v1/seedance/video/generations/{taskId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
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.example.com/v1/seedance/video/generations/{taskId}")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/seedance/video/generations/{taskId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"created_at": 123,
"updated_at": 123,
"framespersecond": 123,
"generate_audio": true,
"safety_identifier": "<string>",
"service_tier": "<string>",
"execution_expires_after": 123,
"draft_task_id": "<string>",
"id": "<string>",
"model": "<string>",
"status": "<string>",
"error": {
"code": "<string>",
"message": "<string>"
},
"content": {
"video_url": "<string>",
"last_frame_url": "<string>"
},
"usage": {
"completion_tokens": 123,
"total_tokens": 123
},
"seed": 123,
"resolution": "<string>",
"ratio": "<string>",
"duration": 123,
"frames": "<string>",
"priority": 123,
"draft": true
}id returned at creation to query the task. The response preserves Seedance protocol fields, with the video URL in content.video_url after success.
return_last_frame: true, the successful response also includes a last-frame URL that you can use to continue into another video segment.Polling example
import time
import requests
task_id = "cgt-20260730120000-a1b2c3"
url = f"https://api.haitoken.ai/v1/seedance/video/generations/{task_id}"
headers = {"Authorization": "Bearer YOUR_API_KEY"}
while True:
result = requests.get(url, headers=headers).json()
status = result.get("status")
if status == "succeeded":
print(result["content"]["video_url"])
break
if status in ("failed", "cancelled", "expired"):
error = result.get("error") or {}
print(error.get("code"), error.get("message"))
break
time.sleep(5)
Path Parameters
Response
Task creation time (Unix timestamp, seconds)
Task last update time (Unix timestamp, seconds)
Generated video frame rate
Whether the generated video contains audio synchronized with the visuals. This parameter is only supported in seedance 2.0 & 2.0 fast and seedance 1.5 pro. true: the model outputs a video with synchronized audio. false: outputs a silent video.
Unique identifier of the end user. If this parameter is set when creating the video generation task, the API returns it unchanged.
Service tier: default online inference / flex offline inference
Task timeout threshold, in seconds
Draft video task ID. Returned when generating a final video from a draft video
Task ID
Model name
Task status: queued / running / succeeded / failed / expired / cancelled
Error information (returned when the task fails)
Show child attributes
Show child attributes
Generated result content (returned when the task succeeds)
Show child attributes
Show child attributes
Token usage statistics
Show child attributes
Show child attributes
Random seed
Generated video resolution: 480p / 720p / 1080p / 4k
Generated video aspect ratio: 16:9 / 4:3 / 1:1 / 3:4 / 9:16 / 21:9
Generated video duration (seconds)
Generated video frame count. Note: only one of duration and frames is returned. If a frame count is specified in the create video generation request, the frame count is returned.
Execution priority of the current request
Whether the generated video is a draft video. This parameter is only returned by seedance 1.5 pro. true: the current output is a draft video. false: the current output is a standard video.