Ana içeriğe atla
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
}
Bu endpoint’i bir ByteDance Seedance video işi başlatmak için kullanın. Tüm Seedance model katmanları aynı istek yapısını paylaşır; modeli model alanını ayarlayarak seçersiniz. Çağrı hemen bir görev kimliği döndürür ve işleme arka planda devam eder.

Bir model seçin

Model idKatmanNotlar
doubao-seedance-2-02.02.0 ailesindeki en yüksek kaliteli çıktı.
doubao-seedance-2-0-fast2.0Hızlı yineleme ve önizlemeler için 2.0’ın daha hızlı varyantı.
doubao-seedance-1-5-pro1.5 Pro1080p destekler. Yalnızca text-to-video.
doubao-seedance-1-0-pro1.0 Pro1080p ve 2 saniyeden başlayan daha kısa klipleri destekler. Yalnızca text-to-video.
Canlı kullanılabilirlik için Models sayfasına bakın.

Parametre aralıkları

AlanTürGerekliVarsayılanİzin verilen değerler
promptstringevetherhangi bir metin
modelstringevetdoubao-seedance-2-0, doubao-seedance-2-0-fast, doubao-seedance-1-5-pro, doubao-seedance-1-0-pro
secondsintegerhayır5modele bağlıdır (aşağıya bakın)
sizestringhayır16:921:9, 16:9, 4:3, 1:1, 3:4, 9:16
resolutionstringhayır720p2.0 modelleri için 480p, 720p; 1.5 Pro ve 1.0 Pro için 480p, 720p, 1080p
input_referencefilehayırJPEG, PNG veya WebP. Yalnızca 2.0 modelleri tarafından kabul edilir.

Modele göre süre aralığı

Modelseconds aralığı
doubao-seedance-2-0, doubao-seedance-2-0-fast4 ile 15 arası
doubao-seedance-1-5-pro4 ile 12 arası
doubao-seedance-1-0-pro2 ile 10 arası
Model aralığının dışında bir değer göndermek, HTTP 400 ile code: "InvalidParameter" ve duration hakkında bir mesaj döndürür.

Image-to-video desteği

Yalnızca 2.0 modelleri input_reference dosyasını kabul eder. input_reference değerini doubao-seedance-1-5-pro veya doubao-seedance-1-0-pro ile göndermek, the specified task_type r2v does not support model seedance-1-5-pro biçiminde bir mesajla HTTP 400 döndürür. Bu modelleri yalnızca text-to-video için kullanın.

Referans görsel yükleme

İstek gövdesi multipart/form-data biçimindedir. Bir 2.0 modelinde image-to-video çalıştırmak için görseli aynı istekte input_reference parçası olarak ekleyin:
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 değerini, ilk kare sabitleyicisi olarak kullanmak istediğiniz görselin mutlak veya göreli yolu ile değiştirin. Desteklenen formatlar JPEG, PNG ve WebP’dir.

Görev akışı

1

Görevi gönderin

En az prompt ve model ile bir POST isteği gönderin. Sonraki adım için dönen id değerini kaydedin.
2

Görevi sorgulayın

Bir Seedance videosunu getirin çağrısını her 10 ila 20 saniyede bir yapın.
3

Çıktıyı indirin

status değeri SUCCESS olduğunda, video_url adresindeki dosyayı indirin ve uzun süreli erişime ihtiyacınız varsa kendi barındırmanıza alın. URL imzalıdır ve sınırlı bir sürenin ardından sona erer.

Hata yanıtları

Endpoint, gerekli bir alan eksik olduğunda, bir değer kabul edilen aralığın dışında kaldığında veya image-to-video desteklemeyen bir modele input_reference gönderildiğinde HTTP 400 döndürür. Bearer token eksik ya da geçersiz olduğunda HTTP 401 döndürür. Hata gövdesi iki biçimden birini kullanır; tam alanlar için playground içindeki 400 ve 401 örneklerine bakın.

Yetkilendirmeler

Authorization
string
header
gerekli

Bearer token authentication. Use your CometAPI key.

Gövde

multipart/form-data
prompt
string
gerekli

Text prompt that describes the video. Required.

Örnek:

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

model
enum<string>
gerekli

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.

Mevcut seçenekler:
doubao-seedance-2-0,
doubao-seedance-2-0-fast,
doubao-seedance-1-5-pro,
doubao-seedance-1-0-pro
Örnek:

"doubao-seedance-2-0-fast"

seconds
integer
varsayılan: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.

Gerekli aralık: 2 <= x <= 15
Örnek:

5

size
enum<string>
varsayılan:16:9

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

Mevcut seçenekler:
21:9,
16:9,
4:3,
1:1,
3:4,
9:16
Örnek:

"16:9"

resolution
enum<string>
varsayılan: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.

Mevcut seçenekler:
480p,
720p,
1080p
Örnek:

"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.

Yanıt

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

id
string
gerekli

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

object
string
gerekli

Object type, always video.

model
string
gerekli

Echo of the requested model id.

status
enum<string>
gerekli

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

Mevcut seçenekler:
SUBMITTED,
IN_PROGRESS,
SUCCESS,
FAILED,
ERROR
progress
integer
gerekli

Completion percentage. 0 at creation.

Gerekli aralık: 0 <= x <= 100
created_at
integer
gerekli

Task creation time as a Unix timestamp in seconds.

task_id
string

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