> ## 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 (Reference to Video) · Image to video

> xAI Grok reference-to-video — generate a video guided by 1–7 reference images for style and content.

[← Grok Video](/api-documentation/ai-generation/models/grok-video)

**Model name:** `grok-imagine-video/reference-to-video`\
**Generation type:** `image_to_video`\
**Endpoint:** [`POST /api/asset_generator/`](/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** |

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

## Quick start

The example uses sample media from our CDN. Swap in publicly accessible URLs for your own files.

<CodeGroup>
  ```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/reference-to-video",
      "input_params": {
        "prompt": "She looks up from her laptop and smiles at the camera.",
        "reference_image_urls": [
          "https://d35ghwdno3nak3.cloudfront.net/tutorial/avatar-aurora/recommendation-4.jpg"
        ]
      }
    }'
  ```

  ```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/reference-to-video",
          "input_params": {
              "prompt": "She looks up from her laptop and smiles at the camera.",
              "reference_image_urls": [
                  "https://d35ghwdno3nak3.cloudfront.net/tutorial/avatar-aurora/recommendation-4.jpg"
              ]
          },
      },
  )
  print(response.json()["id"])
  ```
</CodeGroup>

## Input parameters

Send these fields in `input_params`.

<ParamField body="prompt" type="string" required>
  Text prompt describing the video to generate. Use @Image1, @Image2, etc. to reference specific images.

  Maximum characters: `4096`.
</ParamField>

<ParamField body="reference_image_urls" type="string[]" required>
  One or more reference image URLs (1–7) to guide the video generation as style and content references.

  Minimum items: `1`.
  Maximum items: `7`.
</ParamField>

<ParamField body="duration" type="string" default={"8"}>
  Duration of the generated video in seconds (1–10).

  Allowed values: `"1"`, `"2"`, `"3"`, `"4"`, `"5"`, `"6"`, `"7"`, `"8"`, `"9"`, `"10"`.
</ParamField>

<ParamField body="aspect_ratio" type="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"`.
</ParamField>

<ParamField body="resolution" type="string" default={"480p"}>
  Output video resolution.

  Allowed values: `"480p"`, `"720p"`.
</ParamField>

<Accordion title="Complete JSON schema">
  ```json theme={null}
  {
    "$schema": "http://json-schema.org/draft-07/schema#",
    "required": [
      "prompt",
      "reference_image_urls"
    ],
    "properties": {
      "prompt": {
        "type": "string",
        "title": "Prompt",
        "maxLength": 4096,
        "description": "Text prompt describing the video to generate. Use @Image1, @Image2, etc. to reference specific images."
      },
      "reference_image_urls": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "title": "Reference Images",
        "x-ui-name": "image_urls",
        "minItems": 1,
        "maxItems": 7,
        "description": "One or more reference image URLs (1–7) to guide the video generation as style and content references.",
        "x-mention-prefix": "image"
      },
      "duration": {
        "enum": [
          "1",
          "2",
          "3",
          "4",
          "5",
          "6",
          "7",
          "8",
          "9",
          "10"
        ],
        "type": "string",
        "title": "Duration",
        "default": "8",
        "description": "Duration of the generated video in seconds (1–10)."
      },
      "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
      }
    }
  }
  ```
</Accordion>

## Response

The request returns the task with `status: "initializing"`. Poll [GET /api/asset\_generator/\{id}/](/api-reference/ai-generation/get-ai-generation-) 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.