# Grok Imagine Video 1.5

> Run Grok Imagine Video 1.5 by xai online or via API. $0.08/sec 480p, $0.14/sec 720p, $0.25/sec 1080p; $0.01/input image, no setup.

**URL:** https://inference.sh/apps/xai/grok-imagine-video-1-5
**Last updated:** 2026-11-06

---

Generate videos with xAI's Grok Imagine Video 1.5. Text-to-video, image-to-video and reference-to-video at 480p, 720p or 1080p, 1-15 seconds, with generated audio.

- app: `xai/grok-imagine-video-1-5`
- maker: [xai](https://inference.sh/apps/xai.md)
- category: [video](https://inference.sh/apps/category/video.md)
- input → output: text → video, image → video, reference → video
- tasks: [text to video](https://inference.sh/apps/tag/text-to-video.md), [image to video](https://inference.sh/apps/tag/image-to-video.md), [reference to video](https://inference.sh/apps/tag/reference-to-video.md), [native audio](https://inference.sh/apps/tag/native-audio.md)
- price: $0.08/sec 480p, $0.14/sec 720p, $0.25/sec 1080p; $0.01/input image
- runs via: api, javascript and python sdk, belt cli, mcp

## grok-imagine-video-1-5 API Guide

### About
generate videos with xai's grok imagine video 1.5. text-to-video, image-to-video and reference-to-video at 480p, 720p or 1080p, 1-15 seconds, with generated audio.

### Get an API Key
Create one in [settings → api keys](https://app.inference.sh/settings/keys). The examples read it from `INFERENCE_API_KEY`.

```bash
export INFERENCE_API_KEY="inf_your_key"
```

### 1. Calling the API

#### Install the Client

```bash
pip install inferencesh
```

#### Run and Get Result
Submit a request and wait for the final result.

```python
import os
from inferencesh import inference

client = inference(api_key=os.environ["INFERENCE_API_KEY"])

## version @2dtdx1ph pinned
result = client.run({
        "app": "xai/grok-imagine-video-1-5@2dtdx1ph",
        "input": {
            "prompt": "A red fox trots through fresh snow at dawn, slow tracking shot"
        }
    })

print(result["output"])
```

#### Stream Live Updates
Get real-time progress updates as the task runs.

```python
import os
from inferencesh import inference

client = inference(api_key=os.environ["INFERENCE_API_KEY"])

## version @2dtdx1ph pinned
## stream=True yields updates as they arrive
for update in client.run({
        "app": "xai/grok-imagine-video-1-5@2dtdx1ph",
        "input": {
            "prompt": "A red fox trots through fresh snow at dawn, slow tracking shot"
        }
    }, stream=True):
    if update.get("progress"):
        print(f"progress: {update['progress']}%")
    if update.get("output"):
        print(f"output: {update['output']}")
```

#### Run in the Background
Start the task and get its id back right away, then check on it with `GET /tasks/{id}`. It is done when `status` is 10 (completed), 11 (failed) or 12 (cancelled).

```python
import os
from inferencesh import inference, TaskStatus

client = inference(api_key=os.environ["INFERENCE_API_KEY"])

## returns as soon as the task is created
task = client.run({
        "app": "xai/grok-imagine-video-1-5@2dtdx1ph",
        "input": {
            "prompt": "A red fox trots through fresh snow at dawn, slow tracking shot"
        }
    }, wait=False)

## later: read its current state
state = client.tasks.get(task["id"]).data
if state["status"] == TaskStatus.COMPLETED:
    print(state["output"])
```

### 2. Files

#### Automatic Upload

```python
## local file paths are automatically uploaded
result = client.run({
    "app": "xai/grok-imagine-video-1-5@2dtdx1ph",
    "input": {
        "image": "/path/to/local/image.png",  # detected & uploaded
        "audio": "https://example.com/audio.mp3",  # url passed through
    }
})
```

#### Manual Upload

```python
## upload and get a hosted URL
file = client.files.upload("/path/to/file.png")
print(file.uri)  # https://cloud.inference.sh/...
```

### 3. Schema

#### Input
- **prompt** (string) *required*: What happens in the video: subject, motion and camera. With reference images, refer to them as <IMAGE_0>, <IMAGE_1>, ...
- **image** (string): Optional first frame. The video animates from this image and keeps its aspect ratio unless aspect_ratio is set.
- **reference_images** (array): Optional reference images for characters, objects or style. Reference-to-video supports up to 720p.
- **duration** (integer): Video length in seconds (1-15).
- **resolution** (string): Output resolution. Price per second: 480p $0.08, 720p $0.14, 1080p $0.25. 1080p is not available with reference images.
- **aspect_ratio** (string): Aspect ratio. Defaults to the first frame's ratio, or 16:9 without one. Setting it with a first frame stretches the image.
- **generate_audio** (boolean): Generate an audio track with the video.

#### Output
- **moderated** (boolean): True when xAI content moderation withheld the generated video.
- **notice** (string): Set when xAI content moderation withheld the video.
- **video** (string): The generated video. Null when xAI content moderation withheld it.

## other video apps

- [Gemini Omni 1.2 Flash](https://inference.sh/apps/google/gemini-omni-1-2-flash.md): $0.0232/sec 360p, $0.0695/sec 720p, $0.1043/sec 1080p, $0.2085/sec 4K, plus $1.50/M input and $9.00/M thinking tokens
- [VACE](https://inference.sh/apps/pruna/vace.md): $0.40/video
- [P-Video-Animate](https://inference.sh/apps/pruna/p-video-animate.md): $0.03/sec 720p, $0.06/sec 1080p
- [P-Video-Upscale](https://inference.sh/apps/pruna/p-video-upscale.md): Std: $0.01/sec 720p, $0.02 1080p, $0.04 2k, $0.08 4k; high fps 2x
- [P-Video-2-Pro-Avatar](https://inference.sh/apps/pruna/p-video-2-pro-avatar.md): $0.02/sec 480p, $0.04/sec 768p, $0.06/sec 1080p, $0.08/sec 2k, $0.12/sec 4k

## faq

### how much does Grok Imagine Video 1.5 cost?

$0.08/sec 480p, $0.14/sec 720p, $0.25/sec 1080p; $0.01/input image. you pay per run from your inference shell credits. no subscription is required.

### how do I run Grok Imagine Video 1.5 via api?

call xai/grok-imagine-video-1-5 with the javascript or python sdk, the rest api, or `belt app run xai/grok-imagine-video-1-5` from a terminal. the api reference on this page lists every input.

### who makes Grok Imagine Video 1.5?

Grok Imagine Video 1.5 is made by xai and runs on inference shell. every xai app is listed at https://inference.sh/apps/xai.

### can my agent use Grok Imagine Video 1.5?

yes. agents call it as a tool through the inference shell mcp server (https://api.inference.sh/mcp), the belt cli or the sdk, and pay per run like you do.

### what are the alternatives to Grok Imagine Video 1.5?

other video apps on inference shell include Gemini Omni 1.2 Flash, VACE, P-Video-Animate, P-Video-Upscale. they run through the same api, so switching is a one-line change.
