Skip to main content
POST
이 엔드포인트를 사용하면 하나의 소스 이미지와 프롬프트로 Grok image-to-video 작업을 시작할 수 있습니다. request_id가 즉시 반환되므로 비동기 워크플로의 첫 단계로 다루어야 합니다.

작은 요청으로 시작하기

  • model: grok-imagine-video-1.5 사용
  • image.url을 공개된 JPEG, PNG 또는 WebP URL로 설정
  • 첫 요청에서는 duration1, resolution720p로 유지
  • 애니메이션 방향이 분명하도록 prompt를 구체적으로 작성
  • base64를 보낼 경우 문서와 OpenAPI 예시 형식은 data:image/png;base64,<BASE64_IMAGE_DATA>로 유지

기간과 해상도

작업 흐름

1

작업 생성

프롬프트와 소스 이미지를 전송한 다음, 반환된 request_id를 저장합니다.
2

완료될 때까지 폴링

중첩된 provider status가 done이 될 때까지 xAI 비디오 결과 가져오기를 호출합니다.
3

출력 저장

provider의 임시 전달 기간이 지난 뒤에도 필요하다면 최종 video.url을 자체 스토리지에 복사합니다.

인증

Authorization
string
header
필수

Bearer token authentication. Use your CometAPI key.

본문

application/json
prompt
string
필수

Prompt describing how the source image should animate. CometAPI requires this field for this route.

예시:

"Animate the still image with a slow camera move and natural motion."

aspect_ratio
enum<string>

Output aspect ratio. Combine with resolution to choose the target frame; for example 480p with 1:1 targets 480x480, 720p with 16:9 targets 1280x720, and 720p with 9:16 targets 720x1280. This endpoint does not expose an exact size field.

사용 가능한 옵션:
1:1,
16:9,
9:16,
4:3,
3:4,
3:2,
2:3
duration
integer
기본값:8

Output duration in seconds. Use an integer from 1 through 15. If omitted, CometAPI treats the request as an 8-second generation for billing and default handling.

image
object

Source image for image-to-video. Use a public JPEG, PNG, or WebP URL, or a data URI such as data:image/png;base64,<BASE64_IMAGE_DATA>.

model
string
기본값:grok-imagine-video-1.5

xAI video model id. The default example uses Grok Imagine 1.5 for image-to-video.

예시:

"grok-imagine-video-1.5"

output
object
resolution
enum<string>
기본값:720p

Output resolution. Use 720p for a small image-to-video test, or 1080p when you need a higher resolution tier.

사용 가능한 옵션:
480p,
720p,
1080p
size
string

Deprecated size field. Prefer aspect_ratio and resolution.

user
string

Optional end-user identifier.

응답

200 - application/json

Request accepted.

request_id
string
필수

Deferred request id used for polling.