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

# Grok Video Text to Video API

> xAI Grok text-to-video — up to 15 seconds with flexible aspect ratios.

[← Grok Video](https://docs.creatify.ai/api-documentation/ai-generation/models/grok-video.md)

**Model name:** `grok-imagine-video/text-to-video`\
**Generation type:** `text_to_video`\
**Endpoint:** [`POST /api/asset_generator/`](https://docs.creatify.ai/api-reference/ai-generation/post-ai-generation)

## Pricing

| Duration | 480p | 720p |
| - | - | - |
| 1s | **1.0** | **1.0** |
| 2s | **1.5** | **1.5** |
| 3s | **2.0** | **2.5** |
| 4s | **2.5** | **3.0** |
| 5s | **3.0** | **4.0** |
| 6s | **3.5** | **4.5** |
| 7s | **4.0** | **5.0** |
| 8s | **4.5** | **6.0** |
| 9s | **5.0** | **6.5** |
| 10s | **5.5** | **7.5** |
| 11s | **6.0** | **8.0** |
| 12s | **6.5** | **8.5** |
| 13s | **7.0** | **9.5** |
| 14s | **7.5** | **10.0** |
| 15s | **8.0** | **11.0** |

Prices are per output. When a request asks for several outputs, the charge is this price times the number of outputs.

## Quick start

```bash cURL theme={null}
curl --request POST \
  --url https://api.creatify.ai/api/asset_generator/ \
  --header 'Content-Type: application/json' \
  --header 'X-API-ID: your-api-id' \
  --header 'X-API-KEY: your-api-key' \
  --data '{
    "model_name": "grok-imagine-video/text-to-video",
    "input_params": {
      "prompt": "A slow cinematic tracking shot along a sunlit coastal road."
    }
  }'
```

```python Python theme={null}
import requests

response = requests.post(
    "https://api.creatify.ai/api/asset_generator/",
    headers={"X-API-ID": "your-api-id", "X-API-KEY": "your-api-key"},
    json={
        "model_name": "grok-imagine-video/text-to-video",
        "input_params": {
            "prompt": "A slow cinematic tracking shot along a sunlit coastal road."
        },
    },
)
print(response.json()["id"])
```

## Input parameters

Send these fields in `input_params`.

**prompt** `string` *required*

The text prompt for video generation.

Maximum characters: `2500`.

**duration** `string` (default: 8)

Duration of the generated video in seconds (1–15).

Allowed values: `"1"`, `"2"`, `"3"`, `"4"`, `"5"`, `"6"`, `"7"`, `"8"`, `"9"`, `"10"`, `"11"`, `"12"`, `"13"`, `"14"`, `"15"`.

**aspect\_ratio** `string` (default: 16:9)

Aspect ratio of the generated video.

Allowed values: `"16:9"`, `"9:16"`, `"1:1"`, `"4:3"`, `"3:4"`, `"3:2"`, `"2:3"`.

**resolution** `string` (default: 480p)

Output video resolution.

Allowed values: `"480p"`, `"720p"`.

> [accordion] Complete JSON schema
>
> ```json theme={null}
> {
>   "$schema": "http://json-schema.org/draft-07/schema#",
>   "required": [
>     "prompt"
>   ],
>   "properties": {
>     "prompt": {
>       "type": "string",
>       "title": "Prompt",
>       "maxLength": 2500,
>       "description": "The text prompt for video generation."
>     },
>     "duration": {
>       "enum": [
>         "1",
>         "2",
>         "3",
>         "4",
>         "5",
>         "6",
>         "7",
>         "8",
>         "9",
>         "10",
>         "11",
>         "12",
>         "13",
>         "14",
>         "15"
>       ],
>       "type": "string",
>       "title": "Duration",
>       "default": "8",
>       "description": "Duration of the generated video in seconds (1–15)."
>     },
>     "aspect_ratio": {
>       "enum": [
>         "16:9",
>         "9:16",
>         "1:1",
>         "4:3",
>         "3:4",
>         "3:2",
>         "2:3"
>       ],
>       "type": "string",
>       "title": "Aspect Ratio",
>       "default": "16:9",
>       "description": "Aspect ratio of the generated video."
>     },
>     "resolution": {
>       "enum": [
>         "480p",
>         "720p"
>       ],
>       "type": "string",
>       "title": "Resolution",
>       "default": "480p",
>       "description": "Output video resolution.",
>       "x-advance-settings": true
>     }
>   }
> }
> ```

## Response

The request returns the task with `status: "initializing"`. Poll [GET /api/asset\_generator/\{id}/](https://docs.creatify.ai/api-reference/ai-generation/get-ai-generation-.md) until `status` is `done` or `failed`, or pass a `webhook_url` to be notified. A finished task lists its files in `assets` and the credits it charged in `credits_used`.


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