Skip to content
Dashboard

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 second
Lowest 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.'
});
Read docs

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.

spacexai logo
Start frame (required)
Prompt(optional)

Duration8s
1s15s
Resolution
Aspect ratio
Videos to generate
spacexai logo

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
Input
Output
Capabilities
ZDR
No Training
Free Tier
Release Date
$0.01/img
$0.08/sec+2 more
05/30/2026

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.

index.ts
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.

top-level-params.ts
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);
ParameterTypeRequiredDescription
prompt.imagestringYesURL of the image to animate.
prompt.textstringNoDescription of the motion or animation.
durationnumberNoVideo length in seconds. 1-15 seconds.
resolutionstringNoResolution ('854x480', '1280x720', '1920x1080').
aspectRatiostringNoAspect ratio ('1:1', '16:9', '9:16', '4:3', '3:4', '3:2', '2:3').
frameImagesArray<{ image: string | Buffer; frameType: 'first_frame' }>NoOpening 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

InputFormatsSourcesMax countMax sizeLimits
Imageurl, base641

Provider options

Pass every Grok image-to-video option under providerOptions.xai.

provider-options.ts
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.

ParameterTypeRequiredDescription
resolution'480p' | '720p'NoVideo resolution. Defaults to 480p.
pollIntervalMsnumberNoHow often to check task status. Defaults to 5000.
pollTimeoutMsnumberNoMaximum 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.

grok-image-to-video.ts
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 headingMore models by SpaceXAI

Model
Context
Latency
Throughput
Input
Output
Cache
Web Search
Capabilities
Providers
ZDR
No Training
Free Tier
Release Date
500K
$2/M+1 more
$6/M+1 more
Read$0.50/M
$5/K
+1
xai logo
08/12/2026
500K
$2/M+1 more
$6/M+1 more
Read$0.30/M
$5/K
+3
xai logo
07/08/2026
1M
$1.25/M+1 more
$2.50/M+1 more
Read$0.20/M
$5/K
+3
vertex logo
xai logo
04/30/2026
2M
$1.25/M+1 more
$2.50/M+1 more
Read$0.20/M
$5/K
+2
vertex logo
xai logo
03/10/2026
1M
$0.20/M
$0.50/M
Read$0.05/M
+1
vertex logo
11/19/2025
1M
$0.20/M
$0.50/M
Read$0.05/M
+2
vertex logo
11/19/2025

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.5 is 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.5 is the stable release of the same generation
  • Text-Only Prompting: grok-imagine-video generates clips straight from text descriptions
  • Static Visuals: grok-imagine-image or grok-imagine-image-pro covers stills without video cost

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.5 is 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 image and a text motion description to the AI SDK's generateVideo function.

  • 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-preview as 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.

Your use is subject to SpaceXAI's Terms & Privacy Policies.