Seedance 2.0 API
账户和部署可用性
需要符合条件的旧版计费账户,并已配置对应服务商。美元扩展生成不包含此模型。
使用你的 API 密钥调用 GET /api/v1/models,查看账户可用的模型及选项。
请求字段
- model
doubao-seedance-2-0-260128- provider
volcengine- quality
draft (480p), standard (720p), hd (1080p)- outputCount
1–4- 提示词长度上限
- 20000
- seed
- 可选整数种子。省略或传 null 时由服务商选择。
- generateAudio
- 通过 generateAudio 开关生成音频。
视频草稿根据素材字段判断输入方式。请省略 mode 字段。
| 输入方式 | 素材字段 | size | 时长(秒) |
|---|---|---|---|
| text-to-video | 无 | adaptive, 854x480, 480x854, 1280x720, 720x1280, 1920x1080, 1080x1920 | 4–15 |
| first-frame | firstFrameAssetId | adaptive, 854x480, 480x854, 1280x720, 720x1280, 1920x1080, 1080x1920 | 4–15 |
| first-last-frame | firstFrameAssetId, lastFrameAssetId | adaptive, 854x480, 480x854, 1280x720, 720x1280, 1920x1080, 1080x1920 | 4–15 |
| reference-images | referenceAssetIds (1–9 张图) | adaptive, 854x480, 480x854, 1280x720, 720x1280, 1920x1080, 1080x1920 | 4–15 |
像素尺寸必须与对应的 quality 搭配。 854x480 → draft, 480x854 → draft, 1280x720 → standard, 720x1280 → standard, 1920x1080 → hd, 1080x1920 → hd
使用互不重复的参考图片,并保持首尾帧字段为空。
报价示例
将 REPLACE_WITH_* 替换为你的账户完成上传后返回的素材 ID,再将草稿发送到报价接口。 上传参考素材
text-to-video
curl --fail-with-body "$GAPTI_ORIGIN/api/v1/quotes" \
-H "Authorization: Bearer $GAPTI_API_KEY" \
-H "Content-Type: application/json" \
--data '{
"draft": {
"kind": "video",
"prompt": "Pan slowly across a lakeside cabin at sunrise. Keep the horizon level.",
"model": "doubao-seedance-2-0-260128",
"duration": 4,
"quality": "standard",
"outputCount": 1,
"seed": null,
"firstFrameAssetId": null,
"lastFrameAssetId": null,
"provider": "volcengine",
"size": "adaptive",
"generateAudio": false
}
}'first-frame
curl --fail-with-body "$GAPTI_ORIGIN/api/v1/quotes" \
-H "Authorization: Bearer $GAPTI_API_KEY" \
-H "Content-Type: application/json" \
--data '{
"draft": {
"kind": "video",
"prompt": "Pan slowly across a lakeside cabin at sunrise. Keep the horizon level.",
"model": "doubao-seedance-2-0-260128",
"duration": 4,
"quality": "standard",
"outputCount": 1,
"seed": null,
"firstFrameAssetId": "REPLACE_WITH_FIRST_IMAGE_ASSET_ID",
"lastFrameAssetId": null,
"provider": "volcengine",
"size": "adaptive",
"generateAudio": false
}
}'first-last-frame
curl --fail-with-body "$GAPTI_ORIGIN/api/v1/quotes" \
-H "Authorization: Bearer $GAPTI_API_KEY" \
-H "Content-Type: application/json" \
--data '{
"draft": {
"kind": "video",
"prompt": "Pan slowly across a lakeside cabin at sunrise. Keep the horizon level.",
"model": "doubao-seedance-2-0-260128",
"duration": 4,
"quality": "standard",
"outputCount": 1,
"seed": null,
"firstFrameAssetId": "REPLACE_WITH_FIRST_IMAGE_ASSET_ID",
"lastFrameAssetId": "REPLACE_WITH_LAST_IMAGE_ASSET_ID",
"provider": "volcengine",
"size": "adaptive",
"generateAudio": false
}
}'reference-images
curl --fail-with-body "$GAPTI_ORIGIN/api/v1/quotes" \
-H "Authorization: Bearer $GAPTI_API_KEY" \
-H "Content-Type: application/json" \
--data '{
"draft": {
"kind": "video",
"prompt": "Pan slowly across a lakeside cabin at sunrise. Keep the horizon level.",
"model": "doubao-seedance-2-0-260128",
"duration": 4,
"quality": "standard",
"outputCount": 1,
"seed": null,
"firstFrameAssetId": null,
"lastFrameAssetId": null,
"provider": "volcengine",
"size": "adaptive",
"generateAudio": false,
"referenceAssetIds": [
"REPLACE_WITH_FIRST_IMAGE_ASSET_ID"
]
}
}'提交与下载
将 normalizedDraft 作为 draft,并将完整报价作为 quoteAcknowledgement。提交前请确认返回的积分。
提交任务