Grok Imagine Video 1.5 Preview
Grok Imagine Video 1.5 Preview is the preview release of SpaceXAI's Imagine Video 1.5 generation. It animates a starting image with synchronized audio in one pass, available through Vercel AI Gateway.
View API reference- Price
- $0.08, Per secondLowest available configuration
import { experimental_generateVideo as generateVideo } from 'ai';
const result = await generateVideo({ model: 'spacexai/grok-imagine-video-1.5-preview', prompt: 'A serene mountain lake at sunrise.'});Copy link to headingPlayground
Try out Grok Imagine Video 1.5 Preview by SpaceXAI. Usage is billed to your team at API rates. Free users (those who haven't made a payment) get $5 of credits every 30 days.
Your generated video will appear here.
Copy link to headingProviders
Route requests across multiple providers. Copy a provider slug to set your preference. Visit the docs for more info. Using a provider means you agree to their terms, listed under Legal.
| Provider |
|---|
Getting started
Generate videos with Grok Imagine Video 1.5 Preview using the experimental_generateVideo function from AI SDK 6 or later. AI Gateway handles routing and polls until the video is ready.
Install the AI SDK (pnpm add ai dotenv), create an API key from the API Keys page, and set it as AI_GATEWAY_API_KEY in your environment. Full setup is covered in the video generation quickstart.
import { experimental_generateVideo as generateVideo } from 'ai';import fs from 'node:fs';import 'dotenv/config';
async function main() { const result = await generateVideo({ model: 'spacexai/grok-imagine-video-1.5-preview', prompt: { image: 'https://example.com/cat.png', text: 'The cat slowly turns its head and blinks', }, });
// Save the generated video fs.writeFileSync('output.mp4', result.videos[0].uint8Array);
console.log('Video saved to output.mp4');}
main().catch(console.error);Top-level parameters
Load the supported top-level parameters: prompt.image, prompt.text, duration, and aspectRatio.
import { experimental_generateVideo as generateVideo } from 'ai';import fs from 'node:fs';import 'dotenv/config';
async function main() { const result = await generateVideo({ model: 'spacexai/grok-imagine-video-1.5-preview', prompt: { image: 'https://example.com/cat.png', text: 'The cat slowly turns its head and blinks', }, duration: 5, aspectRatio: '16:9', });
// Save the generated video fs.writeFileSync('output.mp4', result.videos[0].uint8Array);
console.log('Video saved to output.mp4');}
main().catch(console.error);| Parameter | Type | Required | Description |
|---|---|---|---|
prompt.image | string | Yes | URL of the image to animate. |
prompt.text | string | No | Description of the motion or animation. |
duration | number | No | Video length in seconds. 1-15 seconds. |
resolution | string | No | Resolution ('854x480', '1280x720', '1920x1080'). |
aspectRatio | string | No | Aspect ratio ('1:1', '16:9', '9:16', '4:3', '3:4', '3:2', '2:3'). |
frameImages | Array<{ image: string | Buffer; frameType: 'first_frame' }> | No | Opening frame of the clip, as a single first_frame entry. Replaces prompt.image and wins when both are set. Grok does not interpolate to an ending image, so a last_frame entry is ignored with a warning. |
Input limits
| Input | Formats | Sources | Max count | Max size | Limits |
|---|---|---|---|---|---|
| Image | — | url, base64 | 1 | — | — |
Provider options
Pass every Grok image-to-video option under providerOptions.xai.
import { experimental_generateVideo as generateVideo } from 'ai';import fs from 'node:fs';import 'dotenv/config';
async function main() { const result = await generateVideo({ model: 'spacexai/grok-imagine-video-1.5-preview', prompt: { image: 'https://example.com/cat.png', text: 'The cat slowly turns its head and blinks', }, duration: 5, providerOptions: { xai: { resolution: '720p', pollIntervalMs: 5000, pollTimeoutMs: 600000, }, }, });
// Save the generated video fs.writeFileSync('output.mp4', result.videos[0].uint8Array);
console.log('Video saved to output.mp4');}
main().catch(console.error);Pass Grok-specific options under providerOptions.xai in your generateVideo call.
| Parameter | Type | Required | Description |
|---|---|---|---|
resolution | '480p' | '720p' | No | Video resolution. Defaults to 480p. |
pollIntervalMs | number | No | How often to check task status. Defaults to 5000. |
pollTimeoutMs | number | No | Maximum wait time. Defaults to 600000 (10 minutes). |
Mode selection and frames
Editing, extension, and reference-to-video are mutually exclusive. Passing providerOptions.xai.videoUrl selects editing, and passing inputReferences selects reference-to-video; set providerOptions.xai.mode to choose explicitly.
The top-level parameters win over their provider-option equivalents: a first_frame in frameImages overrides prompt.image, and inputReferences overrides providerOptions.xai.referenceImageUrls.
Grok does not interpolate between a first and last frame. A last_frame entry in frameImages is ignored with a warning — use mode: 'extend-video' to continue from the end of an existing clip instead.
frameImages takes priority over references: when it is set, reference-to-video is not auto-selected.
Image to video
Animate a static image by passing prompt.image (a URL) with an optional prompt.text describing the motion. The output defaults to the input image’s aspect ratio; setting aspectRatio overrides it and stretches the image.
import { experimental_generateVideo as generateVideo } from 'ai';import fs from 'node:fs';import 'dotenv/config';
async function main() { const result = await generateVideo({ model: 'spacexai/grok-imagine-video-1.5-preview', prompt: { image: 'https://example.com/cat.png', text: 'The cat slowly turns its head and blinks', }, duration: 5, providerOptions: { xai: { pollTimeoutMs: 600000, }, }, });
// Save the generated video fs.writeFileSync('output.mp4', result.videos[0].uint8Array);
console.log('Video saved to output.mp4');}
main().catch(console.error);Copy link to headingAbout Grok Imagine Video 1.5 Preview
Grok Imagine Video 1.5 Preview is the preview build of SpaceXAI's Imagine Video 1.5 generation, released May 30, 2026 on AI Gateway. Grok Imagine Video 1.5 Preview generates video from an input image with synchronized audio in a single pass. Over the earlier Grok Imagine Video model, the 1.5 generation improves audio quality, prompt following, and photorealism. Face accuracy and character consistency hold across longer sequences, with better lighting and physical realism. Expanded reference image support gives more control over visual style and subject.
Integration runs through the AI SDK's generateVideo function, imported as experimental_generateVideo from AI SDK 6 or later. Pass a prompt object with an image and a text motion description. You control duration, aspect ratio, and resolution through parameters, with output available at 480p, 720p, and 1080p. Billing is per second of generated video, with rates by resolution shown on this page.
The stable grok-imagine-video-1.5 has since shipped as the production release of the same generation. Keep Grok Imagine Video 1.5 Preview for integrations you validated during the preview window, and plan new work against the stable model.
Copy link to headingWhat To Consider When Choosing a Provider
- Configuration: Grok Imagine Video 1.5 Preview is a preview build, and the stable
grok-imagine-video-1.5is the variant to target for new production work. Keep the preview pinned only where you validated behavior against this specific build. - Configuration: Video generation through AI Gateway requires AI SDK 6 or later and uses
experimental_generateVideo, an experimental API that may change between releases. Generation can take minutes, so extend fetch timeouts in Node.js. Output is billed per second of generated video, and rates vary by resolution. - Zero Data Retention: Zero Data Retention is offered on a per-provider and model basis. See the documentation for details.
- Authentication: AI Gateway authenticates requests using an API key or OIDC token. You do not need to manage provider credentials directly.
Copy link to headingWhen to Use Grok Imagine Video 1.5 Preview
Best for
- Validated Preview Workloads: Integrations tested against this build keep consistent behavior
- Image-To-Video Generation: A starting image plus a motion prompt returns a finished clip
- Audio-Inclusive Clips: Sound effects, ambience, and speech render in the same generation pass
- Style-Controlled Generation: Reference image support steers visual style and subject
Consider alternatives when
- New Production Work:
grok-imagine-video-1.5is the stable release of the same generation - Text-Only Prompting:
grok-imagine-videogenerates clips straight from text descriptions - Static Visuals:
grok-imagine-imageorgrok-imagine-image-procovers stills without video cost
Copy link to headingConclusion
Grok Imagine Video 1.5 Preview is the early-access build of the Imagine Video 1.5 generation on AI Gateway. Image-to-video generation, synchronized audio, and reference image support all work through the AI SDK's generateVideo function. For new projects, start with the stable grok-imagine-video-1.5 instead.
Copy link to headingFrequently Asked Questions
How does Grok Imagine Video 1.5 Preview relate to
grok-imagine-video-1.5?Grok Imagine Video 1.5 Preview is the preview build that reached AI Gateway first. The stable
grok-imagine-video-1.5is the production release of the same generation, so target the stable model for new work.What inputs does Grok Imagine Video 1.5 Preview take?
Grok Imagine Video 1.5 Preview is an image-to-video model. Pass a prompt object with an
imageand atextmotion description to the AI SDK'sgenerateVideofunction.Does Grok Imagine Video 1.5 Preview generate audio?
Yes. Sound effects, ambience, and speech render in the same pass as the video, synchronized to the action.
What resolutions does Grok Imagine Video 1.5 Preview support?
Output is available at 480p, 720p, and 1080p. Billing is per second of generated video, with rates by resolution listed on this page.
How do I authenticate with Grok Imagine Video 1.5 Preview through Vercel AI Gateway?
Use your Vercel AI Gateway API key with
spacexai/grok-imagine-video-1.5-previewas the model identifier.Does Vercel AI Gateway support Zero Data Retention for Grok Imagine Video 1.5 Preview?
Zero Data Retention is not currently available for this model. Zero Data Retention is offered on a per-provider basis. See https://vercel.com/docs/ai-gateway/capabilities/zdr for details.