Seedance 2.0
curl --request POST \
--url https://api.tensorslab.com/v1/video/contents/generations/tasksimport requests
url = "https://api.tensorslab.com/v1/video/contents/generations/tasks"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.tensorslab.com/v1/video/contents/generations/tasks', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$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"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.tensorslab.com/v1/video/contents/generations/tasks")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tensorslab.com/v1/video/contents/generations/tasks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_bodyVideo Generation
Seedance 2.0
Create Seedance 2.0 tasks with the official ByteDance model ID and content[] JSON
Seedance 2.0
curl --request POST \
--url https://api.tensorslab.com/v1/video/contents/generations/tasksimport requests
url = "https://api.tensorslab.com/v1/video/contents/generations/tasks"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.tensorslab.com/v1/video/contents/generations/tasks', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$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"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.tensorslab.com/v1/video/contents/generations/tasks")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tensorslab.com/v1/video/contents/generations/tasks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body
Use official ByteDance model ID
HTTP 200 response:
Save the returned
The JSON body limit is 64 MiB. Use JSON booleans
Use public HTTP(S) URLs or
Try it starts with one text item and one image item. Select each item’s
Example success response (optional metadata varies):
Only tasks created by the current account are accessible. The primary video URL is the platform’s transferred output. Read
Set
dreamina-seedance-2-0-260128. Keep the official JSON body and switch the video base URL and API key to TensorAI. For asset URL and AK/SK settings, see migration settings.
Select Try it to create a task. After creation, Query task prefills the task ID and API key. You can also query a video task to retrieve status and results.
Create a task
curl -X POST "https://api.tensorslab.com/v1/video/contents/generations/tasks" \
-H "Authorization: Bearer <YOUR_API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"model": "dreamina-seedance-2-0-260128",
"content": [{"type": "text", "text": "A paper boat floating on a quiet lake"}],
"duration": 5,
"resolution": "720p",
"ratio": "16:9",
"generate_audio": true,
"watermark": false
}'
{"id":"task_example"}
id to check progress and retrieve the video.
Request parameters
| Parameter | Type | Description |
|---|---|---|
model | string, required | Official ByteDance ID dreamina-seedance-2-0-260128 |
content | object[], required | Official text, image, audio or video content format |
duration | integer | Seconds, 4–15 or -1 (automatic); model decides when omitted |
resolution | string | 480p, 720p, 1080p; combinations depend on model support |
ratio | string | adaptive, 21:9, 16:9, 4:3, 1:1, 3:4, 9:16 |
generate_audio, watermark, return_last_frame | boolean | Synchronized audio, watermark and last frame, subject to model support |
seed | integer | -1–2147483647, subject to model support |
frames | integer | 29–289, in steps of 25+4n; takes precedence over duration, subject to model support |
execution_expires_after | integer | Execution expiry in seconds, 3600–259200 |
priority | integer | Execution priority, 0–9 |
safety_identifier, callback_url, service_tier | string | Safety identifier, callback and service tier; forwarded as supplied |
draft, camera_fixed | boolean | Draft mode and fixed camera, subject to model support |
tools | object[] | At most one {"type":"web_search"} tool; availability depends on the model |
true / false. Omitted optional values are left to the model; supplied values must meet the field and model requirements.
2.0 does not accept output_format or omni_reference_task_type; use Seedance 2.5 for these fields. Available parameters depend on the model.
Media and content
| Type | Content field | role |
|---|---|---|
| Text | text | None |
| Image | image_url.url | first_frame, last_frame, reference_image; may be omitted for official first-frame semantics |
| Audio | audio_url.url | reference_audio |
| Video | video_url.url | reference_video |
asset://<ASSET_ID> from the current account. Images and audio also accept Base64 Data URLs (decoded limits: 30 MiB and 15 MiB). Inline video Base64 is unsupported. URLs must not target local or private addresses.
For a reference image, replace the creation request’s content with:
[
{"type":"text","text":"Keep the reference character's appearance and show them walking in the rain"},
{"type":"image_url","image_url":{"url":"asset://<ASSET_ID>"},"role":"reference_image"}
]
type and fill its matching fields. Use Add item for more media, or delete items you do not need.
Existing assets undergo ownership and readiness checks. See asset management for manual registration and visual verification.
Retrieve results
Try it: query a video task. Seedance 2.0 and 2.5 share the same query endpoint.curl "https://api.tensorslab.com/v1/video/contents/generations/tasks/<TASK_ID>" \
-H "Authorization: Bearer <YOUR_API_KEY>"
status | Meaning |
|---|---|
queued | Queued |
running | Processing, including output transfer |
succeeded | Read content.video_url |
failed, cancelled, expired | Terminal; inspect error.code / error.message |
{
"id":"task_example",
"model":"dreamina-seedance-2-0-260128",
"status":"succeeded",
"content":{"video_url":"https://example.com/output.mp4","last_frame_url":"","file_url":""},
"usage":{"prompt_tokens":0,"completion_tokens":1000,"total_tokens":1000},
"resolution":"720p","ratio":"16:9","duration":5,"framespersecond":24,
"created_at":1794787200,"updated_at":1794787260
}
content.last_frame_url when a last frame was requested and returned, and use the returned duration for automatic-duration tasks.
Official Python SDK
This example uses the officialvolcenginesdkarkruntime SDK. See the official SDK installation guide.
pip install 'volcengine-python-sdk[ark]'
PLATFORM_API_KEY to your TensorAI API key:
import os
import time
from volcenginesdkarkruntime import Ark
client = Ark(api_key=os.environ["PLATFORM_API_KEY"],
base_url="https://api.tensorslab.com/v1/video")
task = client.content_generation.tasks.create(
model="dreamina-seedance-2-0-260128",
content=[{"type":"text","text":"A paper boat floating on a quiet lake"}],
duration=5, resolution="720p", ratio="16:9",
)
for _ in range(240):
result = client.content_generation.tasks.get(task_id=task.id)
if result.status == "succeeded":
print(result.content.video_url)
break
if result.status in {"failed", "cancelled", "expired"}:
raise RuntimeError(result.error)
time.sleep(5)
else:
raise TimeoutError("Retain task.id and query again later")