POST /v1/videos를 사용해 텍스트 프롬프트 또는 참조 이미지로 Sora 2 비디오 생성 작업을 만들고, 이후 task ID로 상태를 조회해 결과를 확인합니다.
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를 사용하고, 속도보다 출력 품질이 더 중요하면 sora-2-pro를 사용하세요seconds를 4로 유지하세요size: 1280x720으로 시작하세요작업이 완료될 때까지 폴링
completed 또는 failed가 될 때까지 비디오 조회를 호출합니다.결과 다운로드 또는 리믹스
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"
}