Seedance 2.0
Seedance 2.0
文档快速开始
API 总览文生视频图生视频
API 参考

图生视频

使用 Seedance 2.0 Open API 基于图片和参考素材生成视频。

图生视频

使用 Seedance 2.0 Open API 基于参考素材生成视频。在这种模式下,你需要通过 mediaUrls 传入一个或多个公开可访问的素材地址,并配合提示词一起提交。

这个接口支持首帧驱动、首尾帧控制,以及更丰富的参考素材工作流。系统会根据你传入素材的数量和类型自动判断生成模式。

接口地址

POST /api/open/v1/video/generations

支持的参考素材类型

类型常见格式常见用途
图片.jpg, .jpeg, .png, .webp, .gif, .bmp首帧、尾帧、风格参考
视频.mp4, .mov, .m4v动作、镜头运动参考
音频.mp3, .wav节奏或时序参考
  • mediaUrls 最多可传 5 个素材地址。
  • 请使用公开可访问的 HTTPS 链接。
  • 为了提升稳定性,建议参考素材尽量清晰、直接,并与提示词目标高度一致。

首帧示例

curl --request POST \
  --url https://www.seedance2.ink/api/open/v1/video/generations \
  --header 'Authorization: Bearer sd2_live_your_api_key' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "seedance-2.0",
    "prompt": "A young woman blows out birthday candles, warm indoor lighting, shallow depth of field",
    "mediaUrls": [
      "https://example.com/photo.jpg"
    ],
    "aspectRatio": "16:9",
    "duration": 5,
    "resolution": "720p"
  }'

首尾帧示例

curl --request POST \
  --url https://www.seedance2.ink/api/open/v1/video/generations \
  --header 'Authorization: Bearer sd2_live_your_api_key' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "seedance-2.0",
    "prompt": "A cinematic transition from sunrise over the ocean to a glowing night skyline",
    "mediaUrls": [
      "https://example.com/first-frame.jpg",
      "https://example.com/last-frame.jpg"
    ],
    "aspectRatio": "16:9",
    "duration": 6,
    "resolution": "1080p"
  }'

多模态参考示例

curl --request POST \
  --url https://www.seedance2.ink/api/open/v1/video/generations \
  --header 'Authorization: Bearer sd2_live_your_api_key' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "seedance-2.0-fast",
    "prompt": "A fashion film with energetic camera motion synced to the beat",
    "mediaUrls": [
      "https://example.com/reference-image.jpg",
      "https://example.com/reference-audio.mp3"
    ],
    "aspectRatio": "9:16",
    "duration": 8,
    "resolution": "720p",
    "webhookUrl": "https://your-app.com/webhooks/seedance"
  }'

成功响应

{
  "success": true,
  "requestId": "req_1234567890",
  "status": "queued",
  "creditsCharged": 64
}

请求体参数

字段类型必填说明
modelstring是可选值:seedance-2.0、seedance-2.0-fast、seedance-1.5-pro。
promptstring是描述目标视频效果的文本指令。
mediaUrlsstring[]是一到五个公开可访问的参考素材地址。
aspectRatiostring否可选值:16:9、9:16、1:1。
durationinteger否seedance-2.0 和 seedance-2.0-fast 支持 4-15 秒;seedance-1.5-pro 仅支持 5 或 10 秒。
resolutionstring否可选值:480p、720p、1080p。
webhookUrlstring否任务完成后接收结果回调的地址。
metadataobject否与本次请求一起保存的自定义元数据。

查询结果

通过提交接口返回的任务 ID 查询生成结果:

curl https://www.seedance2.ink/api/open/v1/video/generations/req_1234567890 \
  --header 'Authorization: Bearer sd2_live_your_api_key'
{
  "success": true,
  "requestId": "req_1234567890",
  "status": "succeeded",
  "model": "seedance-2.0",
  "prompt": "A young woman blows out birthday candles, warm indoor lighting, shallow depth of field",
  "duration": 5,
  "aspectRatio": "16:9",
  "output": {
    "type": "video",
    "url": "https://pub-your-bucket.r2.dev/open-api-results/req_1234567890.mp4"
  },
  "error": null
}

只有当任务状态变为 succeeded 时,响应中才会返回输出视频地址。

取消任务

curl --request POST \
  --url https://www.seedance2.ink/api/open/v1/video/generations/req_1234567890/cancel \
  --header 'Authorization: Bearer sd2_live_your_api_key'
{
  "success": true,
  "requestId": "req_1234567890",
  "status": "cancelled"
}

说明

  • 更丰富的多模态参考场景建议使用 seedance-2.0 或 seedance-2.0-fast。
  • seedance-1.5-pro 更适合较简单的图片驱动生成任务。
  • 如果你不需要参考素材,请直接使用 文生视频。

文生视频

使用 Seedance 2.0 Open API 通过文本提示词生成视频。

开始

下一页

目录

图生视频接口地址支持的参考素材类型首帧示例首尾帧示例多模态参考示例成功响应请求体参数查询结果取消任务说明