xAI
비디오 생성
CometAPI POST /grok/v1/videos/generations를 사용해 Grok으로 비디오를 생성하고, 프롬프트로 입력 이미지를 애니메이션화하며, request_id로 결과를 폴링합니다.
POST
이 엔드포인트를 사용하면 텍스트만으로, 또는 텍스트와 하나의 원본 이미지를 함께 사용해 Grok 비디오 작업을 시작할 수 있습니다.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.
request_id가 즉시 반환되므로 비동기 워크플로의 첫 단계로 취급하세요.
작은 요청으로 시작하기
model: grok-imagine-video사용- 첫 요청에서는
duration을1로,resolution을480p로 유지하세요 - 이미지-투-비디오를 원할 때만
image.url을 추가하세요 - base64를 보낼 경우 문서와 OpenAPI 예시 형식은
data:image/png;base64,<BASE64_IMAGE_DATA>로 유지하세요
작업 흐름
완료될 때까지 폴링
중첩된 provider status가
done이 될 때까지 비디오 생성 결과 가져오기를 호출하세요.인증
Bearer token authentication. Use your CometAPI key.
본문
application/json
Prompt for the video job.
예시:
"A candle flickers on a wooden table."
Output aspect ratio.
사용 가능한 옵션:
1:1, 16:9, 9:16, 4:3, 3:4, 3:2, 2:3 Output duration in seconds. xAI documents a range of 1 to 15 seconds.
Optional source image for image-to-video.
xAI video model id.
예시:
"grok-imagine-video"
Output resolution.
사용 가능한 옵션:
480p, 720p Deprecated size field. Prefer aspect_ratio and resolution.
Optional end-user identifier.
응답
200 - application/json
Request accepted.
Deferred request id used for polling.