Skip to main content
POST
이 엔드포인트를 사용하여 텍스트, 소스 이미지 또는 참조 입력에서 Grok 동영상 작업을 시작하세요. 즉시 request_id를 반환하므로 비동기 워크플로의 첫 단계로 처리하세요. 항상 model: grok-imagine-video-1.5을 명시적으로 전송하세요. 여기에서 설명하는 1.5 요청 형식에는 modelprompt가 필요합니다.

입력 모드 선택

데이터 URI에는 data:image/png;base64,<BASE64_IMAGE_DATA>을 사용하세요. 각 reference_images 항목은 동일한 url 필드를 사용합니다. 참조 오디오 항목은 voice_id 사전 설정을 사용하며, 예를 들어 eve과 같습니다. 프롬프트에서 <IMAGE_0><AUDIO_0> 같은 태그로 해당 참조를 식별할 수 있습니다.

작은 요청으로 시작하기

  • model: grok-imagine-video-1.5 사용
  • 첫 요청에서는 duration1로, resolution480p로 유지하세요.
  • 장면과 움직임이 명확하도록 prompt을 명시적으로 지정하세요.
  • 참조 이미지와 음성을 결합하기 전에 입력 모드를 한 번에 하나씩 추가하세요.

길이 및 해상도

생성된 동영상에는 오디오 트랙이 포함됩니다. 애플리케이션이 특정 출력 형식에 의존하는 경우 duration, resolutionaspect_ratio를 명시적으로 설정하세요.

작업 흐름

1

작업 만들기

모델, 프롬프트 및 모든 입력을 전송한 다음 반환된 request_id를 저장하세요.
2

완료 상태 폴링

다음 xAI 동영상 결과 가져오기 을 호출하여 최상위 statusdone, failed 또는 expired 중 하나가 될 때까지 확인하세요. 작업 메타데이터가 준비되는 동안 초기 응답에는 에코된 request_id만 포함될 수 있습니다.
3

출력 유지

임시 제공 기간 이후에도 필요하면 최종 video.url를 자체 스토리지에 복사하세요.

인증

Authorization
string
header
필수

Use your CometAPI API key as the bearer value.

본문

application/json
model
enum<string>
필수

The Grok video model ID. Send this field explicitly so the request uses Grok Imagine Video 1.5.

사용 가능한 옵션:
grok-imagine-video-1.5
예시:

"grok-imagine-video-1.5"

prompt
string
필수

A description of the scene, motion, and audio. Reference-to-video prompts can identify inputs with tags such as <IMAGE_0> and <AUDIO_0>.

Minimum string length: 1
예시:

"A paper boat glides across a quiet pond at sunrise."

duration
integer
기본값:8

The output duration in seconds. Use an integer from 1 through 15.

필수 범위: 1 <= x <= 15
aspect_ratio
enum<string>

The output aspect ratio. Text-to-video uses 16:9 when omitted. Image-to-video uses the source image's aspect ratio when omitted.

사용 가능한 옵션:
1:1,
16:9,
9:16,
4:3,
3:4,
3:2,
2:3
예시:

"16:9"

resolution
enum<string>
기본값:480p

The output resolution. Reference-to-video requests support 480p and 720p; text-to-video and image-to-video also support 1080p.

사용 가능한 옵션:
480p,
720p,
1080p
image
object

The source image for image-to-video. Do not combine this field with reference_images or reference_audios.

reference_images
object[]

Visual references for reference-to-video. Each item accepts a public image URL or image data URI. Do not combine this field with image.

Required array length: 1 - 7 elements
reference_audios
object[]

Preset voice references for reference-to-video. Do not combine this field with image.

Required array length: 1 - 3 elements

응답

200 - application/json

Request accepted.

request_id
string
필수

The deferred request ID used to poll GET /grok/v1/videos/{request_id}.

마지막 수정일 2026년 8월 21일