创建视频
POST/v1/videos
创建异步视频生成任务。受理后立即返回任务对象,之后用 GET /v1/videos/{video_id} 每 3–5 秒查询一次,直到 status 为 completed 或 failed。
请求体只接受本页列出的字段,出现未列出的字段返回 400 unsupported field: <字段名>。
Seedance 2.0 / 2.5 系列与 Seedance 2.5 LL 的可用字段、取值和上限不同,请对照每个参数下的“按模型分组”说明。请只使用本页列出的取值,未列出的取值可能导致请求被拒绝或任务失败。
模型与限制
| 模型 | 规则分组 | resolution | seconds(含端点) | 计费 | 首尾帧 | task_mode | 参考素材上限 图/视频/音频 |
|---|---|---|---|---|---|---|---|
seedance2.0 | Seedance 2.0 系列 | 480p / 720p / 1080p / 4K省略时 480p | 5–15省略时 5 | 按秒:秒数 × 分辨率单价 | 支持 | 不支持 | 9 / 3 / 31080p / 4K 不可传视频 |
seedance2.0-fast | Seedance 2.0 系列 | 480p / 720p省略时 480p | 4–15省略时 4 | 按秒:秒数 × 分辨率单价 | 支持 | 不支持 | 9 / 3 / 3 |
seedance2.0-mini | Seedance 2.0 系列 | 480p / 720p省略时 480p | 4–15省略时 4 | 按秒:秒数 × 分辨率单价 | 不支持 | 不支持 | 9 / 3 / 3 |
seedance2.0-vip | Seedance 2.0 系列 | 480p / 720p / 1080p / 4K省略时 480p | 5–15省略时 5 | 按秒:秒数 × 分辨率单价 | 支持 | 不支持 | 9 / 3 / 3 |
seedance2.5 | Seedance 2.5 系列 | 480p / 720p / 1080p / 4K省略时 480p | 4–30省略时 4 | 按秒:秒数 × 分辨率单价 | 支持 | extend / edit1080p / 4K 不支持 | 10 / 5 / 51080p / 4K 不可传视频 |
seedance2.5-flash | Seedance 2.5 系列 | 480p / 720p省略时 480p | 4–30省略时 4 | 按秒:秒数 × 分辨率单价 | 支持 | extend / edit | 10 / 5 / 5 |
seedance2.5-vip | Seedance 2.5 系列 | 480p / 720p / 1080p / 4K省略时 480p | 4–30省略时 4 | 按秒:秒数 × 分辨率单价 | 支持 | extend / edit | 10 / 5 / 5 |
seedance2.5-LL | Seedance 2.5 LL | 720p必填 | 5–30省略时 5 | 按条:按分辨率固定价,与秒数无关 | 不支持 | 不支持 | 10 / 5 / 5 |
请求头
Authorizationstring必填Bearer <API_KEY>,使用控制台“API 密钥”中创建的模型调用密钥。Content-Typestring必填application/json。Idempotency-Keystring可选幂等键,最长 256 字节,建议每个新任务生成一个 UUID。超时或网络错误后,用同一个键和完全相同的请求体重试,会返回原任务,不会重复创建和扣费;同一个键不能用于不同的请求体。
限制
- 原提交结果尚未确认时,不要换新键重新提交,否则可能重复创建并扣费;稍后用原键重试或查看任务日志。
请求体参数JSON
modelstring必填要调用的视频模型 ID,区分大小写。可用模型见下方;API Key 设置了模型限制时,只能调用其中允许的模型。
- Seedance 2.0 系列
seedance2.0seedance2.0-fastseedance2.0-miniseedance2.0-vip- Seedance 2.5 系列
seedance2.5seedance2.5-flashseedance2.5-vip- Seedance 2.5 LL
seedance2.5-LL
promptstring必填描述要生成的画面、动作与镜头,不能为空。可用
@图片1、@视频1、@音频1指代素材,同类素材按请求中的顺序从 1 编号。按模型分组
- Seedance 2.0 系列 · Seedance 2.5 系列
- 不超过 10,000 个字符。
- Seedance 2.5 LL
- 不超过 45,000 个字符。
secondsinteger延长 / 编辑时必填视频时长,单位为秒的整数。各模型的允许范围(含两端)和省略时的默认值见上方模型表。也可用别名
duration,两者同时传入时必须相等。task_mode: "extend"时为新增秒数;task_mode: "edit"时须等于原视频时长。按模型分组
- Seedance 2.0 系列 · Seedance 2.5 系列
- 按秒计费:秒数 × 所选分辨率的单价。
- Seedance 2.5 LL
- 只接受 JSON 整数(如
5),不接受字符串"5"。按条计费,价格只取决于分辨率。
resolutionstringSeedance 2.5 LL 必填分辨率档位,取所选模型在模型表中列出的值,例如
480p、720p、1080p、4K。seedance2.0、seedance2.5的1080p和4K不支持传入视频:references中不能有视频素材,seedance2.5在这两档也不能使用task_mode;需要视频输入时请改用720p或更低档位。按模型分组
- Seedance 2.0 系列 · Seedance 2.5 系列
- 省略时为
480p。 - Seedance 2.5 LL
- 必须传入,当前仅
720p。该值只用于匹配价格档位,不控制成片的实际分辨率。也接受别名resolution_name,两者同时传入时必须相同。
aspect_ratiostring可选画面比例,格式为“宽:高”。也可用别名
ratio,两者同时传入时必须相同。按模型分组
- Seedance 2.0 系列 · Seedance 2.5 系列
- 支持
16:9(默认)、9:16、1:1、4:3、3:4、21:9。首尾帧生成另可传auto(也接受adaptive),由模型按首尾帧选择画幅;文生视频、参考素材生成和视频编辑/延长传auto时按16:9生成。seedance2.5系列(含-flash、-vip)的首尾帧生成只支持auto/adaptive,省略时自动使用adaptive,查询任务时metadata.aspect_ratio返回adaptive。 - Seedance 2.5 LL
- 支持
auto(也接受adaptive,两者等价)、16:9、9:16、1:1、4:3、3:4、21:9;省略时由模型决定。也接受别名size。
referencesobject[]可选参考素材,生成模式由素材自动判断:省略为文生视频;一张
first_frame加一张last_frame图片为首尾帧生成,二者必须成对且不能混入其他素材;其余为参考素材生成。不能与images/videos/audios等 URL 数组字段同时使用。按模型分组
- Seedance 2.0 系列
- 图片 ≤ 9、视频 ≤ 3、音频 ≤ 3;音频须与至少一张图片或一段视频一同提交。
seedance2.0在1080p/4K下不能传视频。 - Seedance 2.5 系列
- 图片 ≤ 10、视频 ≤ 5、音频 ≤ 5。
seedance2.5在1080p/4K下不能传视频。 - Seedance 2.5 LL
- 图片 ≤ 10、视频 ≤ 5、音频 ≤ 5。不支持首尾帧,
role只能是reference或省略。
限制
- 公网可直接访问的
https://地址,或你素材库中的asset://<素材ID>(素材须属于当前 API Key 的所有者)。 - 不支持
http://、localhost、内网地址、带用户名密码的 URL 与#片段;地址不能依赖 Cookie、鉴权头、防盗链或很快过期的签名。 - 同一请求内每个地址只能出现一次(不同素材类型之间也不能复用同一地址)。
- 平台支持的素材格式:图片 PNG / JPEG / WebP;视频 MP4 / MOV;音频 MP3 / WAV。模型服务商还会校验分辨率、帧率、时长与内容合规,不通过时任务失败并在
error.message中说明。
显示子字段(3)
typestring必填素材类型。
支持的取值
image图片video视频audio音频
rolestring可选默认值reference素材在生成中的作用。
支持的取值
reference普通参考素材first_frame首帧,仅图片;仅 Seedance 2.0 / 2.5 系列,seedance2.0-mini除外last_frame尾帧,仅图片;仅 Seedance 2.0 / 2.5 系列,seedance2.0-mini除外
sourcestring必填素材地址:公网 HTTPS 地址或
asset://<素材ID>,要求见上方限制。
images / videos / audiosstring[]可选按类型传参考素材 URL 的简写,等价于
role为reference的references,数量上限相同,不能与references混用。可用别名:图片image_urls、imageUrls、reference_images、referenceImages、reference_image_urls,视频和音频同理(把 image 换成 video / audio)。同一类型的多个别名同时出现时内容必须一致。first_image / last_imagestring可选仅适用于:Seedance 2.0 系列、Seedance 2.5 系列
首帧 / 尾帧图片地址的简写,等价于
references中的first_frame/last_frame。须同时提供,不能与references混用。task_modestring可选仅适用于:Seedance 2.5 系列
对已有视频进行延长或编辑,普通生成时省略。仅 Seedance 2.5 系列(
seedance2.5及-flash、-vip等后缀版本)支持,seedance2.5-LL与 Seedance 2.0 系列不支持;以模型表 task_mode 列为准,且不能用于该列标注为不支持的分辨率(seedance2.5的1080p/4K)。按请求的seconds计费,原视频不计费。支持的取值
extend从原视频结尾续拍,seconds为新增秒数edit编辑原视频内容,seconds须等于原视频时长
限制
- 必须传
seconds;references中只能有一段type: "video"、role: "reference"的原视频,不能再有图片、音频、其他视频或首尾帧。
billing_modestring可选仅适用于:Seedance 2.5 LL
可省略;如传入,只能是
per_video。
返回值
HTTP 200,返回视频任务对象。
idstring必填任务 ID,格式为
task_开头的字符串。查询和下载都使用此 ID。task_idstring可选与
id相同的兼容字段。objectstring可选固定为
video。modelstring可选请求的模型 ID。
statusstring可选任务状态。只用
status判断是否结束,不要只看progress。支持的取值
queued排队中,继续轮询in_progress生成中,继续轮询completed已完成,读取metadata.urlfailed失败,读取error.message;费用按服务端流程退还unknown暂未取得状态,继续轮询同一任务,不要重新创建
progressinteger可选进度 0–100,仅供展示。
created_atinteger可选创建时间,Unix 秒。
completed_atinteger可选完成时间,Unix 秒;仅完成后返回。
secondsstring可选本次任务的时长(秒),以字符串返回。
metadataobject可选任务参数与结果地址。
显示子字段(4)
resolutionstring可选分辨率档位。
aspect_ratiostring可选画面比例。
urlstring可选视频地址。仅当
status为completed时可用;任务未完成时可能已返回本站/v1/videos/{id}/content地址,但此时请求会返回 400。完成后可能是公共存储直链(下载时不要携带 API Key),也可能是本站
/v1/videos/{id}/content地址(需要携带创建任务时的 API Key)。请直接使用返回的地址,不要自行拼接。billed_secondsstring可选实际计费秒数;仅部分按秒计费任务在结算后返回。
errorobject可选仅
status为failed时返回。显示子字段(2)
codestring可选固定为
video_generation_failed。messagestring可选失败原因,例如素材无法读取或内容未通过审核。
错误
参数被渠道校验拒绝时返回 {"code": "...", "message": "...", "data": null};鉴权、路由和计费阶段的错误返回 {"error": {"message": "...", "type": "...", "code": "..."}}。这些错误都不会创建任务、不会扣费。
| HTTP | code | 原因与处理 |
|---|---|---|
| 400 | invalid_request | 字段缺失、取值或格式错误、出现未支持字段,详见 message。 |
| 400 | video_pricing_combination_unsupported | 所选模型不支持该分辨率或时长。 |
| 400 | asset_reference_not_found | asset:// 素材不存在或不属于你。 |
| 401 | — | API Key 无效、过期或已禁用。 |
| 403 | — | API Key 不允许此模型,或 IP 受限。 |
| 403 | video_pricing_model_disabled | 模型已停售。 |
| 403 | insufficient_user_quota | 余额或 API Key 额度不足,充值或调整额度后重试。 |
| 409 | idempotency_conflict | 同一 Idempotency-Key 用于了不同请求体。 |
| 409 | task_submission_recovery_pending | 原提交结果尚未确认,不要重复提交。 |
| 429 | — | 请求过快或并发已满,稍后重试。 |
| 503 | video_pricing_not_configured | 模型当前没有可用价格配置,暂不可调用。 |
| 超时 / 5xx | — | 任务可能已创建。保留原 Idempotency-Key 与请求体重试,或先在控制台任务日志确认,避免重复扣费。 |
curl -X POST https://ling-light.com/v1/videos \
-H "Authorization: Bearer $LINGLIGHT_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"model": "seedance2.0",
"prompt": "一只橘猫坐在窗台上看雨,镜头缓慢推近",
"seconds": 5,
"resolution": "720p",
"aspect_ratio": "16:9"
}'const response = await fetch('https://ling-light.com/v1/videos', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LINGLIGHT_API_KEY}`,
'Content-Type': 'application/json',
'Idempotency-Key': crypto.randomUUID(),
},
body: JSON.stringify({
"model": "seedance2.0",
"prompt": "一只橘猫坐在窗台上看雨,镜头缓慢推近",
"seconds": 5,
"resolution": "720p",
"aspect_ratio": "16:9"
}),
})
console.log(response.status, await response.json())import os
import uuid
import requests
response = requests.post(
"https://ling-light.com/v1/videos",
headers={
"Authorization": f"Bearer {os.environ['LINGLIGHT_API_KEY']}",
"Idempotency-Key": str(uuid.uuid4()),
},
json={
"model": "seedance2.0",
"prompt": "一只橘猫坐在窗台上看雨,镜头缓慢推近",
"seconds": 5,
"resolution": "720p",
"aspect_ratio": "16:9",
},
timeout=60,
)
print(response.status_code, response.json()){
"id": "task_xxxxxxxxxxxxxxxx",
"task_id": "task_xxxxxxxxxxxxxxxx",
"object": "video",
"model": "seedance2.0",
"status": "queued",
"progress": 0,
"created_at": 1795660800,
"seconds": "5",
"metadata": {
"aspect_ratio": "16:9",
"resolution": "720p",
"url": "https://ling-light.com/v1/videos/task_xxxxxxxxxxxxxxxx/content"
}
}curl -X POST https://ling-light.com/v1/videos \
-H "Authorization: Bearer $LINGLIGHT_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"model": "seedance2.5",
"prompt": "人物从 @图片1 自然走到 @图片2 的位置,镜头保持稳定",
"seconds": 5,
"resolution": "720p",
"aspect_ratio": "auto",
"references": [
{
"type": "image",
"role": "first_frame",
"source": "https://cdn.example.com/first.png"
},
{
"type": "image",
"role": "last_frame",
"source": "https://cdn.example.com/last.png"
}
]
}'const response = await fetch('https://ling-light.com/v1/videos', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LINGLIGHT_API_KEY}`,
'Content-Type': 'application/json',
'Idempotency-Key': crypto.randomUUID(),
},
body: JSON.stringify({
"model": "seedance2.5",
"prompt": "人物从 @图片1 自然走到 @图片2 的位置,镜头保持稳定",
"seconds": 5,
"resolution": "720p",
"aspect_ratio": "auto",
"references": [
{
"type": "image",
"role": "first_frame",
"source": "https://cdn.example.com/first.png"
},
{
"type": "image",
"role": "last_frame",
"source": "https://cdn.example.com/last.png"
}
]
}),
})
console.log(response.status, await response.json())import os
import uuid
import requests
response = requests.post(
"https://ling-light.com/v1/videos",
headers={
"Authorization": f"Bearer {os.environ['LINGLIGHT_API_KEY']}",
"Idempotency-Key": str(uuid.uuid4()),
},
json={
"model": "seedance2.5",
"prompt": "人物从 @图片1 自然走到 @图片2 的位置,镜头保持稳定",
"seconds": 5,
"resolution": "720p",
"aspect_ratio": "auto",
"references": [
{
"type": "image",
"role": "first_frame",
"source": "https://cdn.example.com/first.png",
},
{
"type": "image",
"role": "last_frame",
"source": "https://cdn.example.com/last.png",
},
],
},
timeout=60,
)
print(response.status_code, response.json()){
"id": "task_xxxxxxxxxxxxxxxx",
"task_id": "task_xxxxxxxxxxxxxxxx",
"object": "video",
"model": "seedance2.5",
"status": "queued",
"progress": 0,
"created_at": 1795660800,
"seconds": "5",
"metadata": {
"aspect_ratio": "adaptive",
"resolution": "720p",
"url": "https://ling-light.com/v1/videos/task_xxxxxxxxxxxxxxxx/content"
}
}curl -X POST https://ling-light.com/v1/videos \
-H "Authorization: Bearer $LINGLIGHT_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"model": "seedance2.5",
"prompt": "@图片1 中的女孩转头看向镜头,动作节奏参考 @视频1,语气参考 @音频1",
"seconds": 8,
"resolution": "480p",
"aspect_ratio": "16:9",
"references": [
{
"type": "image",
"source": "https://cdn.example.com/girl.png"
},
{
"type": "video",
"source": "https://cdn.example.com/motion.mp4"
},
{
"type": "audio",
"source": "asset://a1B2c3D4e5F6"
}
]
}'const response = await fetch('https://ling-light.com/v1/videos', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LINGLIGHT_API_KEY}`,
'Content-Type': 'application/json',
'Idempotency-Key': crypto.randomUUID(),
},
body: JSON.stringify({
"model": "seedance2.5",
"prompt": "@图片1 中的女孩转头看向镜头,动作节奏参考 @视频1,语气参考 @音频1",
"seconds": 8,
"resolution": "480p",
"aspect_ratio": "16:9",
"references": [
{
"type": "image",
"source": "https://cdn.example.com/girl.png"
},
{
"type": "video",
"source": "https://cdn.example.com/motion.mp4"
},
{
"type": "audio",
"source": "asset://a1B2c3D4e5F6"
}
]
}),
})
console.log(response.status, await response.json())import os
import uuid
import requests
response = requests.post(
"https://ling-light.com/v1/videos",
headers={
"Authorization": f"Bearer {os.environ['LINGLIGHT_API_KEY']}",
"Idempotency-Key": str(uuid.uuid4()),
},
json={
"model": "seedance2.5",
"prompt": "@图片1 中的女孩转头看向镜头,动作节奏参考 @视频1,语气参考 @音频1",
"seconds": 8,
"resolution": "480p",
"aspect_ratio": "16:9",
"references": [
{
"type": "image",
"source": "https://cdn.example.com/girl.png",
},
{
"type": "video",
"source": "https://cdn.example.com/motion.mp4",
},
{
"type": "audio",
"source": "asset://a1B2c3D4e5F6",
},
],
},
timeout=60,
)
print(response.status_code, response.json()){
"id": "task_xxxxxxxxxxxxxxxx",
"task_id": "task_xxxxxxxxxxxxxxxx",
"object": "video",
"model": "seedance2.5",
"status": "queued",
"progress": 0,
"created_at": 1795660800,
"seconds": "8",
"metadata": {
"aspect_ratio": "16:9",
"resolution": "480p",
"url": "https://ling-light.com/v1/videos/task_xxxxxxxxxxxxxxxx/content"
}
}curl -X POST https://ling-light.com/v1/videos \
-H "Authorization: Bearer $LINGLIGHT_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"model": "seedance2.5-LL",
"prompt": "参考 @图片1 的角色,在海边奔跑,傍晚逆光",
"seconds": 10,
"resolution": "720p",
"aspect_ratio": "16:9",
"references": [
{
"type": "image",
"source": "https://cdn.example.com/character.png"
}
]
}'const response = await fetch('https://ling-light.com/v1/videos', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LINGLIGHT_API_KEY}`,
'Content-Type': 'application/json',
'Idempotency-Key': crypto.randomUUID(),
},
body: JSON.stringify({
"model": "seedance2.5-LL",
"prompt": "参考 @图片1 的角色,在海边奔跑,傍晚逆光",
"seconds": 10,
"resolution": "720p",
"aspect_ratio": "16:9",
"references": [
{
"type": "image",
"source": "https://cdn.example.com/character.png"
}
]
}),
})
console.log(response.status, await response.json())import os
import uuid
import requests
response = requests.post(
"https://ling-light.com/v1/videos",
headers={
"Authorization": f"Bearer {os.environ['LINGLIGHT_API_KEY']}",
"Idempotency-Key": str(uuid.uuid4()),
},
json={
"model": "seedance2.5-LL",
"prompt": "参考 @图片1 的角色,在海边奔跑,傍晚逆光",
"seconds": 10,
"resolution": "720p",
"aspect_ratio": "16:9",
"references": [
{
"type": "image",
"source": "https://cdn.example.com/character.png",
},
],
},
timeout=60,
)
print(response.status_code, response.json()){
"id": "task_xxxxxxxxxxxxxxxx",
"task_id": "task_xxxxxxxxxxxxxxxx",
"object": "video",
"model": "seedance2.5-LL",
"status": "queued",
"progress": 0,
"created_at": 1795660800,
"seconds": "10",
"metadata": {
"aspect_ratio": "16:9",
"resolution": "720p",
"url": "https://ling-light.com/v1/videos/task_xxxxxxxxxxxxxxxx/content"
}
}curl -X POST https://ling-light.com/v1/videos \
-H "Authorization: Bearer $LINGLIGHT_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"model": "seedance2.5",
"task_mode": "extend",
"prompt": "沿用 @视频1 的场景和镜头风格,从结尾自然续拍",
"seconds": 5,
"resolution": "720p",
"aspect_ratio": "16:9",
"references": [
{
"type": "video",
"role": "reference",
"source": "https://cdn.example.com/source.mp4"
}
]
}'const response = await fetch('https://ling-light.com/v1/videos', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LINGLIGHT_API_KEY}`,
'Content-Type': 'application/json',
'Idempotency-Key': crypto.randomUUID(),
},
body: JSON.stringify({
"model": "seedance2.5",
"task_mode": "extend",
"prompt": "沿用 @视频1 的场景和镜头风格,从结尾自然续拍",
"seconds": 5,
"resolution": "720p",
"aspect_ratio": "16:9",
"references": [
{
"type": "video",
"role": "reference",
"source": "https://cdn.example.com/source.mp4"
}
]
}),
})
console.log(response.status, await response.json())import os
import uuid
import requests
response = requests.post(
"https://ling-light.com/v1/videos",
headers={
"Authorization": f"Bearer {os.environ['LINGLIGHT_API_KEY']}",
"Idempotency-Key": str(uuid.uuid4()),
},
json={
"model": "seedance2.5",
"task_mode": "extend",
"prompt": "沿用 @视频1 的场景和镜头风格,从结尾自然续拍",
"seconds": 5,
"resolution": "720p",
"aspect_ratio": "16:9",
"references": [
{
"type": "video",
"role": "reference",
"source": "https://cdn.example.com/source.mp4",
},
],
},
timeout=60,
)
print(response.status_code, response.json()){
"id": "task_xxxxxxxxxxxxxxxx",
"task_id": "task_xxxxxxxxxxxxxxxx",
"object": "video",
"model": "seedance2.5",
"status": "queued",
"progress": 0,
"created_at": 1795660800,
"seconds": "5",
"metadata": {
"aspect_ratio": "16:9",
"resolution": "720p",
"url": "https://ling-light.com/v1/videos/task_xxxxxxxxxxxxxxxx/content"
}
}