创建视频生成任务(doubao-2.5)
接口: POST https://4zapi.com/api/v3/contents/generations/tasks
实际请求:POST /api/v3/contents/generations/tasks https://www.volcengine.com/docs/82379/1520757?lang=zh 模型固定 doubao-seedance-2-5-260628。分辨率支持 480p、720p、1080p,不支持 4k,不传时默认 720p。 duration 取值 4–30,或 -1(由模型选择)。带参考视频的参考生视频请传 omni_reference_task_type=reference;若被判定为视频编辑,ratio 只能为 adaptive,duration 只能为 -1。
请求体 (application/json)
content(array<object>, 必填)model(string, 必填): 固定 doubao-seedance-2-5-260628duration(integer): 4–30,或 -1。视频编辑任务必须为 -1generate_audio(boolean)omni_reference_task_type(string): auto、reference、edit、extend。带参考视频且指定宽高比、时长时建议 referenceoutput_format(string): mp4 或 mov,仅 Seedance 2.5。默认 mp4ratio(string): 16:9、4:3、1:1、3:4、9:16、21:9、adaptive。编辑、延长、首帧、首尾帧只支持 adaptiveresolution(string): 480p、720p、1080p。默认 720p,不支持 4kwatermark(boolean)
请求示例
{
"content": [
{
"text": "全程使用视频1的第一视角构图,全程使用音频1作为背景音乐。第一人称视角果茶宣传广告,seedance牌「苹苹安安」苹果果茶限定款;首帧为图片1,你的手摘下一颗带晨露的阿克苏红苹果,轻脆的苹果碰撞声;2-4 秒:快速切镜,你的手将苹果块投入雪克杯,加入冰块与茶底,用力摇晃,冰块碰撞声与摇晃声卡点轻快鼓点,背景音:「鲜切现摇」;4-6 秒:第一人称成品特写,分层果茶倒入透明杯,你的手轻挤奶盖在顶部铺展,在杯身贴上粉红包标,镜头拉近看奶盖与果茶的分层纹理;6-8 秒:第一人称手持举杯,你将图片2中的果茶举到镜头前(模拟递到观众面前的视角),杯身标签清晰可见,背景音「来一口鲜爽」,尾帧定格为图片2。背景声音统一为女生音色。",
"type": "text"
},
{
"image_url": {
"url": "https://ark-project.tos-cn-beijing.volces.com/doc_image/r2v_tea_pic1.jpg"
},
"role": "reference_image",
"type": "image_url"
},
{
"image_url": {
"url": "https://ark-project.tos-cn-beijing.volces.com/doc_image/r2v_tea_pic2.jpg"
},
"role": "reference_image",
"type": "image_url"
},
{
"role": "reference_video",
"type": "video_url",
"video_url": {
"url": "https://pro.filesystem.site/cdn/20260403/0e80a635b859e7716671a40d836135.mp4"
}
},
{
"audio_url": {
"url": "https://ark-project.tos-cn-beijing.volces.com/doc_audio/r2v_tea_audio1.mp3"
},
"role": "reference_audio",
"type": "audio_url"
}
],
"duration": 11,
"generate_audio": true,
"model": "doubao-seedance-2-5-260628",
"omni_reference_task_type": "reference",
"output_format": "mp4",
"ratio": "21:9",
"resolution": "720p",
"watermark": false
}