Model Capabilities

Image-to-Video

Transform a still image into a video by providing a source image along with an optional prompt. The model animates the image content based on your instructions. On grok-imagine-video-1.5, image-to-video supports native 1080p. Sending image alone is image-to-video. Combining it with last_frame, keyframes, or reference_images is reference-to-video with that image as the pinned first frame. See First & Last frame and Keyframes.

You can provide the source image as:

The demo below shows this in action; hold to animate a still image:

Time-lapse
Loading video…
Hold to animate
Playing
import { xai } from "@ai-sdk/xai";import { experimental_generateVideo as generateVideo } from "ai";const result = await generateVideo({    model: xai.video("grok-imagine-video-1.5"),    prompt: {        image: "https://docs.x.ai/assets/api-examples/video/milkyway-still.png",        text: "Generate a slow and serene time-lapse",    },    duration: 12,    providerOptions: {        xai: { resolution: "720p" },    },});const videoUrl = result.providerMetadata?.xai?.videoUrl;console.log(videoUrl);

In the Vercel AI SDK, the prompt parameter accepts an object with image and text fields for image-to-video generation. The image field can be a URL string, base64-encoded string, Uint8Array, ArrayBuffer, or Buffer.



Last updated: September 21, 2026