Metin prompt’larından veya referans görsellerden Sora 2 video üretim görevleri oluşturmak için POST /v1/videos kullanın, ardından sonuçlar için görev kimliğine göre durumu sorgulayın.
curl --request POST \
--url https://api.cometapi.com/v1/videos \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form 'prompt=A paper airplane glides across a desk.' \
--form input_reference='@example-file'{
"created_at": 1773296991,
"id": "video_69b25d5f467c81908733a56bc236b4df",
"model": "sora-2",
"object": "video",
"progress": 0,
"seconds": "4",
"size": "1280x720",
"status": "queued"
}sora-2, çıktı kalitesinin hızdan daha önemli olduğu durumlarda ise sora-2-pro kullanınseconds değerini 4 olarak tutunsize: 1280x720 ile başlayınİş tamamlanana kadar sorgulayın
completed veya failed olana kadar Retrieve Video çağrısı yapın.Sonucu indirin veya remix yapın
Bearer token authentication. Use your CometAPI key.
Text prompt that describes the video you want to create.
"A paper airplane glides across a desk."
Sora model ID. Choose a current model from the Models page.
"sora-2"
Clip duration in seconds.
4, 8, 12 "4"
Output resolution formatted as width x height.
720x1280, 1280x720, 1024x1792, 1792x1024 "1280x720"
Optional reference image uploaded as a file. The image should match the target size you request.
curl --request POST \
--url https://api.cometapi.com/v1/videos \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form 'prompt=A paper airplane glides across a desk.' \
--form input_reference='@example-file'{
"created_at": 1773296991,
"id": "video_69b25d5f467c81908733a56bc236b4df",
"model": "sora-2",
"object": "video",
"progress": 0,
"seconds": "4",
"size": "1280x720",
"status": "queued"
}