imagesarrayrequired
One or more reference image URLs to guide the video generation as style and content references. Reference in prompt as <IMAGE_0>, <IMAGE_1>, etc. Maximum 7 images.
xai/grok-imagine-video/1.5/reference-to-videoGrok Imagine Video 1.5 is xAI's image-to-video AI model. Bring static images to life with fluid animation, consistent character motion, and professional-grade video output.
Try the model
PNG, JPEG, WebP, or GIF · 20 MiB maximum each
Customize your input with more control.
What would you like to do next?
Select an example to load its inputs and result into the playground.
{
"duration": 1,
"images": [
"https://static.sandbase.ai/examples/182071c8-4a68-49d6-8ddb-2e1ba5af7d4d/input/2e71e37f-fbf8-44ba-a7ad-c1a366f777bd.png"
],
"prompt": "the subject walks forward",
"resolution": "480p"
}Grok Imagine Video 1.5 reference-to-video: reference images keep characters and objects consistent in a 1–15 second clip.
| Field | Type | Default | Notes |
|---|---|---|---|
prompt | string, required | — | Up to 4,096 characters. |
aspect_ratio | 21:9 / 16:9 / 3:2 / 4:3 / 5:4 / 1:1 / 4:5 / 3:4 / 2:3 / 9:16 | — | Output frame shape. |
resolution | 480p / 720p | 720p | Sets the per-second rate. |
duration | integer 1–15 | 8 | Output length in seconds. |
images | image URL[], required | — | Reference images, Image 1, Image 2, … |
Per output second: $0.08 at 480p and $0.14 at 720p, plus $0.01 per reference image.
| Output | 480p | 720p |
|---|---|---|
| 8s (default) | $0.65 | $1.13 |
| 15s | $1.21 | $2.11 |
Failed runs are not charged.
Other Grok Imagine Video 1.5 endpoints: xai/grok-imagine-video/1.5/text-to-video, xai/grok-imagine-video/1.5/image-to-video, xai/grok-imagine-video/1.5/lite/text-to-video, xai/grok-imagine-video/1.5/lite/image-to-video, xai/grok-imagine-video/text-to-video (previous version).
Start building
Submit this model through the SandBase Unified Run API.
# The quoted heredoc keeps Unicode and shell metacharacters unchanged.
result=$(curl --fail-with-body --silent \
-X POST "https://api.sandbase.ai/v1/run" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
--data-binary @- <<'SANDBASE_JSON'
{
"model": "xai/grok-imagine-video/1.5/reference-to-video",
"images": [
"https://v3b.fal.media/files/b/0a8b90e0/BFLE9VDlZqsryU-UA3BoD_image_004.png"
],
"prompt": "The person from <IMAGE_0> walks through a rainy neon-lit street.",
"duration": 8,
"resolution": "720p"
}
SANDBASE_JSON
)
run_id=$(printf '%s' "$result" | jq -r .id)
for attempt in $(seq 1 120); do
status=$(printf '%s' "$result" | jq -r .status)
case "$status" in completed|failed|timeout) break ;; esac
sleep 2
result=$(curl --fail-with-body --silent \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
"https://api.sandbase.ai/v1/run/$run_id")
done
status=$(printf '%s' "$result" | jq -r .status)
[ "$status" = completed ] || { echo "Generation ended: $status" >&2; exit 1; }
printf '%s\n' "$result"Create a SandBase API key and set it in your server environment. All requests use Bearer authentication.
export SANDBASE_API_KEY="YOUR_API_KEY"Keep the key on your server. Do not expose it in browser code or commit it to a repository.
POST to /v1/run with this model ID and its inputs. The request example above includes submission and polling.
Use the returned run ID to poll until the status is completed, failed or timeout. Read output only after completed.
curl "https://api.sandbase.ai/v1/run/$RUN_ID" \
-H "Authorization: Bearer $SANDBASE_API_KEY"Pass a publicly accessible file URL in the model’s image, video or audio field. Supported formats and limits are shown beside each Playground input.
Use the upload or replace control on supported image fields in the Playground. Video URL fields accept a hosted driving video; they do not imply video-upload support.
imagesarrayrequiredOne or more reference image URLs to guide the video generation as style and content references. Reference in prompt as <IMAGE_0>, <IMAGE_1>, etc. Maximum 7 images.
promptstringrequiredText prompt describing the video. Tag references as <IMAGE_0>, <IMAGE_1>, etc.
durationintegerVideo duration in seconds.
Default: 8
Minimum: 1
Maximum: 15
resolutionstringResolution of the output video.
Default: "720p"
Possible values: "480p", "720p"
aspect_ratiostringThe aspect ratio of the generated image.
Possible values: "21:9", "16:9", "3:2", "4:3", "5:4", "1:1", "4:5", "3:4", "2:3", "9:16"
{
"model": "xai/grok-imagine-video/1.5/reference-to-video",
"images": [
"https://v3b.fal.media/files/b/0a8b90e0/BFLE9VDlZqsryU-UA3BoD_image_004.png"
],
"prompt": "The person from <IMAGE_0> walks through a rainy neon-lit street.",
"duration": 8,
"resolution": "720p"
}A completed run exposes its result in output. The following is the model’s saved example, not a new generation.
[
{
"poster": "https://static.sandbase.ai/examples/posters/d087fb8ab1ef444377f3.jpg",
"source": "Completed user prediction (human visual safety screened)",
"source_url": "https://www.sandbase.ai",
"url": "https://static.sandbase.ai/examples/182071c8-4a68-49d6-8ddb-2e1ba5af7d4d/output/95798e92-c36f-4ca4-bd1a-bcff7dcee1ca.mp4"
}
]