Seedance
Seedance 2.5 · 生成影片
影片 / Seedance / Seedance 2.5 / 生成影片
| 介面 | 方法 | 路徑 |
|---|---|---|
| 提交任務 | POST | /v1/videos/generations |
| 查詢結果 | GET | /v1/videos/generations/{id} |
請求參數
Authorization
在 Header 加入參數 Authorization,其值為 Bearer 之後拼接你的 API Key。
Authorization: Bearer ****************
Header 參數
Content-Typestring可選
application/json
Acceptstring可選
application/json
Body 參數application/json必填
modelstring必需
模型 ID,固定為 `dreamina-seedance-2.5`
contentarray[object]必需
BytePlus 原生輸入陣列(推薦主用法),下方 5 種 type 組合使用。注意 role 跟 type 同級放在 content item 外層,不進 image_url/video_url 子物件。role 取值:圖片 first_frame/last_frame/reference_image;視頻 reference_video。
callback_urlstring可選
任務狀態變更時的回呼通知位址(可選)
return_last_frameboolean可選
是否回傳影片尾幀圖(預設 false)
resolutionstring可選
480p / 720p / 1080p / 4k影片解析度(預設 720p;4k 僅 Seedance 2.0)
ratiostring可選
16:9 / 4:3 / 1:1 / 9:16 / 21:9 / adaptive生成影片寬高比(預設 adaptive)
durationinteger可選
影片時長(秒),預設 5
seedinteger可選
隨機種子,預設 -1(隨機);範圍 [-1, 2^32-1]
camera_fixedboolean可選
是否固定鏡頭(預設 false)
watermarkboolean可選
是否加浮水印(預設 false)
service_tierstring可選
default / flex服務檔位:default 線上推理 / flex 離線推理(半價,Seedance 2.0 系列不支援)
execution_expires_afterinteger可選
任務逾時閾值(秒),自建立時間起算;預設 172800(48h),範圍 [3600, 259200]
generate_audioboolean可選
生成影片是否含同步音訊(預設 true;僅 Seedance 2.0 系列 / 1.5 Pro)
draftboolean可選
是否開啟草稿模式(預設 false;僅 Seedance 1.5 Pro;草稿固定 480p)
safety_identifierstring可選
終端使用者唯一識別碼,用於平台風控識別
範例
{ "model": "dreamina-seedance-2.5", "content": [ { "type": "text", "text": "海浪拍打礁石的慢鏡頭,黃昏暖色調" } ], "resolution": "720p", "ratio": "16:9", "duration": 5, "seed": 11, "camera_fixed": false, "watermark": false}請求範例程式碼
curl https://api.hotrouter.ai/v1/videos/generations \ -H "Authorization: Bearer $API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "dreamina-seedance-2.5", "content": [ { "type": "text", "text": "海浪拍打礁石的慢鏡頭,黃昏暖色調" } ], "resolution": "720p", "ratio": "16:9", "duration": 5, "seed": 11, "camera_fixed": false, "watermark": false }'回應
提交任務
{ "id": "cgt-xxxxxxxx", "status": "queued"}查詢結果
{ "id": "cgt-xxxxxxxx", "status": "succeeded", "content": { "video_url": "https://.../video.mp4" }, "usage": { "completion_tokens": 0 }}
