Seedance 2.0
Seedance 2.0
文件快速開始
API 總覽文生影片圖生影片
API 參考

圖生影片

使用 Seedance 2.0 Open API 透過圖片與參考素材生成影片。

在這個模式下,你需要透過 mediaUrls 傳入一個或多個公開可訪問的素材地址。

Endpoint

POST /api/open/v1/video/generations

支援的參考素材類型

TypeCommon formatsTypical usage
圖片.jpg, .jpeg, .png, .webp, .gif, .bmp首幀、尾幀、風格參考
影片.mp4, .mov, .m4v動作與鏡頭運動參考
音訊.mp3, .wav節奏或時序參考

請求示例

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"
  }'

成功回應

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

請求參數

FieldTypeRequiredDescription
modelstringYes可選值:seedance-2.0、seedance-2.0-fast、seedance-1.5-pro。
promptstringYes描述目標影片效果的自然語言提示詞。
mediaUrlsstring[]Yes一到五個公開可訪問的參考素材地址。
aspectRatiostringNo可選值:16:9、9:16、1:1。
durationintegerNoseedance-2.0 與 seedance-2.0-fast 支援 4-15 秒;seedance-1.5-pro 僅支援 5 或 10 秒。
resolutionstringNo可選值:480p、720p、1080p。
webhookUrlstringNo任務完成後接收回調通知的地址。
metadataobjectNo與本次請求一同保存的自訂資料。

查詢結果

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 river flowing through an autumn forest, aerial view, cinematic motion",
  "duration": 5,
  "aspectRatio": "16:9",
  "output": {
    "type": "video",
    "url": "https://pub-your-bucket.r2.dev/open-api-results/req_1234567890.mp4"
  },
  "error": null
}

取消任務

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"
}

說明

  • mediaUrls 最多可傳 5 個素材地址。
  • 建議使用公開可訪問的 HTTPS 連結。
  • 若不需要參考素材,請直接使用 文生影片。

文生影片

使用 Seedance 2.0 Open API 透過文字提示詞生成影片。

Start

下一頁

目錄

Endpoint支援的參考素材類型請求示例成功回應請求參數查詢結果取消任務說明