Create Video
curl --request POST \
--url https://octopusx.ai/v1/video/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "<string>",
"content": [
{}
],
"content[].type": "<string>",
"content[].text": "<string>",
"content[].image_url": {},
"content[].image_url.url": "<string>",
"content[].video_url": {},
"content[].video_url.url": "<string>",
"content[].audio_url": {},
"content[].audio_url.url": "<string>",
"content[].draft_task": {},
"content[].draft_task.id": "<string>",
"content[].role": "<string>",
"metadata": {},
"metadata.duration": 123,
"metadata.resolution": "<string>",
"metadata.ratio": "<string>",
"metadata.frames": 123,
"metadata.seed": 123,
"metadata.camera_fixed": true,
"metadata.watermark": true,
"metadata.generate_audio": true,
"metadata.return_last_frame": true,
"metadata.draft": true,
"metadata.service_tier": "<string>",
"metadata.execution_expires_after": 123,
"metadata.callback_url": "<string>"
}
'import requests
url = "https://octopusx.ai/v1/video/generations"
payload = {
"model": "<string>",
"content": [{}],
"content[].type": "<string>",
"content[].text": "<string>",
"content[].image_url": {},
"content[].image_url.url": "<string>",
"content[].video_url": {},
"content[].video_url.url": "<string>",
"content[].audio_url": {},
"content[].audio_url.url": "<string>",
"content[].draft_task": {},
"content[].draft_task.id": "<string>",
"content[].role": "<string>",
"metadata": {},
"metadata.duration": 123,
"metadata.resolution": "<string>",
"metadata.ratio": "<string>",
"metadata.frames": 123,
"metadata.seed": 123,
"metadata.camera_fixed": True,
"metadata.watermark": True,
"metadata.generate_audio": True,
"metadata.return_last_frame": True,
"metadata.draft": True,
"metadata.service_tier": "<string>",
"metadata.execution_expires_after": 123,
"metadata.callback_url": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: '<string>',
content: [{}],
'content[].type': '<string>',
'content[].text': '<string>',
'content[].image_url': {},
'content[].image_url.url': '<string>',
'content[].video_url': {},
'content[].video_url.url': '<string>',
'content[].audio_url': {},
'content[].audio_url.url': '<string>',
'content[].draft_task': {},
'content[].draft_task.id': '<string>',
'content[].role': '<string>',
metadata: {},
'metadata.duration': 123,
'metadata.resolution': '<string>',
'metadata.ratio': '<string>',
'metadata.frames': 123,
'metadata.seed': 123,
'metadata.camera_fixed': true,
'metadata.watermark': true,
'metadata.generate_audio': true,
'metadata.return_last_frame': true,
'metadata.draft': true,
'metadata.service_tier': '<string>',
'metadata.execution_expires_after': 123,
'metadata.callback_url': '<string>'
})
};
fetch('https://octopusx.ai/v1/video/generations', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'model' => '<string>',
'content' => [
[
]
],
'content[].type' => '<string>',
'content[].text' => '<string>',
'content[].image_url' => [
],
'content[].image_url.url' => '<string>',
'content[].video_url' => [
],
'content[].video_url.url' => '<string>',
'content[].audio_url' => [
],
'content[].audio_url.url' => '<string>',
'content[].draft_task' => [
],
'content[].draft_task.id' => '<string>',
'content[].role' => '<string>',
'metadata' => [
],
'metadata.duration' => 123,
'metadata.resolution' => '<string>',
'metadata.ratio' => '<string>',
'metadata.frames' => 123,
'metadata.seed' => 123,
'metadata.camera_fixed' => true,
'metadata.watermark' => true,
'metadata.generate_audio' => true,
'metadata.return_last_frame' => true,
'metadata.draft' => true,
'metadata.service_tier' => '<string>',
'metadata.execution_expires_after' => 123,
'metadata.callback_url' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://octopusx.ai/v1/video/generations"
payload := strings.NewReader("{\n \"model\": \"<string>\",\n \"content\": [\n {}\n ],\n \"content[].type\": \"<string>\",\n \"content[].text\": \"<string>\",\n \"content[].image_url\": {},\n \"content[].image_url.url\": \"<string>\",\n \"content[].video_url\": {},\n \"content[].video_url.url\": \"<string>\",\n \"content[].audio_url\": {},\n \"content[].audio_url.url\": \"<string>\",\n \"content[].draft_task\": {},\n \"content[].draft_task.id\": \"<string>\",\n \"content[].role\": \"<string>\",\n \"metadata\": {},\n \"metadata.duration\": 123,\n \"metadata.resolution\": \"<string>\",\n \"metadata.ratio\": \"<string>\",\n \"metadata.frames\": 123,\n \"metadata.seed\": 123,\n \"metadata.camera_fixed\": true,\n \"metadata.watermark\": true,\n \"metadata.generate_audio\": true,\n \"metadata.return_last_frame\": true,\n \"metadata.draft\": true,\n \"metadata.service_tier\": \"<string>\",\n \"metadata.execution_expires_after\": 123,\n \"metadata.callback_url\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://octopusx.ai/v1/video/generations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"<string>\",\n \"content\": [\n {}\n ],\n \"content[].type\": \"<string>\",\n \"content[].text\": \"<string>\",\n \"content[].image_url\": {},\n \"content[].image_url.url\": \"<string>\",\n \"content[].video_url\": {},\n \"content[].video_url.url\": \"<string>\",\n \"content[].audio_url\": {},\n \"content[].audio_url.url\": \"<string>\",\n \"content[].draft_task\": {},\n \"content[].draft_task.id\": \"<string>\",\n \"content[].role\": \"<string>\",\n \"metadata\": {},\n \"metadata.duration\": 123,\n \"metadata.resolution\": \"<string>\",\n \"metadata.ratio\": \"<string>\",\n \"metadata.frames\": 123,\n \"metadata.seed\": 123,\n \"metadata.camera_fixed\": true,\n \"metadata.watermark\": true,\n \"metadata.generate_audio\": true,\n \"metadata.return_last_frame\": true,\n \"metadata.draft\": true,\n \"metadata.service_tier\": \"<string>\",\n \"metadata.execution_expires_after\": 123,\n \"metadata.callback_url\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://octopusx.ai/v1/video/generations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"<string>\",\n \"content\": [\n {}\n ],\n \"content[].type\": \"<string>\",\n \"content[].text\": \"<string>\",\n \"content[].image_url\": {},\n \"content[].image_url.url\": \"<string>\",\n \"content[].video_url\": {},\n \"content[].video_url.url\": \"<string>\",\n \"content[].audio_url\": {},\n \"content[].audio_url.url\": \"<string>\",\n \"content[].draft_task\": {},\n \"content[].draft_task.id\": \"<string>\",\n \"content[].role\": \"<string>\",\n \"metadata\": {},\n \"metadata.duration\": 123,\n \"metadata.resolution\": \"<string>\",\n \"metadata.ratio\": \"<string>\",\n \"metadata.frames\": 123,\n \"metadata.seed\": 123,\n \"metadata.camera_fixed\": true,\n \"metadata.watermark\": true,\n \"metadata.generate_audio\": true,\n \"metadata.return_last_frame\": true,\n \"metadata.draft\": true,\n \"metadata.service_tier\": \"<string>\",\n \"metadata.execution_expires_after\": 123,\n \"metadata.callback_url\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"task_id": "cgt-20260412163502-x8k2m"
}
{
"error": {
"code": "InvalidParameter",
"message": "the parameter duration specified in the request is not valid",
"type": "new_api_error"
}
}
{
"error": {
"code": "Unauthorized",
"message": "Invalid API key provided",
"type": "new_api_error"
}
}
{
"error": {
"code": "Forbidden",
"message": "access denied",
"type": "new_api_error"
}
}
{
"error": {
"code": "RateLimitExceeded",
"message": "当前请求频率过高,请稍后再试",
"type": "new_api_error"
}
}
{
"error": {
"code": "InternalError",
"message": "internal server error",
"type": "new_api_error"
}
}
Seedance-2
Create Video
Submit a Seedance 2.0 multimodal video generation task using POST /v1/video/generations.
POST
https://octopusx.ai
/
v1
/
video
/
generations
Create Video
curl --request POST \
--url https://octopusx.ai/v1/video/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "<string>",
"content": [
{}
],
"content[].type": "<string>",
"content[].text": "<string>",
"content[].image_url": {},
"content[].image_url.url": "<string>",
"content[].video_url": {},
"content[].video_url.url": "<string>",
"content[].audio_url": {},
"content[].audio_url.url": "<string>",
"content[].draft_task": {},
"content[].draft_task.id": "<string>",
"content[].role": "<string>",
"metadata": {},
"metadata.duration": 123,
"metadata.resolution": "<string>",
"metadata.ratio": "<string>",
"metadata.frames": 123,
"metadata.seed": 123,
"metadata.camera_fixed": true,
"metadata.watermark": true,
"metadata.generate_audio": true,
"metadata.return_last_frame": true,
"metadata.draft": true,
"metadata.service_tier": "<string>",
"metadata.execution_expires_after": 123,
"metadata.callback_url": "<string>"
}
'import requests
url = "https://octopusx.ai/v1/video/generations"
payload = {
"model": "<string>",
"content": [{}],
"content[].type": "<string>",
"content[].text": "<string>",
"content[].image_url": {},
"content[].image_url.url": "<string>",
"content[].video_url": {},
"content[].video_url.url": "<string>",
"content[].audio_url": {},
"content[].audio_url.url": "<string>",
"content[].draft_task": {},
"content[].draft_task.id": "<string>",
"content[].role": "<string>",
"metadata": {},
"metadata.duration": 123,
"metadata.resolution": "<string>",
"metadata.ratio": "<string>",
"metadata.frames": 123,
"metadata.seed": 123,
"metadata.camera_fixed": True,
"metadata.watermark": True,
"metadata.generate_audio": True,
"metadata.return_last_frame": True,
"metadata.draft": True,
"metadata.service_tier": "<string>",
"metadata.execution_expires_after": 123,
"metadata.callback_url": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: '<string>',
content: [{}],
'content[].type': '<string>',
'content[].text': '<string>',
'content[].image_url': {},
'content[].image_url.url': '<string>',
'content[].video_url': {},
'content[].video_url.url': '<string>',
'content[].audio_url': {},
'content[].audio_url.url': '<string>',
'content[].draft_task': {},
'content[].draft_task.id': '<string>',
'content[].role': '<string>',
metadata: {},
'metadata.duration': 123,
'metadata.resolution': '<string>',
'metadata.ratio': '<string>',
'metadata.frames': 123,
'metadata.seed': 123,
'metadata.camera_fixed': true,
'metadata.watermark': true,
'metadata.generate_audio': true,
'metadata.return_last_frame': true,
'metadata.draft': true,
'metadata.service_tier': '<string>',
'metadata.execution_expires_after': 123,
'metadata.callback_url': '<string>'
})
};
fetch('https://octopusx.ai/v1/video/generations', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'model' => '<string>',
'content' => [
[
]
],
'content[].type' => '<string>',
'content[].text' => '<string>',
'content[].image_url' => [
],
'content[].image_url.url' => '<string>',
'content[].video_url' => [
],
'content[].video_url.url' => '<string>',
'content[].audio_url' => [
],
'content[].audio_url.url' => '<string>',
'content[].draft_task' => [
],
'content[].draft_task.id' => '<string>',
'content[].role' => '<string>',
'metadata' => [
],
'metadata.duration' => 123,
'metadata.resolution' => '<string>',
'metadata.ratio' => '<string>',
'metadata.frames' => 123,
'metadata.seed' => 123,
'metadata.camera_fixed' => true,
'metadata.watermark' => true,
'metadata.generate_audio' => true,
'metadata.return_last_frame' => true,
'metadata.draft' => true,
'metadata.service_tier' => '<string>',
'metadata.execution_expires_after' => 123,
'metadata.callback_url' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://octopusx.ai/v1/video/generations"
payload := strings.NewReader("{\n \"model\": \"<string>\",\n \"content\": [\n {}\n ],\n \"content[].type\": \"<string>\",\n \"content[].text\": \"<string>\",\n \"content[].image_url\": {},\n \"content[].image_url.url\": \"<string>\",\n \"content[].video_url\": {},\n \"content[].video_url.url\": \"<string>\",\n \"content[].audio_url\": {},\n \"content[].audio_url.url\": \"<string>\",\n \"content[].draft_task\": {},\n \"content[].draft_task.id\": \"<string>\",\n \"content[].role\": \"<string>\",\n \"metadata\": {},\n \"metadata.duration\": 123,\n \"metadata.resolution\": \"<string>\",\n \"metadata.ratio\": \"<string>\",\n \"metadata.frames\": 123,\n \"metadata.seed\": 123,\n \"metadata.camera_fixed\": true,\n \"metadata.watermark\": true,\n \"metadata.generate_audio\": true,\n \"metadata.return_last_frame\": true,\n \"metadata.draft\": true,\n \"metadata.service_tier\": \"<string>\",\n \"metadata.execution_expires_after\": 123,\n \"metadata.callback_url\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://octopusx.ai/v1/video/generations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"<string>\",\n \"content\": [\n {}\n ],\n \"content[].type\": \"<string>\",\n \"content[].text\": \"<string>\",\n \"content[].image_url\": {},\n \"content[].image_url.url\": \"<string>\",\n \"content[].video_url\": {},\n \"content[].video_url.url\": \"<string>\",\n \"content[].audio_url\": {},\n \"content[].audio_url.url\": \"<string>\",\n \"content[].draft_task\": {},\n \"content[].draft_task.id\": \"<string>\",\n \"content[].role\": \"<string>\",\n \"metadata\": {},\n \"metadata.duration\": 123,\n \"metadata.resolution\": \"<string>\",\n \"metadata.ratio\": \"<string>\",\n \"metadata.frames\": 123,\n \"metadata.seed\": 123,\n \"metadata.camera_fixed\": true,\n \"metadata.watermark\": true,\n \"metadata.generate_audio\": true,\n \"metadata.return_last_frame\": true,\n \"metadata.draft\": true,\n \"metadata.service_tier\": \"<string>\",\n \"metadata.execution_expires_after\": 123,\n \"metadata.callback_url\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://octopusx.ai/v1/video/generations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"<string>\",\n \"content\": [\n {}\n ],\n \"content[].type\": \"<string>\",\n \"content[].text\": \"<string>\",\n \"content[].image_url\": {},\n \"content[].image_url.url\": \"<string>\",\n \"content[].video_url\": {},\n \"content[].video_url.url\": \"<string>\",\n \"content[].audio_url\": {},\n \"content[].audio_url.url\": \"<string>\",\n \"content[].draft_task\": {},\n \"content[].draft_task.id\": \"<string>\",\n \"content[].role\": \"<string>\",\n \"metadata\": {},\n \"metadata.duration\": 123,\n \"metadata.resolution\": \"<string>\",\n \"metadata.ratio\": \"<string>\",\n \"metadata.frames\": 123,\n \"metadata.seed\": 123,\n \"metadata.camera_fixed\": true,\n \"metadata.watermark\": true,\n \"metadata.generate_audio\": true,\n \"metadata.return_last_frame\": true,\n \"metadata.draft\": true,\n \"metadata.service_tier\": \"<string>\",\n \"metadata.execution_expires_after\": 123,\n \"metadata.callback_url\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"task_id": "cgt-20260412163502-x8k2m"
}
{
"error": {
"code": "InvalidParameter",
"message": "the parameter duration specified in the request is not valid",
"type": "new_api_error"
}
}
{
"error": {
"code": "Unauthorized",
"message": "Invalid API key provided",
"type": "new_api_error"
}
}
{
"error": {
"code": "Forbidden",
"message": "access denied",
"type": "new_api_error"
}
}
{
"error": {
"code": "RateLimitExceeded",
"message": "当前请求频率过高,请稍后再试",
"type": "new_api_error"
}
}
{
"error": {
"code": "InternalError",
"message": "internal server error",
"type": "new_api_error"
}
}
Create Video
Submit a Seedance 2.0 video generation task. It supports text-to-video, first-frame/first-and-last-frame, reference image/video/audio, video continuation, video editing, and multimodal composition modes. For assets in the media library, it is recommended to reference them incontent using asset://{assetId} (see Upload Assets).
Method and Path
POST /v1/video/generations
Request Examples
{
"model": "doubao-seedance-2-0-260128",
"content": [
{
"type": "text",
"text": "First-person view fruit tea ad: 0-2s picking apples by hand; 2-4s cut to pouring into a shaker cup and shaking; 4-6s close-up of pouring into a clear cup; 6-8s raise the cup toward the camera"
},
{
"type": "image_url",
"image_url": { "url": "https://example.com/apple.jpg" },
"role": "reference_image"
},
{
"type": "image_url",
"image_url": { "url": "https://example.com/cup.jpg" },
"role": "reference_image"
},
{
"type": "video_url",
"video_url": { "url": "https://example.com/pov_reference.mp4" },
"role": "reference_video"
},
{
"type": "audio_url",
"audio_url": { "url": "https://example.com/bgm.mp3" },
"role": "reference_audio"
}
],
"metadata": {
"duration": 8,
"resolution": "720p",
"ratio": "16:9",
"generate_audio": true,
"watermark": false
}
}
{
"model": "doubao-seedance-2-0-260128",
"content": [
{
"type": "text",
"text": "Animate naturally from the first frame"
},
{
"type": "image_url",
"image_url": { "url": "https://example.com/first.jpg" },
"role": "first_frame"
}
],
"metadata": {
"duration": 10,
"resolution": "720p",
"ratio": "adaptive"
}
}
{
"model": "doubao-seedance-2-0-260128",
"content": [
{
"type": "text",
"text": "Smooth transition from first frame to last frame"
},
{
"type": "image_url",
"image_url": { "url": "https://example.com/first.jpg" },
"role": "first_frame"
},
{
"type": "image_url",
"image_url": { "url": "https://example.com/last.jpg" },
"role": "last_frame"
}
],
"metadata": {
"duration": 5,
"resolution": "720p",
"ratio": "16:9"
}
}
{
"model": "doubao-seedance-2-0-260128",
"content": [
{
"type": "text",
"text": "The subject walks forward naturally"
},
{
"type": "image_url",
"image_url": { "url": "https://example.com/character.jpg" },
"role": "reference_image"
}
],
"metadata": {
"duration": 10,
"resolution": "720p",
"ratio": "16:9"
}
}
{
"model": "doubao-seedance-2-0-260128",
"content": [
{
"type": "text",
"text": "Continue the motion and style of the source video"
},
{
"type": "video_url",
"video_url": { "url": "https://example.com/source.mp4" },
"role": "reference_video"
}
],
"metadata": {
"duration": 8,
"resolution": "720p",
"ratio": "adaptive"
}
}
{
"model": "doubao-seedance-2-0-260128",
"content": [
{
"type": "text",
"text": "Replace product in video with product in image"
},
{
"type": "video_url",
"video_url": { "url": "https://example.com/source.mp4" },
"role": "reference_video"
},
{
"type": "image_url",
"image_url": { "url": "https://example.com/product.jpg" },
"role": "reference_image"
}
],
"metadata": {
"duration": 8,
"resolution": "720p",
"ratio": "16:9",
"return_last_frame": true
}
}
{
"model": "doubao-seedance-2-0-260128",
"content": [
{
"type": "text",
"text": "First-person view fruit tea ad"
},
{
"type": "image_url",
"image_url": { "url": "https://example.com/apple.jpg" },
"role": "reference_image"
},
{
"type": "image_url",
"image_url": { "url": "https://example.com/cup.jpg" },
"role": "reference_image"
},
{
"type": "video_url",
"video_url": { "url": "https://example.com/pov_reference.mp4" },
"role": "reference_video"
},
{
"type": "audio_url",
"audio_url": { "url": "https://example.com/bgm.mp3" },
"role": "reference_audio"
}
],
"metadata": {
"duration": 8,
"resolution": "720p",
"ratio": "16:9",
"generate_audio": true,
"watermark": false
}
}
{
"model": "doubao-seedance-2-0-260128",
"content": [
{
"type": "text",
"text": "First-person view fruit tea ad: 0-2s picking apples by hand; 2-4s cut to pouring into a shaker cup and shaking; 4-6s close-up of pouring into a clear cup; 6-8s raise the cup toward the camera"
},
{
"type": "image_url",
"image_url": { "url": "asset://asset-xxx" },
"role": "reference_image"
},
{
"type": "image_url",
"image_url": { "url": "asset://asset-xxx" },
"role": "reference_image"
},
{
"type": "video_url",
"video_url": { "url": "asset://asset-xxx" },
"role": "reference_video"
},
{
"type": "audio_url",
"audio_url": { "url": "asset://asset-xxx" },
"role": "reference_audio"
}
],
"metadata": {
"duration": 8,
"resolution": "720p",
"ratio": "16:9",
"generate_audio": true,
"watermark": false
}
}
Response Examples
{
"task_id": "cgt-20260412163502-x8k2m"
}
{
"error": {
"code": "InvalidParameter",
"message": "the parameter duration specified in the request is not valid",
"type": "new_api_error"
}
}
{
"error": {
"code": "Unauthorized",
"message": "Invalid API key provided",
"type": "new_api_error"
}
}
{
"error": {
"code": "Forbidden",
"message": "access denied",
"type": "new_api_error"
}
}
{
"error": {
"code": "RateLimitExceeded",
"message": "当前请求频率过高,请稍后再试",
"type": "new_api_error"
}
}
{
"error": {
"code": "InternalError",
"message": "internal server error",
"type": "new_api_error"
}
}
task_id.
Authentication
Authorization: Bearer YOUR_API_KEY
Body
Model name:
doubao-seedance-2-0-260128: Standard version, optimized for the best visual quality and complex shot planningdoubao-seedance-2-0-fast-260128: Fast version, optimized for low latency and cost-sensitive scenarios
Multimodal input array; the order affects role assignment.
Content type:
text, image_url, video_url, audio_url, draft_task.Required when
type=text; prompt text.Used when
type=image_url; must include url.Public image URL or asset reference
asset://{assetId}.Used when
type=video_url; must include url.Public video URL or
asset://{assetId}.Used when
type=audio_url; must include url.Public audio URL or
asset://{assetId}.Used when
type=draft_task; must include id, and it must be the only element in content.Draft task ID, used to continue generation from a draft.
Media role:
first_frame: first frame (image)last_frame: last frame (image)reference_image: reference imagereference_video: reference/source video (continuation, editing)reference_audio: reference audio (requiresmetadata.generate_audio=true)
Video generation parameters; all are optional.
Video duration in seconds. Valid range
[4, 15] or -1 (automatically determined by the model), default 5.Resolution:
480p, 720p, 1080p, default 720p.Aspect ratio:
16:9, 9:16, 1:1, 4:3, adaptive, default 16:9.Total number of video frames. Mutually exclusive with
duration; if frames is provided, it takes precedence over duration.Random seed. The same
seed plus the same input can produce similar results.Whether to keep the camera fixed (suppress camera movement), default
false.Whether to add a watermark in the bottom-right corner of the video, default
true.Whether to generate or synthesize audio. Must be
true when using reference_audio, default false.Whether to return the final frame image URL for subsequent continuation, default
false.Draft mode: faster generation with slightly lower quality, suitable for previews, default
false.Service tier, default
default.Maximum task execution time in seconds, range
[3600, 259200] (1 hour to 3 days), default 172800.Callback URL when the task is completed.
content Mixing Rules
Violating the following rules may return400:
reference_imagecannot appear together withfirst_frame/last_frameaudio_urlcannot be the only input incontent; it must be paired with at least an image or videodraft_taskmust be the only element in thecontentarray
Generation Mode Comparison
| Mode | Request Example Label | content Key Points |
|---|---|---|
| Text to Video | Text to Video | text + optional reference image/video/audio |
| First-Frame Image to Video | First-Frame Image to Video | text + first_frame |
| First-and-Last-Frame Image to Video | First-and-Last-Frame Image to Video | text + first_frame + last_frame |
| Reference Image to Video | Reference Image to Video | text + reference_image |
| Video Continuation | Video Continuation | text + reference_video |
| Video Editing | Video Editing | text + reference_video + reference_image |
| Multimodal Composition | Multimodal Composition | text + multiple types of references |
| Reference Assets | Reference Assets | Each URL uses asset://{assetId} |
Response
Task ID, used for Query Task.
Related Pages
⌘I