# Create Video Generation Task (Old)

> Legacy Grok create video generation task endpoint.

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

## Overview

### `grok-imagine`

 scenario:

- text-to-video
- single-image-to-video

 Rules:

- only `prompt` -> text-to-video
- `prompt + image` -> image-to-video

## Endpoint


```http
POST /v1/video/generations
```
## Query Parameters

| Name | Type | Required | Description | Example |
| --- | --- | --- | --- | --- |
| `Authorization` | string | No | | Bearer &#123;your_token&#125; |
## Request Body Parameters

| Field | Type | Required | Title | Description |
| --- | --- | --- | --- | --- |
| `model` | string | Yes | Public model name | |
| `prompt` | string | Yes | prompt | Structure Yes Required, recommended to pass |
| `image` | string | Yes | single source image URL | image-to-video |
| `duration`| string | Yes |, | allowed values:`6`, `10` |
| `size`| string | Yes | output resolution | allowed values:`480p`, `720p` |
| `aspect_ratio`| string | Yes | output aspect ratio | allowed values:`16:9`, `1:1`, `9:16` |

## Request Examples

### text-to-video

```json
{
  "model": "grok-imagine",
  "prompt": " camera, fast, camera. ",
  "size": "720p",
  "aspect_ratio": "16:9",
  "duration": 6
}
```

```bash
curl -X POST "{BASE_URL}/v1/video/generations" \
 -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}'
```
### single-image-to-video

```json
{
  "model": "grok-imagine",
  "prompt": " camera, camera. ",
  "image": "https://example.com/portrait.png",
  "size": "480p",
  "aspect_ratio": "9:16",
  "duration": 10
}
```

```bash
curl -X POST "{BASE_URL}/v1/video/generations" \
 -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": "9:16",
 "duration": 10}'
```
## Response Fields

| Field | Type | Required | Title | Description |
| --- | --- | --- | --- | --- |


## Response Examples

### Example 1

```json
{}
```
