# xAI Grok Imagine Video Edit API

> Grok Imagine Video Edit is xAI's video-to-video AI model. Transform, enhance, and edit video content using text prompts - from style changes to object manipulation and scene modification.

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

## Facts

- Provider: xAI
- Type: Video model
- Model ID: `xai/grok-imagine-video/video-edit`
- Price: From $0.30 per run
- Capabilities: video 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/video-edit",
  "video": "https://static.sandbase.ai/examples/xai/grok-imagine-video/edit/input_video_0.mp4",
  "prompt": "Colorize the video",
  "resolution": "auto"
}'
```

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 Edit through SandBase?

Create a SandBase API key, then send requests with the model ID "xai/grok-imagine-video/video-edit" 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 Edit and the other models in the catalog; you do not need to sign up with xAI separately.

## README

### Grok Imagine Video Edit

Grok Imagine Video edit: change an existing clip with an instruction while keeping its motion.

#### Fields

| Field | Type | Default | Notes |
|---|---|---|---|
| `prompt` | string, required | — | Up to 4,096 characters. |
| `video` | video URL, required | — | Source clip. |
| `resolution` | `auto` / `480p` / `720p` | `auto` | Sets the per-second rate. |

#### Billing

$0.08 per output second at 720p and $0.06 otherwise; the output matches the source length. The quote before submission assumes 5 seconds.

| Output | auto | 480p | 720p |
|---|---|---|---|
| 3s source | $0.18 | $0.18 | $0.24 |
| 5s source | $0.30 | $0.30 | $0.40 |
| 8s source | $0.48 | $0.48 | $0.64 |

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/reference-to-video`, `xai/grok-imagine-video/video-extend`, `xai/grok-imagine-video/1.5/text-to-video` (1.5, newer).
