跳转到内容
免费注册
Seedance

Seedance 视频 API:型号、字段与素材要求

用 BetterToken API Key 接入 Seedance,按 Model ID 和操作选择字段、素材与生成方式。

你可以用文字、首帧或参考素材生成视频。中国区四款支持三种生成操作;SR 两款支持文生与单张首帧图生。按所需操作、时长和输出档位选择 Model ID。

先准备 BetterToken API Key。Base URL 为 https://bettertoken.ai/v1,认证使用 Authorization: Bearer YOUR_API_KEY。原样复制 Model ID,大小写必须一致。

下方每份 request.json 都使用同一流程:先报价,再确认创建、轮询与下载。报价不启动生成;创建会提交付费任务。当前费用见模型广场。

型号与操作

下表按操作列出可选值;字段默认值、素材数量和组合限制见对应小节。素材大小按 1 MB = 1048576 字节换算。

Model ID操作时长(秒)输出档位比例音频素材角色
ByteDance-Seedance-2.0-SRimage_to_video5–10,步长 5720p、1080p、4k16:9、4:3、1:1、3:4、9:16、21:9、adaptiveon、offfirst_frame
ByteDance-Seedance-2.0-SRtext_to_video5–10,步长 5720p、1080p、4k16:9、4:3、1:1、3:4、9:16、21:9、adaptiveon、off无
ByteDance-Seedance-2.5-SRimage_to_video5–10,步长 5720p、1080p16:9、4:3、1:1、3:4、9:16、21:9、adaptiveon、offfirst_frame
ByteDance-Seedance-2.5-SRtext_to_video5–10,步长 5720p、1080p16:9、4:3、1:1、3:4、9:16、21:9、adaptiveon、off无
doubao-seedance-2-0-260128image_to_video4–15,步长 1;可用 auto480p、720p、1080p、4k16:9、4:3、1:1、3:4、9:16、21:9、adaptiveon、offfirst_frame、last_frame
doubao-seedance-2-0-260128reference_to_video4–15,步长 1;可用 auto480p、720p、1080p、4k16:9、4:3、1:1、3:4、9:16、21:9、adaptiveon、offreference_image、reference_video、reference_audio
doubao-seedance-2-0-260128text_to_video4–15,步长 1;可用 auto480p、720p、1080p、4k16:9、4:3、1:1、3:4、9:16、21:9、adaptiveon、off无
doubao-seedance-2-0-fast-260128image_to_video4–15,步长 1;可用 auto480p、720p16:9、4:3、1:1、3:4、9:16、21:9、adaptiveon、offfirst_frame、last_frame
doubao-seedance-2-0-fast-260128reference_to_video4–15,步长 1;可用 auto480p、720p16:9、4:3、1:1、3:4、9:16、21:9、adaptiveon、offreference_image、reference_video、reference_audio
doubao-seedance-2-0-fast-260128text_to_video4–15,步长 1;可用 auto480p、720p16:9、4:3、1:1、3:4、9:16、21:9、adaptiveon、off无
doubao-seedance-2-0-mini-260615image_to_video4–15,步长 1;可用 auto480p、720p16:9、4:3、1:1、3:4、9:16、21:9、adaptiveon、offfirst_frame、last_frame
doubao-seedance-2-0-mini-260615reference_to_video4–15,步长 1;可用 auto480p、720p16:9、4:3、1:1、3:4、9:16、21:9、adaptiveon、offreference_image、reference_video、reference_audio
doubao-seedance-2-0-mini-260615text_to_video4–15,步长 1;可用 auto480p、720p16:9、4:3、1:1、3:4、9:16、21:9、adaptiveon、off无
doubao-seedance-2-5-260628image_to_video4–30,步长 1;可用 auto480p、720p、1080padaptiveon、offfirst_frame、last_frame
doubao-seedance-2-5-260628reference_to_video4–30,步长 1;可用 auto480p、720p、1080p16:9、4:3、1:1、3:4、9:16、21:9、adaptiveon、offreference_image、reference_video、reference_audio
doubao-seedance-2-5-260628text_to_video4–30,步长 1;可用 auto480p、720p、1080p16:9、4:3、1:1、3:4、9:16、21:9、adaptiveon、off无

SR 两款的固定时长只能选 5 或 10 秒。中国区型号与 SR 型号是不同的 Model ID,不要把某个型号的字段与素材限制套用到另一个型号。

示例素材

图生与图片参考示例使用白色桌面上的蓝色陶瓷杯。你可以保留样图试用,也可以先替换为自己有权使用且符合本页限制的公网 HTTPS 素材。

视频生成参考图:白色桌面上的蓝色陶瓷杯

文生视频

ByteDance-Seedance-2.0-SR

你只有文字描述时,使用本操作生成视频。

把 model 设为本小节的 Model ID,把 operation 设为 text_to_video。仅使用下表列出的生成字段;素材放在 media 数组中。

字段类型必填可选值或范围默认值
audio.modestring否on、offon
duration.modestring否fixedfixed
duration.secondsinteger否5–10,步长 5 秒;仅固定时长使用5
output.aspect_ratiostring否16:9、4:3、1:1、3:4、9:16、21:9、adaptive16:9
output.formatstring否mp4mp4
output.resolutionstring否720p、1080p、4k720p
promptstring是字符串无
watermarkboolean否falsefalse

素材要求

本操作不接收素材。

组合约束

  • 使用 duration.mode="fixed" 时必须有 duration.seconds。显式填写 fixed 时请同时填写秒数。

请求示例

将下方 JSON 保存为 request.json,然后按通用流程先报价、确认后创建。

{
"model": "ByteDance-Seedance-2.0-SR",
"operation": "text_to_video",
"prompt": "A blue ceramic mug on a white table. Slowly move the camera closer in soft daylight.",
"duration": {
"mode": "fixed",
"seconds": 5
},
"output": {
"resolution": "720p",
"aspect_ratio": "16:9"
}
}

常见 422 错误

422 错误码处理方法
enum / range / step按本节字段表调整取值与步长。
unsupported_field删除本操作字段表中没有的字段。
requires按本节组合约束补齐秒数、比例、音频设置或素材。

ByteDance-Seedance-2.5-SR

你只有文字描述时,使用本操作生成视频。

把 model 设为本小节的 Model ID,把 operation 设为 text_to_video。仅使用下表列出的生成字段;素材放在 media 数组中。

字段类型必填可选值或范围默认值
audio.modestring否on、offon
duration.modestring否fixedfixed
duration.secondsinteger否5–10,步长 5 秒;仅固定时长使用5
output.aspect_ratiostring否16:9、4:3、1:1、3:4、9:16、21:9、adaptive16:9
output.formatstring否mp4mp4
output.resolutionstring否720p、1080p720p
promptstring是字符串无
watermarkboolean否falsefalse

素材要求

本操作不接收素材。

组合约束

  • 使用 duration.mode="fixed" 时必须有 duration.seconds。显式填写 fixed 时请同时填写秒数。

请求示例

将下方 JSON 保存为 request.json,然后按通用流程先报价、确认后创建。

{
"model": "ByteDance-Seedance-2.5-SR",
"operation": "text_to_video",
"prompt": "A blue ceramic mug on a white table. Slowly move the camera closer in soft daylight.",
"duration": {
"mode": "fixed",
"seconds": 5
},
"output": {
"resolution": "720p",
"aspect_ratio": "16:9"
}
}

常见 422 错误

422 错误码处理方法
enum / range / step按本节字段表调整取值与步长。
unsupported_field删除本操作字段表中没有的字段。
requires按本节组合约束补齐秒数、比例、音频设置或素材。

doubao-seedance-2-0-260128

你只有文字描述时,使用本操作生成视频。

把 model 设为本小节的 Model ID,把 operation 设为 text_to_video。仅使用下表列出的生成字段;素材放在 media 数组中。

字段类型必填可选值或范围默认值
audio.modestring否on、offon
duration.modestring否fixed、autofixed
duration.secondsinteger否4–15,步长 1 秒;仅固定时长使用无
output.aspect_ratiostring否16:9、4:3、1:1、3:4、9:16、21:9、adaptiveadaptive
output.formatstring否mp4mp4
output.resolutionstring否480p、720p、1080p、4k720p
promptstring是字符串无
watermarkboolean否false、truefalse

素材要求

本操作不接收素材。

组合约束

  • 使用 duration.mode="fixed" 时必须有 duration.seconds。显式填写 fixed 时请同时填写秒数。
  • 使用 duration.mode="auto" 时不要传 duration.seconds。

请求示例

将下方 JSON 保存为 request.json,然后按通用流程先报价、确认后创建。

{
"model": "doubao-seedance-2-0-260128",
"operation": "text_to_video",
"prompt": "A blue ceramic mug on a white table. Slowly move the camera closer in soft daylight.",
"duration": {
"mode": "fixed",
"seconds": 5
},
"output": {
"resolution": "720p",
"aspect_ratio": "16:9"
}
}

常见 422 错误

422 错误码处理方法
enum / range / step按本节字段表调整取值与步长。
unsupported_field删除本操作字段表中没有的字段。
requires按本节组合约束补齐秒数、比例、音频设置或素材。
excludes删除与自动时长或尾帧冲突的字段。

doubao-seedance-2-0-fast-260128

你只有文字描述时,使用本操作生成视频。

把 model 设为本小节的 Model ID,把 operation 设为 text_to_video。仅使用下表列出的生成字段;素材放在 media 数组中。

字段类型必填可选值或范围默认值
audio.modestring否on、offon
duration.modestring否fixed、autofixed
duration.secondsinteger否4–15,步长 1 秒;仅固定时长使用无
output.aspect_ratiostring否16:9、4:3、1:1、3:4、9:16、21:9、adaptiveadaptive
output.formatstring否mp4mp4
output.resolutionstring否480p、720p720p
promptstring是字符串无
watermarkboolean否false、truefalse

素材要求

本操作不接收素材。

组合约束

  • 使用 duration.mode="fixed" 时必须有 duration.seconds。显式填写 fixed 时请同时填写秒数。
  • 使用 duration.mode="auto" 时不要传 duration.seconds。

请求示例

将下方 JSON 保存为 request.json,然后按通用流程先报价、确认后创建。

{
"model": "doubao-seedance-2-0-fast-260128",
"operation": "text_to_video",
"prompt": "A blue ceramic mug on a white table. Slowly move the camera closer in soft daylight.",
"duration": {
"mode": "fixed",
"seconds": 5
},
"output": {
"resolution": "720p",
"aspect_ratio": "16:9"
}
}

常见 422 错误

422 错误码处理方法
enum / range / step按本节字段表调整取值与步长。
unsupported_field删除本操作字段表中没有的字段。
requires按本节组合约束补齐秒数、比例、音频设置或素材。
excludes删除与自动时长或尾帧冲突的字段。

doubao-seedance-2-0-mini-260615

你只有文字描述时,使用本操作生成视频。

把 model 设为本小节的 Model ID,把 operation 设为 text_to_video。仅使用下表列出的生成字段;素材放在 media 数组中。

字段类型必填可选值或范围默认值
audio.modestring否on、offon
duration.modestring否fixed、autofixed
duration.secondsinteger否4–15,步长 1 秒;仅固定时长使用无
output.aspect_ratiostring否16:9、4:3、1:1、3:4、9:16、21:9、adaptiveadaptive
output.formatstring否mp4mp4
output.resolutionstring否480p、720p720p
promptstring是字符串无
watermarkboolean否false、truefalse

素材要求

本操作不接收素材。

组合约束

  • 使用 duration.mode="fixed" 时必须有 duration.seconds。显式填写 fixed 时请同时填写秒数。
  • 使用 duration.mode="auto" 时不要传 duration.seconds。

请求示例

将下方 JSON 保存为 request.json,然后按通用流程先报价、确认后创建。

{
"model": "doubao-seedance-2-0-mini-260615",
"operation": "text_to_video",
"prompt": "A blue ceramic mug on a white table. Slowly move the camera closer in soft daylight.",
"duration": {
"mode": "fixed",
"seconds": 5
},
"output": {
"resolution": "720p",
"aspect_ratio": "16:9"
}
}

常见 422 错误

422 错误码处理方法
enum / range / step按本节字段表调整取值与步长。
unsupported_field删除本操作字段表中没有的字段。
requires按本节组合约束补齐秒数、比例、音频设置或素材。
excludes删除与自动时长或尾帧冲突的字段。

doubao-seedance-2-5-260628

你只有文字描述时,使用本操作生成视频。

把 model 设为本小节的 Model ID,把 operation 设为 text_to_video。仅使用下表列出的生成字段;素材放在 media 数组中。

字段类型必填可选值或范围默认值
audio.modestring否on、offon
duration.modestring否fixed、autoauto
duration.secondsinteger否4–30,步长 1 秒;仅固定时长使用无
output.aspect_ratiostring否16:9、4:3、1:1、3:4、9:16、21:9、adaptiveadaptive
output.formatstring否mp4mp4
output.resolutionstring否480p、720p、1080p720p
promptstring是字符串无
watermarkboolean否false、truefalse

素材要求

本操作不接收素材。

组合约束

  • 使用 duration.mode="fixed" 时必须有 duration.seconds。显式填写 fixed 时请同时填写秒数。
  • 使用 duration.mode="auto" 时不要传 duration.seconds。

请求示例

将下方 JSON 保存为 request.json,然后按通用流程先报价、确认后创建。

{
"model": "doubao-seedance-2-5-260628",
"operation": "text_to_video",
"prompt": "A blue ceramic mug on a white table. Slowly move the camera closer in soft daylight.",
"duration": {
"mode": "fixed",
"seconds": 5
},
"output": {
"resolution": "720p",
"aspect_ratio": "16:9"
}
}

常见 422 错误

422 错误码处理方法
enum / range / step按本节字段表调整取值与步长。
unsupported_field删除本操作字段表中没有的字段。
requires按本节组合约束补齐秒数、比例、音频设置或素材。
excludes删除与自动时长或尾帧冲突的字段。

图生视频

ByteDance-Seedance-2.0-SR

你希望以图片确定起始画面或首尾画面时,使用本操作。

把 model 设为本小节的 Model ID,把 operation 设为 image_to_video。仅使用下表列出的生成字段;素材放在 media 数组中。

字段类型必填可选值或范围默认值
audio.modestring否on、offon
duration.modestring否fixedfixed
duration.secondsinteger否5–10,步长 5 秒;仅固定时长使用5
output.aspect_ratiostring否16:9、4:3、1:1、3:4、9:16、21:9、adaptive16:9
output.formatstring否mp4mp4
output.resolutionstring否720p、1080p、4k720p
promptstring是字符串无
watermarkboolean否falsefalse

素材要求

素材角色类型与数量格式单文件限制
first_frameimage,1 个(必填)jpeg、png、webp大小不超过 10 MB;宽 128–4096 px;高 128–4096 px

素材是否必需还需满足下方组合约束。

组合约束

  • 使用 duration.mode="fixed" 时必须有 duration.seconds。显式填写 fixed 时请同时填写秒数。
  • 必须提供 first_frame。

请求示例

将下方 JSON 保存为 request.json,然后按通用流程先报价、确认后创建。

{
"model": "ByteDance-Seedance-2.0-SR",
"operation": "image_to_video",
"prompt": "Slowly move the camera closer to the blue ceramic mug. Preserve its shape and the white table.",
"duration": {
"mode": "fixed",
"seconds": 5
},
"output": {
"resolution": "720p",
"aspect_ratio": "adaptive"
},
"media": [
{
"id": "first",
"type": "image",
"role": "first_frame",
"source": "https://docs.bettertoken.ai/images/nano-banana-guide/sample-07.png"
}
]
}

常见 422 错误

422 错误码处理方法
enum / range / step按本节字段表调整取值与步长。
unsupported_field删除本操作字段表中没有的字段。
requires按本节组合约束补齐秒数、比例、音频设置或素材。
count / media_role按本节素材表调整角色与数量。
video_input_unsupported检查公网 HTTPS 地址、Content-Type 与文件格式,再重新报价。

ByteDance-Seedance-2.5-SR

你希望以图片确定起始画面或首尾画面时,使用本操作。

把 model 设为本小节的 Model ID,把 operation 设为 image_to_video。仅使用下表列出的生成字段;素材放在 media 数组中。

字段类型必填可选值或范围默认值
audio.modestring否on、offon
duration.modestring否fixedfixed
duration.secondsinteger否5–10,步长 5 秒;仅固定时长使用5
output.aspect_ratiostring否16:9、4:3、1:1、3:4、9:16、21:9、adaptive16:9
output.formatstring否mp4mp4
output.resolutionstring否720p、1080p720p
promptstring是字符串无
watermarkboolean否falsefalse

素材要求

素材角色类型与数量格式单文件限制
first_frameimage,1 个(必填)jpeg、png、webp大小不超过 10 MB;宽 128–4096 px;高 128–4096 px

素材是否必需还需满足下方组合约束。

组合约束

  • 使用 duration.mode="fixed" 时必须有 duration.seconds。显式填写 fixed 时请同时填写秒数。
  • 必须提供 first_frame。

请求示例

将下方 JSON 保存为 request.json,然后按通用流程先报价、确认后创建。

{
"model": "ByteDance-Seedance-2.5-SR",
"operation": "image_to_video",
"prompt": "Slowly move the camera closer to the blue ceramic mug. Preserve its shape and the white table.",
"duration": {
"mode": "fixed",
"seconds": 5
},
"output": {
"resolution": "720p",
"aspect_ratio": "adaptive"
},
"media": [
{
"id": "first",
"type": "image",
"role": "first_frame",
"source": "https://docs.bettertoken.ai/images/nano-banana-guide/sample-07.png"
}
]
}

常见 422 错误

422 错误码处理方法
enum / range / step按本节字段表调整取值与步长。
unsupported_field删除本操作字段表中没有的字段。
requires按本节组合约束补齐秒数、比例、音频设置或素材。
count / media_role按本节素材表调整角色与数量。
video_input_unsupported检查公网 HTTPS 地址、Content-Type 与文件格式,再重新报价。

doubao-seedance-2-0-260128

你希望以图片确定起始画面或首尾画面时,使用本操作。

把 model 设为本小节的 Model ID,把 operation 设为 image_to_video。仅使用下表列出的生成字段;素材放在 media 数组中。

字段类型必填可选值或范围默认值
audio.modestring否on、offon
duration.modestring否fixed、autofixed
duration.secondsinteger否4–15,步长 1 秒;仅固定时长使用无
output.aspect_ratiostring否16:9、4:3、1:1、3:4、9:16、21:9、adaptiveadaptive
output.formatstring否mp4mp4
output.resolutionstring否480p、720p、1080p、4k720p
promptstring是字符串无
watermarkboolean否false、truefalse

素材要求

素材角色类型与数量格式单文件限制
first_frameimage,1 个(必填)jpeg、png、webp、bmp、tiff、gif、heic、heif大小 1–31457279 字节;宽 300–6000 px;高 300–6000 px
last_frameimage,可选,最多 1 个jpeg、png、webp、bmp、tiff、gif、heic、heif大小 1–31457279 字节;宽 300–6000 px;高 300–6000 px

素材是否必需还需满足下方组合约束。

组合约束

  • 使用 duration.mode="fixed" 时必须有 duration.seconds。显式填写 fixed 时请同时填写秒数。
  • 使用 duration.mode="auto" 时不要传 duration.seconds。
  • 必须提供 first_frame。

请求示例

将下方 JSON 保存为 request.json,然后按通用流程先报价、确认后创建。

{
"model": "doubao-seedance-2-0-260128",
"operation": "image_to_video",
"prompt": "Slowly move the camera closer to the blue ceramic mug. Preserve its shape and the white table.",
"duration": {
"mode": "fixed",
"seconds": 5
},
"output": {
"resolution": "720p",
"aspect_ratio": "adaptive"
},
"media": [
{
"id": "first",
"type": "image",
"role": "first_frame",
"source": "https://docs.bettertoken.ai/images/nano-banana-guide/sample-07.png"
}
]
}

常见 422 错误

422 错误码处理方法
enum / range / step按本节字段表调整取值与步长。
unsupported_field删除本操作字段表中没有的字段。
requires按本节组合约束补齐秒数、比例、音频设置或素材。
excludes删除与自动时长或尾帧冲突的字段。
count / media_role按本节素材表调整角色与数量。
video_input_unsupported检查公网 HTTPS 地址、Content-Type 与文件格式,再重新报价。

doubao-seedance-2-0-fast-260128

你希望以图片确定起始画面或首尾画面时,使用本操作。

把 model 设为本小节的 Model ID,把 operation 设为 image_to_video。仅使用下表列出的生成字段;素材放在 media 数组中。

字段类型必填可选值或范围默认值
audio.modestring否on、offon
duration.modestring否fixed、autofixed
duration.secondsinteger否4–15,步长 1 秒;仅固定时长使用无
output.aspect_ratiostring否16:9、4:3、1:1、3:4、9:16、21:9、adaptiveadaptive
output.formatstring否mp4mp4
output.resolutionstring否480p、720p720p
promptstring是字符串无
watermarkboolean否false、truefalse

素材要求

素材角色类型与数量格式单文件限制
first_frameimage,1 个(必填)jpeg、png、webp、bmp、tiff、gif、heic、heif大小 1–31457279 字节;宽 300–6000 px;高 300–6000 px
last_frameimage,可选,最多 1 个jpeg、png、webp、bmp、tiff、gif、heic、heif大小 1–31457279 字节;宽 300–6000 px;高 300–6000 px

素材是否必需还需满足下方组合约束。

组合约束

  • 使用 duration.mode="fixed" 时必须有 duration.seconds。显式填写 fixed 时请同时填写秒数。
  • 使用 duration.mode="auto" 时不要传 duration.seconds。
  • 必须提供 first_frame。

请求示例

将下方 JSON 保存为 request.json,然后按通用流程先报价、确认后创建。

{
"model": "doubao-seedance-2-0-fast-260128",
"operation": "image_to_video",
"prompt": "Slowly move the camera closer to the blue ceramic mug. Preserve its shape and the white table.",
"duration": {
"mode": "fixed",
"seconds": 5
},
"output": {
"resolution": "720p",
"aspect_ratio": "adaptive"
},
"media": [
{
"id": "first",
"type": "image",
"role": "first_frame",
"source": "https://docs.bettertoken.ai/images/nano-banana-guide/sample-07.png"
}
]
}

常见 422 错误

422 错误码处理方法
enum / range / step按本节字段表调整取值与步长。
unsupported_field删除本操作字段表中没有的字段。
requires按本节组合约束补齐秒数、比例、音频设置或素材。
excludes删除与自动时长或尾帧冲突的字段。
count / media_role按本节素材表调整角色与数量。
video_input_unsupported检查公网 HTTPS 地址、Content-Type 与文件格式,再重新报价。

doubao-seedance-2-0-mini-260615

你希望以图片确定起始画面或首尾画面时,使用本操作。

把 model 设为本小节的 Model ID,把 operation 设为 image_to_video。仅使用下表列出的生成字段;素材放在 media 数组中。

字段类型必填可选值或范围默认值
audio.modestring否on、offon
duration.modestring否fixed、autofixed
duration.secondsinteger否4–15,步长 1 秒;仅固定时长使用无
output.aspect_ratiostring否16:9、4:3、1:1、3:4、9:16、21:9、adaptiveadaptive
output.formatstring否mp4mp4
output.resolutionstring否480p、720p720p
promptstring是字符串无
watermarkboolean否false、truefalse

素材要求

素材角色类型与数量格式单文件限制
first_frameimage,1 个(必填)jpeg、png、webp、bmp、tiff、gif、heic、heif大小 1–31457279 字节;宽 300–6000 px;高 300–6000 px
last_frameimage,可选,最多 1 个jpeg、png、webp、bmp、tiff、gif、heic、heif大小 1–31457279 字节;宽 300–6000 px;高 300–6000 px

素材是否必需还需满足下方组合约束。

组合约束

  • 使用 duration.mode="fixed" 时必须有 duration.seconds。显式填写 fixed 时请同时填写秒数。
  • 使用 duration.mode="auto" 时不要传 duration.seconds。
  • 必须提供 first_frame。

请求示例

将下方 JSON 保存为 request.json,然后按通用流程先报价、确认后创建。

{
"model": "doubao-seedance-2-0-mini-260615",
"operation": "image_to_video",
"prompt": "Slowly move the camera closer to the blue ceramic mug. Preserve its shape and the white table.",
"duration": {
"mode": "fixed",
"seconds": 5
},
"output": {
"resolution": "720p",
"aspect_ratio": "adaptive"
},
"media": [
{
"id": "first",
"type": "image",
"role": "first_frame",
"source": "https://docs.bettertoken.ai/images/nano-banana-guide/sample-07.png"
}
]
}

常见 422 错误

422 错误码处理方法
enum / range / step按本节字段表调整取值与步长。
unsupported_field删除本操作字段表中没有的字段。
requires按本节组合约束补齐秒数、比例、音频设置或素材。
excludes删除与自动时长或尾帧冲突的字段。
count / media_role按本节素材表调整角色与数量。
video_input_unsupported检查公网 HTTPS 地址、Content-Type 与文件格式,再重新报价。

doubao-seedance-2-5-260628

你希望以图片确定起始画面或首尾画面时,使用本操作。

把 model 设为本小节的 Model ID,把 operation 设为 image_to_video。仅使用下表列出的生成字段;素材放在 media 数组中。

字段类型必填可选值或范围默认值
audio.modestring否on、offon
duration.modestring否fixed、autoauto
duration.secondsinteger否4–30,步长 1 秒;仅固定时长使用无
output.aspect_ratiostring否adaptiveadaptive
output.formatstring否mp4mp4
output.resolutionstring否480p、720p、1080p720p
promptstring是字符串无
watermarkboolean否false、truefalse

素材要求

素材角色类型与数量格式单文件限制
first_frameimage,1 个(必填)jpeg、png、webp、bmp、tiff、gif、heic、heif大小 1–31457279 字节;宽 300–6000 px;高 300–6000 px
last_frameimage,可选,最多 1 个jpeg、png、webp、bmp、tiff、gif、heic、heif大小 1–31457279 字节;宽 300–6000 px;高 300–6000 px

素材是否必需还需满足下方组合约束。

组合约束

  • 使用 duration.mode="fixed" 时必须有 duration.seconds。显式填写 fixed 时请同时填写秒数。
  • 使用 duration.mode="auto" 时不要传 duration.seconds。
  • 必须提供 first_frame。
  • 本操作必须使用 output.aspect_ratio="adaptive",包括只传首帧或同时传首尾帧。

请求示例

将下方 JSON 保存为 request.json,然后按通用流程先报价、确认后创建。

{
"model": "doubao-seedance-2-5-260628",
"operation": "image_to_video",
"prompt": "Slowly move the camera closer to the blue ceramic mug. Preserve its shape and the white table.",
"duration": {
"mode": "fixed",
"seconds": 5
},
"output": {
"resolution": "720p",
"aspect_ratio": "adaptive"
},
"media": [
{
"id": "first",
"type": "image",
"role": "first_frame",
"source": "https://docs.bettertoken.ai/images/nano-banana-guide/sample-07.png"
}
]
}

常见 422 错误

422 错误码处理方法
enum / range / step按本节字段表调整取值与步长。
unsupported_field删除本操作字段表中没有的字段。
requires按本节组合约束补齐秒数、比例、音频设置或素材。
excludes删除与自动时长或尾帧冲突的字段。
count / media_role按本节素材表调整角色与数量。
video_input_unsupported检查公网 HTTPS 地址、Content-Type 与文件格式,再重新报价。

参考生成

doubao-seedance-2-0-260128

你希望用参考素材保持主体或动作特征时,使用本操作。

把 model 设为本小节的 Model ID,把 operation 设为 reference_to_video。仅使用下表列出的生成字段;素材放在 media 数组中。

字段类型必填可选值或范围默认值
audio.modestring否on、offon
duration.modestring否fixed、autofixed
duration.secondsinteger否4–15,步长 1 秒;仅固定时长使用无
output.aspect_ratiostring否16:9、4:3、1:1、3:4、9:16、21:9、adaptiveadaptive
output.formatstring否mp4mp4
output.resolutionstring否480p、720p、1080p、4k720p
promptstring是字符串无
watermarkboolean否false、truefalse

素材要求

素材角色类型与数量格式单文件限制
reference_imageimage,可选,最多 9 个jpeg、png、webp、bmp、tiff、gif、heic、heif大小 1–31457279 字节;宽 300–6000 px;高 300–6000 px
reference_videovideo,可选,最多 3 个mp4、mov大小不超过 200 MB;宽 300–6000 px;高 300–6000 px;时长 2–15 秒;帧率不低于 24 fps,且不超过 60 fps;本角色合计不超过 15 秒
reference_audioaudio,可选,最多 3 个wav、mp3大小不超过 15 MB;时长 2–15 秒;本角色合计不超过 15 秒

素材是否必需还需满足下方组合约束。

组合约束

  • 使用 duration.mode="fixed" 时必须有 duration.seconds。显式填写 fixed 时请同时填写秒数。
  • 使用 duration.mode="auto" 时不要传 duration.seconds。
  • 至少提供以下角色之一:reference_image、reference_video、reference_audio。
  • 参考音频不能单独使用,必须同时提供参考图片或参考视频。

请求示例

将下方 JSON 保存为 request.json,然后按通用流程先报价、确认后创建。

{
"model": "doubao-seedance-2-0-260128",
"operation": "reference_to_video",
"prompt": "Create a product video of the blue ceramic mug in the reference image. Keep its shape and color.",
"duration": {
"mode": "fixed",
"seconds": 5
},
"output": {
"resolution": "720p",
"aspect_ratio": "adaptive"
},
"media": [
{
"id": "reference",
"type": "image",
"role": "reference_image",
"source": "https://docs.bettertoken.ai/images/nano-banana-guide/sample-07.png"
}
]
}

常见 422 错误

422 错误码处理方法
enum / range / step按本节字段表调整取值与步长。
unsupported_field删除本操作字段表中没有的字段。
requires按本节组合约束补齐秒数、比例、音频设置或素材。
excludes删除与自动时长或尾帧冲突的字段。
count / media_role按本节素材表调整角色与数量。
video_input_unsupported检查公网 HTTPS 地址、Content-Type 与文件格式,再重新报价。

doubao-seedance-2-0-fast-260128

你希望用参考素材保持主体或动作特征时,使用本操作。

把 model 设为本小节的 Model ID,把 operation 设为 reference_to_video。仅使用下表列出的生成字段;素材放在 media 数组中。

字段类型必填可选值或范围默认值
audio.modestring否on、offon
duration.modestring否fixed、autofixed
duration.secondsinteger否4–15,步长 1 秒;仅固定时长使用无
output.aspect_ratiostring否16:9、4:3、1:1、3:4、9:16、21:9、adaptiveadaptive
output.formatstring否mp4mp4
output.resolutionstring否480p、720p720p
promptstring是字符串无
watermarkboolean否false、truefalse

素材要求

素材角色类型与数量格式单文件限制
reference_imageimage,可选,最多 9 个jpeg、png、webp、bmp、tiff、gif、heic、heif大小 1–31457279 字节;宽 300–6000 px;高 300–6000 px
reference_videovideo,可选,最多 3 个mp4、mov大小不超过 200 MB;宽 300–6000 px;高 300–6000 px;时长 2–15 秒;帧率不低于 24 fps,且不超过 60 fps;本角色合计不超过 15 秒
reference_audioaudio,可选,最多 3 个wav、mp3大小不超过 15 MB;时长 2–15 秒;本角色合计不超过 15 秒

素材是否必需还需满足下方组合约束。

组合约束

  • 使用 duration.mode="fixed" 时必须有 duration.seconds。显式填写 fixed 时请同时填写秒数。
  • 使用 duration.mode="auto" 时不要传 duration.seconds。
  • 至少提供以下角色之一:reference_image、reference_video、reference_audio。
  • 参考音频不能单独使用,必须同时提供参考图片或参考视频。

请求示例

将下方 JSON 保存为 request.json,然后按通用流程先报价、确认后创建。

{
"model": "doubao-seedance-2-0-fast-260128",
"operation": "reference_to_video",
"prompt": "Create a product video of the blue ceramic mug in the reference image. Keep its shape and color.",
"duration": {
"mode": "fixed",
"seconds": 5
},
"output": {
"resolution": "720p",
"aspect_ratio": "adaptive"
},
"media": [
{
"id": "reference",
"type": "image",
"role": "reference_image",
"source": "https://docs.bettertoken.ai/images/nano-banana-guide/sample-07.png"
}
]
}

常见 422 错误

422 错误码处理方法
enum / range / step按本节字段表调整取值与步长。
unsupported_field删除本操作字段表中没有的字段。
requires按本节组合约束补齐秒数、比例、音频设置或素材。
excludes删除与自动时长或尾帧冲突的字段。
count / media_role按本节素材表调整角色与数量。
video_input_unsupported检查公网 HTTPS 地址、Content-Type 与文件格式,再重新报价。

doubao-seedance-2-0-mini-260615

你希望用参考素材保持主体或动作特征时,使用本操作。

把 model 设为本小节的 Model ID,把 operation 设为 reference_to_video。仅使用下表列出的生成字段;素材放在 media 数组中。

字段类型必填可选值或范围默认值
audio.modestring否on、offon
duration.modestring否fixed、autofixed
duration.secondsinteger否4–15,步长 1 秒;仅固定时长使用无
output.aspect_ratiostring否16:9、4:3、1:1、3:4、9:16、21:9、adaptiveadaptive
output.formatstring否mp4mp4
output.resolutionstring否480p、720p720p
promptstring是字符串无
watermarkboolean否false、truefalse

素材要求

素材角色类型与数量格式单文件限制
reference_imageimage,可选,最多 9 个jpeg、png、webp、bmp、tiff、gif、heic、heif大小 1–31457279 字节;宽 300–6000 px;高 300–6000 px
reference_videovideo,可选,最多 3 个mp4、mov大小不超过 200 MB;宽 300–6000 px;高 300–6000 px;时长 2–15 秒;帧率不低于 24 fps,且不超过 60 fps;本角色合计不超过 15 秒
reference_audioaudio,可选,最多 3 个wav、mp3大小不超过 15 MB;时长 2–15 秒;本角色合计不超过 15 秒

素材是否必需还需满足下方组合约束。

组合约束

  • 使用 duration.mode="fixed" 时必须有 duration.seconds。显式填写 fixed 时请同时填写秒数。
  • 使用 duration.mode="auto" 时不要传 duration.seconds。
  • 至少提供以下角色之一:reference_image、reference_video、reference_audio。
  • 参考音频不能单独使用,必须同时提供参考图片或参考视频。

请求示例

将下方 JSON 保存为 request.json,然后按通用流程先报价、确认后创建。

{
"model": "doubao-seedance-2-0-mini-260615",
"operation": "reference_to_video",
"prompt": "Create a product video of the blue ceramic mug in the reference image. Keep its shape and color.",
"duration": {
"mode": "fixed",
"seconds": 5
},
"output": {
"resolution": "720p",
"aspect_ratio": "adaptive"
},
"media": [
{
"id": "reference",
"type": "image",
"role": "reference_image",
"source": "https://docs.bettertoken.ai/images/nano-banana-guide/sample-07.png"
}
]
}

常见 422 错误

422 错误码处理方法
enum / range / step按本节字段表调整取值与步长。
unsupported_field删除本操作字段表中没有的字段。
requires按本节组合约束补齐秒数、比例、音频设置或素材。
excludes删除与自动时长或尾帧冲突的字段。
count / media_role按本节素材表调整角色与数量。
video_input_unsupported检查公网 HTTPS 地址、Content-Type 与文件格式,再重新报价。

doubao-seedance-2-5-260628

你希望用参考素材保持主体或动作特征时,使用本操作。

把 model 设为本小节的 Model ID,把 operation 设为 reference_to_video。仅使用下表列出的生成字段;素材放在 media 数组中。

字段类型必填可选值或范围默认值
audio.modestring否on、offon
duration.modestring否fixed、autoauto
duration.secondsinteger否4–30,步长 1 秒;仅固定时长使用无
output.aspect_ratiostring否16:9、4:3、1:1、3:4、9:16、21:9、adaptiveadaptive
output.formatstring否mp4mp4
output.resolutionstring否480p、720p、1080p720p
promptstring是字符串无
watermarkboolean否false、truefalse

素材要求

素材角色类型与数量格式单文件限制
reference_imageimage,可选,最多 30 个jpeg、png、webp、bmp、tiff、gif、heic、heif大小 1–31457279 字节;宽 300–6000 px;高 300–6000 px
reference_videovideo,可选,最多 10 个mp4、mov大小不超过 200 MB;宽 300–6000 px;高 300–6000 px;时长 2–30 秒;帧率不低于 24 fps,且不超过 60 fps;本角色合计不超过 30 秒
reference_audioaudio,可选,最多 10 个wav、mp3大小不超过 15 MB;时长 2–30 秒;本角色合计不超过 30 秒

素材是否必需还需满足下方组合约束。

组合约束

  • 使用 duration.mode="fixed" 时必须有 duration.seconds。显式填写 fixed 时请同时填写秒数。
  • 使用 duration.mode="auto" 时不要传 duration.seconds。
  • 至少提供以下角色之一:reference_image、reference_video、reference_audio。

请求示例

将下方 JSON 保存为 request.json,然后按通用流程先报价、确认后创建。

{
"model": "doubao-seedance-2-5-260628",
"operation": "reference_to_video",
"prompt": "Create a product video of the blue ceramic mug in the reference image. Keep its shape and color.",
"duration": {
"mode": "fixed",
"seconds": 5
},
"output": {
"resolution": "720p",
"aspect_ratio": "adaptive"
},
"media": [
{
"id": "reference",
"type": "image",
"role": "reference_image",
"source": "https://docs.bettertoken.ai/images/nano-banana-guide/sample-07.png"
}
]
}

常见 422 错误

422 错误码处理方法
enum / range / step按本节字段表调整取值与步长。
unsupported_field删除本操作字段表中没有的字段。
requires按本节组合约束补齐秒数、比例、音频设置或素材。
excludes删除与自动时长或尾帧冲突的字段。
count / media_role按本节素材表调整角色与数量。
video_input_unsupported检查公网 HTTPS 地址、Content-Type 与文件格式,再重新报价。

官方资料

调用 BetterToken 时,使用本页字段与实时模型目录中的对应操作。