curl --request POST \
--url https://api.apiyi.com/seedance/api/v3/contents/generations/tasks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "doubao-seedance-2-5-260628",
"content": [
{
"type": "text",
"text": "无人机航拍视角飞越秋天的山谷,金黄色的森林和蜿蜒的河流,电影感"
}
]
}
'import requests
url = "https://api.apiyi.com/seedance/api/v3/contents/generations/tasks"
payload = {
"model": "doubao-seedance-2-5-260628",
"content": [
{
"type": "text",
"text": "无人机航拍视角飞越秋天的山谷,金黄色的森林和蜿蜒的河流,电影感"
}
]
}
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: 'doubao-seedance-2-5-260628',
content: [{type: 'text', text: '无人机航拍视角飞越秋天的山谷,金黄色的森林和蜿蜒的河流,电影感'}]
})
};
fetch('https://api.apiyi.com/seedance/api/v3/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.apiyi.com/seedance/api/v3/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",
CURLOPT_POSTFIELDS => json_encode([
'model' => 'doubao-seedance-2-5-260628',
'content' => [
[
'type' => 'text',
'text' => '无人机航拍视角飞越秋天的山谷,金黄色的森林和蜿蜒的河流,电影感'
]
]
]),
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://api.apiyi.com/seedance/api/v3/contents/generations/tasks"
payload := strings.NewReader("{\n \"model\": \"doubao-seedance-2-5-260628\",\n \"content\": [\n {\n \"type\": \"text\",\n \"text\": \"无人机航拍视角飞越秋天的山谷,金黄色的森林和蜿蜒的河流,电影感\"\n }\n ]\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://api.apiyi.com/seedance/api/v3/contents/generations/tasks")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"doubao-seedance-2-5-260628\",\n \"content\": [\n {\n \"type\": \"text\",\n \"text\": \"无人机航拍视角飞越秋天的山谷,金黄色的森林和蜿蜒的河流,电影感\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.apiyi.com/seedance/api/v3/contents/generations/tasks")
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\": \"doubao-seedance-2-5-260628\",\n \"content\": [\n {\n \"type\": \"text\",\n \"text\": \"无人机航拍视角飞越秋天的山谷,金黄色的森林和蜿蜒的河流,电影感\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "cgt-20260606160057-6bbjd"
}Seedance 2.0 / 2.5 影片生成 API 參考
Seedance 2.0 影片生成 API 參考與線上除錯:文生影片 / 首尾幀 / 首幀 / 多模態參考生影片,非同步任務式端點,含完整輪詢與下載程式碼。
curl --request POST \
--url https://api.apiyi.com/seedance/api/v3/contents/generations/tasks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "doubao-seedance-2-5-260628",
"content": [
{
"type": "text",
"text": "无人机航拍视角飞越秋天的山谷,金黄色的森林和蜿蜒的河流,电影感"
}
]
}
'import requests
url = "https://api.apiyi.com/seedance/api/v3/contents/generations/tasks"
payload = {
"model": "doubao-seedance-2-5-260628",
"content": [
{
"type": "text",
"text": "无人机航拍视角飞越秋天的山谷,金黄色的森林和蜿蜒的河流,电影感"
}
]
}
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: 'doubao-seedance-2-5-260628',
content: [{type: 'text', text: '无人机航拍视角飞越秋天的山谷,金黄色的森林和蜿蜒的河流,电影感'}]
})
};
fetch('https://api.apiyi.com/seedance/api/v3/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.apiyi.com/seedance/api/v3/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",
CURLOPT_POSTFIELDS => json_encode([
'model' => 'doubao-seedance-2-5-260628',
'content' => [
[
'type' => 'text',
'text' => '无人机航拍视角飞越秋天的山谷,金黄色的森林和蜿蜒的河流,电影感'
]
]
]),
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://api.apiyi.com/seedance/api/v3/contents/generations/tasks"
payload := strings.NewReader("{\n \"model\": \"doubao-seedance-2-5-260628\",\n \"content\": [\n {\n \"type\": \"text\",\n \"text\": \"无人机航拍视角飞越秋天的山谷,金黄色的森林和蜿蜒的河流,电影感\"\n }\n ]\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://api.apiyi.com/seedance/api/v3/contents/generations/tasks")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"doubao-seedance-2-5-260628\",\n \"content\": [\n {\n \"type\": \"text\",\n \"text\": \"无人机航拍视角飞越秋天的山谷,金黄色的森林和蜿蜒的河流,电影感\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.apiyi.com/seedance/api/v3/contents/generations/tasks")
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\": \"doubao-seedance-2-5-260628\",\n \"content\": [\n {\n \"type\": \"text\",\n \"text\": \"无人机航拍视角飞越秋天的山谷,金黄色的森林和蜿蜒的河流,电影感\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "cgt-20260606160057-6bbjd"
}Bearer sk-your-api-key(令牌須勾選 SeeDance2 分組,2.5 與 2.0 系通用),填好 model / content 後發起請求。提交成功返回任務 id,後續輪詢與下載見下方程式碼示例。content 陣列區分模式。模型選型、定價、解析度畫素表、FAQ 見 Seedance 2.0 概覽。- 路徑字首是
/seedance/api/v3,不要漏掉/api,也不要用/v1/videos - 令牌必須勾選
SeeDance2分組,否則報「該模型無可用渠道」:2.5 與 2.0 系都走SeeDance2,一把令牌通吃四個模型(mini/fast另有特價的SD2Mini/SD2Fast) generate_audio預設 true(輸出帶聲音),不需要請顯式傳false- Python requests 需加請求頭
"Accept-Encoding": "identity",否則可能報 gzip 解碼錯誤,或響應體被截斷成非法 JSON(如開頭丟失{",只剩id":"cgt-xxx"}),甚至間歇性 400 - 成功狀態是
succeeded(不是completed),影片地址在content.video_url,24 小時過期
程式碼示例
curl -X POST "https://api.apiyi.com/seedance/api/v3/contents/generations/tasks" \
-H "Authorization: Bearer sk-your-api-key" \
-H "Content-Type: application/json" \
-d '{
"model": "doubao-seedance-2-0-fast-260128",
"content": [
{"type": "text", "text": "無人機航拍視角飛越秋天的山谷,金黃色的森林和蜿蜒的河流,電影感"}
],
"resolution": "720p",
"ratio": "16:9",
"duration": 5,
"generate_audio": false
}'
# 返回:{"id":"cgt-2026xxxx-xxxxx"},拿 id 輪詢查詢介面
import time
import requests
BASE = "https://api.apiyi.com/seedance/api/v3/contents/generations/tasks"
HEADERS = {
"Authorization": "Bearer sk-your-api-key",
"Content-Type": "application/json",
# 必加:閘道 gzip 頭與實際編碼不符,缺了會報 gzip 解碼錯誤,
# 或響應體被截斷成非法 JSON(如開頭丟 {",只剩 id":"cgt-xxx"}),甚至間歇 400
"Accept-Encoding": "identity",
}
# 1. 建立任務
body = {
"model": "doubao-seedance-2-0-fast-260128",
"content": [
{"type": "text", "text": "海浪拍打礁石,夕陽把海面染成金色,慢鏡頭,氛圍寧靜"}
],
"resolution": "720p",
"ratio": "16:9",
"duration": 5,
# "generate_audio": False, # 預設 True;不要聲音時取消註釋
# "seed": 12345, # 固定隨機性,可復現類似結果
}
task_id = requests.post(BASE, json=body, headers=HEADERS, timeout=60).json()["id"]
print("task_id:", task_id)
# 2. 輪詢直到終態(succeeded / failed / expired)
while True:
time.sleep(20)
task = requests.get(f"{BASE}/{task_id}", headers=HEADERS, timeout=30).json()
status = task.get("status")
print("status:", status)
if status in ("succeeded", "failed", "expired"):
break
# 3. 下載影片(URL 24 小時過期,成功後立即轉存)
if status == "succeeded":
video_url = task["content"]["video_url"] # 注意:在 content 下,不在頂層
print("tokens:", task["usage"]["completion_tokens"])
with requests.get(video_url, stream=True, timeout=300) as r:
r.raise_for_status()
with open(f"{task_id}.mp4", "wb") as f:
for chunk in r.iter_content(chunk_size=1 << 20):
f.write(chunk)
print(f"已儲存 {task_id}.mp4")
else:
print("任務未成功:", task.get("error"))
# 首尾幀:2 張圖,role 必填;與參考圖模式互斥
body_first_last = {
"model": "doubao-seedance-2-0-260128",
"content": [
{"type": "text", "text": "畫面從第一幀平滑過渡到最後一幀,鏡頭緩慢運動"},
{"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"},
],
"resolution": "720p",
"ratio": "adaptive", # 按首幀圖片比例自動適配,避免裁剪
"duration": 5,
}
# 多模態參考:0~9 參考圖 + 0~3 參考影片 + 0~3 參考音訊(至少 1 圖或 1 影片),可生成全新/編輯/延長影片
body_reference = {
"model": "doubao-seedance-2-0-260128",
"content": [
{"type": "text", "text": "以參考圖的角色和風格,生成角色在雨夜街頭行走的鏡頭"},
{"type": "image_url", "image_url": {"url": "https://example.com/character.png"},
"role": "reference_image"},
# {"type": "video_url", "video_url": {"url": "..."}, "role": "reference_video"},
# {"type": "audio_url", "audio_url": {"url": "..."}, "role": "reference_audio"},
],
"resolution": "720p",
"ratio": "16:9",
"duration": 5,
}
# 圖片也支援 Base64(data:image/png;base64,xxx)與平臺素材 ID(asset://xxx)
# 2.5 與 2.0 共用同一端點與請求結構,只需換 model;以下三段是 2.5 獨有的能力
# ① 30 秒長片:2.5 的 duration 上限是 30(2.0 系是 15)
body_30s = {
"model": "doubao-seedance-2-5-260628",
"content": [{"type": "text", "text": "無人機航拍飛越秋天的山谷,晨霧在林間流動,一鏡到底"}],
"resolution": "720p",
"ratio": "16:9",
"duration": 30, # 別省略!2.5 的 duration 預設是 -1,模型會自己選時長
}
# ② 影片編輯:ratio 必須 adaptive、duration 必須 -1,參考影片時長需在 4-30 秒
body_edit = {
"model": "doubao-seedance-2-5-260628",
"content": [
# 提示詞必須帶編輯意圖詞:增加 / 加上 / 刪除 / 去掉 / 修改 / 替換 / 改成
{"type": "text", "text": "在 @影片1 中增加幾隻飛過的小鳥"},
{"type": "video_url", "video_url": {"url": "https://example.com/source.mp4"},
"role": "reference_video"},
],
"resolution": "720p",
"ratio": "adaptive", # 必須;傳具體比例會同步 400
"duration": -1, # 必須;傳具體秒數會同步 400
"omni_reference_task_type": "edit", # 顯式宣告,把引數校驗前置到提交時
"output_format": "mov", # 可選:後期加工推薦 mov(部分播放器不相容)
}
# ③ 影片延長:ratio 必須 adaptive
body_extend = {
"model": "doubao-seedance-2-5-260628",
"content": [
# 提示詞必須帶延長意圖詞:向前/向後延長、延續、續寫
{"type": "text", "text": "向後延長 @影片1,鏡頭繼續向前推進,天色漸暗"},
{"type": "video_url", "video_url": {"url": "https://example.com/source.mp4"},
"role": "reference_video"},
],
"resolution": "720p",
"ratio": "adaptive",
"omni_reference_task_type": "extend",
}
# ④ 純音訊參考:2.5 獨有,2.0 系必須搭配圖片或影片
body_audio_only = {
"model": "doubao-seedance-2-5-260628",
"content": [
{"type": "text", "text": "根據 @音訊1 的節奏,生成抽象光影隨節拍律動的畫面"},
{"type": "audio_url", "audio_url": {"url": "https://example.com/track.mp3"},
"role": "reference_audio"},
],
"resolution": "720p",
"ratio": "16:9",
"duration": 5,
}
# 提交與輪詢流程與上面完全一致,不再重複
const BASE = "https://api.apiyi.com/seedance/api/v3/contents/generations/tasks";
const HEADERS = {
"Authorization": "Bearer sk-your-api-key",
"Content-Type": "application/json",
};
// 1. 建立任務
const { id } = await fetch(BASE, {
method: "POST",
headers: HEADERS,
body: JSON.stringify({
model: "doubao-seedance-2-0-fast-260128",
content: [{ type: "text", text: "雪山腳下的湖泊倒映著星空,延時攝影效果" }],
resolution: "720p",
ratio: "9:16", // 豎屏與橫屏同價
duration: 5,
}),
}).then(r => r.json());
console.log("task_id:", id);
// 2. 輪詢直到終態
let task;
do {
await new Promise(r => setTimeout(r, 20000));
task = await fetch(`${BASE}/${id}`, { headers: HEADERS }).then(r => r.json());
console.log("status:", task.status);
} while (!["succeeded", "failed", "expired"].includes(task.status));
// 3. 影片直鏈(24 小時過期,請立即轉存)
if (task.status === "succeeded") console.log(task.content.video_url);
curl "https://api.apiyi.com/seedance/api/v3/contents/generations/tasks/cgt-2026xxxx-xxxxx" \
-H "Authorization: Bearer sk-your-api-key"
引數說明速查
| 引數 | 型別 | 必填 | 預設 | 說明 |
|---|---|---|---|---|
model | string | ✓ | — | doubao-seedance-2-5-260628(2.5,推薦,支援 1080p、最長 30 秒)/ doubao-seedance-2-0-260128(標準版,支援 1080p)/ doubao-seedance-2-0-fast-260128(極速版,最高 720p)/ doubao-seedance-2-0-mini-260615(輕量版,最高 720p,單價約標準版一半)。寫純 ID,不要帶 ep- 字首 |
content | array | ✓ | — | 輸入資訊陣列,見下方「生成模式」 |
resolution | string | 720p | 480p / 720p / 1080p(1080p 僅 2.5 與標準版,fast 與 mini 最高 720p);四個模型都不支援 4k | |
ratio | string | adaptive | 16:9 / 4:3 / 1:1 / 3:4 / 9:16 / 21:9 / adaptive;同檔位全比例同價 | |
duration | int | 2.5 為 -1,2.0 係為 5 | 2.5 支援 4–30 整數秒,2.0 系支援 4–15;-1 由模型智慧選時長(按實際產出計費)。2.5 預設即 -1,不顯式傳會自動選時長、費用隨之變化 | |
generate_audio | bool | true | 是否生成同步音訊(人聲/音效/配樂,單聲道) | |
watermark | bool | false | 是否加「AI 生成」水印 | |
seed | int | -1 | [-1, 2^32-1];相同 seed 生成類似(不保證一致)結果 | |
return_last_frame | bool | false | 返回尾幀 png(無水印),用於多段影片接力 | |
execution_expires_after | int | 172800 | 任務過期閾值(秒),範圍 [3600, 259200] | |
output_format | string | mp4 | 僅 2.5:mp4(通用)/ mov(QuickTime,H.264 + yuv444p + PCM,色彩還原更好,適合後期;部分播放器不相容) | |
omni_reference_task_type | string | auto | 僅 2.5:auto / edit(影片編輯)/ extend(影片延長)。顯式指定後接口會前置校驗特殊引數限制,提交時就能拿到 400,而不是等任務跑完才失敗 |
frames、camera_fixed 引數——這些是 Seedance 1.x 的能力,傳入會被忽略或報錯。2.5 獨有的任務型別硬約束(違反會在提交時返回 InvalidParameter.TaskTypeConstraint,不扣費):| 任務型別 | ratio | duration |
|---|---|---|
| 文生影片 / 參考生影片 | 無限制 | 無限制 |
| 首幀 / 首尾幀生影片 | 必須 adaptive | 無限制 |
| 影片編輯 | 必須 adaptive | 必須 -1,且待編輯影片時長在 4–30 秒內 |
| 影片延長 | 必須 adaptive | 無限制 |
生成模式(content 組合)
| 模式 | content 組成 | role 取值 |
|---|---|---|
| 文生影片 | 1 個 text | — |
| 圖生影片-首尾幀 | text(可選)+ 2 個 image_url | 必填 first_frame / last_frame |
| 圖生影片-首幀 | text(可選)+ 1 個 image_url | first_frame 或不填 |
| 多模態參考生影片 | text + 參考素材(2.5:最多 30 image_url + 10 video_url + 10 audio_url;2.0 系:0–9 圖 + 0–3 影片 + 0–3 音訊,至少 1 圖或 1 影片) | reference_image / reference_video / reference_audio |
| 影片編輯(僅 2.5) | text(含編輯意圖詞)+ 至少 1 個 video_url | reference_video,配 omni_reference_task_type: "edit" |
| 影片延長(僅 2.5) | text(含延長意圖詞)+ 至少 1 個 video_url | reference_video,配 omni_reference_task_type: "extend" |
data:image/png;base64,...)、素材 ID(asset://...);不支援含真人人臉的輸入素材。素材引用的端到端程式碼(上傳入庫 → asset:// 出片 → 下載)見 素材引用實戰。
大素材內聯會拖慢建立任務:Base64 或大圖 URL 的上行/下載耗時全都算在提交階段,會把秒級的建立任務介面拖到幾十秒甚至讀超時。帶圖帶影片時建議先入庫拿 asset:// 素材 ID,見 素材優先實踐。
參考素材數量按模型區分:2.5 支援 30 圖 + 10 影片 + 10 音訊,且音訊可以單獨作為唯一參考;2.0 系是 9 圖 + 3 影片 + 3 音訊,音訊必須與至少 1 個圖片或影片一起傳。
編輯與延長靠提示詞意圖觸發,omni_reference_task_type 只是把校驗前置。提示詞裡用 @影片1、@影像1 按傳入順序指代素材;編輯要帶「增加 / 刪除 / 修改 / 替換」這類詞,延長要帶「向後延長 / 續寫 / 延續」。若模型按提示詞判定的任務型別與顯式宣告不符,任務會非同步失敗並返回 InvalidParameter.TaskTypeMismatch。
響應格式
建立成功只返回任務 ID(不是影片本身):{ "id": "cgt-20260606160057-6bbjd" }
id 後輪詢 GET /seedance/api/v3/contents/generations/tasks/{id} 查詢狀態。
輪詢節奏建議
| 專案 | 建議值 | 說明 |
|---|---|---|
| 首次查詢延遲 | 提交後 20–30 秒 | 更早查必然是 queued,純屬浪費請求 |
| 輪詢間隔 | 10–20 秒一次 | 影片生成是分鐘級任務,秒級輪詢沒有意義,還可能觸發限流 |
| 超時上限 | 10 分鐘未到終態即視為異常 | 排隊高峰可放寬到 15 分鐘,或改由 execution_expires_after 兜底 |
{
"id": "cgt-20260606160057-6bbjd",
"model": "doubao-seedance-2-0-fast-260128",
"status": "succeeded",
"content": {
"video_url": "https://ark-acg-cn-beijing.tos-cn-beijing.volces.com/....mp4?X-Tos-Expires=86400&..."
},
"usage": { "completion_tokens": 108900, "total_tokens": 108900 },
"created_at": 1780732857,
"updated_at": 1780732991,
"seed": 97151,
"resolution": "720p",
"ratio": "16:9",
"duration": 5,
"framespersecond": 24,
"generate_audio": true,
"draft": false
}
- 影片地址在
content.video_url,不在頂層;簽名直鏈 24 小時過期,成功後立即下載轉存 - 狀態機:
queued → running → succeeded / failed / expired,成功是succeeded - 下載影片時直接 GET 直鏈即可,不要帶
Authorization頭
usage.completion_tokens 即計費 token 數,滿足 token ≈ 時長 × 寬 × 高 × 24 / 1024(實測偏差少於 0.1%)。含參考影片時,輸入影片時長按輸出解析度一併計入,即 (輸入影片時長 + 輸出時長) × 寬 × 高 × 24 / 1024。duration: -1 或 ratio: adaptive 時,實際時長與比例以響應中的 duration / ratio 欄位為準(編輯任務的時長可能是非整數秒)。授權
在 API易控制台获取的 API Key(2.5 须勾选 SeeDance25 分组,2.0 系须勾选 SeeDance2 分组)
主體
模型 ID(写纯 ID,不要带 ep- 前缀)。2.5 支持 1080p 与 4-30 秒,参考素材上限 30 图 + 10 视频 + 10 音频;2.0 标准版支持 1080p;fast 与 mini 最高 720p,mini 单价约标准版一半。四个模型均不支持 4k
doubao-seedance-2-5-260628, doubao-seedance-2-0-260128, doubao-seedance-2-0-fast-260128, doubao-seedance-2-0-mini-260615 "doubao-seedance-2-5-260628"
输入信息数组。文生视频只放 1 个 text;图生视频追加 image_url(role: first_frame / last_frame);多模态参考生视频追加 image_url(role: reference_image),可再加 video_url / audio_url。参考素材上限:2.5 为 30 图 + 10 视频 + 10 音频且音频可单独使用,2.0 系为 9 图 + 3 视频 + 3 音频且至少需 1 图或 1 视频。三种图生场景互斥
Show child attributes
Show child attributes
分辨率档位(定义像素面积,同档位全比例同价)。1080p 仅 2.5 与 2.0 标准版支持,fast 与 mini 最高 720p;均不支持 4k
480p, 720p, 1080p 宽高比。adaptive 按输入自动适配(图生视频推荐,避免裁剪);实际比例见查询响应 ratio 字段
16:9, 4:3, 1:1, 3:4, 9:16, 21:9, adaptive 视频时长(整数秒):2.5 为 4-30,2.0 系为 4-15;或 -1 由模型智能选择(按实际产出计费)。费用与时长线性相关。注意 2.5 的缺省值是 -1,2.0 系是 5
5
是否生成与画面同步的音频(人声/音效/背景音乐,单声道)。注意默认 true,不需要声音时显式传 false
是否在右下角加「AI 生成」水印
随机种子,[-1, 2^32-1]。相同 seed 生成类似(不保证一致)结果;-1 表示随机
是否返回尾帧 png(无水印、与视频同宽高),用于把尾帧作为下一段任务首帧、量产连续视频
任务过期阈值(秒),超时任务标记为 expired。范围 [3600, 259200]
输出视频格式,仅 doubao-seedance-2-5-260628 支持。mov 为 QuickTime 容器(H.264 + yuv444p + PCM),色彩还原更好、适合后期,但部分播放器不兼容
mp4, mov 全模态参考生视频的任务类型,仅 doubao-seedance-2-5-260628 支持。显式指定 edit 或 extend 时接口会前置校验:视频编辑要求 ratio=adaptive 且 duration=-1,视频延长要求 ratio=adaptive,不符合会在提交时返回 InvalidParameter.TaskTypeConstraint
auto, edit, extend 回應
任务创建成功,返回任务 ID(用于轮询查询)
任务创建成功响应。拿 id 轮询 GET /seedance/api/v3/contents/generations/tasks/{id};任务成功后视频地址在 content.video_url(24 小时过期),计费 token 在 usage.completion_tokens
视频生成任务 ID(保存 7 天)
"cgt-20260606160057-6bbjd"
這個頁面有幫助嗎?