Grok Imagine Keyframes

Grok Imagine keyframes pin up to four interior frames inside a clip on grok-imagine-video-1.5, between a first frame and a last frame. Here is what the xAI API supports.

imaginegrok.org is independent and is not affiliated with xAI, and the video generator on this site does not expose keyframes — it animates one still at /grok-image-to-video. This page explains how Grok Imagine keyframes work, as documented in the xAI developer docs.

Text or image in · Grok Imagine out

Grok Imagine Keyframes

The workspace on this page does not expose Grok Imagine keyframes. It runs short image-to-video from a single still, with no first/last frame fields and no interior pins.

Free to try · No X account · Credits when you need more

Required
First frameThe still the clip starts from — one sharp, well-lit frame.

This workspace animates one still — there are no first/last frame fields and no interior keyframe pins.

Vibe
Music
dramatic cinematic score · follows Vibe
254 chars
PublicFeatured

Your video may be selected and published to the public Explore feed to inspire other creators.

Coastal scooter ride · real output from this generator

Grok Imagine keyframes demo: first frame to last frame

Made with Grok Imagine's first/last-frame mode: two stills set as the first frame and the last frame, and Grok Imagine animated everything in between — 6 seconds, with audio. This Grok Imagine keyframes example uses only the first and last frames; no interior keyframes were used. It was not made on this site's generator, which animates a single still.

A boy kneeling on a hilltop at sunset holding a red kite on a string, the pinned first frame
The first frameThe pinned first frame: a boy kneeling on a hilltop at sunset, red kite in hand. Example generated for illustration.
The same boy now standing on the hilltop as the red kite flies high above him, the pinned last frame
The last frameThe pinned last frame: the same boy standing as the kite flies high. Example generated for illustration.
The Grok Imagine keyframes resultThe result: Grok Imagine animated the six seconds between the two stills above, with audio. First and last frames only — no interior keyframes were pinned. Example generated for illustration.

How It Works

Four clear steps from prompt to finished output — built for creators who want results without an X Premium maze.

Step 1

Give the clip a first frame

The image field sets the first frame of the video. It accepts a URL, a data-URI, or a file_id, and text-to-video and image-to-video both run on grok-imagine-video-1.5.

Step 2

Pin interior keyframes

The keyframes field takes up to 4 interior frames, each an image plus a timestamp in seconds. A timestamp must be strictly greater than 0 and less than the clip duration, and the prompt becomes optional whenever a frame is pinned.

Step 3

Snap to the 1/3-second grid

Grok Imagine keyframes anchor to a 1/3-second grid. Two keyframes that round to the same slot are rejected, so keep pins at least 1/3 of a second apart. In xAI's cookbook runs, each keyframe showed up within about 1/3 s of its mark, usually a little early.

Step 4

Optionally pin the last frame

last_frame sets the final image, and keyframes can be combined with reference_images and reference_audios. Pass the same image as image and last_frame and the clip loops back to its start.

Features

Capabilities tuned for the keyword intent of this page — not a generic feature dump.

Only on grok-imagine-video-1.5

Keyframes are supported on grok-imagine-video-1.5 only. The older grok-imagine-video model does not have them, and neither does grok-imagine-video-1.5-lite (https://docs.x.ai/developers/model-capabilities/video/reference-to-video).

Up to 4 interior pins

Each Grok Imagine keyframes entry is an image plus a timestamp. With first frame, last frame, and 4 interior pins, you can storyboard a whole 15-second shot before generating.

Clips from 1 to 15 seconds

grok-imagine-video-1.5 generates 1–15 s clips at 480p, 720p, or 1080p native resolution, with native audio and lip-synced speech (https://docs.x.ai/developers/model-capabilities/video/overview).

API pricing per second

Output is billed per second: $0.08 at 480p, $0.14 at 720p, and $0.25 at 1080p, plus $0.01 per input image (https://docs.x.ai/developers/pricing, last updated October 10, 2026).

The loop trick

xAI's “a year that loops” example passes spring at 0 s, summer at 3 s, autumn at 6 s, and winter at 9 s as keyframes, then spring again as last_frame at 12 s — 720p, 16:9, and the clip loops.

Prompt optional when pinned

When a frame is pinned, the prompt is optional. xAI's tip: pins work best when they share a scene — generate one still, then produce the others through image editing so only what should change actually differs.

How to Use Grok Imagine Keyframes

  1. 1.Generate the anchor still first

    Do not hunt for keyframe stills at random. Make one good still of the scene, then edit that image into the other states so every pin shares lighting, lens, and composition.

  2. 2.Write the REST call

    POST https://api.x.ai/v1/videos/generations with model "grok-imagine-video-1.5", an image for the first frame, a last_frame, and keyframes like {"image":{"url":"MID"},"timestamp_s":3.0} for interior pins, plus duration.

  3. 3.Know your SDK's field names

    REST uses keyframes, image, and timestamp_s. The Python SDK takes keyframes with image_url or image_file_id and timestamp. The Vercel AI SDK uses providerOptions.xai.keyframes with imageUrl and timestampSeconds (needs @ai-sdk/xai 5.0.8+); in Vercel endpoints the field is frameImages.

  4. 4.Space pins at least 1/3 s apart

    Grok Imagine keyframes snap to a 1/3-second grid and reject two pins that land in the same slot. If a request fails with close timestamps, spread them out.

  5. 5.Keep the scene consistent

    xAI's docs say pins work best when they share a scene. The Grok Imagine Odyssey team used a middle keyframe so Odysseus enters on cue with a plough — same field, same look, one timed entrance (/grok-imagine-odyssey).

Who Uses This

Developers on the xAI API

You are wiring grok-imagine-video-1.5 into a product and need the exact field names, the 1/3-second grid rule, and what keyframes cost per second.

Storyboard-first creators

You already know your start, middle, and end frames. Grok Imagine keyframes turn that storyboard into a single generation instead of three clips stitched in an editor.

Loop makers

Pass the same image as image and last_frame and the clip loops. Grok Imagine keyframes are the reason a seamless season transition fits in one 12-second request.

People evaluating this site

If you came to imaginegrok.org looking for Grok Imagine keyframes, this page is the explainer; the generator here animates a single still and does not expose interior pins.

The fields, the grid, and an example request

Grok Imagine keyframes are an API feature on grok-imagine-video-1.5. Three frame fields matter: - image — the first frame. URL, data-URI, or file_id. - last_frame — the final frame. - keyframes — up to 4 interior frames, each { image, timestamp_s }. timestamp_s must be strictly greater than 0 and strictly less than the clip's duration. Anchors snap to a 1/3-second grid, and two keyframes that round to the same slot are rejected — keep pins at least 1/3 s apart. The prompt is optional whenever a frame is pinned, and keyframes combine with reference_images and reference_audios (https://docs.x.ai/developers/model-capabilities/video/reference-to-video). Example request: POST https://api.x.ai/v1/videos/generations { "model": "grok-imagine-video-1.5", "image": { "url": "START" }, "last_frame": { "url": "END" }, "keyframes": [ { "image": { "url": "MID" }, "timestamp_s": 3.0 } ], "duration": 10 } SDK names differ: the Python SDK takes keyframes with image_url or image_file_id and timestamp; the Vercel AI SDK reads providerOptions.xai.keyframes with imageUrl and timestampSeconds on @ai-sdk/xai 5.0.8 or newer, and Vercel endpoints expose the same idea as frameImages. Pricing: $0.08/s at 480p, $0.14/s at 720p, $0.25/s at 1080p, and $0.01 per input image (https://docs.x.ai/developers/pricing, last updated October 10, 2026). Clips run 1–15 s at 480p/720p/1080p native (https://docs.x.ai/developers/model-capabilities/video/overview).

Loops, time-lapses, and the shared-scene tip

xAI's own examples show the two patterns people actually use. The loop: pass the same image as image and last_frame. In the "a year that loops" example, spring sits at 0 s, summer at 3 s, autumn at 6 s, winter at 9 s, and spring returns as last_frame at 12 s — 720p, 16:9, and the video ends where it started. The time-lapse: the cookbook's photo-to-time-lapse run (https://docs.x.ai/cookbook/examples/photo-to-time-lapse) reports that each keyframe showed up within about 1/3 s of its mark, usually a little early. Plan pins accordingly if a hit must land on an exact beat. The shared-scene tip, straight from the docs: pins work best when they share a scene. Generate one still of the scene, then make the other pins by editing that image, so only the element that should change actually differs. The Grok Imagine Odyssey crew used the same mechanism — a middle keyframe timed so Odysseus walks in on cue with a plough (/grok-imagine-odyssey).

What imaginegrok.org does instead

This site's generator does not expose Grok Imagine keyframes. There is no first-frame/last-frame pair and no interior pin: imaginegrok.org runs short image-to-video from a single still at /grok-image-to-video and on this page. If you need pinned frames, the xAI API at docs.x.ai is the documented path. If you need one still turned into a moving clip with audio, that is exactly what this site does. imaginegrok.org is independent and is not affiliated with xAI; credits here are unrelated to xAI API pricing.

Grok Imagine Keyframes — FAQ

On grok-imagine-video-1.5, keyframes are up to 4 interior frames pinned inside a clip at chosen timestamps, between the image (first frame) and last_frame fields. Anchors snap to a 1/3-second grid, and the prompt is optional whenever a frame is pinned.
Only grok-imagine-video-1.5. The feature is not available on the older grok-imagine-video model and not on grok-imagine-video-1.5-lite (https://docs.x.ai/developers/model-capabilities/video/reference-to-video).
timestamp_s must be strictly greater than 0 and less than the duration. Pins snap to a 1/3-second grid, and two keyframes that round to the same slot are rejected — keep Grok Imagine keyframes at least 1/3 s apart.
REST: keyframes, image, timestamp_s. Python SDK: keyframes with image_url or image_file_id plus timestamp. Vercel AI SDK: providerOptions.xai.keyframes with imageUrl and timestampSeconds, which needs @ai-sdk/xai 5.0.8 or newer; Vercel endpoints call it frameImages.
Pass the same image as image and last_frame. xAI's example pins spring at 0 s, summer at 3 s, autumn at 6 s, winter at 9 s, and spring again as last_frame at 12 s, at 720p in 16:9.
grok-imagine-video-1.5 bills $0.08/s at 480p, $0.14/s at 720p, and $0.25/s at 1080p, plus $0.01 per input image, per https://docs.x.ai/developers/pricing (last updated October 10, 2026).
No. The generator on this site animates a single still (image-to-video), with no first/last frame fields and no interior pins. imaginegrok.org is independent and is not affiliated with xAI. The single-still workflow lives at /grok-image-to-video.

Turn one still into a short video on imaginegrok.org

Generate a video

Related