建立 Seedance 影片
在 CometAPI 上建立 Seedance 影片任務。使用文字提示、參考媒體或 Seedance 2.5 形象素材,並指定時長與 WxH 輸出大小。
curl https://api.cometapi.com/v1/videos \
-H "Authorization: Bearer $COMETAPI_KEY" \
-F 'prompt="A matte magenta cube rotates slowly above a cyan studio floor while a small yellow sphere circles it."' \
-F 'model="seedance-2-5"' \
-F 'seconds="4"' \
-F 'size="1280x720"'{
"id": "task_abc123",
"task_id": "task_abc123",
"object": "video",
"model": "doubao-seedance-2-0-mini",
"status": "queued",
"progress": 0,
"created_at": 1776681149
}size 設為適用於您模型的大小表中的 WxH 值。doubao-seedance-2-0-mini。
縮寫的 seedance-mini 值不是有效的模型 ID。支援的模型 ID
請根據您的輸入模式和解析度選擇模型,然後在model 欄位中傳送其完整 ID。
| 模型 | 完整模型 ID | 模式與解析度層級 | 支援項目 seconds |
|---|---|---|---|
| Seedance 2.5 | seedance-2-5 | 文字轉影片、參考媒體; 480p, 720p | 4-30 |
| Seedance 2.0 | doubao-seedance-2-0 | 文字轉影片、參考媒體; 480p, 720p, 1080p, 4K | 4-15 |
| Seedance 2.0 Fast | doubao-seedance-2-0-fast | 文字轉影片、參考媒體; 480p, 720p | 4-15 |
| Seedance 2.0 Mini | doubao-seedance-2-0-mini | 文字轉影片、參考媒體; 480p, 720p | 4-15 |
| Seedance 1.5 Pro | doubao-seedance-1-5-pro | 文字轉影片、圖片轉影片; 480p, 720p, 1080p | 4-12 |
| Seedance 1.0 Pro | doubao-seedance-1-0-pro | 文字轉影片、圖片轉影片; 480p, 720p, 1080p | 2-10 |
使用參考圖片
將POST /v1/videos 設為 multipart/form-data,並在 input_reference 中提供參考圖片。
如需使用多張標準參考圖片,請依圖片順序重複該欄位;每個欄位填入一個可公開存取的 HTTPS 圖片 URL 或一個上傳的圖片檔案。
對於標準參考圖片,此欄位僅使用 URL 或僅使用檔案。請分別傳送每個 URL,而非以逗號串接 URL。
請將每張上傳圖片的大小維持在 20 MiB(20 × 1024 × 1024 位元組).
Seedance 1.0 Pro 和 1.5 Pro 使用一張參考圖片。Seedance 2.0、Fast 和 Mini 最多可接受 9 張參考圖片。
Seedance 2.5 最多可接受 30 張參考圖片。這些數量限制同時適用於 URL 和上傳的檔案。
請在 Prompt 中為每張圖片指定角色,例如主體、場景或視覺風格。
描述要保留的外觀、動作和鏡頭運動。
本頁頂端的請求範例顯示圖片 URL 輸入,以及單張或多張圖片上傳。
傳送參考圖片 URL
使用兩個圖片 URL 引導主體外觀和場景:curl \
https://api.cometapi.com/v1/videos \
-H "Authorization: Bearer $COMETAPI_KEY" \
--form-string 'model=doubao-seedance-2-0' \
--form-string 'prompt=Use the subject in @Image1 and the setting in @Image2. Use a slow camera push-in and natural motion.' \
--form-string 'seconds=5' \
--form-string 'size=1280x720' \
--form-string 'input_reference=https://your-image-host/subject.png' \
--form-string 'input_reference=https://your-image-host/setting.png'
使用形象素材
在 Seedance 2.5 要求中使用形象素材前,請先建立並啟用形象素材。先從建立形象素材群組開始,再透過上傳形象素材上傳圖片。儲存回傳的素材 ID,並等待其狀態變為active。
使用 asset:// 參照格式傳送素材 ID。素材參照放在 input_reference 中,影片要求不會取得來源圖片 URL。
curl \
https://api.cometapi.com/v1/videos \
-H "Authorization: Bearer $COMETAPI_KEY" \
--form-string 'model=seedance-2-5' \
--form-string 'prompt=Animate the character in the referenced asset with a slow camera push-in and natural motion.' \
--form-string 'seconds=5' \
--form-string 'size=1280x720' \
--form-string 'input_reference=asset://<ASSET_ID>'
Authorization 標頭中使用原始存取權杖。影片要求使用帶有 Bearer 配置的 CometAPI API 金鑰。如果素材仍為 processing、failed 或無法使用,請先查看素材狀態或處理素材,再提交影片任務。
使用參考影片和音訊
Seedance 2.0、Fast、Mini 和 2.5 接受reference_videos 和 reference_audios。
影片參考請使用 MP4 檔案,音訊參考請使用 MP3 檔案。請將每個參考以可公開存取的 HTTPS URL 或上傳檔案傳送。
請將參考音訊與至少一張圖片或一部影片搭配使用。
在 Prompt 中,使用 @Image1、@Video1 和 @Audio1 為參考資料指派角色。
依各媒體類型中的順序為參考資料編號。
您可以在不同欄位中混用 URL 和上傳檔案。
在 input_reference、reference_videos 和 reference_audios 中,請全部使用 URL 或全部使用檔案。
如有多個輸入,請針對每個輸入重複填寫一次欄位,而非以逗號串接 URL。
| 模型系列 | 參考圖片 | 參考影片 | 參考音訊 | 參考輸入總數 |
|---|---|---|---|---|
| Seedance 2.0、Fast 和 Mini | 最多 9 個 URL 或檔案,位於 input_reference | 最多 3 個 | 最多 3 個 | 最多 12 個 |
| Seedance 2.5 | 最多 30 個 URL 或檔案,位於 input_reference | 最多 10 個 URL 或 5 個檔案 | 最多 10 個 URL 或 5 個檔案 | 最多 50 個 |
doubao-seedance-2-0)對 URL 和上傳檔案皆有額外的媒體限制。
參考影片的合計時長須介於 2 至 15 秒,總大小須低於 50 MB。
請使用約 480p(640x640)至 720p(834x1112 的參考影片解析度).
參考音訊的合計時長須為 15 秒以下,每個檔案須為 15 MB 以下。
上傳的媒體也必須符合上述各檔案的上傳限制。
傳送參考影片 URL
使用參考影片來引導鏡頭移動和動作:curl \
https://api.cometapi.com/v1/videos \
-H "Authorization: Bearer $COMETAPI_KEY" \
--form-string 'model=doubao-seedance-2-0' \
--form-string 'prompt=Follow the camera movement and action in @Video1. Preserve the direction and pace of the motion.' \
--form-string 'seconds=5' \
--form-string 'size=1280x720' \
--form-string 'reference_videos=https://your-media-host/reference.mp4'
將圖片 URL 與音訊搭配使用
讓參考主體依照參考音訊的節奏動起來:curl \
https://api.cometapi.com/v1/videos \
-H "Authorization: Bearer $COMETAPI_KEY" \
--form-string 'model=doubao-seedance-2-0' \
--form-string 'prompt=Animate the subject in @Image1 to the rhythm of @Audio1. Preserve the subject appearance and use a fixed camera.' \
--form-string 'seconds=5' \
--form-string 'size=1280x720' \
--form-string 'input_reference=https://your-image-host/subject.png' \
--form-string 'reference_audios=https://your-media-host/reference.mp3'
使用 Seedance 2.5 上傳參考媒體
在一個請求中上傳兩張圖片、一個 MP4 影片和一個 MP3 音訊檔案:curl \
https://api.cometapi.com/v1/videos \
-H "Authorization: Bearer $COMETAPI_KEY" \
--form-string 'model=seedance-2-5' \
--form-string 'prompt=Use the subject in @Image1 and the setting in @Image2. Follow the motion in @Video1 and the rhythm of @Audio1.' \
--form-string 'seconds=5' \
--form-string 'size=1280x720' \
--form 'input_reference=@/path/to/subject.png;type=image/png' \
--form 'input_reference=@/path/to/setting.png;type=image/png' \
--form 'reference_videos=@/path/to/reference.mp4;type=video/mp4' \
--form 'reference_audios=@/path/to/reference.mp3;type=audio/mpeg'
依模型劃分的時長
將seconds 設為模型支援範圍內的整數值。若省略此值,CometAPI 會請求 5 秒的片段。
| 模型系列 | 支援的值 seconds | 預設值 | 邊界行為 |
|---|---|---|---|
| Seedance 2.5 | 4-30 | 5 | 使用範圍內的整數秒數。 |
| Seedance 2.0、Seedance 2.0 Fast 和 Seedance 2.0 Mini | 4-15 | 5 | 使用範圍內的整數秒數。 |
| Seedance 1.5 Pro | 4-12 | 5 | 使用範圍內的整數秒數。 |
| Seedance 1.0 Pro | 2-10 | 5 | 使用範圍內的整數秒數。 |
依模型劃分的尺寸支援
Seedance 2.5
對於 Seedance 2.5,這些WxH 值同時適用於文字 Prompt 和參考媒體。
| 解析度類別 | 16:9 | 4:3 | 1:1 | 3:4 | 9:16 | 21:9 |
|---|---|---|---|---|---|---|
480p | 854x480 | 752x560 | 640x640 | 560x752 | 480x854 | 992x432 |
720p | 1280x720 | 1112x834 | 960x960 | 834x1112 | 720x1280 | 1470x630 |
較早期的 Seedance 模型
最後一欄彙整了適用於 Seedance 1.5 Pro、standard Seedance 2.0 和 Fast 的確切WxH 值。
Seedance 2.0 Fast 僅使用該欄中的 480p 和 720p 值。
該欄中的 1080p 值適用於 Seedance 1.5 Pro 和 standard Seedance 2.0。
4K 值僅適用於 standard Seedance 2.0。在 Mini 欄中,— 表示不支援該解析度。
| 解析度類別 | 長寬比 | Seedance 2.0 Mini | Seedance 1.0 系列 | Seedance 1.5 Pro / standard Seedance 2.0 / Fast |
|---|---|---|---|---|
480p | 16:9 | 864x496 | 864x480 | 864x496 |
4:3 | 752x560 | 736x544 | 752x560 | |
1:1 | 640x640 | 640x640 | 640x640 | |
3:4 | 560x752 | 544x736 | 560x752 | |
9:16 | 496x864 | 480x864 | 496x864 | |
21:9 | 992x432 | 960x416 | 992x432 | |
720p | 16:9 | 1280x720 | 1248x704 | 1280x720 |
4:3 | 1112x834 | 1120x832 | 1112x834 | |
1:1 | 960x960 | 960x960 | 960x960 | |
3:4 | 834x1112 | 832x1120 | 834x1112 | |
9:16 | 720x1280 | 704x1248 | 720x1280 | |
21:9 | 1470x630 | 1504x640 | 1470x630 | |
1080p | 16:9 | — | 1920x1088 | 1920x1080 |
4:3 | — | 1664x1248 | 1664x1248 | |
1:1 | — | 1440x1440 | 1440x1440 | |
3:4 | — | 1248x1664 | 1248x1664 | |
9:16 | — | 1088x1920 | 1080x1920 | |
21:9 | — | 2176x928 | 2206x946 | |
4K | 16:9 | — | — | 3840x2160 (僅限 Seedance 2.0) |
4:3 | — | — | 3326x2494 (僅限 Seedance 2.0) | |
1:1 | — | — | 2880x2880 (僅限 Seedance 2.0) | |
3:4 | — | — | 2494x3326 (僅限 Seedance 2.0) | |
9:16 | — | — | 2160x3840 (僅限 Seedance 2.0) | |
21:9 | — | — | 4398x1886 (僅限 Seedance 2.0) |
480p 和 720p。請將 size 設為 Mini 欄中的 WxH 值。主體
Text prompt that describes the video. Required. When using reference images, describe what each image should control, such as the subject from @Image1, the secondary object from @Image2, and the background or style from @Image3. Also state the action, camera motion, visual style, and scene.
"A slow cinematic camera push across a coastal landscape at sunrise."
Output size as an exact WxH value. For Seedance 2.5 text-to-video and image-to-video, use 854x480, 752x560, 640x640, 560x752, 480x854, or 992x432 for 480p; use 1280x720, 1112x834, 960x960, 834x1112, 720x1280, or 1470x630 for 720p. For Seedance 2.0 Mini, use 864x496, 752x560, 640x640, 560x752, 496x864, or 992x432 for 480p; use the same documented 720p values. The standard Seedance 2.0 model also accepts its documented 4K values.
^[1-9]\d{2,3}x[1-9]\d{2,3}$"854x480"
"480x854"
"864x496"
"752x560"
"640x640"
"560x752"
"496x864"
"992x432"
"1280x720"
"1112x834"
"960x960"
"834x1112"
"720x1280"
"1470x630"
"1920x1080"
"1080x1920"
"3840x2160"
"3326x2494"
"2880x2880"
"2494x3326"
"2160x3840"
"4398x1886"
Reference images or a CometAPI character asset. Repeat input_reference with one publicly accessible HTTPS image URL, one uploaded image file, or one asset:// reference per field. Use only URLs, asset references, or files within a request. Keep each uploaded image at or below 20 MiB. Seedance 2.0, Fast, and Mini allow up to nine image URLs or files and 12 reference inputs in total. Seedance 2.5 allows up to 30 image URLs or files and 50 reference inputs in total. For Seedance 1.0 Pro and 1.5 Pro, send one URL or one file. Submit images in the order you want to reference them in the prompt.
^https://Reference video inputs for Seedance 2.0, Fast, Mini, and 2.5. Repeat reference_videos with a publicly accessible HTTPS MP4 URL or an uploaded MP4 file. Use only URLs or only files within this field. Each file can be up to 50 MiB. Seedance 2.0, Fast, and Mini allow up to three video inputs and 12 reference inputs in total. Seedance 2.5 allows up to ten video URLs or five uploaded video files, with 50 reference inputs in total. For standard Seedance 2.0 (doubao-seedance-2-0), URL and uploaded references must have a combined video duration of 2 to 15 seconds and a total video size under 50 MB. Each reference video must have a resolution of approximately 480p (640x640) to 720p (834x1112). These media limits apply in addition to the 50 MiB per-file upload limit.
1 - 10 elements^https://"https://your-media-host/reference.mp4"
Reference audio inputs for Seedance 2.0, Fast, Mini, and 2.5. Repeat reference_audios with a publicly accessible HTTPS MP3 URL or an uploaded MP3 file. Use only URLs or only files within this field. Each file can be up to 15 MiB. Seedance 2.0, Fast, and Mini allow up to three audio inputs and 12 reference inputs in total. Seedance 2.5 allows up to ten audio URLs or five uploaded audio files, with 50 reference inputs in total. Pair audio with at least one reference image or video. For standard Seedance 2.0 (doubao-seedance-2-0), URL and uploaded audio references must have a combined duration at or below 15 seconds, with each audio file at or below 15 MB. These media limits apply in addition to the 15 MiB per-file upload limit.
1 - 10 elements^https://"https://your-media-host/reference.mp3"
回應
Task created. Save the returned id and poll GET /v1/videos/{id}.
curl https://api.cometapi.com/v1/videos \
-H "Authorization: Bearer $COMETAPI_KEY" \
-F 'prompt="A matte magenta cube rotates slowly above a cyan studio floor while a small yellow sphere circles it."' \
-F 'model="seedance-2-5"' \
-F 'seconds="4"' \
-F 'size="1280x720"'{
"id": "task_abc123",
"task_id": "task_abc123",
"object": "video",
"model": "doubao-seedance-2-0-mini",
"status": "queued",
"progress": 0,
"created_at": 1776681149
}