视频生成系列
Seedance 2 Mini
Seedance 2 轻量版视频生成,仅支持多模态参考模式(图/视频/音频),480p-720p,低成本草稿。
CokeAPI 接入 Seedance 2 Mini 轻量版视频模型。默认是异步任务: POST 创建后拿到 task_id,再通过 GET /v1/generations/{task_id} 轮询直到 succeeded。
图生视频提示:生成接口不再接收内联 base64 图片数据。请先使用 文件上传接口 上传参考图片获取 URL,再传入 image_with_roles 或 video_with_roles 或 audio_with_roles。
模型 ID: seedance-2-mini
调用示例
请求参数
| 参数 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
| model | string | 是 | — | seedance-2-mini |
| prompt | string | 是 | — | 视频内容描述,中文≤500字,英文≤1000词 |
| client_business_id | string | 否 | — | 客户侧业务 ID,可用于查询状态 |
| duration | int | 是 | — | 时长(秒): 4 / 8 / 10 / 12 / 15 |
| aspect_ratio | string | 否 | — | 宽高比: 21:9 / 16:9 / 4:3 / 1:1 / 3:4 / 9:16 |
| image_with_roles | object[] | 否 | — | 带角色的图片数组,每项含 url 和 role |
| video_with_roles | object[] | 否 | — | 带角色的视频数组,每项含 url 和 role |
| audio_with_roles | object[] | 否 | — | 带角色的音频数组,每项含 url 和 role |
| resolution | string | 否 | 720p | 分辨率: 480p/720p |
| seed | int | 否 | — | 随机种子 |
| callback_url | string | 否 | — | 回调地址,需配合 trace_id 使用 |
| trace_id | string | 否 | — | 调用方透传 ID,需配合 callback_url 使用 |
image_with_roles 格式
[
{"url": "https://example.com/ref.jpg", "role": "reference_image"}
]支持的 role 值:
reference_image— 参考图(最多 9 张)
seedance-2-mini不支持first_frame和last_frame角色。
video_with_roles 格式
[
{"url": "https://example.com/ref.mp4", "role": "reference_video"}
]role 固定为 reference_video。最多 3 条。
audio_with_roles 格式
[
{"url": "https://example.com/ref.mp3", "role": "reference_audio"}
]role 固定为 reference_audio。最多 3 段。需配合图片或视频参考输入。
输入组合规则
| 输入形态 | 说明 |
|---|---|
| 文本 + 参考图 | 多模态参考生视频 |
| 文本 + 参考视频 | 视频参考生视频 |
| 文本 + 参考图 + 参考音频 | 多模态参考生视频 |
| 文本 + 参考图 + 参考视频 + 参考音频 | 多模态参考生视频 |
seedance-2-mini不支持纯文生视频,必须至少提供一种参考素材(图/视频/音频)。
响应
创建任务 (POST)
{
"id": "video_abc123def456",
"task_id": "video_abc123def456",
"object": "video.generation.task",
"status": "queued",
"progress": 0,
"model": "seedance-2-mini",
"kind": "video",
"mode": "text_to_video",
"created": 1768380224
}查询任务 (GET /v1/generations/{task_id})
完成后:
{
"id": "video_abc123def456",
"task_id": "video_abc123def456",
"object": "video.generation.task",
"status": "succeeded",
"progress": 100,
"model": "seedance-2-mini",
"kind": "video",
"mode": "text_to_video",
"result": {
"id": "video_abc123def456",
"object": "video.generation",
"created": 1768380224,
"model": "seedance-2-mini",
"data": [
{
"url": "https://cdn.cokeapi.com/v/video_abc123def456.mp4",
"duration_ms": 10000,
"width": 1280,
"height": 720
}
]
},
"created": 1768380224
}任务状态说明
| 状态 | 说明 |
|---|---|
| queued | 任务已排队等待处理 |
| running | 任务正在处理中 |
| succeeded | 任务已完成 |
| failed | 任务失败 |
| refunded | 任务失败已退款 |
计费
按 6 秒基准档计费,超过 6 秒按 10 秒档计费(费用 = 基准价 × 10/6)。
| 分辨率 | 6 秒基准价 | 10 秒价 |
|---|---|---|
| 480p | $0.057 | $0.095 |
| 720p | $0.057 | $0.095 |
| 768p | $0.114 | $0.19 |
图生视频(带参考图)按 i2v 价目计费:
| 分辨率 | 6 秒基准价(i2v) | 10 秒价(i2v) |
|---|---|---|
| 480p | $0.068 | $0.113 |
| 720p | $0.138 | $0.23 |
失败任务不计费,自动退款。价格为 2026-07 快照,以 模型列表页 实时价目为准。
注意事项
seedance-2-mini仅支持多模态参考模式,不支持纯文生视频和首帧/尾帧模式。seedance-2-mini不支持生成同步音频 (generate_audio)。duration为必填,仅支持固定值:4/8/10/12/15。- 最多支持 9 张参考图、3 条参考视频、3 段参考音频。
- 失败的任务不计费,会自动返还预扣点数。