# xAI Grok Imagine Video Reference to Video API

> Grok Imagine Video is xAI's image-to-video AI model. Bring static images to life with fluid animation, consistent character motion, and professional-grade video output.

Source: https://www.sandbase.ai/model/xai/grok-imagine-video/reference-to-video
API reference: https://www.sandbase.ai/model/xai/grok-imagine-video/reference-to-video/docs

## Facts

- Provider: xAI
- Type: Video model
- Model ID: `xai/grok-imagine-video/reference-to-video`
- Price: From $0.56 per run
- Capabilities: reference to video
- Billing: pay per use from one SandBase balance; no provider account or subscription needed

## Call it

- Unified Run API: `POST https://api.sandbase.ai/v1/run`

```bash
curl -X POST https://api.sandbase.ai/v1/run \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "xai/grok-imagine-video/reference-to-video",
  "prompt": "A @Image1 running through a sunlit meadow, cinematic slow motion",
  "duration": 8,
  "resolution": "720p",
  "aspect_ratio": "16:9",
  "reference_image_urls": [
    "https://static.sandbase.ai/examples/xai/grok-imagine-video/reference-to-video/input_reference_image_urls_0.png"
  ]
}'
```

The response returns a run id; poll `GET https://api.sandbase.ai/v1/run/{id}` until the status is `completed` or `failed`.

## FAQ

### How do I call xAI Grok Imagine Video Reference to Video through SandBase?

Create a SandBase API key, then send requests with the model ID "xai/grok-imagine-video/reference-to-video" to Unified Run API (/v1/run) at https://api.sandbase.ai. The request examples on this page show the exact payload.

### Do I need a separate xAI account?

No. One SandBase API key and balance gives you access to xAI Grok Imagine Video Reference to Video and the other models in the catalog; you do not need to sign up with xAI separately.

## README

### Grok Imagine Video Reference to Video

Grok Imagine Video reference-to-video: up to 7 reference images keep characters and objects consistent in a 1–10 second clip.

#### Fields

| Field | Type | Default | Notes |
|---|---|---|---|
| `prompt` | string, required | — | Up to 4,096 characters. |
| `aspect_ratio` | `16:9` / `4:3` / `3:2` / `1:1` / `2:3` / `3:4` / `9:16` | `16:9` | Output frame shape. |
| `resolution` | `480p` / `720p` | `720p` | Sets the per-second rate. |
| `duration` | integer 1–10 | 8 | Output length in seconds. |
| `reference_image_urls` | image URL[] (≤7), required | — | Reference images, up to 7. |

#### Billing

$0.07 per output second at 720p and $0.05 at 480p, plus $0.002 per request.

| Output | 480p | 720p |
|---|---|---|
| 6s | $0.302 | $0.422 |
| 8s (default) | $0.402 | $0.562 |
| 10s | $0.502 | $0.702 |

Failed runs are not charged.

#### Prompting

- Describe subject, action, camera, and sound.

#### Also on SandBase

Other Grok Imagine Video endpoints: `xai/grok-imagine-video/text-to-video`, `xai/grok-imagine-video/image-to-video`, `xai/grok-imagine-video/video-edit`, `xai/grok-imagine-video/video-extend`, `xai/grok-imagine-video/1.5/text-to-video` (1.5, newer).
