跳到主要内容

seedance-2-0 系列

seedance-2-0 系列 视频调用说明

基础信息

项目说明
模型名称seedance-2-0、seedance-2-0-fast、seedance-2-0-nsfw
模型 IDseedance-2-0、seedance-2-0-fast、seedance-2-0-nsfw
模型类型视频生成
Base URLhttps://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条件必填输出尺寸,例如 1280x720720x1280(fast系列不支持1080p)。可用 resolution + ratio 替代
resolution条件必填分辨率档位,与 ratio 同时传入时可替代 size。可选值:480p720p1080p
ratio条件必填宽高比,与 resolution 同时传入时可替代 size。可选值:16:94:31:13:49:1621:9
seconds时长字符串,范围 415 秒,例如 "4""5"
generate_audio是否生成音频
seed随机种子
input_reference.content多模态参考数组

sizeresolution + ratio 二选一即可,不建议同时传。

input_reference.content[] 支持三类参考素材:

type字段说明
image_urlimage_url.url图片 URL
video_urlvideo_url.url视频 URL
audio_urlaudio_url.url音频 URL

每一项都可以带 role。常用值包括:

  • reference_image
  • reference_video
  • reference_audio
  • first_frame
  • last_frame

3. 基础约束

生成时长:

  • seconds 需在 415 之间

素材与提示词限制:

素材类型字段 / Role数量上限时长 / 规格限制
参考图reference_image9单张 < 30MB
参考视频reference_video3单个 2~15s,总时长 <= 15s,单个 < 50MB
参考音频reference_audio3单个 2~15s,总时长 <= 15s,单个 < 15MB
文本提示prompt / text1中文 <= 500 字,英文 <= 1000 词;超限易导致细节丢失

多模态参考专项约束:

  • reference_audio 不支持独立传入。
  • 如果需要传入音频作为 BGM 或音色参考,input_reference.content 数组中必须至少包含 1 个视觉素材作为多模态锚点。
  • 视觉素材可以是 reference_imagereference_video

4. 创建任务示例

4.1 文生视频

curl --request POST "$BASE_URL/v1/videos" \
--header "Authorization: Bearer $API_KEY" \
--header "Content-Type: application/json" \
--data '{
"model": "seedance-2-0-fast",
"prompt": "一只橘猫站在雨后的东京街头,霓虹倒影,电影感镜头运动。",
"size": "1280x720",
"seconds": "4",
"generate_audio": false
}'

典型响应:

{
"id": "cgt-20260529102017-sjqj9",
"task_id": "cgt-20260529102017-sjqj9",
"object": "video",
"model": "seedance-2-0-fast",
"status": "queued",
"created_at": 1780021218
}

4.2 图生视频:单图参考

curl --request POST "$BASE_URL/v1/videos" \
--header "Authorization: Bearer $API_KEY" \
--header "Content-Type: application/json" \
--data '{
"model": "seedance-2-0-fast",
"prompt": "保持主体构图一致,镜头缓慢推进,风格写实。",
"size": "1280x720",
"seconds": "5",
"input_reference": {
"content": [
{
"type": "image_url",
"role": "first_frame",
"image_url": {
"url": "https://example.com/first-frame.png"
}
}
]
}
}'

4.3 图生视频:首尾帧

curl --request POST "$BASE_URL/v1/videos" \
--header "Authorization: Bearer $API_KEY" \
--header "Content-Type: application/json" \
--data '{
"model": "seedance-2-0-fast",
"prompt": "从首帧自然过渡到尾帧,镜头运动连贯,人物表情稳定。",
"size": "1280x720",
"seconds": "5",
"input_reference": {
"content": [
{
"type": "image_url",
"role": "first_frame",
"image_url": {
"url": "https://example.com/first-frame.png"
}
},
{
"type": "image_url",
"role": "last_frame",
"image_url": {
"url": "https://example.com/last-frame.png"
}
}
]
}
}'

4.4 多图参考

curl --request POST "$BASE_URL/v1/videos" \
--header "Authorization: Bearer $API_KEY" \
--header "Content-Type: application/json" \
--data '{
"model": "seedance-2-0-fast",
"prompt": "根据多张参考图生成一段产品展示视频,保持主体一致,镜头从左向右平滑移动。",
"size": "1280x720",
"seconds": "6",
"input_reference": {
"content": [
{
"type": "image_url",
"role": "reference_image",
"image_url": {
"url": "https://example.com/reference-1.png"
}
},
{
"type": "image_url",
"role": "reference_image",
"image_url": {
"url": "https://example.com/reference-2.png"
}
},
{
"type": "image_url",
"role": "reference_image",
"image_url": {
"url": "https://example.com/reference-3.png"
}
}
]
}
}'

4.5 多模态参考:图片 + 视频 + 音频

curl --request POST "$BASE_URL/v1/videos" \
--header "Authorization: Bearer $API_KEY" \
--header "Content-Type: application/json" \
--data '{
"model": "seedance-2-0-fast",
"prompt": "第一人称视角果茶宣传广告。首帧采用图片1构图,成品定格采用图片2构图,全程参考视频1的运动方式,并参考音频1的节奏氛围。",
"size": "1280x720",
"seconds": "8",
"generate_audio": true,
"input_reference": {
"content": [
{
"type": "image_url",
"role": "reference_image",
"image_url": {
"url": "https://example.com/tea-reference-1.jpg"
}
},
{
"type": "image_url",
"role": "reference_image",
"image_url": {
"url": "https://example.com/tea-reference-2.jpg"
}
},
{
"type": "video_url",
"role": "reference_video",
"video_url": {
"url": "https://example.com/tea-motion.mp4"
}
},
{
"type": "audio_url",
"role": "reference_audio",
"audio_url": {
"url": "https://example.com/tea-rhythm.mp3"
}
}
]
}
}'

4.6 使用 resolution + ratio

curl --request POST "$BASE_URL/v1/videos" \
--header "Authorization: Bearer $API_KEY" \
--header "Content-Type: application/json" \
--data '{
"model": "seedance-2-0-fast",
"prompt": "生成一段竖屏城市街拍视频,夜景霓虹,镜头缓慢前移。",
"resolution": "720p",
"ratio": "9:16",
"seconds": "4",
"generate_audio": false
}'

这等价于使用 size: "720x1280"。如果已经传了 resolution + ratio,就不需要再传 size

5. 查询任务

curl --request GET "$BASE_URL/v1/videos/TASK_ID_HERE" \
--header "Authorization: Bearer $API_KEY"

典型返回示例:

{
"created_at": 1780021218,
"id": "cgt-20260529102017-sjqj9",
"model": "seedance-2-0-fast",
"object": "video",
"prompt": "一只橘猫站在雨后的东京街头,霓虹倒影,电影感镜头运动。",
"size": "1280x720",
"status": "SUCCESS"
}

常见任务状态包括:

  • QUEUED
  • IN_PROGRESS
  • SUCCESS
  • FAILURE

6. 下载视频

任务完成后,调用内容下载接口获取视频流:

curl --request GET "$BASE_URL/v1/videos/TASK_ID_HERE/content" \
--header "Authorization: Bearer $API_KEY" \
--output output.mp4

如果任务还没完成,接口会返回错误;任务完成后,响应体是视频二进制流。

7. 尺寸参数

可以直接传 size,也可以用 resolution + ratio 替代。下表为 Seedance 2.0 系列可用值。

resolutionratio对应 size
480p16:9864x496
480p4:3752x560
480p1:1640x640
480p3:4560x752
480p9:16496x864
480p21:9992x432
720p16:91280x720
720p4:31112x834
720p1:1960x960
720p3:4834x1112
720p9:16720x1280
720p21:91470x630
1080p16:91920x1080
1080p4:31664x1248
1080p1:11440x1440
1080p3:41248x1664
1080p9:161080x1920
1080p21:92206x946

注意:1080p 是 Seedance 2.0 系列可用值;如果使用 Seedance 2.0 fast,1080p 不支持。

8. 最小联调顺序

建议按下面顺序验证:

  1. 文生视频
  2. 单图参考
  3. 查询任务
  4. 下载视频
  5. 多模态参考