xAI
비디오 편집
POST /grok/v1/videos/edits를 사용해 텍스트 프롬프트로 원본 비디오를 편집하고, 모션을 유지하며, 비동기 폴링 결과를 위한 request_id를 받습니다.
POST
Create an xAI video edit job
이 엔드포인트를 사용하면 텍스트 지시로 기존 MP4를 편집할 수 있습니다. 출력 결과는 새 생성 요청보다 원본 클립의 타이밍과 구도에 더 가깝게 유지됩니다.Documentation Index
Fetch the complete documentation index at: https://apidoc.cometapi.com/llms.txt
Use this file to discover all available pages before exploring further.
요청을 보내기 전에
- 접근 가능한
video.url을 제공하세요 - 원본 클립은 짧게 유지하세요. xAI의 자체 가이드에서는 편집 길이를 약 8.7초로 제한합니다
- 하나의 명확한 변경 사항을 설명하는 집중된 지시를 사용하세요
- 편집은 생성과 동일한 폴링 흐름을 사용하므로 반환된
request_id를 저장하세요
편집 흐름
최종 결과 폴링
작업이 완료될 때까지 비디오 생성 결과 가져오기를 호출하세요.
CometAPI에서 달라지는 점
xAI는 비디오 편집을 생성과 동일한 비동기 수명 주기로 문서화하며, 선택적 원본 이미지 대신 원본 비디오를 사용한다는 점만 다릅니다. CometAPI는 이 동작과 동일한 폴링 엔드포인트를 유지하므로, 편집 워크플로는 여전히 시작 -> 폴링 -> 다운로드입니다.인증
Bearer token authentication. Use your CometAPI key.
본문
application/json
Edit instruction describing the change you want.
예시:
"Add snow to the scene."
Source video to edit. xAI documents an input limit of about 8.7 seconds.
xAI video model id.
예시:
"grok-imagine-video"
Optional output delivery configuration.
Optional end-user identifier.
응답
200 - application/json
Request accepted.
Deferred request id used for polling.