curl https://api.nodylink.com/v2/videos/generations \
-H "Authorization: Bearer sk-你的密钥" \
-H "Content-Type: application/json" \
-d '{
"model": "Doubao-Seedance-2.0-full",
"content": [
{"type": "text", "text": "小猫对着镜头打哈欠,午后阳光,浅景深"}
],
"resolution": "1080p",
"ratio": "16:9",
"duration": 5,
"generate_audio": true
}'
import time
import requests
API_KEY = "sk-你的密钥"
BASE = "https://api.nodylink.com"
headers = {"Authorization": f"Bearer {API_KEY}"}
submit = requests.post(
f"{BASE}/v2/videos/generations",
headers=headers,
json={
"model": "Doubao-Seedance-2.0-full",
"content": [{"type": "text", "text": "小猫对着镜头打哈欠,午后阳光,浅景深"}],
"resolution": "1080p",
"ratio": "16:9",
"duration": 5,
"generate_audio": True,
},
).json()
task_id = submit["id"]
def video_url(data):
task = data.get("task") or {}
if task.get("outputs"):
return task["outputs"][0]
return (data.get("content") or {}).get("video_url")
while True:
task = requests.get(f"{BASE}/v2/videos/generations/{task_id}", headers=headers).json()
if task["status"] == "SUCCESS":
print(video_url(task["data"]))
break
if task["status"] == "FAILURE":
raise RuntimeError(task["fail_reason"])
time.sleep(10)
const API_KEY = "sk-你的密钥";
const BASE = "https://api.nodylink.com";
const headers = {
Authorization: `Bearer ${API_KEY}`,
"Content-Type": "application/json",
};
const submit = await fetch(`${BASE}/v2/videos/generations`, {
method: "POST",
headers,
body: JSON.stringify({
model: "Doubao-Seedance-2.0-full",
content: [{ type: "text", text: "小猫对着镜头打哈欠,午后阳光,浅景深" }],
resolution: "1080p",
ratio: "16:9",
duration: 5,
generate_audio: true,
}),
}).then((r) => r.json());
const videoUrl = (data) => data?.task?.outputs?.[0] ?? data?.content?.video_url;
while (true) {
const task = await fetch(`${BASE}/v2/videos/generations/${submit.id}`, { headers })
.then((r) => r.json());
if (task.status === "SUCCESS") {
console.log(videoUrl(task.data));
break;
}
if (task.status === "FAILURE") throw new Error(task.fail_reason);
await new Promise((r) => setTimeout(r, 10000));
}
{
"id": "6b2f8d1e-3c4a-4e9b-8f70-1a5d9c2e7b36",
"task_id": "6b2f8d1e-3c4a-4e9b-8f70-1a5d9c2e7b36",
"object": "video",
"model": "Doubao-Seedance-2.0-full",
"status": "queued",
"progress": 0,
"created_at": 1792000000
}
{
"code": "missing_model",
"message": "model field is required",
"data": null
}
Doubao Seedance
Seedance 2.0 Full
Doubao Seedance 2.0 全分辨率视频生成。标准版支持 480p / 720p / 1080p / 4k,fast 与 mini 支持 480p / 720p。
POST
/
v2
/
videos
/
generations
curl https://api.nodylink.com/v2/videos/generations \
-H "Authorization: Bearer sk-你的密钥" \
-H "Content-Type: application/json" \
-d '{
"model": "Doubao-Seedance-2.0-full",
"content": [
{"type": "text", "text": "小猫对着镜头打哈欠,午后阳光,浅景深"}
],
"resolution": "1080p",
"ratio": "16:9",
"duration": 5,
"generate_audio": true
}'
import time
import requests
API_KEY = "sk-你的密钥"
BASE = "https://api.nodylink.com"
headers = {"Authorization": f"Bearer {API_KEY}"}
submit = requests.post(
f"{BASE}/v2/videos/generations",
headers=headers,
json={
"model": "Doubao-Seedance-2.0-full",
"content": [{"type": "text", "text": "小猫对着镜头打哈欠,午后阳光,浅景深"}],
"resolution": "1080p",
"ratio": "16:9",
"duration": 5,
"generate_audio": True,
},
).json()
task_id = submit["id"]
def video_url(data):
task = data.get("task") or {}
if task.get("outputs"):
return task["outputs"][0]
return (data.get("content") or {}).get("video_url")
while True:
task = requests.get(f"{BASE}/v2/videos/generations/{task_id}", headers=headers).json()
if task["status"] == "SUCCESS":
print(video_url(task["data"]))
break
if task["status"] == "FAILURE":
raise RuntimeError(task["fail_reason"])
time.sleep(10)
const API_KEY = "sk-你的密钥";
const BASE = "https://api.nodylink.com";
const headers = {
Authorization: `Bearer ${API_KEY}`,
"Content-Type": "application/json",
};
const submit = await fetch(`${BASE}/v2/videos/generations`, {
method: "POST",
headers,
body: JSON.stringify({
model: "Doubao-Seedance-2.0-full",
content: [{ type: "text", text: "小猫对着镜头打哈欠,午后阳光,浅景深" }],
resolution: "1080p",
ratio: "16:9",
duration: 5,
generate_audio: true,
}),
}).then((r) => r.json());
const videoUrl = (data) => data?.task?.outputs?.[0] ?? data?.content?.video_url;
while (true) {
const task = await fetch(`${BASE}/v2/videos/generations/${submit.id}`, { headers })
.then((r) => r.json());
if (task.status === "SUCCESS") {
console.log(videoUrl(task.data));
break;
}
if (task.status === "FAILURE") throw new Error(task.fail_reason);
await new Promise((r) => setTimeout(r, 10000));
}
{
"id": "6b2f8d1e-3c4a-4e9b-8f70-1a5d9c2e7b36",
"task_id": "6b2f8d1e-3c4a-4e9b-8f70-1a5d9c2e7b36",
"object": "video",
"model": "Doubao-Seedance-2.0-full",
"status": "queued",
"progress": 0,
"created_at": 1792000000
}
{
"code": "missing_model",
"message": "model field is required",
"data": null
}
- 请求体与 火山方舟视频生成 API 官方格式一致:文本、图片、视频、音频都放在
content数组中,用role区分用途。素材角色和参数限制与 Seedance 2.0 相同,并开放对应版本的全部输出分辨率。 - 样片模式请使用 Seedance 2.5 Full。
- 异步接口:提交后立即返回任务
id,再调用 查询视频任务 获取结果。 - 计费与时长、分辨率、是否包含参考视频相关,见 模型价格。任务失败自动退款。
模型
| 模型 ID | 说明 | 分辨率 |
|---|---|---|
Doubao-Seedance-2.0-full | 标准版,全分辨率 | 480p / 720p / 1080p / 4k |
Doubao-Seedance-2.0-fast-full | 快速版,功能与标准版一致,生成更快 | 480p / 720p |
Doubao-Seedance-2.0-mini-full | 迷你版,功能与标准版一致 | 480p / 720p |
分辨率
| 分辨率 | 位深 | 支持的模型 |
|---|---|---|
480p | 8bit | 三个模型都支持 |
720p | 8bit | 三个模型都支持 |
1080p | 8bit | 仅 Doubao-Seedance-2.0-full |
4k | 10bit,H.265/HEVC | 仅 Doubao-Seedance-2.0-full |
4k 使用 10bit 位深和 H.265/HEVC 编码。少数播放器无法解码时,换用 VLC、MPV 或 QuickTime Player。显示 各宽高比的输出像素
显示 各宽高比的输出像素
| 分辨率 | 16:9 | 4:3 | 1:1 | 3:4 | 9:16 | 21:9 |
|---|---|---|---|---|---|---|
| 480p | 864×496 | 752×560 | 640×640 | 560×752 | 496×864 | 992×432 |
| 720p | 1280×720 | 1112×834 | 960×960 | 834×1112 | 720×1280 | 1470×630 |
| 1080p | 1920×1080 | 1664×1248 | 1440×1440 | 1248×1664 | 1080×1920 | 2206×946 |
| 4k | 3840×2160 | 3326×2494 | 2880×2880 | 2494×3326 | 2160×3840 | 4398×1886 |
Doubao-Seedance-2.0-full 可以输出。curl https://api.nodylink.com/v2/videos/generations \
-H "Authorization: Bearer sk-你的密钥" \
-H "Content-Type: application/json" \
-d '{
"model": "Doubao-Seedance-2.0-full",
"content": [
{"type": "text", "text": "小猫对着镜头打哈欠,午后阳光,浅景深"}
],
"resolution": "1080p",
"ratio": "16:9",
"duration": 5,
"generate_audio": true
}'
import time
import requests
API_KEY = "sk-你的密钥"
BASE = "https://api.nodylink.com"
headers = {"Authorization": f"Bearer {API_KEY}"}
submit = requests.post(
f"{BASE}/v2/videos/generations",
headers=headers,
json={
"model": "Doubao-Seedance-2.0-full",
"content": [{"type": "text", "text": "小猫对着镜头打哈欠,午后阳光,浅景深"}],
"resolution": "1080p",
"ratio": "16:9",
"duration": 5,
"generate_audio": True,
},
).json()
task_id = submit["id"]
def video_url(data):
task = data.get("task") or {}
if task.get("outputs"):
return task["outputs"][0]
return (data.get("content") or {}).get("video_url")
while True:
task = requests.get(f"{BASE}/v2/videos/generations/{task_id}", headers=headers).json()
if task["status"] == "SUCCESS":
print(video_url(task["data"]))
break
if task["status"] == "FAILURE":
raise RuntimeError(task["fail_reason"])
time.sleep(10)
const API_KEY = "sk-你的密钥";
const BASE = "https://api.nodylink.com";
const headers = {
Authorization: `Bearer ${API_KEY}`,
"Content-Type": "application/json",
};
const submit = await fetch(`${BASE}/v2/videos/generations`, {
method: "POST",
headers,
body: JSON.stringify({
model: "Doubao-Seedance-2.0-full",
content: [{ type: "text", text: "小猫对着镜头打哈欠,午后阳光,浅景深" }],
resolution: "1080p",
ratio: "16:9",
duration: 5,
generate_audio: true,
}),
}).then((r) => r.json());
const videoUrl = (data) => data?.task?.outputs?.[0] ?? data?.content?.video_url;
while (true) {
const task = await fetch(`${BASE}/v2/videos/generations/${submit.id}`, { headers })
.then((r) => r.json());
if (task.status === "SUCCESS") {
console.log(videoUrl(task.data));
break;
}
if (task.status === "FAILURE") throw new Error(task.fail_reason);
await new Promise((r) => setTimeout(r, 10000));
}
{
"id": "6b2f8d1e-3c4a-4e9b-8f70-1a5d9c2e7b36",
"task_id": "6b2f8d1e-3c4a-4e9b-8f70-1a5d9c2e7b36",
"object": "video",
"model": "Doubao-Seedance-2.0-full",
"status": "queued",
"progress": 0,
"created_at": 1792000000
}
{
"code": "missing_model",
"message": "model field is required",
"data": null
}
鉴权
请求参数
string
必填
模型 ID:
Doubao-Seedance-2.0-full、Doubao-Seedance-2.0-fast-full 或 Doubao-Seedance-2.0-mini-full。array
必填
输入内容数组,可以包含文本、图片、视频、音频。
显示 文本
显示 文本
显示 图片
显示 图片
显示 视频
显示 视频
string
默认值:"720p"
分辨率:
480p、720p、1080p 或 4k。Doubao-Seedance-2.0-fast-full 和 Doubao-Seedance-2.0-mini-full 仅支持 480p 和 720p。string
默认值:"16:9"
宽高比:
16:9、4:3、1:1、3:4、9:16、21:9,或 adaptive(根据输入图片 / 视频自动匹配)。integer
默认值:"5"
视频时长(秒),取值 4~15。传
-1 时由模型自动决定时长,提交时按上限预扣费用,完成后按实际结果结算。boolean
默认值:"true"
是否生成与画面同步的音频(人声、音效、背景音乐)。
integer
随机种子,取值 -1 到 2^32-1。相同请求和种子会生成相似结果,但不保证完全一致。
boolean
默认值:"false"
是否在视频中添加「AI 生成」水印。
boolean
默认值:"false"
是否额外返回视频最后一帧的图片,可以作为下一段视频的首帧,实现连续生成。
array
增强工具。目前支持联网搜索:
[{"type": "web_search"}],生成时参考网络上的实时信息。- 使用首帧 / 尾帧时,不能同时传参考视频或参考音频。
- 参考音频不能单独使用,必须搭配参考图或参考视频。
- 真人人脸作为参考素材时可能会被上游内容审核拦截。
提交阶段的错误返回
{"code": "...", "message": "...", "data": null} 结构。HTTP 状态码为 429 时,message 为「当前分组上游负载已饱和,请稍后再试」,请退避后重试。提交响应
string
与
id 相同,为兼容旧接口保留。string
固定为
video。string
请求的模型 ID。
string
固定为
queued。integer
固定为
0。integer
提交时间,Unix 时间戳(秒)。
使用示例
4k
{
"model": "Doubao-Seedance-2.0-full",
"content": [
{"type": "text", "text": "雪后的寺院庭院,僧人缓步穿过石灯笼,电影感长镜头"}
],
"resolution": "4k",
"ratio": "16:9",
"duration": 5
}
480p
{
"model": "Doubao-Seedance-2.0-fast-full",
"content": [
{"type": "text", "text": "一辆红色跑车在海岸公路上疾驰"}
],
"resolution": "480p",
"duration": 5,
"return_last_frame": true
}
图生视频(首帧)
{
"model": "Doubao-Seedance-2.0-full",
"content": [
{"type": "text", "text": "女孩转身微笑,头发随风飘动"},
{"type": "image_url", "image_url": {"url": "https://example.com/girl.jpg"}, "role": "first_frame"}
],
"resolution": "1080p",
"ratio": "adaptive",
"duration": 5
}
多模态参考(图片 + 视频 + 音频)
{
"model": "Doubao-Seedance-2.0-full",
"content": [
{"type": "text", "text": "图片1中的角色按照视频1的舞蹈动作跳舞,音频1作为背景音乐"},
{"type": "image_url", "image_url": {"url": "https://example.com/character.png"}, "role": "reference_image"},
{"type": "video_url", "video_url": {"url": "https://example.com/dance.mp4"}, "role": "reference_video"},
{"type": "audio_url", "audio_url": {"url": "https://example.com/music.mp3"}, "role": "reference_audio"}
],
"resolution": "720p",
"ratio": "9:16",
"duration": 10
}

