# Grok Imagine Video on AI Gateway

**Published:** February 19, 2026 | **Authors:** Walter Korman , Jeremy Philemon, Matt Lenhard, Jerilyn Zheng

---

Generate high-quality videos with natural motion and audio using xAI's Grok Imagine Video, now in AI Gateway. Try it out now via the [v0 Grok Creative Studio](https://v0-grokstudio.vercel.app/), AI SDK 6 or by selecting the model in the [AI Gateway playground](https://vercel.com/ai-gateway/models/grok-imagine-video).

Grok Imagine is known for realistic motion and strong instruction following:

- **Fast Generation**: Generates clips in seconds rather than minutes
- **Instruction Following**: Understands complex prompts and follow-up instructions to tweak scenes
- **Video Editing**: Transform existing videos by changing style, swapping objects, or altering scenes
- **Audio & Dialogue**: Native audio generation with natural, expressive voices and accurate lip-sync

[Video: imagine-sample-reel](//videos.ctfassets.net/e5382hct74si/576fZpehfzbwhCjjAOF6Z6/2aad7716826907449191df16d057ee85/grok-imagine-v2.mov)

## Three ways to get started

Video generation is in beta and currently available for Pro and Enterprise plans and paid AI Gateway users.

- ****[**v0 Grok Creative Studio**](https://v0-grokstudio.vercel.app/): The v0 team created a template that is powered by AI Gateway to create and showcase Grok Video and Image generations.
- **AI SDK 6**: Generate videos programmatically AI SDK 6's `generateVideo`.

```tsx
import { experimental_generateVideo as generateVideo } from 'ai';
const { videos } = await generateVideo({
  model: 'xai/grok-imagine-video',
  prompt: 'A golden retriever catching a frisbee mid-air at the beach',
});
```

- **Gateway Playground**: Experiment with video models with no code in the configurable [AI Gateway playground](https://vercel.com/ai-gateway/models/grok-imagine-video) that's embedded in each model page. Compare providers, tweak prompts, and download results without writing code. To access, click any video gen model in the [model list](https://vercel.com/ai-gateway/models?capabilities=video-generation&providers=xai).

## Available Model

| Model | Description |
| `xai/grok-imagine-video` | Text-to-video, image-to-video, and video editing |

## Simple: Text-to-Video

Generate a video from a text description.

[Video: swans-lake](//videos.ctfassets.net/e5382hct74si/3bL8dfOvutN2TEGUCzLauq/eec4cafae5d139c2c61bdeb541eeb8bb/swans-lake.mp4)

In this example,  `xai/grok-imagine-video` is used to generate a video of 2 swans. Note that you can also specify the duration of the output.

```tsx
import { experimental_generateVideo as generateVideo } from 'ai';
const { videos } = await generateVideo({
  model: 'xai/grok-imagine-video',
  prompt:
   `Two elegant white swans gliding on a misty lake at dawn, soft golden light,
    reflections on still water, romantic atmosphere, cinematic`,
  aspectRatio: '16:9',
  resolution: '1280x720',
  duration: 3,
});
```

## Advanced: Reference-to-Video

Transform an existing video into a new style:

[Video: edited imagine video](//videos.ctfassets.net/e5382hct74si/6dUcFQzqTLH2TkQPvhaS91/51dce404177df2fed50bf31a086bf437/train-ghibli.mp4)

In this example, using a previous generation from Grok Imagine Video, the output was transformed into an animated watercolor style.

[Video: train video](//videos.ctfassets.net/e5382hct74si/QYrrIWYTgqvSK5zCSHiee/dfec03285f7870981af403dbcaa6a917/train-countryside.mp4)

The source video is used and edited, which is useful for style transfer, object swapping, and scene transformations.

```tsx
import { experimental_generateVideo as generateVideo } from 'ai';
const { videos } = await generateVideo({
  model: 'xai/grok-imagine-video',
  prompt:
   'Transform into anime style, soft hand-painted look, warm dreamy atmosphere',
  providerOptions: {
    xai: {
      videoUrl: sourceVideo,
    },
  },
});
```

## Learn More

For more examples and detailed configuration options for Grok Imagine Video, check out the [Video Generation Documentation](https://vercel.com/docs/ai-gateway/capabilities/video-generation). You can also find simple getting started scripts with the [Video Generation Quick Start](https://vercel.com/docs/ai-gateway/getting-started/video).

---

📚 **More updates:** [View all changelog entries](/changelog/sitemap.md) | [Blog](/blog/sitemap.md)