# Grok Imagine Video Generation

> Grok Imagine video source documentation.

Canonical URL: https://docs.uniall.ai/models/video/grok-imagine
Locale: en

Updated: 2026-06-03

This document explains how to call Grok Imagine video model. user requires using this sitestable model and OpenAI compatibilityvideo task endpoint.

## 1. Model

| Model | scenario | Billing basis |
| --- | --- | --- |
| `grok-imagine` | text-to-video, image-to-video, reference-image-to-video, video editing, video extension | capability type, /Output video duration billing detail; image-to-video input image |

For new integrations, use `grok-imagine`, input form and `extra_body.operation` Capability. this site's model list Model do not call.

## 2. Endpoint Overview

### 2.1 recommended: OpenAI compatibilityvideo task endpoint

```http
POST /v1/videos
GET /v1/videos/{task_id}
GET /v1/videos/{task_id}/content
```

`POST /v1/videos` submit task, return video task ID. poll `GET /v1/videos/{task_id}` Status. task completed, read response URL,`/v1/videos/{task_id}/content` Get Video File.

### 2.2 compatibility: video task endpoint

```http
POST /v1/videos/generations
GET /v1/videos/generations/{task_id}

POST /v1/video/generations
GET /v1/video/generations/{task_id}
```

 Endpoint, new recommended `/v1/videos`.

### 2.3 Details
```http
Authorization: Bearer sk-***
Content-Type: application/json
```

## 3. fast

| | recommendedModel | | Capability |
| --- | --- | --- | --- |
| promptgenerate video | `grok-imagine`|`prompt`+`duration` | |
| oneimage | `grok-imagine`|`prompt`+`image`+`duration` | |
| multiple reference imagesgenerate video | `grok-imagine`|`prompt`+`images`+`duration` | |
| editing video | `grok-imagine`|`prompt`+`video`+`extra_body.operation=edit_video`, recommended `extra_body.input_video_seconds`|`edit_video` |
| video | `grok-imagine`|`prompt`+`video`+`duration`+`extra_body.operation=video_extend`, recommended `extra_body.input_video_seconds`|`video_extend` |

Note: `extra_body.operation` Yesthis sitestableCapability. input form the platform; video editingand pass `video`, recommended pass `extra_body.operation`.

## 4. Parameter Reference

| Parameters | Type | Required | Note |
| --- | --- | --- | --- |
| `model`| string | Yes | always pass `grok-imagine` |
| `prompt` | string | Yes | video generation, editingor prompt |
| `image`| string/object | image-to-videoRequired | single image URL; supports `{"url": "..."}` |
| `images` | string[] | multiple reference imagesRequired | multiple reference images URL |
| `image_url`/`image_urls` | string/string[] | No | image compatibility field |
| `video`| string/object | editing/ Required | video URL; supports `{"url": "..."}` |
| `videos` | string[] | No | reference video URL array, reference video Capability |
| `size`| string | No |,`480p`, `720p`; video extension does not support Parameters |
| `aspect_ratio`| string | No | output aspect ratio; text-to-video `16:9`, `1:1`, `9:16`, single-image-to-video `auto` |
| `duration` | integer/string | Conditional | duration., multiple reference images and use; video editing do not pass Field |
| `seconds`| string | Conditional | OpenAI compatibilitydurationField; pass `duration` pass `seconds`, do notand `duration` pass both |
| `extra_body.operation`| string | No | stableCapability:`text_to_video`, `image_to_video`, `reference_to_video`, `edit_video`, `video_extend` |
| `extra_body.input_video_seconds` | integer | editing/ recommended to pass | video billing detail duration, passpositive integer. video duration recommended to pass; pass the platform oruse value |

## 5. duration rules, multiple reference images and pass duration. video editing do not pass duration.

| scenario | durationField | supports value | video duration |
| --- | --- | --- | --- |
| text-to-video | `duration` or `seconds`|`1-15` integer seconds | requires |
| single-image-to-video | `duration` or `seconds`|`1-15` integer seconds | requires |
| reference-image-to-video | `duration` or `seconds`|`1-10` integer seconds | requires |
| video editing | pass `duration`/`seconds`| | recommended to pass `extra_body.input_video_seconds` |
| video extension | `duration` or `seconds`|`2-10` integer seconds | recommended to pass `extra_body.input_video_seconds` |

Note:

- recommended to use `duration`, `"duration": 6`.
- If can onlyuse OpenAI compatibility field, pass `seconds`, `"seconds": "6"`.
- `duration` and `seconds` one of two required, do not pass both.
- video editingand `extra_body.input_video_seconds` Yes video duration, Yes duration.
- If video duration, pass `extra_body.input_video_seconds`; the platform video, billing detail duration.
- billing detail userpass, Yes task / duration.

## 6. Capability Rules

 requires pass `extra_body.operation`:

- imageandvideo: text-to-video.
- one `image`: image-to-video.
- `images`: reference-image-to-video.
- `video`: recommended pass `edit_video` or `video_extend`.

 editing video:

```json
{
  "extra_body": {
    "operation": "edit_video",
    "input_video_seconds": 8
  }
}
```

 video:

```json
{
  "duration": 6,
  "extra_body": {
    "operation": "video_extend",
    "input_video_seconds": 8
  }
}
```

## 7. Request Examples

### 7.1 text-to-video

```bash
curl -X POST "{BASE_URL}/v1/videos" \
 -H "Authorization: Bearer sk-***" \
 -H "Content-Type: application/json" \
 -d '{"model": "grok-imagine",
 "prompt": " camera, fast, camera. ",
 "size": "720p",
 "aspect_ratio": "16:9",
 "duration": 6}'
```

 submitresponses:

```json
{
  "id": "task_xxx",
  "task_id": "task_xxx",
  "object": "video",
  "model": "grok-imagine",
  "status": "queued",
  "progress": 0,
  "created_at": 1773980459,
  "seconds": "6"
}
```

### 7.2 single-image-to-video

```bash
curl -X POST "{BASE_URL}/v1/videos" \
 -H "Authorization: Bearer sk-***" \
 -H "Content-Type: application/json" \
 -d '{"model": "grok-imagine",
 "prompt": " camera, camera. ",
 "image": "https://example.com/portrait.png",
 "size": "480p",
 "aspect_ratio": "auto",
 "duration": 10}'
```

### 7.3 reference-image-to-video

```bash
curl -X POST "{BASE_URL}/v1/videos" \
 -H "Authorization: Bearer sk-***" \
 -H "Content-Type: application/json" \
 -d '{"model": "grok-imagine",
 "prompt": " @Image1 @Image2, slow camera push-in. ",
 "images": ["https://example.com/person.png",
 "https://example.com/street.png"],
 "size": "720p",
 "aspect_ratio": "4:3",
 "duration": 10}'
```

### 7.4 video editing

```bash
curl -X POST "{BASE_URL}/v1/videos" \
 -H "Authorization: Bearer sk-***" \
 -H "Content-Type: application/json" \
 -d '{"model": "grok-imagine",
 "prompt": "to change videointo, reserved action and. ",
 "video": "https://example.com/source.mp4",
 "size": "720p",
 "extra_body": {"operation": "edit_video",
 "input_video_seconds": 8}}'
```

video editing do not pass `duration`/`seconds`. If video duration, recommended to pass `extra_body.input_video_seconds`, and; pass the platform oruse value.

### 7.5 video extension

```bash
curl -X POST "{BASE_URL}/v1/videos" \
 -H "Authorization: Bearer sk-***" \
 -H "Content-Type: application/json" \
 -d '{"model": "grok-imagine",
 "prompt": " camera, video and Orientation. ",
 "video": "https://example.com/source.mp4",
 "duration": 6,
 "extra_body": {"operation": "video_extend",
 "input_video_seconds": 8}}'
```

video extension `duration` duration, supports `2-10`. If video duration, recommended to pass both `extra_body.input_video_seconds`.

## 8. Query Taskand video

### 8.1 queryStatus

```bash
curl "{BASE_URL}/v1/videos/task_xxx" \
 -H "Authorization: Bearer sk-***"
```

In progress:

```json
{
  "id": "task_xxx",
  "task_id": "task_xxx",
  "object": "video",
  "model": "grok-imagine",
  "status": "in_progress",
  "progress": 45,
  "created_at": 1773980459,
  "seconds": "6"
}
```

completed:

```json
{
  "id": "task_xxx",
  "task_id": "task_xxx",
  "object": "video",
  "model": "grok-imagine",
  "status": "completed",
  "progress": 100,
  "created_at": 1773980459,
  "completed_at": 1773980519,
  "seconds": "6",
  "size": "720p",
  "metadata": {
    "url": "https://example.com/result.mp4"
  }
}
```

Failed:

```json
{
  "id": "task_xxx",
  "object": "video",
  "model": "grok-imagine",
  "status": "failed",
  "progress": 100,
  "created_at": 1773980459,
  "error": {
    "code": "task_failed",
    "message": "request rejected"
  }
}
```

recommended `2-5` poll,`status` `completed` or `failed`.

### 8.2 Get Video File

```bash
curl "{BASE_URL}/v1/videos/task_xxx/content" \
 -H "Authorization: Bearer sk-***" \
 -o result.mp4
```

 Endpointreturn `video/mp4` file. usequeryresponses `metadata.url`.

## 9. Billing Notes

Grok video this siteuse billing detail, publicpricing Model.

| scenario | billing detail |
| --- | --- |
| text-to-video | Resolution tier, Output video duration |
| single-image-to-video | Resolution tier, Output video duration |
| reference-image-to-video | Resolution tier, Output video duration |
| video editing | Resolution tier, video duration, Output video duration |
| video extension | video duration, Output video duration |

public " Parameters "and,:

- video:
- video 480P:
- video 720P:

image-to-videoand reference-image-to-video Input image facts, Grok videoRules to change.

submit. tasksubmit balance, Yesto change value public.

## 10. Common Errors

### to changevideo model imageEndpoint

`grok-imagine` call `/v1/videos`, do not `/v1/images/generations`.

### editingand only pass `video`. editingpass:
