APIMaster.ai

Seedance 2.5 Flash 影片生成 API

使用文字、圖片、影片或音訊參考非同步生成影片。公開模型 ID 固定為 `seedance-2.5-flash`,價格與參數限制獨立。

Seedance 2.5 Flash 影片生成 API

使用文字、圖片、影片或音訊參考非同步生成影片。公開模型 ID 固定為 seedance-2.5-flash,價格與參數限制獨立。

能力與限制

輸出支援 480p / 720p,時長為 4–30 秒整數,預設 5 秒;duration: -1 表示自動時長。不支援 1080p、4K 與 Draft 樣片模式。

每次最多 10 張圖片、5 段影片、5 段音訊。單段參考影片或音訊為 2–30 秒,影片與音訊總時長各不超過 30 秒。單張圖片上限 30 MB、影片 200 MB、音訊 15 MB。請使用已獲授權且可存取的素材。

參數

參數 類型 值 / 限制
model string seedance-2.5-flash
prompt string Text
resolution string 480p / 720p; default 720p
duration integer 4–30, -1; default 5
seconds integer / string Alias: duration
aspect_ratio string 16:9, 4:3, 1:1, 3:4, 9:16, 21:9, adaptive; default adaptive
ratio string Alias: aspect_ratio
size string Alias: resolution / pixel size; no conflicting resolution or ratio
generate_audio boolean default true
audio boolean Alias: generate_audio
watermark boolean default false
return_last_frame boolean default false
seed integer 0 is preserved
output_format string mp4 / mov; default mp4
omni_reference_task_type string auto, reference, edit, extend
image_urls string[] 10
image_with_roles object[] url, role: first_frame, last_frame, reference_image; images total ≤10
video_urls string[] 5
audio_urls string[] 5
content object[] Native text, image_url, video_url, audio_url references
metadata object Optional wrapper for generation fields
draft boolean true: unsupported
draft_task_id string unsupported

首尾影格、編輯與延長任務請保持 adaptive,輸出跟隨參考素材比例。編輯要求 4–30 秒來源影片與 duration: -1。可單獨使用音訊參考;MOV 等進階選項取決於生成路由。

提交與下載

儲存提交後的公開任務 ID,輪詢完成後下載。HTTP 200 僅代表受理。失敗時先讀取錯誤;只有重試完全相同的請求時才重用 Idempotency-Key。

curl "https://apimaster.ai/v1/v1/videos" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: flash-text-unique-001" \
  -d '{"model":"seedance-2.5-flash","prompt":"A red paper boat floating on calm water at sunrise","duration":4,"resolution":"720p","aspect_ratio":"16:9","generate_audio":true,"watermark":false}'
curl "https://apimaster.ai/v1/v1/videos/TASK_ID" -H "Authorization: Bearer YOUR_API_KEY"
curl -L "https://apimaster.ai/v1/v1/videos/TASK_ID/content" -H "Authorization: Bearer YOUR_API_KEY" -o video.mp4
curl "https://apimaster.ai/v1/v1/videos/TASK_ID/billing" -H "Authorization: Bearer YOUR_API_KEY"

參考素材、編輯與延長

{
  "model": "seedance-2.5-flash",
  "prompt": "The paper boat passes under a wooden bridge",
  "duration": 4,
  "resolution": "480p",
  "aspect_ratio": "adaptive",
  "generate_audio": false,
  "image_with_roles": [
    {
      "url": "https://example.com/authorized-first-frame.png",
      "role": "first_frame"
    }
  ]
}
{
  "model": "seedance-2.5-flash",
  "prompt": "Change the lighting to warm sunset",
  "resolution": "720p",
  "duration": -1,
  "aspect_ratio": "adaptive",
  "omni_reference_task_type": "edit",
  "video_urls": [
    "https://example.com/authorized-source.mp4"
  ]
}

omni_reference_task_type: "extend" + duration: 4 + aspect_ratio: "adaptive".

計費

下表以國際版官方 Token 單價為基礎;實際扣費還會套用渠道、群組及帳戶設定,請查看模型卡與任務帳單。圖片參考按輸出秒數計費;影片參考按實測輸入加輸出秒數計費。官方 Token 帳單可能有最低用量,與平台按秒估算可能不同。

解析度 美元 / 秒 美元 / 秒,含影片輸入
480p 0.0672525 0.04131225
720p 0.1512 0.09288

疑難排解

檢查公開模型 ID、解析度與素材數量,明確傳入 false 等布林值。缺少指紋基線不等於生成失敗。請及時下載,避免依賴臨時連結長期保存。