---
title: Grok Imagine Video | Runware Docs
url: https://runware.ai/docs/models/xai-grok-imagine-video
description: AI video generation with synchronized audio from text and images
---
# Grok Imagine Video

![Grok Imagine Video](https://assets.runware.ai/covers/xai-grok-imagine-video.jpg)

Grok Imagine Video is a multimodal generative video model that produces short video clips with native audio from text descriptions or static images. It supports text-to-video and image-to-video generation with synchronized sound effects and dialogue, enabling developers to animate scenes with motion, camera dynamics, and audio in a single API workflow.

- **Status**: live
- **ID**: `xai:grok-imagine@video`
- Try in Playground
- **Creator**: xAI
- **Release Date**: January 29, 2026
- **Zero Data Retention**: Yes
- **Capabilities**: Text to Video, Image to Video, Video to Video, Edit, Extend, Checkpoint, Audio

## Pricing

$0.30 from, per run · ~1m 11s per request

**Rates**

*480p*

- text to video · up to 6s · per run: `$0.30`
- image to video · up to 6s · per run: `$0.302`
- video to video · up to 6s · per run: `$0.36`
- each second beyond the first sixper second · beyond 6: `$0.05`

*720p*

- text to video · up to 6s · per run: `$0.42`
- image to video · up to 6s · per run: `$0.422`
- video to video · up to 6s · per run: `$0.48`
- each second beyond the first sixper second · beyond 6: `$0.07`

**5 example generations**

- [first-frame](https://runware.ai/docs/models/xai-grok-imagine-video/examples#example-automated-car-wash-music-segment) · 720p · 5s: `$0.352` (~1m 11s)
- [text-to-video](https://runware.ai/docs/models/xai-grok-imagine-video/examples#example-period-railway-platform-clean-plate) · 720p · 6s: `$0.42` (~1m 4s)
- [video-edit](https://runware.ai/docs/models/xai-grok-imagine-video/examples#example-museum-pest-training-avatar-clip) · 6s: `$0.482` (~1m 20s)
- [reference-to-video](https://runware.ai/docs/models/xai-grok-imagine-video/examples#example-industrial-bakery-music-video-segment) · 720p · 8s: `$0.564` (~53s)
- [video-extend](https://runware.ai/docs/models/xai-grok-imagine-video/examples#example-deepwell-thermal-logo-loop) · 8s: `$0.621` (~2m 6s)

times vary, measured end to end · [How pricing works](https://runware.ai/docs/models-api/pricing)

## Compatibility & Validation

Provide at least one of `inputs.frameImages` and `inputs.video`, or `width/height`, but not both.

---

Inside `inputs`, `frameImages` cannot be used with `referenceImages`.

---

Inside `inputs`, `frameImages` cannot be used with `video`.

---

When `inputs.video` is provided, `width/height` and `resolution` cannot be used.

---

When `inputs.video` is provided and `duration` is not provided, `inputs.referenceImages` cannot be used.

---

When `resolution` is provided, `inputs.frameImages` requires at least 1 item.

---

`width` and `height` must be used together.

---

The following dimension combinations are supported:

| Configuration | Dimensions |
| --- | --- |
| `480p (1:1)` | `480x480` |
| `480p (16:9)` | `848x480` |
| `480p (9:16)` | `480x848` |
| `480p (4:3)` | `640x480` |
| `480p (3:4)` | `480x640` |
| `480p (3:2)` | `720x480` |
| `480p (2:3)` | `480x720` |
| `720p (1:1)` | `720x720` |
| `720p (16:9)` | `1280x720` |
| `720p (9:16)` | `720x1280` |
| `720p (4:3)` | `960x720` |
| `720p (3:4)` | `720x960` |
| `720p (3:2)` | `1088x720` |
| `720p (2:3)` | `720x1088` |

## Notes

Grok Imagine Video supports multiple generation modes determined by the input parameters:

- **Text-to-Video:** Provide a prompt with `width`/`height` or `resolution`. No inputs needed.
- **Image-to-Video:** Provide a frame image via `inputs.frameImages` (max 1, first frame). Dimensions are derived from the image. Use `resolution` for adaptive sizing, or omit dimensions entirely.
- **Reference-to-Video:** Provide reference images via `inputs.referenceImages` (1-7) to guide style and content. Requires `width`/`height` and a prompt. Cannot be combined with `inputs.frameImages`.
- **Video Edit:** Provide a video via `inputs.video` without `duration`. Applies the prompt as an edit to the existing video.
- **Video Extension:** Provide a video via `inputs.video` with `duration` (2-10s). Extends the video using the prompt. Optionally include `inputs.referenceImages` to guide the extended content. Dimensions are inherited from the input video (capped at 720p).

## Request Parameters

**API Options**

Platform-level options for task execution and delivery.

### [taskType](https://runware.ai/docs/models/xai-grok-imagine-video#request-tasktype)

- **Type**: `string`
- **Required**: true
- **Value**: `videoInference`

Identifier for the type of task being performed.

### [taskUUID](https://runware.ai/docs/models/xai-grok-imagine-video#request-taskuuid)

- **Type**: `string`
- **Required**: true
- **Format**: `UUID v4`

UUID v4 identifier for tracking tasks and matching async responses. Must be unique per task.

### [outputType](https://runware.ai/docs/models/xai-grok-imagine-video#request-outputtype)

- **Type**: `string`
- **Default**: `URL`

Video output type.

**Allowed values**: `URL`

### [outputFormat](https://runware.ai/docs/models/xai-grok-imagine-video#request-outputformat)

- **Type**: `string`
- **Default**: `MP4`

Specifies the file format of the generated output. The available values depend on the task type and the specific model's capabilities.

- \`MP4\`: Widely supported video container (H.264), recommended for general use.
- \`WEBM\`: Optimized for web delivery.
- \`MOV\`: QuickTime format, common in professional workflows (Apple ecosystem).

**Allowed values**: `MP4` `WEBM` `MOV`

### [outputQuality](https://runware.ai/docs/models/xai-grok-imagine-video#request-outputquality)

- **Type**: `integer`
- **Min**: `20`
- **Max**: `99`
- **Default**: `95`

Compression quality of the output. Higher values preserve quality but increase file size.

### [webhookURL](https://runware.ai/docs/models/xai-grok-imagine-video#request-webhookurl)

- **Type**: `string`
- **Format**: `uri`

Webhook URL that receives JSON responses via HTTP POST when generation tasks complete. For batch requests with multiple results, each completed item triggers a separate webhook call as it becomes available.

**Learn more** (1 resource):

- [Webhooks](https://runware.ai/docs/models-api/webhooks) (platform)

### [deliveryMethod](https://runware.ai/docs/models/xai-grok-imagine-video#request-deliverymethod)

- **Type**: `string`
- **Default**: `async`

Determines how the API delivers task results.

**Allowed values**:

- `sync` Returns results directly in the API response. Over HTTP, a task still running after 120 seconds continues as an async task and comes back with status 'processing'. Poll for its results using getResponse.
- `async` Returns an immediate acknowledgment with the task UUID. Poll for results using getResponse.

**Learn more** (1 resource):

- [Task Polling](https://runware.ai/docs/models-api/task-polling) (platform)

### [uploadEndpoint](https://runware.ai/docs/models/xai-grok-imagine-video#request-uploadendpoint)

- **Type**: `string`
- **Format**: `uri`

Specifies a URL where the generated content will be automatically uploaded using the HTTP PUT method. The raw binary data of the media file is sent directly as the request body. For secure uploads to cloud storage, use presigned URLs that include temporary authentication credentials.

**Common use cases:**

- **Cloud storage**: Upload directly to S3 buckets, Google Cloud Storage, or Azure Blob Storage using presigned URLs.
- **CDN integration**: Upload to content delivery networks for immediate distribution.

```text
// S3 presigned URL for secure upload
https://your-bucket.s3.amazonaws.com/generated/content.mp4?X-Amz-Signature=abc123&X-Amz-Expires=3600

// Google Cloud Storage presigned URL
https://storage.googleapis.com/your-bucket/content.jpg?X-Goog-Signature=xyz789

// Custom storage endpoint
https://storage.example.com/uploads/generated-image.jpg
```

The content data will be sent as the request body to the specified URL when generation is complete.

### [safety](https://runware.ai/docs/models/xai-grok-imagine-video#request-safety)

- **Path**: `safety.checkContent`
- **Type**: `object (2 properties)`

Content safety checking configuration for video generation.

#### [checkContent](https://runware.ai/docs/models/xai-grok-imagine-video#request-safety-checkcontent)

- **Path**: `safety.checkContent`
- **Type**: `boolean`

Enable or disable content safety checking. Increases total generation time and adds a small charge on top of the generation cost.

#### [mode](https://runware.ai/docs/models/xai-grok-imagine-video#request-safety-mode)

- **Path**: `safety.mode`
- **Type**: `string`
- **Default**: `fast`

Safety checking mode for video generation.

**Allowed values**:

- `fast` Checks key frames.
- `full` Checks all frames.

### [ttl](https://runware.ai/docs/models/xai-grok-imagine-video#request-ttl)

- **Type**: `integer`
- **Min**: `60`

Time-to-live (TTL) in seconds for generated content. Only applies when `outputType` is `URL`.

### [includeCost](https://runware.ai/docs/models/xai-grok-imagine-video#request-includecost)

- **Type**: `boolean`

Include task cost in the response.

### [numberResults](https://runware.ai/docs/models/xai-grok-imagine-video#request-numberresults)

- **Type**: `integer`
- **Min**: `1`
- **Max**: `4`
- **Default**: `1`

Number of results to generate. Each result uses a different seed, producing variations of the same parameters.

**Inputs**

Input resources for the task (images, audio, etc). These must be nested inside the \`inputs\` object.

### [referenceImages](https://runware.ai/docs/models/xai-grok-imagine-video#request-inputs-referenceimages)

- **Path**: `inputs.referenceImages`
- **Type**: `array of strings`
- **Min items**: `1`
- **Max items**: `7`

List of reference images (UUID, URL, Data URI, or Base64).

### [frameImages](https://runware.ai/docs/models/xai-grok-imagine-video#request-inputs-frameimages)

- **Path**: `inputs.frameImages`
- **Type**: `array of strings or objects`
- **Min items**: `items: 1`

An array of frame-specific image inputs to guide video generation. Each item can be either a plain image input (UUID, URL, Data URI, or Base64) or an object that pairs an image with a target position in the video.

The `frameImages` parameter allows you to constrain specific frames within the video sequence, ensuring that particular visual content appears at designated points. Position can be specified using `frame` (named positions or frame indices) or `timestamp` (seconds), depending on model support. This is different from `referenceImages`, which provide overall visual guidance without constraining specific timeline positions.

When the `frame` parameter is omitted, automatic distribution rules apply:

- **1 image**: Used as the first frame.

**Examples**:

**Shorthand format:** When you don't need to specify a frame position, you can pass a plain image input directly.

```json
"frameImages": [
  "aac49721-1964-481a-ae78-8a4e29b91402"
]
```

**Object format:** When you need to specify a position, use an object with `image` and either `frame` or `timestamp` (model-dependent).

```json
"frameImages": [
  {
    "image": "aac49721-1964-481a-ae78-8a4e29b91402",
    "frame": "first"
  }
]
```

**Format 1: string[]**:

- **Type**: `string`

Image input (UUID, URL, Data URI, or Base64).

**Format 2: object[]**:

#### [image](https://runware.ai/docs/models/xai-grok-imagine-video#request-inputs-frameimages-format-2-image)

- **Path**: `inputs.frameImages.image`
- **Type**: `string`
- **Required**: true

Image input (UUID, URL, Data URI, or Base64).

#### [frame](https://runware.ai/docs/models/xai-grok-imagine-video#request-inputs-frameimages-format-2-frame)

- **Path**: `inputs.frameImages.frame`
- **Type**: `object`

Target frame position for the image. This model only supports the first frame.

**Allowed values**:

- `first` First frame of the video.
- `0` Frame index 0 (first frame).

### [video](https://runware.ai/docs/models/xai-grok-imagine-video#request-inputs-video)

- **Path**: `inputs.video`
- **Type**: `string`

Video input (UUID or URL).

**Core Parameters**

Primary parameters that define the task output.

### [model](https://runware.ai/docs/models/xai-grok-imagine-video#request-model)

- **Type**: `string`
- **Required**: true
- **Value**: `xai:grok-imagine@video`

Send `auto` instead of an AIR identifier to have the model router choose the model for this task. The rest of the request is unchanged, every value you send is kept, and only the parameters you leave out are filled in. See [Model Router](https://runware.ai/docs/models-api/model-router).

**Learn more** (3 resources):

- [Text To Image: Model Selection](https://runware.ai/docs/learn/text-to-image#model-selection) (learn)
- [Image Inpainting: Model Specialized Inpainting Models](https://runware.ai/docs/learn/image-inpainting#model-specialized-inpainting-models) (learn)
- [Image Outpainting: Other Critical Parameters](https://runware.ai/docs/learn/image-outpainting#other-critical-parameters) (learn)

### [positivePrompt](https://runware.ai/docs/models/xai-grok-imagine-video#request-positiveprompt)

- **Type**: `string`
- **Required**: true
- **Min**: `1`

Text prompt describing elements to include in the generated output.

**Learn more** (1 resource):

- [Prompts](https://runware.ai/docs/learn/prompts) (learn)

### [width](https://runware.ai/docs/models/xai-grok-imagine-video#request-width)

- **Type**: `integer`
- **Required**: conditional — Required when inputs.frameImages and inputs.video are not provided
- **Paired with**: height

Width of the generated media in pixels.

**Learn more** (2 resources):

- [Dimensions](https://runware.ai/docs/learn/dimensions) (learn)
- [Image Outpainting: Dimensions Critical For Outpainting](https://runware.ai/docs/learn/image-outpainting#dimensions-critical-for-outpainting) (learn)

### [height](https://runware.ai/docs/models/xai-grok-imagine-video#request-height)

- **Type**: `integer`
- **Required**: conditional — Required when inputs.frameImages and inputs.video are not provided
- **Paired with**: width

Height of the generated media in pixels.

**Learn more** (2 resources):

- [Dimensions](https://runware.ai/docs/learn/dimensions) (learn)
- [Image Outpainting: Dimensions Critical For Outpainting](https://runware.ai/docs/learn/image-outpainting#dimensions-critical-for-outpainting) (learn)

### [resolution](https://runware.ai/docs/models/xai-grok-imagine-video#request-resolution)

- **Type**: `string`
- **Default**: `480p`

Resolution preset for the output. When used with input media, automatically matches the aspect ratio from the input.

**Allowed values**: `480p` `720p`

### [duration](https://runware.ai/docs/models/xai-grok-imagine-video#request-duration)

- **Type**: `integer`
- **Min**: `1`
- **Max**: `15`
- **Default**: `6`

Length of the generated video in seconds. The total number of frames produced is determined by duration multiplied by the model's frame rate (fps).

## Response Parameters

### [taskType](https://runware.ai/docs/models/xai-grok-imagine-video#response-tasktype)

- **Type**: `string`
- **Required**: true
- **Value**: `videoInference`

Identifier for the type of task this response belongs to.

### [taskUUID](https://runware.ai/docs/models/xai-grok-imagine-video#response-taskuuid)

- **Type**: `string`
- **Required**: true
- **Format**: `UUID v4`

UUID v4 identifier echoed from the original request, used to match async responses to their tasks.

### [videoUUID](https://runware.ai/docs/models/xai-grok-imagine-video#response-videouuid)

- **Type**: `string`
- **Required**: true
- **Format**: `UUID v4`

UUID of the output video.

### [videoURL](https://runware.ai/docs/models/xai-grok-imagine-video#response-videourl)

- **Type**: `string`
- **Format**: `uri`

URL of the output video.

### [videoBase64Data](https://runware.ai/docs/models/xai-grok-imagine-video#response-videobase64data)

- **Type**: `string`

Base64-encoded video data.

### [videoDataURI](https://runware.ai/docs/models/xai-grok-imagine-video#response-videodatauri)

- **Type**: `string`
- **Format**: `uri`

Data URI of the output video.

### [NSFWContent](https://runware.ai/docs/models/xai-grok-imagine-video#response-nsfwcontent)

- **Type**: `boolean`

Flag indicating if NSFW content was detected.

### [cost](https://runware.ai/docs/models/xai-grok-imagine-video#response-cost)

- **Type**: `float`

Task cost in USD. Present when `includeCost` is set to `true` in the request.

## Examples

### text-to-video (text-to-video)

[Watch video](https://assets.runware.ai/examples/xai-grok-imagine-video/71e9a677-7dc4-41b1-991e-9a53179bc276.mp4)

```json
{
  "taskType": "videoInference",
  "taskUUID": "28246c0d-6dce-4524-9488-7ac520bb2e45",
  "model": "xai:grok-imagine@video",
  "positivePrompt": "Finished VFX cleanup plate for a 1940s historical drama: an empty rural British railway platform after removal of every modern intrusion. No LED displays, CCTV cameras, plastic bins, vending machines, safety cones, contemporary signs, exposed cables, or people. Generatively reconstruct coherent cream-and-umber brickwork, weathered timber paneling, glazed canopy supports, and continuous stone paving across all cleaned areas. The camera makes a smooth, slow lateral dolly to the right, creating gentle parallax through the canopy columns while the architecture remains stable and temporally consistent. Wisps of steam drift across the distant tracks in a light breeze. Soft overcast morning light, muted olive, soot black, warm cream, and aged brick palette. Photorealistic 35mm period-drama cinematography, subtle film grain, restrained contrast, precise historical detail, no morphing or flicker. Natural synchronized ambience only: distant steam hiss, crows, and light wind; no music or voices.",
  "width": 1280,
  "height": 720,
  "duration": 6
}
```

---

### first-frame (first-frame)

[Watch video](https://assets.runware.ai/examples/xai-grok-imagine-video/621feda1-b461-4cb3-8b32-c21d5f0c1acb.mp4)

```json
{
  "taskType": "videoInference",
  "taskUUID": "30ea139c-8f43-40de-b24d-6285f62afca1",
  "model": "xai:grok-imagine@video",
  "positivePrompt": "Continue directly and seamlessly from the supplied first frame as one uninterrupted music-video shot. The percussionist snaps into a forceful syncopated rhythm on the waterproof electronic pads while maintaining her identity, wardrobe and position. Each strike triggers coordinated car-wash motion: the huge red-and-blue brushes begin rotating, the overhead gantry advances, white spray jets pulse on the beat and reflected cyan light ripples across the flooded floor. The camera makes a smooth, rapid push toward her, ending in a confident medium close-up as droplets hit her visor. Energetic electro-clash art direction, saturated primary colors, glossy wet metal, precise choreography, realistic water physics, sharp strobing reflections without obscuring the performer. Native audio: punchy industrial electronic percussion built from pad hits, relay clicks, pump thumps, spinning brush motors and rhythmic water bursts. No cuts, no scene change, no titles, no logos.",
  "resolution": "720p",
  "duration": 5,
  "inputs": {
    "frameImages": [
      "https://assets.runware.ai/assets/inputs/6741c475-b31f-4218-b68e-2ab1f41057fc.jpg"
    ]
  }
}
```

---

### reference-to-video (reference-to-video)

[Watch video](https://assets.runware.ai/examples/xai-grok-imagine-video/7ac25fc8-89da-4b53-8058-82ba8982aedb.mp4)

```json
{
  "taskType": "videoInference",
  "taskUUID": "44fa66ba-fcc6-4558-b5c5-47aa78762bd7",
  "model": "xai:grok-imagine@video",
  "positivePrompt": "Create a polished eight-second portrait music-video segment in one continuous shot. Use reference image 1 to preserve the lead percussionist's appearance, cherry-red coveralls, blue clogs, hairnet and deadpan performance style. Use reference image 2 to establish the commercial bakery's symmetrical architecture, stainless conveyors, repeating proofing baskets, cream tiles, powder-blue machinery and fluorescent lighting. Frame the performer full-body at the center of the bakery aisle while rows of pale dough rounds glide past on conveyors. She performs a precise, playful rhythm by striking two empty stainless mixing bowls with wooden spoons, then pivots sharply and lands a final hit directly toward camera. Begin medium-wide and make a smooth, slow push-in, keeping the machinery's repeating lines graphic within the 720x960 portrait frame. Art direction: retro-industrial art pop, clean hard light, cherry red, powder blue, warm flour cream and brushed steel, subtle 35mm grain, crisp realistic motion, dry humor, premium music-video finish. Native audio is a tight original electronic groove built from synchronized bowl strikes, conveyor clicks, pneumatic hisses and a low rubbery bass pulse; every visible strike lands exactly on beat. No dialogue, vocals, logos, captions or on-screen text.",
  "width": 720,
  "height": 960,
  "duration": 8,
  "inputs": {
    "referenceImages": [
      "https://assets.runware.ai/assets/inputs/4bd189e1-3fd4-4711-9012-2ef2b08b6658.jpg",
      "https://assets.runware.ai/assets/inputs/2bf81bfa-5446-4c50-8003-ef8094855af4.jpg"
    ]
  }
}
```

---

### video-edit (video-edit)

[Watch video](https://assets.runware.ai/examples/xai-grok-imagine-video/1d0084a6-82f3-40e9-a302-fd6cf8f45224.mp4)

```json
{
  "taskType": "videoInference",
  "taskUUID": "06f07374-d5de-4b67-b688-5f82ea7ef705",
  "model": "xai:grok-imagine@video",
  "positivePrompt": "Transform the live presenter into Mara, the exact handmade wool-felt museum conservator avatar shown in the reference image. Replace the plain room with a shallow-depth-of-field miniature collections store built from wood, paper, and felt. Preserve the source video's vertical medium-close framing, locked camera, head position, blinks, reassuring nod, hand timing, facial performance, scene continuity, and exact synchronized spoken dialogue. Convincing stop-motion puppet articulation with accurate lip sync, subtle frame-by-frame textile movement, warm soft key light, terracotta, indigo, and parchment palette. Retain clean original speech and quiet room tone. One continuous professional staff-training shot with no cuts, captions, logos, or added text.",
  "duration": 6,
  "inputs": {
    "video": "https://assets.runware.ai/assets/inputs/22e3b7a0-0c0e-4521-a8f5-4ef3e857e9d1.mp4",
    "referenceImages": [
      "https://assets.runware.ai/assets/inputs/7ba1baf9-391a-4397-9a2a-9f9eb3fb361e.jpg"
    ]
  }
}
```

---

### video-extend (video-extend)

[Watch video](https://assets.runware.ai/examples/xai-grok-imagine-video/aec59778-7355-4e03-96d5-7efeea4b093e.mp4)

```json
{
  "taskType": "videoInference",
  "taskUUID": "b9b0bed4-879c-4922-9e2f-dc3689eb36ff",
  "model": "xai:grok-imagine@video",
  "positivePrompt": "Continue naturally from the exact final frame of the source video for an eight-second logo loop. Preserve the centered DEEPWELL THERMAL wordmark, circular borehole symbol, graphite background, warm-white geological contour lines, oxidized-orange accent, subtle paper grain, locked framing, line weights, spacing, and typography without redesigning or restyling anything. Maintain the existing left-to-right motion: the orange thermal pulse travels smoothly through the contour network, briefly illuminates successive underground strata around the circular mark, then fades as it exits at the right edge. A matching pulse re-enters from the left so the final frame returns precisely to the same visual state as the source ending, creating a seamless loop. Keep all motion measured and technically precise, with no camera movement, new objects, extra lettering, distortion, cuts, or transitions. Continue the low geothermal hum and synchronize one restrained soft pulse tone with the orange light completing its circuit.",
  "duration": 8,
  "inputs": {
    "video": "https://assets.runware.ai/assets/inputs/188a8d97-be84-4410-a931-f6169cc6e70f.mp4"
  }
}
```