Buat job video ByteDance Seedance asinkron di CometAPI dengan POST /v1/videos. Satu endpoint melayani Seedance 1.0 Pro, 1.5 Pro, dan 2.0, dengan request multipart/form-data.
model. Pemanggilan ini langsung mengembalikan task id dan proses render berlanjut di latar belakang.
| Model id | Tier | Catatan |
|---|---|---|
doubao-seedance-2-0 | 2.0 | Output dengan kualitas tertinggi dalam keluarga 2.0. |
doubao-seedance-2-0-fast | 2.0 | Varian 2.0 yang lebih cepat untuk iterasi dan pratinjau singkat. |
doubao-seedance-1-5-pro | 1.5 Pro | Mendukung 1080p. Hanya text-to-video. |
doubao-seedance-1-0-pro | 1.0 Pro | Mendukung 1080p dan klip yang lebih pendek mulai dari 2 detik. Hanya text-to-video. |
| Field | Tipe | Wajib | Default | Nilai yang diizinkan |
|---|---|---|---|---|
prompt | string | ya | — | teks apa pun |
model | string | ya | — | doubao-seedance-2-0, doubao-seedance-2-0-fast, doubao-seedance-1-5-pro, doubao-seedance-1-0-pro |
seconds | integer | tidak | 5 | bergantung pada model (lihat di bawah) |
size | string | tidak | 16:9 | 21:9, 16:9, 4:3, 1:1, 3:4, 9:16 |
resolution | string | tidak | 720p | 480p, 720p untuk model 2.0; 480p, 720p, 1080p untuk 1.5 Pro dan 1.0 Pro |
input_reference | file | tidak | — | JPEG, PNG, atau WebP. Hanya diterima oleh model 2.0. |
| Model | Rentang seconds |
|---|---|
doubao-seedance-2-0, doubao-seedance-2-0-fast | 4 hingga 15 |
doubao-seedance-1-5-pro | 4 hingga 12 |
doubao-seedance-1-0-pro | 2 hingga 10 |
400 dengan code: "InvalidParameter" dan pesan tentang duration.
input_reference. Mengirim input_reference dengan doubao-seedance-1-5-pro atau doubao-seedance-1-0-pro akan mengembalikan HTTP 400 dengan pesan dalam bentuk the specified task_type r2v does not support model seedance-1-5-pro. Gunakan model tersebut hanya untuk text-to-video.
multipart/form-data. Untuk menjalankan image-to-video pada model 2.0, lampirkan gambar sebagai bagian input_reference dalam request yang sama:
curl https://api.cometapi.com/v1/videos \
-H "Authorization: Bearer <COMETAPI_KEY>" \
-F 'prompt="A slow cinematic camera push across a coastal landscape at sunrise."' \
-F 'model="doubao-seedance-2-0"' \
-F 'seconds="5"' \
-F 'size="16:9"' \
-F 'resolution="720p"' \
-F 'input_reference=@/path/to/reference.jpg'
/path/to/reference.jpg dengan path absolut atau relatif ke gambar yang ingin Anda gunakan sebagai anchor frame pertama. Format yang didukung adalah JPEG, PNG, dan WebP.
Submit the task
prompt dan model. Simpan id yang dikembalikan untuk langkah berikutnya.Poll the task
400 saat field wajib tidak ada, nilai berada di luar rentang yang diterima, atau input_reference dikirim ke model yang tidak mendukung image-to-video. Endpoint ini mengembalikan HTTP 401 saat bearer token tidak ada atau tidak valid. Body error menggunakan salah satu dari dua bentuk; lihat contoh 400 dan 401 di playground untuk field yang tepat.Bearer token authentication. Use your CometAPI key.
Text prompt that describes the video. Required.
"A slow cinematic camera push across a coastal landscape at sunrise."
Seedance model id. Choose doubao-seedance-2-0 for the highest quality 2.0 output, doubao-seedance-2-0-fast for quick iteration on 2.0, doubao-seedance-1-5-pro for the 1.5 Pro tier, or doubao-seedance-1-0-pro for the 1.0 Pro tier. Only the two 2.0 models accept input_reference.
doubao-seedance-2-0, doubao-seedance-2-0-fast, doubao-seedance-1-5-pro, doubao-seedance-1-0-pro "doubao-seedance-2-0-fast"
Video duration in seconds. The accepted range depends on the model: doubao-seedance-2-0 and doubao-seedance-2-0-fast accept 4 to 15, doubao-seedance-1-5-pro accepts 4 to 12, and doubao-seedance-1-0-pro accepts 2 to 10. The default is 5 for every model.
2 <= x <= 155
Output aspect ratio. All Seedance models accept the same set of values.
21:9, 16:9, 4:3, 1:1, 3:4, 9:16 "16:9"
Output resolution. 480p and 720p are accepted by every model; 1080p is supported only by doubao-seedance-1-5-pro and doubao-seedance-1-0-pro.
480p, 720p, 1080p "720p"
Optional reference image. When included, the job runs in image-to-video mode and uses the image as the visual anchor. Only doubao-seedance-2-0 and doubao-seedance-2-0-fast accept this field; sending it with a 1.0 Pro or 1.5 Pro model returns HTTP 400.
Task created. Save the returned id and poll GET /v1/videos/{id}.
Task id. Use it as the path parameter for GET /v1/videos/{id}.
Object type, always video.
Echo of the requested model id.
Initial task status. A newly created task is returned as SUBMITTED.
SUBMITTED, IN_PROGRESS, SUCCESS, FAILED, ERROR Completion percentage. 0 at creation.
0 <= x <= 100Task creation time as a Unix timestamp in seconds.
Alias of id returned for compatibility. The value matches id.