seedance-2.0-sz / seedance-2.5-sz
seedance-2.0-sz、seedance-2.0-sz-fast、seedance-2.0-sz-mini 和 seedance-2.5-sz 统一使用 /v1/videos 创建异步视频任务。请求参数沿用 火山引擎 Seedance 官方多模态接口的字段语义;MoonNexAI 的 references[] 是新接入推荐的 统一素材写法,服务端会转换为模型所需的多模态内容结构。
火山引擎官方参数兼容
四个 SZ 公共模型都支持在 POST /v1/videos 中提交火山引擎官方形状的参数。也就是说, 客户可以继续使用 content[]、ratio、resolution、duration、 generate_audio 等字段,只需要把模型名改为 MoonNexAI 当前开放的 SZ 模型名。 references[] 是 MoonNexAI 推荐的统一写法,适合新接入和跨 SDK 调用。
| 入口 | 可用模型名 | 说明 |
|---|---|---|
POST /v1/videos | seedance-2.0-sz、seedance-2.0-sz-fast、seedance-2.0-sz-mini、seedance-2.5-sz | MoonNexAI 统一入口;兼容火山引擎官方字段语义,并按所选 SZ 模型能力校验。 |
POST /api/v3/contents/generations/tasks | 使用 MoonNexAI 公共模型 ID:seedance-2.0-sz、seedance-2.0-sz-fast、seedance-2.0-sz-mini、seedance-2.5-sz | 火山引擎官方路径与参数形状兼容;只替换请求路径,model 仍按本页公共模型列表填写。 |
字段归一化规则如下:
| MoonNexAI 通用字段 | 火山引擎官方形状字段 | 处理方式 |
|---|---|---|
prompt | content[] 的 text 条目 | 只传 prompt 时由服务端补成文本条目;纯文生视频必须有文本。 |
references[] | content[] 的媒体条目 | 按 media_type 和 role 转换为 image_url、video_url 或 audio_url。 |
size | resolution | 两者同时传入时必须一致。 |
aspect_ratio | ratio | 两者同时传入时必须一致。 |
first_frame / last_frame | 媒体条目的 role | 使用 first_frame、last_frame,不能与普通混合参考素材混用。 |
以下冲突会在创建任务前直接返回 400,不会静默丢弃字段:
content与references同时出现。prompt与content[].text同时出现但内容不一致。size与resolution,或aspect_ratio与ratio同时出现但值不一致。duration与frames同时出现;SZ 模型使用duration,不支持frames。
显式 false、0、0.0 和 duration: -1 会被保留。service_tier 在 SZ 模型中使用 default;flex 不支持。priority、execution_expires_after、 safety_identifier 等字段仍会按火山引擎官方格式校验,是否实际生效以模型能力和账号配置为准。
型号选择
| 模型 | 定位 | 分辨率 | 时长 |
|---|---|---|---|
seedance-2.0-sz | 标准多模态视频生成 | 480P、720P、1080P、4K | 4 - 15 秒,或智能时长 -1 |
seedance-2.0-sz-fast | 快速多模态视频生成 | 480P、720P | 4 - 15 秒,或智能时长 -1 |
seedance-2.0-sz-mini | 轻量多模态视频生成 | 480P、720P | 4 - 15 秒,或智能时长 -1 |
seedance-2.5-sz | 新一代多模态视频生成 | 480P、720P、1080P | 4 - 30 秒,或智能时长 -1 |
实际可用的模型、分辨率、时长和比例以 GET /v1/models 返回的能力以及控制台为准。
能力边界
| 能力 | seedance-2.0-sz 系列 | seedance-2.5-sz |
|---|---|---|
| 文生视频 | 支持 | 支持 |
| 图片参考 | 最多 9 张 | 最多 30 张 |
| 视频参考 | 最多 3 个 | 最多 10 个 |
| 音频参考 | 最多 3 个;需同时提供图片或视频 | 最多 10 个;需同时提供图片或视频 |
| 混合素材 | 最多 15 个参考素材 | 最多 50 个参考素材 |
| 首帧 / 尾帧 | 支持 | 支持 |
| 视频编辑 / 延长 | 支持 | 以模型能力为准 |
| 真人参考 | 支持;仍需通过内容安全审核 | 支持;仍需通过内容安全审核 |
音频不能单独作为输入。可以提交文本、图片、视频、音频的任意合法组合,但至少要有一张图片或一个视频才能提交音频参考。素材 URL 必须是无需登录、无需 Cookie 或额外鉴权 Header 即可下载的稳定公网媒体直链。
请求参数
参数分为两栏。两栏表达的是同一组视频能力:通用栏适合 MoonNexAI SDK 和跨模型接入,官方栏适合直接复用火山引擎 content[] 请求。两栏不要在同一请求中混用。
| MoonNexAI 统一通用参数 | 火山官方兼容参数 |
|---|---|
model | model(仍填写 MoonNexAI 公共模型 ID) |
prompt | content[] 中的 text 条目 |
references[]:media_type、role、url、alias | content[]:image_url、video_url、audio_url 条目,并填写 role、唯一 alias |
aspect_ratio | ratio |
size | resolution |
duration、generate_audio、watermark、seed、callback_url | 同名官方字段;camera_fixed、return_last_frame、omni_reference_task_type、output_format 等按官方能力使用 |
MoonNexAI 统一通用视频参数
| 字段 | 类型 | 说明 |
|---|---|---|
model | string | 必填。四个 SZ 公开模型之一。 |
prompt | string | 视频描述,可用 @alias 引用 references[] 素材。 |
references[] | array | 统一素材数组;条目使用 media_type、role、url 和可选 alias。 |
aspect_ratio | string | 画面比例,例如 16:9、9:16、1:1 或 adaptive。 |
size | string | 通用分辨率字段,服务端映射为模型需要的 resolution。 |
duration | integer | 2.0 支持 4 - 15 秒,2.5 支持 4 - 30 秒;-1 为智能时长。 |
generate_audio | boolean | 是否生成音轨。 |
watermark、seed、callback_url | boolean/integer/string | 通用控制字段,是否可用以模型能力为准。 |
火山官方兼容参数
| 字段 | 类型 | 说明 |
|---|---|---|
model | string | 必填。填写本页列出的 MoonNexAI 公共模型 ID。 |
content[] | array | 官方多模态数组,条目类型为 text、image_url、video_url 或 audio_url。 |
ratio | string | 官方比例字段,例如 16:9、9:16、1:1、21:9 或 adaptive。 |
resolution | string | 官方分辨率字段,例如 480p、720p、1080p 或 4k。 |
duration | integer | 目标时长;SZ 不支持 frames。 |
generate_audio、watermark、seed、callback_url | boolean/integer/string | 与火山官方语义一致,显式 false、0 会被保留。 |
camera_fixed、return_last_frame、omni_reference_task_type、output_format | mixed | 仅在所选 SZ 型号能力允许时使用。 |
generateAudio 是历史兼容别名,语义与 generate_audio 相同,新的客户端应使用下划线字段。显式传入的 false 不会被当作缺省值丢弃。
创建示例
1. 纯文生视频
curl https://moonnexai.com/v1/videos \
-H "Authorization: Bearer <MOONNEXAI_API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"model": "seedance-2.0-sz-fast",
"prompt": "一只橘猫在窗边伸懒腰,镜头缓慢推近,午后自然光,写实风格。",
"duration": 4,
"ratio": "16:9",
"resolution": "480p",
"generate_audio": true,
"watermark": false
}'2. 单图片图生视频(关闭声音)
curl https://moonnexai.com/v1/videos \
-H "Authorization: Bearer <MOONNEXAI_API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"model": "seedance-2.0-sz-mini",
"prompt": "让人物自然转身并向镜头微笑,保持服装和脸部特征稳定。",
"duration": 4,
"aspect_ratio": "9:16",
"resolution": "480p",
"generate_audio": false,
"references": [
{
"media_type": "image",
"role": "reference_image",
"url": "https://example.com/person.png",
"alias": "人物"
}
]
}'3. 图片 + 视频 + 音频组合(生成有声视频)
{
"model": "seedance-2.0-sz",
"prompt": "使用@人物的外观,参考@动作的运镜,并将@音乐作为背景音乐。",
"duration": 8,
"ratio": "16:9",
"resolution": "720p",
"generate_audio": true,
"references": [
{ "media_type": "image", "role": "reference_image", "url": "https://example.com/person.png", "alias": "人物" },
{ "media_type": "video", "role": "reference_video", "url": "https://example.com/motion.mp4", "alias": "动作" },
{ "media_type": "audio", "role": "reference_audio", "url": "https://example.com/music.mp3", "alias": "音乐" }
]
}4. 一图 + 一音频 + 一视频(官方 content[] 形状与 Asset://)
先通过 /v1/assets/uploads 的 mode=asset 为目标模型准备三类素材,并确认每个素材 都返回 generation_ready=true 且 preparation_status=ready。创建任务时仍要把三个 引用显式写入请求体:
{
"model": "seedance-2.5-sz",
"content": [
{
"type": "image_url",
"role": "reference_image",
"image_url": { "url": "Asset://asset_image_demo" }
},
{
"type": "audio_url",
"role": "reference_audio",
"audio_url": { "url": "Asset://asset_audio_demo" }
},
{
"type": "video_url",
"role": "reference_video",
"video_url": { "url": "Asset://asset_video_demo" }
}
],
"duration": 5,
"ratio": "16:9",
"resolution": "720P",
"generate_audio": true,
"watermark": false
}音频参考必须和图片或视频参考同时提交,不能单独创建音频输入任务。三类素材也可以 改用 references[] 表达;同一请求不要同时提交 content 和 references。
5. 多图 + 多视频 + 多音频(MoonNexAI 统一通用参数)
同一场景使用统一 references[] 表达,适合 MoonNexAI SDK 和跨模型调用:
{
"model": "seedance-2.5-sz",
"prompt": "保持 @Image1、@Image2 的主体特征,参考 @Video1、@Video2 的动作,并融合 @Audio1、@Audio2 的声音氛围。",
"references": [
{ "media_type": "image", "role": "reference_image", "url": "https://example.com/image-1.png", "alias": "Image1" },
{ "media_type": "image", "role": "reference_image", "url": "https://example.com/image-2.png", "alias": "Image2" },
{ "media_type": "video", "role": "reference_video", "url": "https://example.com/video-1.mp4", "alias": "Video1" },
{ "media_type": "video", "role": "reference_video", "url": "https://example.com/video-2.mp4", "alias": "Video2" },
{ "media_type": "audio", "role": "reference_audio", "url": "https://example.com/audio-1.mp3", "alias": "Audio1" },
{ "media_type": "audio", "role": "reference_audio", "url": "https://example.com/audio-2.mp3", "alias": "Audio2" }
],
"duration": 8,
"aspect_ratio": "16:9",
"size": "720p",
"generate_audio": true
}5a. 多图 + 多视频 + 多音频(火山官方兼容参数)
火山官方 Seedance 形状支持在同一个请求中组合多张图片、多个视频和多段音频。下面示例使用 2 + 2 + 2 的组合;请根据所选 SZ 型号的能力上限增减条目。
{
"model": "seedance-2.5-sz",
"content": [
{ "type": "text", "text": "保持 @Image1、@Image2 的主体特征,参考 @Video1、@Video2 的动作,并融合 @Audio1、@Audio2 的声音氛围。" },
{ "type": "image_url", "role": "reference_image", "image_url": { "url": "https://example.com/image-1.png" }, "alias": "Image1" },
{ "type": "image_url", "role": "reference_image", "image_url": { "url": "https://example.com/image-2.png" }, "alias": "Image2" },
{ "type": "video_url", "role": "reference_video", "video_url": { "url": "https://example.com/video-1.mp4" }, "alias": "Video1" },
{ "type": "video_url", "role": "reference_video", "video_url": { "url": "https://example.com/video-2.mp4" }, "alias": "Video2" },
{ "type": "audio_url", "role": "reference_audio", "audio_url": { "url": "https://example.com/audio-1.mp3" }, "alias": "Audio1" },
{ "type": "audio_url", "role": "reference_audio", "audio_url": { "url": "https://example.com/audio-2.mp3" }, "alias": "Audio2" }
],
"duration": 8,
"ratio": "16:9",
"resolution": "720P",
"generate_audio": true,
"output_format": "mp4"
}2.0 和 2.5 使用同一官方 content[] 结构;只需按模型能力调整 duration、resolution 和素材数量。
6. 首帧 + 尾帧
{
"model": "seedance-2.0-sz",
"prompt": "从室内平滑过渡到户外,保持主体和色彩连续。",
"duration": 6,
"ratio": "16:9",
"resolution": "1080p",
"generate_audio": false,
"content": [
{ "type": "image_url", "role": "first_frame", "image_url": { "url": "https://example.com/first.jpg" } },
{ "type": "image_url", "role": "last_frame", "image_url": { "url": "https://example.com/last.jpg" } }
]
}7. 文本放在 content[] 并使用智能时长
{
"model": "seedance-2.5-sz",
"content": [
{ "type": "text", "text": "一段电影感的城市夜景航拍。" }
],
"duration": -1,
"ratio": "adaptive",
"resolution": "1080p",
"seed": 42,
"camera_fixed": false,
"generate_audio": true,
"watermark": false,
"callback_url": "https://example.com/webhooks/moonnexai"
}8. Seedance 2.5 视频编辑并输出 MOV
{
"model": "seedance-2.5-sz",
"prompt": "保留主体动作,调整为清晨自然光,并延续原视频的镜头节奏。",
"duration": -1,
"ratio": "adaptive",
"resolution": "1080p",
"omni_reference_task_type": "edit",
"output_format": "mov",
"generate_audio": true,
"references": [
{
"media_type": "video",
"role": "reference_video",
"url": "https://example.com/source.mp4",
"alias": "原视频"
}
]
}SZ 四个公开模型均使用 duration,不要发送 frames 或把不需要的字段设为 null。2.5 的 edit / extend 请求必须满足上表约束;任务虽然可以创建,模型仍可能因素材或提示词与指定任务类型不一致而异步失败。
参考素材角色
role | 用途 |
|---|---|
reference_image | 普通图片参考 |
first_frame | 首帧图片 |
last_frame | 尾帧图片 |
reference_video | 动作、画面或运镜参考视频 |
reference_audio | 音频参考;必须和图片或视频一起提交 |
提示词中的 @alias 只用于描述素材语义,服务端仍以 references[] 或 content[] 的结构化角色校验为准。需要严格首尾帧时,应显式使用 first_frame / last_frame。
素材可以使用客户自有的匿名公网直链,也可以使用已就绪的 MoonNexAI Asset://asset_xxx 引用。公网地址不需要先调用 /v1/assets/uploads;只有需要托管、复用或由 MoonNexAI 管理素材生命周期时才使用资产接口。无论采用哪种方式,素材仍需通过格式、时长、大小和内容安全检查。
查询任务与下载结果
提交后保存返回的 id 或 task_id,先查询状态,只有 status 为 succeeded 且没有 error 时才读取结果地址:
curl https://moonnexai.com/v1/videos/<TASK_ID> \
-H "Authorization: Bearer <MOONNEXAI_API_KEY>"成功响应可能在 result_url、video_url、url、output.url、output[].url 或 content.video_url 中返回结果地址。请直接使用接口实际返回的完整 URL;它可能是经过批准的直达媒体地址,也可能是 MoonNexAI 管理的媒体地址。不要自行拼接、替换域名或删除签名参数。
只有成功响应没有提供可用结果 URL 时,才使用兼容内容接口兜底下载:
curl -L https://moonnexai.com/v1/videos/<TASK_ID>/content \
-H "Authorization: Bearer <MOONNEXAI_API_KEY>" \
-o result.mp4pending、submitted、running、failed 和 cancelled 状态都不要读取 URL;失败时请查看响应中的 error。结果 URL 可能带有临时签名和有效期,生成成功后应及时下载或转存到自己的存储。
计费方式
本系列按 Seedance 官方 Token 用量维度计费:视频费用由模型对应的 Token 单价和任务 Token 用量决定。包含视频参考素材的任务按官方“包含视频输入”计费维度处理;不包含视频参考素材的任务按官方“不含视频输入”计费维度处理。当前价格以模型列表、控制台和实际计费记录为准,本文不固定金额。