All models

Grok Imagine Video

xai/grok-imagine-video
xAI Video GenerationImage-to-VideoMultimodal

xAI's video generation model. Generates, edits, and extends videos from text and image inputs with native synchronized audio including dialogue, sound effects, and music. Supports multiple creative modes (normal, fun, custom).

Quick start

# Inspect the price — a plain request returns the 402 challenge:
curl -i https://api.glianalabs.com/v1/infer \
  -H "content-type: application/json" \
  -d '{
    "model": "xai/grok-imagine-video",
    "image": <object>,
    "prompt": <string>,
    "video": <object>
  }'

# Pay + run in one step with the mppx CLI (create a wallet: npx mppx account create):
npx mppx https://api.glianalabs.com/v1/infer \
  -J '{"model": "xai/grok-imagine-video", "image": "<object>", "prompt": "<string>", "video": "<object>"}'

Examples

Parameters

Input
aspect_ratio string

Output aspect ratio (e.g. 16:9, 1:1, 9:16).

duration integer

Length of the output in seconds.

image object

Input image (HTTPS URL or upload) to guide or edit from.

prompt string

Text prompt describing what to generate.

reference_images array

Reference images that guide characters, style, or composition.

resolution string

Output resolution / quality tier.

size string

Output dimensions (width × height).

user string

Optional end-user identifier for abuse monitoring; not required.

video object

Input video (HTTPS URL or upload) to edit or extend.

Output
video: string