Get video task
curl --request GET \
--url https://api.tensorslab.com/v1/video/contents/generations/tasks/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.tensorslab.com/v1/video/contents/generations/tasks/{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.tensorslab.com/v1/video/contents/generations/tasks/{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.tensorslab.com/v1/video/contents/generations/tasks/{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.tensorslab.com/v1/video/contents/generations/tasks/{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.tensorslab.com/v1/video/contents/generations/tasks/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tensorslab.com/v1/video/contents/generations/tasks/{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": "<string>",
"model": "<string>",
"status": "queued",
"content": {
"video_url": "<string>",
"last_frame_url": "<string>",
"file_url": "<string>"
},
"usage": {
"prompt_tokens": 123,
"completion_tokens": 123,
"total_tokens": 123,
"tool_usage": {}
},
"created_at": 123,
"updated_at": 123,
"error": {
"code": "<string>",
"message": "<string>"
},
"framespersecond": 123,
"draft_task_id": "<string>",
"resolution": "<string>",
"ratio": "<string>",
"duration": 123,
"frames": 123,
"seed": 123,
"execution_expires_after": 123,
"generate_audio": true,
"tools": [
{}
],
"output_format": "<string>",
"service_tier": "<string>",
"draft": true,
"priority": 4,
"safety_identifier": "<string>"
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}Video Generation
Query video task
Retrieve task status and video results for Seedance 2.0 / 2.5
Get video task
curl --request GET \
--url https://api.tensorslab.com/v1/video/contents/generations/tasks/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.tensorslab.com/v1/video/contents/generations/tasks/{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.tensorslab.com/v1/video/contents/generations/tasks/{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.tensorslab.com/v1/video/contents/generations/tasks/{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.tensorslab.com/v1/video/contents/generations/tasks/{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.tensorslab.com/v1/video/contents/generations/tasks/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tensorslab.com/v1/video/contents/generations/tasks/{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": "<string>",
"model": "<string>",
"status": "queued",
"content": {
"video_url": "<string>",
"last_frame_url": "<string>",
"file_url": "<string>"
},
"usage": {
"prompt_tokens": 123,
"completion_tokens": 123,
"total_tokens": 123,
"tool_usage": {}
},
"created_at": 123,
"updated_at": 123,
"error": {
"code": "<string>",
"message": "<string>"
},
"framespersecond": 123,
"draft_task_id": "<string>",
"resolution": "<string>",
"ratio": "<string>",
"duration": 123,
"frames": 123,
"seed": 123,
"execution_expires_after": 123,
"generate_audio": true,
"tools": [
{}
],
"output_format": "<string>",
"service_tier": "<string>",
"draft": true,
"priority": 4,
"safety_identifier": "<string>"
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}
Use the returned task
id and the same account’s API key. Seedance 2.0 and 2.5 share this endpoint. Try it prefills the most recent task ID and API key from this page session; you can also enter them manually.
After creation, select Query task to continue without re-entering these fields. The API key is shared only in the current page session and cleared on refresh or close.
queued means queued and running means processing. When succeeded, read content.video_url. For failed, cancelled or expired, inspect error.code and error.message.Authorizations
Path Parameters
Response
OK