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.
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.
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
This workspace animates one still — there are no first/last frame fields and no interior keyframe pins.
Your video may be selected and published to the public Explore feed to inspire other creators.
Coastal scooter ride · real output from this generator
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.


Four clear steps from prompt to finished output — built for creators who want results without an X Premium maze.
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.
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.
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.
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.
Capabilities tuned for the keyword intent of this page — not a generic feature dump.
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).
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.
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).
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).
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.
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.
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.
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.
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.
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.
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).
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.
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.
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.
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.
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).
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).
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.