seedance-2-0 系列
seedance-2-0 系列 视频调用说明
基础信息
| 项目 | 说明 |
|---|---|
| 模型名称 | seedance-2-0、seedance-2-0-fast、seedance-2-0-nsfw |
| 模型 ID | seedance-2-0、seedance-2-0-fast、seedance-2-0-nsfw |
| 模型类型 | 视频生成 |
| Base URL | https://api-platform.ope.ai |
| 创建任务 | POST /v1/videos |
| 查询任务 | GET /v1/videos/{task_id} |
| 下载结果 | GET /v1/videos/{task_id}/content |
鉴权方式:
Authorization: Bearer YOUR_API_KEY
建议先在 shell 里准备两个变量:
BASE_URL="https://api-platform.ope.ai"
API_KEY="YOUR_API_KEY"
价格信息请查看:模型价格。
1. 请求格式
统一视频入口使用 POST /v1/videos。文本提示词放在顶层 prompt,图片、视频、音频参考素材放在 input_reference.content。
尺寸可以用两种方式传入:
- 直接传
size,例如1280x720 - 传
resolution+ratio,例如resolution: "720p"+ratio: "16:9",用于替代size
{
"model": "seedance-2-0-fast",
"prompt": "这里写文字提示词",
"size": "1280x720",
"seconds": "4",
"input_reference": {
"content": [
{
"type": "image_url",
"role": "reference_image",
"image_url": {
"url": "https://example.com/reference.png"
}
}
]
}
}
2. 字段说明
| 字段 | 必填 | 说明 |
|---|---|---|
model | 是 | 固定传 模型 ID 例如 seedance-2-0 |
prompt | 是 | 视频生成提示词 |
size | 条件必填 | 输出尺寸, 例如 1280x720、720x1280(fast系列不支持1080p)。可用 resolution + ratio 替代 |
resolution | 条件必填 | 分辨率档位,与 ratio 同时传入时可替代 size。可选值:480p、720p、1080p |
ratio | 条件必填 | 宽高比,与 resolution 同时传入时可替代 size。可选值:16:9、4:3、1:1、3:4、9:16、21:9 |
seconds | 是 | 时长字符串,范围 4 到 15 秒,例如 "4"、"5" |
generate_audio | 否 | 是否生成音频 |
seed | 否 | 随机种子 |
input_reference.content | 否 | 多模态参考数组 |
size 与 resolution + ratio 二选一即可,不建议同时传。
input_reference.content[] 支持三类参考素材:
type | 字段 | 说明 |
|---|---|---|
image_url | image_url.url | 图片 URL |
video_url | video_url.url | 视频 URL |
audio_url | audio_url.url | 音频 URL |
每一项都可以带 role。常用值包括:
reference_imagereference_videoreference_audiofirst_framelast_frame