ToAPIs ToAPIs
seedance-ext

seedance-2-fast-ext 視頻生成

使用 seedance-2-fast-ext 模型低成本快速生成視頻

POST
/v1/videos/generations

中國大陸用戶請注意: 中國大陸用戶請使用 https://toapis.cn 作為接口地址(Base URL)。文檔示例中的 https://toapis.com 請替換為 https://toapis.cn。

seedance-2-fast-ext 是 Seedance 2.0 系列的促銷渠道衝量模型,面向低成本、快速生成場景:

  • 文生視頻、參考圖片生成
  • 支持 480p、720p 和 1080p 輸出
  • 不支持參考視頻、參考音頻、首尾幀控制和視頻編輯
  • 接口為異步任務:提交後返回 generation.task,完成後通過視頻任務狀態接口獲取結果。

認證

Authorizationstring請求頭必填

使用 Bearer Token 認證:

Authorization: Bearer YOUR_API_KEY

請求參數

modelstring請求體必填預設值: seedance-2-fast-ext

ToAPIs 公共模型名,固定使用 seedance-2-fast-ext。

promptstring請求體

描述場景、鏡頭運動、主體動作、風格和聲音氛圍。

secondsinteger請求體預設值: 5

輸出視頻時長(秒),僅支持 5、10、15。兼容字段 duration 也可以使用,無需同時傳入。

sizestring請求體

輸出寬高比,支持 16:9、9:16、4:3、3:4、1:1。兼容字段 aspect_ratio 也可以使用。

resolutionstring請求體預設值: 720p

輸出分辨率,支持 480p、720p 和 1080p。

reference_imagestring請求體

單張參考圖片的公開 URL。多張時請改用 reference_images。

reference_imagesstring[]請求體

參考圖片 URL 數組,最多 9 張。也可以使用 image_with_roles(role 為 reference_image)顯式傳入。

callback_urlstring請求體

ToAPIs 任務完成回調地址,詳見任務 Webhook。

client_business_idstring請求體

客戶側訂單號或業務任務 ID。提交後會隨任務保存,也可用 GET /v1/videos/generations/{client_business_id} 查詢。

trace_idstring請求體

調用方自定義的鏈路追蹤 ID。

素材組合規則

請求內容 是否支持 說明
僅提示詞 是 文生視頻
參考圖片 是 最多 9 張
參考視頻 / 參考音頻 否 請使用 seedance-2.5-ext
首幀 / 尾幀 否 不支持首尾幀模式

請求示例

文生視頻

curl --request POST \
  --url https://toapis.com/v1/videos/generations \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "seedance-2-fast-ext",
    "prompt": "海浪拍打礁石,鏡頭環繞緩慢推進。",
    "seconds": 5,
    "size": "16:9",
    "resolution": "720p"
  }'

參考圖片生成

curl --request POST \
  --url https://toapis.com/v1/videos/generations \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "seedance-2-fast-ext",
    "prompt": "讓圖片1中的角色眨眼微笑。",
    "seconds": 5,
    "size": "9:16",
    "resolution": "480p",
    "reference_images": [
      "https://example.com/avatar.png"
    ]
  }'

響應

idstring
任務 ID,用於查詢狀態。
client_business_idstring
請求傳入該字段時返回。
objectstring
固定為 generation.task。
modelstring
本次請求的模型名。
statusstring
queued、in_progress、completed 或 failed。
progressinteger
0–100 的任務進度。
created_atinteger
創建時間戳。

響應示例

{
  "id": "tsk_vid_xxx",
  "object": "generation.task",
  "model": "seedance-2-fast-ext",
  "status": "in_progress",
  "progress": 10,
  "created_at": 1781577600
}