Skip to main content
POST
cURL
Bu endpoint’i kullanarak bir Wan metinden videoya görevi oluşturun. API hemen bir görev kimliği döndürür, bu nedenle döndürülen id değerini saklayın ve terminal bir duruma ulaşana kadar görevi sorgulayın. POST /v1/videos multipart/form-data kullanır; skaler kontrolleri form alanları olarak iletin.

Bir model seçin

Süreyi ve boyutu ayarlayın

Hedef model için size değerini aşağıdaki WxH değerlerinden biri olarak ayarlayın.

Wan 2.7 boyut değerleri

Wan 2.6 boyut değerleri

Görev akışı

1

Görevi oluştur

Multipart form isteğini gönderin ve döndürülen id değerini saklayın.
2

Görevi sorgula

status değeri completed, failed veya error olana kadar Bir Wan videosunu al çağrısını yapın.
3

Sonucu indir

Görev completed olduğunda, MP4 dosyasını indirmek için Wan video içeriğini al çağrısını yapın.

Yetkilendirmeler

Authorization
string
header
gerekli

Bearer authentication. Use your CometAPI API key.

Gövde

multipart/form-data
model
enum<string>
gerekli

Wan model ID for this endpoint.

Mevcut seçenekler:
wan2.6,
wan2.7
Örnek:

"wan2.6"

prompt
string
gerekli

Text prompt that describes the video to generate.

Örnek:

"A small robot walks through a bright greenhouse with smooth camera movement."

seconds
string

Requested clip duration in seconds. For wan2.6, use 5, 10, or 15. For wan2.7, use an integer from 2 through 15. Default is 5.

Örnek:

"5"

size
string

Supported WxH size values. For wan2.6: 1280x720, 720x1280, 1088x832, 832x1088, 1920x1080, 1080x1920, 1440x1440, 1632x1248, 1248x1632. For wan2.7: 1280x720, 720x1280, 1920x1080, 1080x1920, 1440x1440. Default is 1920x1080.

Örnek:

"1280x720"

Yanıt

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

id
string
gerekli

Task ID. Use this value with retrieve and content endpoints.

Örnek:

"task_example"

object
string
gerekli

Object type. Video tasks return video.

Örnek:

"video"

model
string
gerekli

Model ID used for the task.

Örnek:

"wan2.6"

status
enum<string>
gerekli

Task lifecycle status. Poll until the value is completed, failed, or error.

Mevcut seçenekler:
queued,
in_progress,
completed,
failed,
error
Örnek:

"queued"

progress
integer
gerekli

Task progress as a coarse percentage.

Gerekli aralık: 0 <= x <= 100
Örnek:

0

created_at
integer
gerekli

Task creation time as a Unix timestamp in seconds.

Örnek:

1779938152

task_id
string

Compatibility alias for id when present.

Örnek:

"task_example"

completed_at
integer

Task completion time as a Unix timestamp in seconds. This field appears on completed tasks.

Örnek:

1779938219

video_url
string

Temporary video delivery URL. This field appears on completed tasks.

Örnek:

"<temporary-video-url>"

error
object

Failure details. This field appears when the task fails.