---
title: "Generative Videos (VideoConductor)"
description: "xAI Grok Imagine Video — draft T2V, draft_i2v (1.5 + imageUrl), production remaster, sourceVideoUrl edit"
locale: "en"
---
# Generative Videos (`VideoConductor`)

Ring Platform ships **VideoConductor** — async xAI Grok video generation with **draft**, **draft_i2v**, **production**, and **production_i2v** modes, mirroring the ImageConductor pattern.

For operators and architects, see the full **[VideoConductor feature guide](/docs/features/video-conductor.md)** — architecture diagrams, remaster strategies, database migration, and MCP walkthrough.

## Model truth (corrected 2026-06-18)

| Model | Modalities | Resolution | ~$/sec | Script scenes |
|-------|------------|------------|--------|---------------|
| **`grok-imagine-video`** | **Text-to-video** + I2V + R2V + edit | 480p, 720p | **$0.05** | Montages, UI demos — vague dialogue |
| **`grok-imagine-video-1.5`** | **Image-to-video only** (+ **prompt** for motion/script) | 480p, 720p | **$0.08** / **$0.14** | **Preferred** when `imageUrl` + `DIALOGUE:` prompt |

**Important:** `grok-imagine-video-1.5` is **not** text-only T2V. It **requires** a starting frame (`imageUrl`). Your intuition is correct that it **also** accepts a rich text `prompt` — that prompt drives motion and implied dialogue. [xAI Imagine I2V](https://docs.x.ai/developers/model-capabilities/imagine) · [AIML 1.5 preview](https://docs.aimlapi.com/api-references/video-models/xai/grok-imagine-video-1.5-preview).

**Workflow for nightclub / dialogue clips:**

1. Author **`scripted-video-generation-request-*.json`** or pass **`firstFramePrompt`** on `ring-video-create`.
2. Pipeline auto-generates still → **draft_i2v** @ **480p** + compiled `DIALOGUE:` prompt.
3. `remaster: true` @ 720p **or** `sourceVideoUrl` edit pass.

See [Scripted media pipeline](/docs/development/scripted-media-pipeline.md).

Lip-sync is **best-effort** — burn exact lines in post when word-perfect delivery matters.

## Quality modes (SSOT: `lib/video/video-presets.json`)

| `qualityMode` | Model | Resolution | ~$/sec | Needs `imageUrl` |
|---------------|--------|------------|--------|------------------|
| **`draft`** (default) | `grok-imagine-video` | 480p | $0.05 | No (T2V) |
| **`draft_i2v`** | `grok-imagine-video-1.5` | **480p** | $0.08 | **Yes** |
| **`production`** | `grok-imagine-video` | 720p | $0.05 | No |
| **`production_i2v`** | `grok-imagine-video-1.5` | 720p | $0.14 | Yes |

**Auto-select:** `qualityMode: draft` + `imageUrl` → **`draft_i2v`** (no extra flag needed).

## Remaster strategies

| Input | Behavior |
|-------|----------|
| `remaster: true` only | Re-generate at **720p** (`production` or `production_i2v` if `imageUrl`) |
| `remaster: true` + **`sourceVideoUrl`** | **`POST /v1/videos/edits`** — edit existing manifest/CDN MP4 ([xAI video editing](https://docs.x.ai/developers/model-capabilities/video/editing)) |

## Architecture

```text
Surface (MCP / CLI / server code)
  → VideoConductor.generate | .remaster | .editFromSource
    → xAI POST /v1/videos/generations | /v1/videos/edits → request_id
    → poll GET /v1/videos/{request_id}
    → optional file().upload(generated/videos/…)
  → { success, video: { url, temporaryUrl, requestId, … } }
```

| Layer | Path |
|-------|------|
| Presets | `lib/video/video-presets.json` |
| Config | `lib/video/video.config.ts` |
| Provider | `lib/video/providers/xai.provider.ts` |
| Facade | `lib/video/conductor/video-conductor.ts` |
| Scripted media | `lib/media/*` — schema, prompt compiler, thumbnail |
| Scripted CLI | `scripts/ring-viral-video/run-scripted-video.mjs` |
| Legacy CLI | `scripts/ring-viral-video/generate-xai-videos.mjs` |
| Truth lens | `AI-LEGIOX/legiox-truth-lens/xai-grok-imagine-video-specialist.nodus.json` |

## Surfaces

| Surface | Entry |
|---------|--------|
| **MCP** | `ring-video-create` → `POST /api/mcp/v1/videos/generate` |
| **Scripted CLI** | `node scripts/ring-viral-video/run-scripted-video.mjs ` |
| **Legacy CLI** | `node scripts/ring-viral-video/generate-xai-videos.mjs` (direct xAI) |

## MCP request — scripted scene (auto first frame)

```json
{
  "prompt": "ACTION: man leans in. DIALOGUE: Man says: \"So your HOA uses Ring?\"",
  "firstFramePrompt": "Cinematic still, guy and girl at SF nightclub bar, neon magenta lights, silver ring visible",
  "qualityMode": "draft",
  "duration": 12,
  "clipId": "03_sf_nightclub_ring_opener",
  "pipelineRequestId": "hoa-nightclub-viral-2026-06"
}
```

## MCP request — remaster from manifest URL

```json
{
  "prompt": "Improve clarity and lighting; characters speak the same dialogue with clearer lip movement",
  "remaster": true,
  "sourceVideoUrl": "https://vidgen.x.ai/.../draft.mp4",
  "remasterFromRequestId": "prior-draft-request-id"
}
```

| Field | Required | Notes |
|-------|----------|-------|
| `prompt` | Yes | Motion, ACTION, DIALOGUE blocks |
| `qualityMode` | No | `draft` (default), `draft_i2v`, `production`, `production_i2v` |
| `imageUrl` | For 1.5 | Auto-upgrades draft → `draft_i2v` |
| `sourceVideoUrl` | For edit remaster | Manifest `url` from prior clip |
| `remaster` | No | `true` → 720p re-gen or edit if URL set |
| `remasterFromRequestId` | No | Audit link to draft job |

## Environment

```bash
XAI_API_KEY=your_key
XAI_API_BASE_URL=https://api.x.ai/v1

VIDEO_GEN_POLL_TIMEOUT_MS=900000
VIDEO_GEN_POLL_INTERVAL_MS=5000
VIDEO_GEN_STORAGE_PREFIX=generated/videos
XAI_VIDEO_DEFAULT_DURATION=6
XAI_VIDEO_ASPECT_RATIO=16:9
```

## CLI

```bash
cd ring-platform.org/scripts/ring-viral-video
# Scripted pipeline (gateway + firstFrame + thumbnail)
node run-scripted-video.mjs scripted-video-generation-request-hoa-nightclub.json --download
node run-scripted-video.mjs scripted-video-generation-request-hoa-nightclub.json --clip=03_sf_nightclub_ring_opener

# Legacy direct xAI
node generate-xai-videos.mjs --draft 01_hoa_video_call_pains --download
```

Manifest upserts by `id::qualityMode` — partial runs do not wipe prior clips.
