API protocol
Seedance 2.0 / 2.5: parameters, scenarios and API guide
Preview guide
Paste into an AI assistant to help with integration. Documentation and examples only; no real credentials.
Direct answerUse POST /v1/videos and singular content, not Kling contents. Text has type=text; media uses image_url/video_url/audio_url.
Updated · Reviewed
Purpose and workflows
Use text, frames, multimodal references and character assets. Version 2.5 also has draft and draft-to-final workflows; advanced parameters are version-specific.
This guide checks the site request contract; it does not claim paid generation acceptance for every scenario. Use the exact model, group and available endpoint shown in the marketplace. Replace example.com media and placeholder task IDs. Confirm a minimal request before adding references and advanced parameters. Consult marketplace pricing and actual billing for charges.
Models and endpoints
doubao-seedance-2-0-260128, doubao-seedance-2-0-fast-260128, doubao-seedance-2-0-mini-260615, doubao-seedance-2-5-260628
POST /v1/videos
Reference media formats
| Media | Fields | Encoding and transport | Preparation and limits |
|---|---|---|---|
| Images / frames | content[].image_url.url + role | HTTP(S) image URL, full data:image/<format>;base64,... URI, or a site-approved asset://ID valid for this model. | Prefer JPEG/PNG/WebP; role is first_frame, last_frame or reference_image. Prefer explicit MIME data URIs over raw Base64 format inference. |
| Reference / edit video | content[].video_url.url + role=reference_video | HTTP(S) video URL or an asset://ID approved by this site; no video Base64/data URI. | Prefer MP4 (H.264, AAC audio). Follow version-specific duration and role rules for editing. Human subjects require the site asset review workflow. |
| Reference audio | content[].audio_url.url + role=reference_audio | HTTP(S) audio URL, data:audio/wav;base64,... / data:audio/mpeg;base64,... URI, or an approved asset://ID; no raw audio Base64. | WAV/MP3. The 2.0 series requires a reference image or video alongside audio; check 2.5 combination and duration rules separately. |
| Task / asset IDs | content[].draft_task.id / asset://ID | Final generation references a successful site draft task_ ID; media uses an approved asset://ID. They are not interchangeable. | draft_task is 2.5-only. Final generation has a recorded 500 and is not accepted yet. An asset-review task ID is not an asset ID. |
Parameters and combinations
- Use POST /v1/videos and singular content, not Kling contents. Text has type=text; media uses image_url/video_url/audio_url.
- role separates first_frame/last_frame from reference_image/reference_video/reference_audio. Upload and approve person assets to active before using the returned asset:// reference.
- Minimum-duration examples use 4s. Confirm resolution/route availability before adding sound, last frames or references. Describe fixed cameras in text on 2.x; omit legacy camera_fixed/seed.
- A 2.5 draft uses draft=true and 480p; final generation uses one draft_task reference and 1080p, inheriting duration, ratio and audio without resubmitting them.
- Draft finalization requires an accessible completed site draft task. Asset reviews, video generation and drafts have distinct IDs.
- 2026-11-15 business-site checks: 2.0 Fast image plus reference audio produced non-silent audio; a 2.5 four-second 480p draft completed. Draft-to-1080p returned a site 500 and is not accepted. The draft /content download returned 502, but completed video_url downloaded and decoded. Check the result URL before creating another billable task.
| Field | Type | Use and constraints |
|---|---|---|
Authorization | header string | Required: Bearer <site API key>, with Content-Type: application/json. Provider credentials and regional endpoints are managed by the service. |
model | string | Required: use an exact model listed here. Version 2.0, fast, mini and 2.5 have different constraints. |
content | object[] | Required text/media list; draft-to-final uses draft_task content instead. |
content[].type | string | Required per item: text/image_url/video_url/audio_url; draft_task is 2.5 only. |
content[].text | string | Required for text. Official guidance recommends ≤500 Chinese characters or ≤1000 English words. Describe a fixed camera in the prompt. |
content[].image_url.url | string | Required for images: public URL, image data URI or asset:// ID from the site asset workflow. Official limits: <30 MB each, 300–6000px, ratio 0.4–2.5; ≤9 reference images on 2.0, ≤30 on 2.5. Site asset access and routing still apply. |
content[].video_url.url | string | Required for video: public URL or bound asset:// ID, not raw Base64. Official 2.0: ≤3 clips, 2–15s each, total ≤15s; 2.5: ≤10 clips, 2–30s each, total ≤30s, editing source ≥4s. Each ≤200 MB. |
content[].audio_url.url | string | Required for audio: URL, audio data URI or bound asset ID; WAV/MP3, ≤15 MB each. 2.0: ≤3 clips of 2–15s, total ≤15s, with image/video; 2.5: ≤10 clips of 2–30s, total ≤30s, official audio-only references allowed. |
content[].role | string | Images: first_frame (optional for one image), last_frame or reference_image; videos require reference_video, audio requires reference_audio. Frames exclude multimodal references. |
duration | integer | 2.0: 4–15s or -1; 2.5: 4–30s or -1, official default -1. Editing on 2.5 requires -1. Site routes may be narrower; minimum-duration examples use 4s. |
resolution | string | Official default 720p. Standard 2.0/2.5: 480p/720p/1080p/4k; fast/mini: 480p/720p only. Site 4k routes have not all been accepted. |
ratio | string | 16:9/4:3/1:1/3:4/9:16/21:9/adaptive; official 2.x default adaptive. 2.5 frames, editing and extension require adaptive. |
generate_audio | boolean | Optional, default true; false produces silent video. Supported on 2.0/2.5 and explicit false is preserved. |
watermark | boolean | Optional; official default false. |
return_last_frame | boolean | Optional, default false. true requests a JPEG last frame; use the actual successful result, not the task ID as an image URL. |
draft | boolean | 2.5 only, default false; true requires 480p. Official drafts created since 2026-10-28 10:00 UTC+8 last 14 days, earlier drafts 7 days. See the site draft-to-final failure note. |
content[].draft_task.id | string | Use your successful site draft task_ ID for 2.5 final generation; omit inherited text, media, duration, ratio and audio controls. |
callback_url | string | Optional HTTP(S) status callback. Keep site polling; callback payloads are not guaranteed to use site task IDs. |
execution_expires_after | integer | Optional, 3600–259200 seconds, default 172800; measured from creation and terminates as expired. |
seed | integer | Currently documented only for 1.0 pro/pro fast (-1–2147483647, default -1), not the 2.x models here; removed from their examples. |
camera_fixed | boolean | Currently documented only for 1.0 pro/pro fast, default false. For 2.x, describe a fixed camera in text and omit this field. |
frames | integer | Official 1.0 pro/pro fast only: 29–289 of form 25+4n. Not applicable to these 2.x models; do not mix with duration. |
service_tier | string | Official default/flex tiers are for 1.0; flex is unavailable on 2.0/2.5. Do not infer offline discounts from legacy docs. |
omni_reference_task_type | string | 2.5 only: auto (default)/reference/edit/extend; validated and forwarded. edit/extend require reference_video and ratio=adaptive; edit also requires duration=-1 and an actual 4–30s source video. Media duration and prompt/task consistency are checked upstream; forwarding does not establish editing generation acceptance. |
output_format | string | 2.5 only: mp4 (default) or mov, validated and forwarded. Professional MOV encoding may need a compatible player; a filename extension is not a substitute. |
priority | integer | Official 2.x: integer 0–9, default 0; higher values rank first within an endpoint without interrupting running tasks. Forwarded by the site, preserving explicit zero. |
safety_identifier | string | Optional stable pseudonymous end-user ID, at most 64 printable ASCII characters; prefer a hashed identifier. Validated and forwarded. |
tools[].type | string | Official 2.x supports web_search. Forwarded; tools may be omitted, an empty array, or one entry with type=web_search. The model decides whether to search; forwarding does not guarantee search usage. |
Scenarios and code examples
Text to video
Applies to: doubao-seedance-2-0-260128, doubao-seedance-2-0-fast-260128, doubao-seedance-2-0-mini-260615, doubao-seedance-2-5-260628
POST /v1/videos
{
"model": "doubao-seedance-2-5-260628",
"content": [
{
"type": "text",
"text": "人物走过花园,镜头缓慢推进。"
}
],
"duration": 4,
"ratio": "16:9",
"resolution": "720p",
"generate_audio": true,
"watermark": false
}
curl
curl --fail-with-body --silent --show-error --connect-timeout 10 --max-time 120 --request POST 'https://api.tu-zi.com/v1/videos' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"model": "doubao-seedance-2-5-260628",
"content": [
{
"type": "text",
"text": "人物走过花园,镜头缓慢推进。"
}
],
"duration": 4,
"ratio": "16:9",
"resolution": "720p",
"generate_audio": true,
"watermark": false
}'
python
import json
import os
import requests
url = "https://api.tu-zi.com/v1/videos"
headers = json.loads("{\"Authorization\":\"Bearer YOUR_API_KEY\",\"Content-Type\":\"application/json\"}")
for name in ["API_KEY"]:
if not os.environ.get(name, "").strip():
raise RuntimeError("Set environment variable: " + name)
headers["Authorization"] = "Bearer " + os.environ["API_KEY"]
payload = json.loads("{\"model\":\"doubao-seedance-2-5-260628\",\"content\":[{\"type\":\"text\",\"text\":\"人物走过花园,镜头缓慢推进。\"}],\"duration\":4,\"ratio\":\"16:9\",\"resolution\":\"720p\",\"generate_audio\":true,\"watermark\":false}")
response = requests.request("POST", url, headers=headers, json=payload, timeout=120)
response.raise_for_status()
result = response.json()
if isinstance(result, dict) and (result.get("success") is False or result.get("code") is False or result.get("error")):
raise RuntimeError(json.dumps(result, ensure_ascii=False))
print(json.dumps(result, ensure_ascii=False, indent=2))
javascript
// Node.js 20+
const url = "https://api.tu-zi.com/v1/videos";
const headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
};
for (const name of ["API_KEY"]) {
if (!process.env[name]?.trim()) throw new Error("Set environment variable: " + name);
}
headers.Authorization = 'Bearer ' + process.env.API_KEY;
const response = await fetch(url, { method: "POST", headers, body: JSON.stringify({
"model": "doubao-seedance-2-5-260628",
"content": [
{
"type": "text",
"text": "人物走过花园,镜头缓慢推进。"
}
],
"duration": 4,
"ratio": "16:9",
"resolution": "720p",
"generate_audio": true,
"watermark": false
}), signal: AbortSignal.timeout(120000) });
if (!response.ok) throw new Error(await response.text());
const result = await response.json();
if (result?.success === false || result?.code === false || result?.error) throw new Error(JSON.stringify(result));
console.log(JSON.stringify(result, null, 2));
First and last frames
Applies to: doubao-seedance-2-0-260128, doubao-seedance-2-0-fast-260128, doubao-seedance-2-0-mini-260615, doubao-seedance-2-5-260628
POST /v1/videos
{
"model": "doubao-seedance-2-5-260628",
"content": [
{
"type": "text",
"text": "人物走过花园,镜头缓慢推进。"
},
{
"type": "image_url",
"image_url": {
"url": "https://example.com/subject.png"
},
"role": "first_frame"
},
{
"type": "image_url",
"image_url": {
"url": "https://example.com/end.png"
},
"role": "last_frame"
}
],
"duration": 4,
"resolution": "720p",
"generate_audio": false,
"ratio": "adaptive"
}
curl
curl --fail-with-body --silent --show-error --connect-timeout 10 --max-time 120 --request POST 'https://api.tu-zi.com/v1/videos' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"model": "doubao-seedance-2-5-260628",
"content": [
{
"type": "text",
"text": "人物走过花园,镜头缓慢推进。"
},
{
"type": "image_url",
"image_url": {
"url": "https://example.com/subject.png"
},
"role": "first_frame"
},
{
"type": "image_url",
"image_url": {
"url": "https://example.com/end.png"
},
"role": "last_frame"
}
],
"duration": 4,
"resolution": "720p",
"generate_audio": false,
"ratio": "adaptive"
}'
python
import json
import os
import requests
url = "https://api.tu-zi.com/v1/videos"
headers = json.loads("{\"Authorization\":\"Bearer YOUR_API_KEY\",\"Content-Type\":\"application/json\"}")
for name in ["API_KEY"]:
if not os.environ.get(name, "").strip():
raise RuntimeError("Set environment variable: " + name)
headers["Authorization"] = "Bearer " + os.environ["API_KEY"]
payload = json.loads("{\"model\":\"doubao-seedance-2-5-260628\",\"content\":[{\"type\":\"text\",\"text\":\"人物走过花园,镜头缓慢推进。\"},{\"type\":\"image_url\",\"image_url\":{\"url\":\"https://example.com/subject.png\"},\"role\":\"first_frame\"},{\"type\":\"image_url\",\"image_url\":{\"url\":\"https://example.com/end.png\"},\"role\":\"last_frame\"}],\"duration\":4,\"resolution\":\"720p\",\"generate_audio\":false,\"ratio\":\"adaptive\"}")
response = requests.request("POST", url, headers=headers, json=payload, timeout=120)
response.raise_for_status()
result = response.json()
if isinstance(result, dict) and (result.get("success") is False or result.get("code") is False or result.get("error")):
raise RuntimeError(json.dumps(result, ensure_ascii=False))
print(json.dumps(result, ensure_ascii=False, indent=2))
javascript
// Node.js 20+
const url = "https://api.tu-zi.com/v1/videos";
const headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
};
for (const name of ["API_KEY"]) {
if (!process.env[name]?.trim()) throw new Error("Set environment variable: " + name);
}
headers.Authorization = 'Bearer ' + process.env.API_KEY;
const response = await fetch(url, { method: "POST", headers, body: JSON.stringify({
"model": "doubao-seedance-2-5-260628",
"content": [
{
"type": "text",
"text": "人物走过花园,镜头缓慢推进。"
},
{
"type": "image_url",
"image_url": {
"url": "https://example.com/subject.png"
},
"role": "first_frame"
},
{
"type": "image_url",
"image_url": {
"url": "https://example.com/end.png"
},
"role": "last_frame"
}
],
"duration": 4,
"resolution": "720p",
"generate_audio": false,
"ratio": "adaptive"
}), signal: AbortSignal.timeout(120000) });
if (!response.ok) throw new Error(await response.text());
const result = await response.json();
if (result?.success === false || result?.code === false || result?.error) throw new Error(JSON.stringify(result));
console.log(JSON.stringify(result, null, 2));
Image, video and audio references
Applies to: doubao-seedance-2-0-260128, doubao-seedance-2-0-fast-260128, doubao-seedance-2-0-mini-260615, doubao-seedance-2-5-260628
POST /v1/videos
{
"model": "doubao-seedance-2-5-260628",
"content": [
{
"type": "text",
"text": "人物走过花园,镜头缓慢推进。"
},
{
"type": "image_url",
"image_url": {
"url": "https://example.com/subject.png"
},
"role": "reference_image"
},
{
"type": "video_url",
"video_url": {
"url": "https://example.com/action.mp4"
},
"role": "reference_video"
},
{
"type": "audio_url",
"audio_url": {
"url": "https://example.com/voice.wav"
},
"role": "reference_audio"
}
],
"duration": 4,
"ratio": "16:9",
"generate_audio": true,
"watermark": false
}
curl
curl --fail-with-body --silent --show-error --connect-timeout 10 --max-time 120 --request POST 'https://api.tu-zi.com/v1/videos' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"model": "doubao-seedance-2-5-260628",
"content": [
{
"type": "text",
"text": "人物走过花园,镜头缓慢推进。"
},
{
"type": "image_url",
"image_url": {
"url": "https://example.com/subject.png"
},
"role": "reference_image"
},
{
"type": "video_url",
"video_url": {
"url": "https://example.com/action.mp4"
},
"role": "reference_video"
},
{
"type": "audio_url",
"audio_url": {
"url": "https://example.com/voice.wav"
},
"role": "reference_audio"
}
],
"duration": 4,
"ratio": "16:9",
"generate_audio": true,
"watermark": false
}'
python
import json
import os
import requests
url = "https://api.tu-zi.com/v1/videos"
headers = json.loads("{\"Authorization\":\"Bearer YOUR_API_KEY\",\"Content-Type\":\"application/json\"}")
for name in ["API_KEY"]:
if not os.environ.get(name, "").strip():
raise RuntimeError("Set environment variable: " + name)
headers["Authorization"] = "Bearer " + os.environ["API_KEY"]
payload = json.loads("{\"model\":\"doubao-seedance-2-5-260628\",\"content\":[{\"type\":\"text\",\"text\":\"人物走过花园,镜头缓慢推进。\"},{\"type\":\"image_url\",\"image_url\":{\"url\":\"https://example.com/subject.png\"},\"role\":\"reference_image\"},{\"type\":\"video_url\",\"video_url\":{\"url\":\"https://example.com/action.mp4\"},\"role\":\"reference_video\"},{\"type\":\"audio_url\",\"audio_url\":{\"url\":\"https://example.com/voice.wav\"},\"role\":\"reference_audio\"}],\"duration\":4,\"ratio\":\"16:9\",\"generate_audio\":true,\"watermark\":false}")
response = requests.request("POST", url, headers=headers, json=payload, timeout=120)
response.raise_for_status()
result = response.json()
if isinstance(result, dict) and (result.get("success") is False or result.get("code") is False or result.get("error")):
raise RuntimeError(json.dumps(result, ensure_ascii=False))
print(json.dumps(result, ensure_ascii=False, indent=2))
javascript
// Node.js 20+
const url = "https://api.tu-zi.com/v1/videos";
const headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
};
for (const name of ["API_KEY"]) {
if (!process.env[name]?.trim()) throw new Error("Set environment variable: " + name);
}
headers.Authorization = 'Bearer ' + process.env.API_KEY;
const response = await fetch(url, { method: "POST", headers, body: JSON.stringify({
"model": "doubao-seedance-2-5-260628",
"content": [
{
"type": "text",
"text": "人物走过花园,镜头缓慢推进。"
},
{
"type": "image_url",
"image_url": {
"url": "https://example.com/subject.png"
},
"role": "reference_image"
},
{
"type": "video_url",
"video_url": {
"url": "https://example.com/action.mp4"
},
"role": "reference_video"
},
{
"type": "audio_url",
"audio_url": {
"url": "https://example.com/voice.wav"
},
"role": "reference_audio"
}
],
"duration": 4,
"ratio": "16:9",
"generate_audio": true,
"watermark": false
}), signal: AbortSignal.timeout(120000) });
if (!response.ok) throw new Error(await response.text());
const result = await response.json();
if (result?.success === false || result?.code === false || result?.error) throw new Error(JSON.stringify(result));
console.log(JSON.stringify(result, null, 2));
Camera prompting and last-frame output
Applies to: doubao-seedance-2-0-260128, doubao-seedance-2-0-fast-260128, doubao-seedance-2-0-mini-260615, doubao-seedance-2-5-260628
POST /v1/videos
{
"model": "doubao-seedance-2-5-260628",
"content": [
{
"type": "text",
"text": "固定机位拍摄人物走过花园,保持镜头稳定。"
}
],
"duration": 4,
"ratio": "9:16",
"resolution": "720p",
"return_last_frame": true
}
curl
curl --fail-with-body --silent --show-error --connect-timeout 10 --max-time 120 --request POST 'https://api.tu-zi.com/v1/videos' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"model": "doubao-seedance-2-5-260628",
"content": [
{
"type": "text",
"text": "固定机位拍摄人物走过花园,保持镜头稳定。"
}
],
"duration": 4,
"ratio": "9:16",
"resolution": "720p",
"return_last_frame": true
}'
python
import json
import os
import requests
url = "https://api.tu-zi.com/v1/videos"
headers = json.loads("{\"Authorization\":\"Bearer YOUR_API_KEY\",\"Content-Type\":\"application/json\"}")
for name in ["API_KEY"]:
if not os.environ.get(name, "").strip():
raise RuntimeError("Set environment variable: " + name)
headers["Authorization"] = "Bearer " + os.environ["API_KEY"]
payload = json.loads("{\"model\":\"doubao-seedance-2-5-260628\",\"content\":[{\"type\":\"text\",\"text\":\"固定机位拍摄人物走过花园,保持镜头稳定。\"}],\"duration\":4,\"ratio\":\"9:16\",\"resolution\":\"720p\",\"return_last_frame\":true}")
response = requests.request("POST", url, headers=headers, json=payload, timeout=120)
response.raise_for_status()
result = response.json()
if isinstance(result, dict) and (result.get("success") is False or result.get("code") is False or result.get("error")):
raise RuntimeError(json.dumps(result, ensure_ascii=False))
print(json.dumps(result, ensure_ascii=False, indent=2))
javascript
// Node.js 20+
const url = "https://api.tu-zi.com/v1/videos";
const headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
};
for (const name of ["API_KEY"]) {
if (!process.env[name]?.trim()) throw new Error("Set environment variable: " + name);
}
headers.Authorization = 'Bearer ' + process.env.API_KEY;
const response = await fetch(url, { method: "POST", headers, body: JSON.stringify({
"model": "doubao-seedance-2-5-260628",
"content": [
{
"type": "text",
"text": "固定机位拍摄人物走过花园,保持镜头稳定。"
}
],
"duration": 4,
"ratio": "9:16",
"resolution": "720p",
"return_last_frame": true
}), signal: AbortSignal.timeout(120000) });
if (!response.ok) throw new Error(await response.text());
const result = await response.json();
if (result?.success === false || result?.code === false || result?.error) throw new Error(JSON.stringify(result));
console.log(JSON.stringify(result, null, 2));
2.5 draft
Applies to: doubao-seedance-2-5-260628
POST /v1/videos
{
"model": "doubao-seedance-2-5-260628",
"content": [
{
"type": "text",
"text": "人物走过花园,镜头缓慢推进。"
}
],
"draft": true,
"resolution": "480p",
"duration": 4,
"ratio": "16:9",
"generate_audio": true,
"watermark": false
}
curl
curl --fail-with-body --silent --show-error --connect-timeout 10 --max-time 120 --request POST 'https://api.tu-zi.com/v1/videos' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"model": "doubao-seedance-2-5-260628",
"content": [
{
"type": "text",
"text": "人物走过花园,镜头缓慢推进。"
}
],
"draft": true,
"resolution": "480p",
"duration": 4,
"ratio": "16:9",
"generate_audio": true,
"watermark": false
}'
python
import json
import os
import requests
url = "https://api.tu-zi.com/v1/videos"
headers = json.loads("{\"Authorization\":\"Bearer YOUR_API_KEY\",\"Content-Type\":\"application/json\"}")
for name in ["API_KEY"]:
if not os.environ.get(name, "").strip():
raise RuntimeError("Set environment variable: " + name)
headers["Authorization"] = "Bearer " + os.environ["API_KEY"]
payload = json.loads("{\"model\":\"doubao-seedance-2-5-260628\",\"content\":[{\"type\":\"text\",\"text\":\"人物走过花园,镜头缓慢推进。\"}],\"draft\":true,\"resolution\":\"480p\",\"duration\":4,\"ratio\":\"16:9\",\"generate_audio\":true,\"watermark\":false}")
response = requests.request("POST", url, headers=headers, json=payload, timeout=120)
response.raise_for_status()
result = response.json()
if isinstance(result, dict) and (result.get("success") is False or result.get("code") is False or result.get("error")):
raise RuntimeError(json.dumps(result, ensure_ascii=False))
print(json.dumps(result, ensure_ascii=False, indent=2))
javascript
// Node.js 20+
const url = "https://api.tu-zi.com/v1/videos";
const headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
};
for (const name of ["API_KEY"]) {
if (!process.env[name]?.trim()) throw new Error("Set environment variable: " + name);
}
headers.Authorization = 'Bearer ' + process.env.API_KEY;
const response = await fetch(url, { method: "POST", headers, body: JSON.stringify({
"model": "doubao-seedance-2-5-260628",
"content": [
{
"type": "text",
"text": "人物走过花园,镜头缓慢推进。"
}
],
"draft": true,
"resolution": "480p",
"duration": 4,
"ratio": "16:9",
"generate_audio": true,
"watermark": false
}), signal: AbortSignal.timeout(120000) });
if (!response.ok) throw new Error(await response.text());
const result = await response.json();
if (result?.success === false || result?.code === false || result?.error) throw new Error(JSON.stringify(result));
console.log(JSON.stringify(result, null, 2));
2.5 draft to final
Applies to: doubao-seedance-2-5-260628
POST /v1/videos
The 2026-11-15 business-site test returned a site 500; draft-to-final is not accepted. Contract only: reference your completed site draft ID, specify 1080p and inherit other settings. Do not automatically recreate tasks.
{
"model": "doubao-seedance-2-5-260628",
"content": [
{
"type": "draft_task",
"draft_task": {
"id": "task_REPLACE_WITH_SUCCESSFUL_DRAFT"
}
}
],
"resolution": "1080p",
"watermark": false
}
Person asset upload, review and reference workflow
Task results and downloads
Save id or task_id from submission. Poll GET /v1/videos/{task_id}: queued / in_progress lead to completed or failed. Read video_url on completion (some responses also expose metadata.url). Resolve relative URLs against the API origin. The site /content endpoint uses your site key; external downloads must not receive that key. Download expiring results promptly. Resume GET after a timeout rather than automatically repeating POST.
Complete unified video Python / JavaScript polling and download examples
Troubleshooting
| Symptom | Check |
|---|---|
| Image validation / URI error | Ensure a video or task ID was not placed in an image field; check the URL returns media |
| Unsupported content type / field | Check the exact family and content/contents/input schema; voice_id cannot be an audio URL |
| 400 conflicting fields | Check prompt/input, frames/references, and seconds/response_format exclusivity |
| HTTP success but task failed | Retain the site task ID, time, model, domain and redacted request; submission 200 is not output success |
| 404 or inaccessible task | Check domain, key access and task type; do not use IDs from another site or the official API |
| Local file cannot be fetched | Use a supported upload flow or a reachable HTTPS media URL |
Sources and scope
Use cases
- Choose video models and media formats
- Diagnose request and task failures
API protocols
/v1/videos
FAQ
Does a task ID prove generation succeeded?
No. Save the site task ID, poll to a successful terminal state and verify the result. Inspect failures instead of automatically creating a new task.
Can I put a local image, video or WAV path in JSON?
No. URL fields require reachable media, not localhost, disk paths or browser-login links. Kling PCM WAV requires an enabled multipart voice endpoint (both sites returned 404 on 2026-11-15). Follow each family’s asset workflow for other media.
Can parameters and task IDs be reused across models?
Do not assume compatibility. Check the exact model, endpoint, casing, media role and exclusive fields. Editing, drafts and voices require accessible successful tasks of the correct kind. Official capabilities are not evidence of site acceptance.
Related guides
Official sources
- Seedance 创建视频任务 API Official
兔子API