> ## Documentation Index
> Fetch the complete documentation index at: https://docs.geekai.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Grok Imagine Video

Grok Imagine Video is SpaceXAI's fast video model. It generates short videos at 480p or 720p in seven aspect ratios: 1:1, 16:9, 9:16, 4:3, 3:4, 3:2, and 2:3.

### Model parameters

### Model parameters

* Model ID: `grok-imagine-video`
* Pricing: see the [model details page](https://geekai.co/models/grok-imagine-video) for current rates.
* Endpoint: `https://geekai.co/api/v1/videos/generations`
* Parameters: [Video API reference](https://docs.geekai.co/en/api/video/generations.md)
* Authentication: [Get an API key](https://geekai.co/user/api_keys)

> [!NOTE]
>
> The following shared video API parameters are not supported:
>
> * `negative_prompt`
> * `image_tail` (first-frame generation only)
> * `with_audio` (Grok Imagine Video includes audio by default)
> * `quality`
> * `size`
> * `fps`
> * `watermark`
>
> See the [official Grok Imagine Video API documentation](https://docs.x.ai/developers/models/grok-imagine-video).

Grok Imagine Video supports these aspect ratios (`aspect_ratio`):

* `1:1`: social media and thumbnails
* `16:9` / `9:16`: widescreen, mobile devices, and feature films
* `4:3` / `3:4`: presentations and portraits
* `3:2` / `2:3`: photography

Grok Imagine Video supports these resolutions (`resolution`):

* `480p`: standard definition (default)
* `720p`: high definition

Grok Imagine Video accepts a `duration` of 1–15 seconds (default: 5 seconds).

### Pricing

Grok Imagine Video pricing depends on duration and resolution:

| Model | Resolution | Price (CNY per second) |
| - | - | - |
| Grok Imagine Video | 480p | 0.375 |
| Grok Imagine Video | 720p | 0.525 |

Additional charges:

* Reference images cost 0.015 CNY each.
* Reference video costs 0.075 CNY per input second.

For [discounted GeekAI channels](https://docs.geekai.co/en/docs/model_price.md), multiply the listed rate by the channel multiplier. On the high-availability, speed-first channel with multiplier `0.8`, a 5-second Grok Imagine Video clip at `720p` costs `0.525 x 5 x 0.8 = 2.1` CNY.

### Text to video

```bash theme={null}
curl --location 'https://geekai.co/api/v1/videos/generations' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer $GEEKAI_API_KEY' \
--data '{
    "prompt": "Generate a video of a kitten walking on Mars",
    "model": "grok-imagine-video",
    "async": true
}'
```

> [!NOTE]
>
> Set resolution and aspect ratio explicitly with `resolution` and `aspect_ratio`. On official channels, use `duration` to set duration. See Model parameters above for supported values.

### Query generation status

Query the generation status with the task ID (`task_id`) from the asynchronous response:

```bash theme={null}
curl --location --request GET 'https://geekai.co/api/v1/videos/fbdf2778-3d6e-4760-b256-bbfe1ebfe3d1' \
--header 'Authorization: Bearer $GEEKAI_API_KEY'
```

While generation is in progress, the response looks like this:

```json theme={null}
{
    "model": "grok-imagine-video",
    "task_id": "fbdf2778-3d6e-4760-b256-bbfe1ebfe3d1",
    "task_status": "running"
}
```

When generation is complete, the response looks like this:

```json theme={null}
{
    "model": "grok-imagine-video",
    "task_id": "fbdf2778-3d6e-4760-b256-bbfe1ebfe3d1",
    "task_status": "succeed",
    "video_result": [
        {
            "url": "https://static.geekai.co/video/2025/11/28/a272281368ad541d1fbcaf77e2b103b6.mp4"
        }
    ]
}
```

Download the video from the URL in `video_result`. The link expires after seven days by default.

### Generate from the first frame

Pass the first frame in `image`. The model generates a video starting from that image:

```bash theme={null}
curl --location --request POST 'https://geekai.co/api/v1/videos/generations' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer $GEEKAI_API_KEY' \
--data '{
    "model": "grok-imagine-video",
    "prompt": "A drone races through intricate obstacles or natural wonders for an immersive flight",
    "image": "https://ark-project.tos-cn-beijing.volces.com/doc_image/seepro_i2v.png",
    "async": true
}'
```

Retrieve the result the same way as for text-to-video above.

### Generate from reference images

Grok Imagine Video accepts up to seven reference images of people, characters, or products to preserve the subject's appearance.

```bash theme={null}
curl --location --request POST 'https://geekai.co/api/v1/videos/generations' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer $GEEKAI_API_KEY' \
--data '{
    "model": "grok-imagine-video",
    "prompt": "The boy in glasses and a blue T-shirt from [image 1] and the corgi from [image 2] sit on the lawn from [image 3], in 3D cartoon style",
    "images": [
        "https://ark-project.tos-cn-beijing.volces.com/doc_image/seelite_ref_1.png",
        "https://ark-project.tos-cn-beijing.volces.com/doc_image/seelite_ref_2.png",
        "https://ark-project.tos-cn-beijing.volces.com/doc_image/seelite_ref_3.png"
    ],
    "async": true
}'
```

> [!NOTE]
>
> Do not combine reference images and first-frame generation: `image` and `images` cannot be supplied together.

### Video editing

Grok Imagine Video can edit a supplied video, using its content as a reference for the new video.

```bash theme={null}
curl --location --request POST 'https://geekai.co/api/v1/videos/generations' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer $GEEKAI_API_KEY' \
--data '{
    "model": "grok-imagine-video",
    "prompt": "Track the kitten as it turns behind a large Martian rock to catch a mouse",
    "video": "https://static.geekai.co/video/2026/07/23/150423f07dd2c229cc7936d0b59f81ac.mp4",
    "async": true
}'
```

Reference video requirements:

* Maximum duration: 8.7 seconds.
* Use MP4 or a video that can be transcoded to MP4, such as H.265, H.264, or AV1.
* When editing, `duration`, `aspect_ratio`, and `resolution` have no effect. The output matches the reference video's duration, aspect ratio, and resolution.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.