content 素材结构和查询结果与火山方舟「创建视频生成任务」接口保持一致,已有火山接入代码只需替换域名和 API Key。id。id 查询生成状态。succeeded 后从 content.video_url 读取视频地址。/doubao 前缀调用,例如 POST https://vip.brioi.com/doubao/api/v3/contents/generations/tasks,行为相同。GET /v1/models 返回结果为准。model 填火山方舟的完整模型 ID:| 模型 | 输出分辨率 | 输出时长 | 参考素材上限 | 样片模式 |
|---|---|---|---|---|
doubao-seedance-2-0-260128 | 480p、720p、1080p、4k | 4–15 秒,或 -1 | 9 张图、3 个视频、3 段音频 | 不支持 |
doubao-seedance-2-0-fast-260128 | 480p、720p | 4–15 秒,或 -1 | 9 张图、3 个视频、3 段音频 | 不支持 |
doubao-seedance-2-0-mini-260615 | 480p、720p | 4–15 秒,或 -1 | 9 张图、3 个视频、3 段音频 | 不支持 |
doubao-seedance-2-5-260628 | 480p、720p、1080p、4k | 4–30 秒,或 -1 | 30 张图、10 个视频、10 段音频 | 支持 |
doubao-seedance-2-5-flash-261115 | 480p、720p | 4–30 秒,或 -1 | 10 张图、5 个视频、5 段音频 | 不支 持 |
4k。duration 为 -1 时由模型在有效范围内自选时长。| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
model | string | 是 | 上表中的模型 ID。 |
content | object[] | 是 | 按顺序提交文本和素材,结构见下文。 |
resolution | string | 否 | 输出分辨率,取值见上表。 |
ratio | string | 否 | 21:9、16:9、4:3、1:1、3:4、9:16 或 adaptive。 |
duration | integer | 否 | 输出时长(秒)。 |
generate_audio | boolean | 否 | 是否生成有声视频。 |
seed | integer | 否 | 随机种子。 |
watermark | boolean | 否 | 是否添加水印。 |
return_last_frame | boolean | 否 | 是否返回尾帧图片。 |
draft | boolean | 否 | 仅 Seedance 2.5:true 时生成 480p 样片。 |
omni_reference_task_type、tools)同样原样提交,是否适用于所选模型以接口返回为准。不支持 callback_url,传入会直接返回参数错误,请轮询查询接口获取结果。字段说明见火山方舟创建视频生成任务。content 元素| 类型 | 写法 | role |
|---|---|---|
| 文本 | {"type":"text","text":"..."} | 不填 |
| 图片 | {"type":"image_url","image_url":{"url":"..."},"role":"..."} | reference_image、first_frame 或 last_frame |
| 视频 | {"type":"video_url","video_url":{"url":"..."},"role":"reference_video"} | reference_video |
| 音频 | {"type":"audio_url","audio_url":{"url":"..."},"role":"reference_audio"} | reference_audio |
| 样片 | {"type":"draft_task","draft_task":{"id":"<样片任务 id>"}} | 不填 |
@image1、@video1、@audio1 按同类素材顺序引用素材。{
"model": "doubao-seedance-2-5-flash-261115",
"content": [
{"type": "text", "text": "清晨的海边,镜头缓慢向前推进"}
],
"resolution": "720p",
"ratio": "16:9",
"duration": 5,
"generate_audio": false
}{
"model": "doubao-seedance-2-0-260128",
"content": [
{"type": "text", "text": "人物微笑并向镜头挥手"},
{"type": "image_url", "image_url": {"url": "https://example.com/first.png"}, "role": "first_frame"}
],
"resolution": "1080p",
"ratio": "adaptive",
"duration": 5
}{
"model": "doubao-seedance-2-5-260628",
"content": [
{"type": "text", "text": "以 @image1 的人物为主角,参考 @video1 的运镜,配合 @audio1 的节奏生成竖屏视频"},
{"type": "image_url", "image_url": {"url": "https://example.com/character.png"}, "role": "reference_image"},
{"type": "video_url", "video_url": {"url": "https://example.com/motion.mp4"}, "role": "reference_video"},
{"type": "audio_url", "audio_url": {"url": "https://example.com/bgm.mp3"}, "role": "reference_audio"}
],
"resolution": "720p",
"ratio": "9:16",
"duration": 12
}draft: true、resolution: "480p" 生成样片:{
"model": "doubao-seedance-2-5-260628",
"draft": true,
"resolution": "480p",
"content": [
{"type": "text", "text": "虚拟人物微笑挥手"},
{"type": "image_url", "image_url": {"url": "https://example.com/portrait.png"}, "role": "reference_image"}
]
}status 为 succeeded 后,用样片任务 id 单独提交正片,可指定 1080p 或 4k:{
"model": "doubao-seedance-2-5-260628",
"content": [
{"type": "draft_task", "draft_task": {"id": "task_YOUR_DRAFT_ID"}}
],
"resolution": "4k"
}id:{"id": "task_EXAMPLE"}id 为本平台任务 ID:{
"id": "task_EXAMPLE",
"model": "doubao-seedance-2-5-260628",
"status": "succeeded",
"content": {"video_url": "https://.../result.mp4"},
"resolution": "720p",
"ratio": "9:16",
"duration": 12,
"usage": {"completion_tokens": 129600, "total_tokens": 129600}
}status 取值:queued、running、succeeded、failed、cancelled、expired。失败时查看 error.code 和 error.message。视频链接有效期较短,请及时下载保存。建议每 5–10 秒查询一次,终态后停止。usage.completion_tokens 结算,单价按模型、输出分辨率以及输入是否包含参考视频区分,再乘以 API Key 所在分组的倍率。提交时先按请求预扣,任务完成后按实际用量多退少补;任务失败按原路退回预扣。{"error": {"code": "InvalidParameter", "message": "具体错误说明"}}| HTTP 状态 | error.code | 常见原因 |
|---|---|---|
400 | InvalidParameter | 参数错误,例如模型不支持所选分辨率、传了 callback_url、content 为空 |
401 | AuthenticationError | API Key 缺失或无效 |
403 | AccessDenied | 余额或额度不足,或没有模型权限 |
404 | NotFound | 请求的资源不存在 |
429 | AccountRateLimitExceeded | 请求过于频繁 |
500、502、503 | InternalServiceError | 服务暂时异常或暂时不可用 |
status 为 failed,原因见 error.code 和 error.message。