Langsung ke konten utama
POST
/
v1
/
videos
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-fast"' \ -F 'seconds="5"' \ -F 'size="16:9"' \ -F 'resolution="720p"'
{ "id": "task_abc123", "task_id": "task_abc123", "object": "video", "model": "doubao-seedance-2-0-fast", "status": "SUBMITTED", "progress": 0, "created_at": 1776681149 }
Gunakan endpoint ini untuk memulai job video ByteDance Seedance. Semua tier model Seedance menggunakan bentuk request yang sama; Anda memilih model dengan menetapkan field model. Pemanggilan ini langsung mengembalikan task id dan proses render berlanjut di latar belakang.

Pilih model

Model idTierCatatan
doubao-seedance-2-02.0Output dengan kualitas tertinggi dalam keluarga 2.0.
doubao-seedance-2-0-fast2.0Varian 2.0 yang lebih cepat untuk iterasi dan pratinjau singkat.
doubao-seedance-1-5-pro1.5 ProMendukung 1080p. Hanya text-to-video.
doubao-seedance-1-0-pro1.0 ProMendukung 1080p dan klip yang lebih pendek mulai dari 2 detik. Hanya text-to-video.
Lihat halaman Models untuk ketersediaan live.

Rentang parameter

FieldTipeWajibDefaultNilai yang diizinkan
promptstringyateks apa pun
modelstringyadoubao-seedance-2-0, doubao-seedance-2-0-fast, doubao-seedance-1-5-pro, doubao-seedance-1-0-pro
secondsintegertidak5bergantung pada model (lihat di bawah)
sizestringtidak16:921:9, 16:9, 4:3, 1:1, 3:4, 9:16
resolutionstringtidak720p480p, 720p untuk model 2.0; 480p, 720p, 1080p untuk 1.5 Pro dan 1.0 Pro
input_referencefiletidakJPEG, PNG, atau WebP. Hanya diterima oleh model 2.0.

Rentang durasi berdasarkan model

ModelRentang seconds
doubao-seedance-2-0, doubao-seedance-2-0-fast4 hingga 15
doubao-seedance-1-5-pro4 hingga 12
doubao-seedance-1-0-pro2 hingga 10
Mengirim nilai di luar rentang model akan mengembalikan HTTP 400 dengan code: "InvalidParameter" dan pesan tentang duration.

Dukungan image-to-video

Hanya model 2.0 yang menerima file 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.

Unggah gambar referensi

Body request adalah 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'
Ganti /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.

Alur task

1

Submit the task

Kirim request POST dengan setidaknya prompt dan model. Simpan id yang dikembalikan untuk langkah berikutnya.
2

Poll the task

Panggil Retrieve a Seedance video setiap 10 hingga 20 detik.
3

Download the output

Saat status menjadi SUCCESS, unduh file di video_url dan host ulang jika Anda memerlukan akses jangka panjang. URL tersebut ditandatangani dan kedaluwarsa setelah jangka waktu terbatas.

Respons error

Endpoint ini mengembalikan HTTP 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.

Otorisasi

Authorization
string
header
wajib

Bearer token authentication. Use your CometAPI key.

Body

multipart/form-data
prompt
string
wajib

Text prompt that describes the video. Required.

Contoh:

"A slow cinematic camera push across a coastal landscape at sunrise."

model
enum<string>
wajib

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.

Opsi yang tersedia:
doubao-seedance-2-0,
doubao-seedance-2-0-fast,
doubao-seedance-1-5-pro,
doubao-seedance-1-0-pro
Contoh:

"doubao-seedance-2-0-fast"

seconds
integer
default:5

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.

Rentang yang diperlukan: 2 <= x <= 15
Contoh:

5

size
enum<string>
default:16:9

Output aspect ratio. All Seedance models accept the same set of values.

Opsi yang tersedia:
21:9,
16:9,
4:3,
1:1,
3:4,
9:16
Contoh:

"16:9"

resolution
enum<string>
default:720p

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.

Opsi yang tersedia:
480p,
720p,
1080p
Contoh:

"720p"

input_reference
file

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.

Respons

Task created. Save the returned id and poll GET /v1/videos/{id}.

id
string
wajib

Task id. Use it as the path parameter for GET /v1/videos/{id}.

object
string
wajib

Object type, always video.

model
string
wajib

Echo of the requested model id.

status
enum<string>
wajib

Initial task status. A newly created task is returned as SUBMITTED.

Opsi yang tersedia:
SUBMITTED,
IN_PROGRESS,
SUCCESS,
FAILED,
ERROR
progress
integer
wajib

Completion percentage. 0 at creation.

Rentang yang diperlukan: 0 <= x <= 100
created_at
integer
wajib

Task creation time as a Unix timestamp in seconds.

task_id
string

Alias of id returned for compatibility. The value matches id.