Documentation

    Documentation

    Documentation

    Ring Platform Logo

    Завантаження документації...

    Підготовка контенту платформи Ring

    Ring Platform Logo

    Завантаження документації...

    Підготовка контенту платформи Ring

    Ring Platform Logo

    Завантаження документації...

    Підготовка контенту платформи Ring

    1. /
    2. /Generative Videos (VideoConductor)

    Updated Jun 18, 20263 min listen

    1. /
    2. /Generative Videos (VideoConductor)

    Updated Jun 18, 20263 min listen

    1. /
    2. /Generative Videos (VideoConductor)

    Updated Jun 18, 20263 min listen

    Concepts, value, and typical clone scenarios — less code.

    Welcome to Ring
    Quick Reference
    Getting Started
    Prerequisites
    Installation
    Database migrations
    First Success Validation
    Troubleshooting
    Next Steps
    Architecture
    Backend modes and databases
    Data Model
    Authentication Architecture
    Email AI-CRM architecture
    PaymentConductor architecture
    Refcodes architecture
    News Kingdom architecture
    Proxy and internationalization
    Real Time
    Discovery Mutation Sync
    Security
    Features
    Doc System
    Authentication
    Email AI-CRM
    Entities
    Opportunities
    Notifications
    Push Notifications with FCM (Ring-Powered)
    Tunnel Protocol
    Web3 Wallet
    Multi-Vendor Store
    Inventory & Stock
    Vendor Management
    Commissions & Settlements
    Referral Codes (Refcodes)
    Affiliate & Referral Enablement
    Payment Integration
    PaymentConductor
    VideoConductor
    WayForPay Payment Integration
    News Module - Digital Newspaper Experience
    Member Blogs
    Scientific Editor
    Locale System
    Security & Compliance
    NFT Marketplace
    Token Staking System
    Performance Optimization Patterns
    Mobile Experience
    Wallet
    Wallet Security Tips
    API
    Authentication
    Email AI-CRM API
    Entities
    Opportunities
    Messaging API
    Notifications API
    Wallet API
    Store API
    Admin API
    CLI
    Customization
    Quick Start — Your First Ring Clone
    Customization Guide
    Database Backend Selection
    Token Economics Setup
    Payment Gateway Integration
    AI Agent Customization
    Reference Ring deployments
    Branding
    Features
    Localization
    Themes
    Components
    Web3
    Token launch jurisdictions
    Deployment
    Self-hosted deployment
    Vercel
    Docker
    Environment Configuration
    Monitoring & Analytics
    Performance Optimization
    Backup & Recovery
    Development
    Local Setup
    Code Structure
    Documentation components
    Community tooling
    Ring MCP Server
    Generative Images (ImageConductor)
    Autonomous Newsroom (Grok)
    OSS vs enterprise
    Whitelabel Navigation
    Best Practices
    Workflow
    Code Style
    Performance
    Testing
    Deployment
    Debugging
    Contributing
    MCP
    ring-image-create
    ring-video-create
    Roadmap
    Examples
    Quick Start
    Authentication
    Email AI-CRM developer guide
    API Integration Examples
    Web3 Integration
    White Label
    Real World
    API Examples (cURL)
    Integrations
    Ethereum wallets (Wagmi v3)

    Quick entry (CTOs · auditors · agents)

    Welcome — mission & audiences
    Quick Reference
    Getting started
    Architecture & Auth.js
    Backend modes & databases (DB_BACKEND_MODE)
    Self-hosted
    Ring MCP Tools
    Ring MCP Server
    Token economics
    Token launch jurisdictions
    Deploy (Docker · k8s)
    Security & compliance reads
    ringdom.org — LegioX homebase
    Source — MIT license (GitHub)

    Concepts, value, and typical clone scenarios — less code.

    Welcome to Ring
    Quick Reference
    Getting Started
    Prerequisites
    Installation
    Database migrations
    First Success Validation
    Troubleshooting
    Next Steps
    Architecture
    Backend modes and databases
    Data Model
    Authentication Architecture
    Email AI-CRM architecture
    PaymentConductor architecture
    Refcodes architecture
    News Kingdom architecture
    Proxy and internationalization
    Real Time
    Discovery Mutation Sync
    Security
    Features
    Doc System
    Authentication
    Email AI-CRM
    Entities
    Opportunities
    Notifications
    Push Notifications with FCM (Ring-Powered)
    Tunnel Protocol
    Web3 Wallet
    Multi-Vendor Store
    Inventory & Stock
    Vendor Management
    Commissions & Settlements
    Referral Codes (Refcodes)
    Affiliate & Referral Enablement
    Payment Integration
    PaymentConductor
    VideoConductor
    WayForPay Payment Integration
    News Module - Digital Newspaper Experience
    Member Blogs
    Scientific Editor
    Locale System
    Security & Compliance
    NFT Marketplace
    Token Staking System
    Performance Optimization Patterns
    Mobile Experience
    Wallet
    Wallet Security Tips
    API
    Authentication
    Email AI-CRM API
    Entities
    Opportunities
    Messaging API
    Notifications API
    Wallet API
    Store API
    Admin API
    CLI
    Customization
    Quick Start — Your First Ring Clone
    Customization Guide
    Database Backend Selection
    Token Economics Setup
    Payment Gateway Integration
    AI Agent Customization
    Reference Ring deployments
    Branding
    Features
    Localization
    Themes
    Components
    Web3
    Token launch jurisdictions
    Deployment
    Self-hosted deployment
    Vercel
    Docker
    Environment Configuration
    Monitoring & Analytics
    Performance Optimization
    Backup & Recovery
    Development
    Local Setup
    Code Structure
    Documentation components
    Community tooling
    Ring MCP Server
    Generative Images (ImageConductor)
    Autonomous Newsroom (Grok)
    OSS vs enterprise
    Whitelabel Navigation
    Best Practices
    Workflow
    Code Style
    Performance
    Testing
    Deployment
    Debugging
    Contributing
    MCP
    ring-image-create
    ring-video-create
    Roadmap
    Examples
    Quick Start
    Authentication
    Email AI-CRM developer guide
    API Integration Examples
    Web3 Integration
    White Label
    Real World
    API Examples (cURL)
    Integrations
    Ethereum wallets (Wagmi v3)

    Quick entry (CTOs · auditors · agents)

    Welcome — mission & audiences
    Quick Reference
    Getting started
    Architecture & Auth.js
    Backend modes & databases (DB_BACKEND_MODE)
    Self-hosted
    Ring MCP Tools
    Ring MCP Server
    Token economics
    Token launch jurisdictions
    Deploy (Docker · k8s)
    Security & compliance reads
    ringdom.org — LegioX homebase
    Source — MIT license (GitHub)

    Concepts, value, and typical clone scenarios — less code.

    Welcome to Ring
    Quick Reference
    Getting Started
    Prerequisites
    Installation
    Database migrations
    First Success Validation
    Troubleshooting
    Next Steps
    Architecture
    Backend modes and databases
    Data Model
    Authentication Architecture
    Email AI-CRM architecture
    PaymentConductor architecture
    Refcodes architecture
    News Kingdom architecture
    Proxy and internationalization
    Real Time
    Discovery Mutation Sync
    Security
    Features
    Doc System
    Authentication
    Email AI-CRM
    Entities
    Opportunities
    Notifications
    Push Notifications with FCM (Ring-Powered)
    Tunnel Protocol
    Web3 Wallet
    Multi-Vendor Store
    Inventory & Stock
    Vendor Management
    Commissions & Settlements
    Referral Codes (Refcodes)
    Affiliate & Referral Enablement
    Payment Integration
    PaymentConductor
    VideoConductor
    WayForPay Payment Integration
    News Module - Digital Newspaper Experience
    Member Blogs
    Scientific Editor
    Locale System
    Security & Compliance
    NFT Marketplace
    Token Staking System
    Performance Optimization Patterns
    Mobile Experience
    Wallet
    Wallet Security Tips
    API
    Authentication
    Email AI-CRM API
    Entities
    Opportunities
    Messaging API
    Notifications API
    Wallet API
    Store API
    Admin API
    CLI
    Customization
    Quick Start — Your First Ring Clone
    Customization Guide
    Database Backend Selection
    Token Economics Setup
    Payment Gateway Integration
    AI Agent Customization
    Reference Ring deployments
    Branding
    Features
    Localization
    Themes
    Components
    Web3
    Token launch jurisdictions
    Deployment
    Self-hosted deployment
    Vercel
    Docker
    Environment Configuration
    Monitoring & Analytics
    Performance Optimization
    Backup & Recovery
    Development
    Local Setup
    Code Structure
    Documentation components
    Community tooling
    Ring MCP Server
    Generative Images (ImageConductor)
    Autonomous Newsroom (Grok)
    OSS vs enterprise
    Whitelabel Navigation
    Best Practices
    Workflow
    Code Style
    Performance
    Testing
    Deployment
    Debugging
    Contributing
    MCP
    ring-image-create
    ring-video-create
    Roadmap
    Examples
    Quick Start
    Authentication
    Email AI-CRM developer guide
    API Integration Examples
    Web3 Integration
    White Label
    Real World
    API Examples (cURL)
    Integrations
    Ethereum wallets (Wagmi v3)

    Quick entry (CTOs · auditors · agents)

    Welcome — mission & audiences
    Quick Reference
    Getting started
    Architecture & Auth.js
    Backend modes & databases (DB_BACKEND_MODE)
    Self-hosted
    Ring MCP Tools
    Ring MCP Server
    Token economics
    Token launch jurisdictions
    Deploy (Docker · k8s)
    Security & compliance reads
    ringdom.org — LegioX homebase
    Source — MIT license (GitHub)
    Docs
    Development
    Docs
    Development
    Docs
    Development

    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.

    Feature guide

    For operators and architects, see the full VideoConductor feature guide — architecture diagrams, remaster strategies, database migration, and MCP walkthrough.

    Model truth (corrected 2026-06-18)

    ModelModalitiesResolution~$/secScript scenes
    grok-imagine-videoText-to-video + I2V + R2V + edit480p, 720p$0.05Montages, UI demos — vague dialogue
    grok-imagine-video-1.5Image-to-video only (+ prompt for motion/script)480p, 720p$0.08 / $0.14Preferred 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 · AIML 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.

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

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

    qualityModeModelResolution~$/secNeeds imageUrl
    draft (default)grok-imagine-video480p$0.05No (T2V)
    draft_i2vgrok-imagine-video-1.5480p$0.08Yes
    productiongrok-imagine-video720p$0.05No
    production_i2vgrok-imagine-video-1.5720p$0.14Yes

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

    Remaster strategies

    InputBehavior
    remaster: true onlyRe-generate at 720p (production or production_i2v if imageUrl)
    remaster: true + sourceVideoUrlPOST /v1/videos/edits — edit existing manifest/CDN MP4 (xAI video editing)

    Architecture

    LayerPath
    Presetslib/video/video-presets.json
    Configlib/video/video.config.ts
    Providerlib/video/providers/xai.provider.ts
    Facadelib/video/conductor/video-conductor.ts
    Scripted medialib/media/* — schema, prompt compiler, thumbnail
    Scripted CLIscripts/ring-viral-video/run-scripted-video.mjs
    Legacy CLIscripts/ring-viral-video/generate-xai-videos.mjs
    Truth lensAI-LEGIOX/legiox-truth-lens/xai-grok-imagine-video-specialist.nodus.json

    Surfaces

    SurfaceEntry
    MCPring-video-create → POST /api/mcp/v1/videos/generate
    Scripted CLInode scripts/ring-viral-video/run-scripted-video.mjs <request.json>
    Legacy CLInode scripts/ring-viral-video/generate-xai-videos.mjs (direct xAI)

    MCP request — scripted scene (auto first frame)

    MCP request — remaster from manifest URL

    FieldRequiredNotes
    promptYesMotion, ACTION, DIALOGUE blocks
    qualityModeNodraft (default), draft_i2v, production, production_i2v
    imageUrlFor 1.5Auto-upgrades draft → draft_i2v
    sourceVideoUrlFor edit remasterManifest url from prior clip
    remasterNotrue → 720p re-gen or edit if URL set
    remasterFromRequestIdNoAudit link to draft job

    Environment

    CLI

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

    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.

    Feature guide

    For operators and architects, see the full VideoConductor feature guide — architecture diagrams, remaster strategies, database migration, and MCP walkthrough.

    Model truth (corrected 2026-06-18)

    ModelModalitiesResolution~$/secScript scenes
    grok-imagine-videoText-to-video + I2V + R2V + edit480p, 720p$0.05Montages, UI demos — vague dialogue
    grok-imagine-video-1.5Image-to-video only (+ prompt for motion/script)480p, 720p$0.08 / $0.14Preferred 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 · AIML 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.

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

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

    qualityModeModelResolution~$/secNeeds imageUrl
    draft (default)grok-imagine-video480p$0.05No (T2V)
    draft_i2vgrok-imagine-video-1.5480p$0.08Yes
    productiongrok-imagine-video720p$0.05No
    production_i2vgrok-imagine-video-1.5720p$0.14Yes

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

    Remaster strategies

    InputBehavior
    remaster: true onlyRe-generate at 720p (production or production_i2v if imageUrl)
    remaster: true + sourceVideoUrlPOST /v1/videos/edits — edit existing manifest/CDN MP4 (xAI video editing)

    Architecture

    LayerPath
    Presetslib/video/video-presets.json
    Configlib/video/video.config.ts
    Providerlib/video/providers/xai.provider.ts
    Facadelib/video/conductor/video-conductor.ts
    Scripted medialib/media/* — schema, prompt compiler, thumbnail
    Scripted CLIscripts/ring-viral-video/run-scripted-video.mjs
    Legacy CLIscripts/ring-viral-video/generate-xai-videos.mjs
    Truth lensAI-LEGIOX/legiox-truth-lens/xai-grok-imagine-video-specialist.nodus.json

    Surfaces

    SurfaceEntry
    MCPring-video-create → POST /api/mcp/v1/videos/generate
    Scripted CLInode scripts/ring-viral-video/run-scripted-video.mjs <request.json>
    Legacy CLInode scripts/ring-viral-video/generate-xai-videos.mjs (direct xAI)

    MCP request — scripted scene (auto first frame)

    MCP request — remaster from manifest URL

    FieldRequiredNotes
    promptYesMotion, ACTION, DIALOGUE blocks
    qualityModeNodraft (default), draft_i2v, production, production_i2v
    imageUrlFor 1.5Auto-upgrades draft → draft_i2v
    sourceVideoUrlFor edit remasterManifest url from prior clip
    remasterNotrue → 720p re-gen or edit if URL set
    remasterFromRequestIdNoAudit link to draft job

    Environment

    CLI

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

    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.

    Feature guide

    For operators and architects, see the full VideoConductor feature guide — architecture diagrams, remaster strategies, database migration, and MCP walkthrough.

    Model truth (corrected 2026-06-18)

    ModelModalitiesResolution~$/secScript scenes
    grok-imagine-videoText-to-video + I2V + R2V + edit480p, 720p$0.05Montages, UI demos — vague dialogue
    grok-imagine-video-1.5Image-to-video only (+ prompt for motion/script)480p, 720p$0.08 / $0.14Preferred 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 · AIML 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.

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

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

    qualityModeModelResolution~$/secNeeds imageUrl
    draft (default)grok-imagine-video480p$0.05No (T2V)
    draft_i2vgrok-imagine-video-1.5480p$0.08Yes
    productiongrok-imagine-video720p$0.05No
    production_i2vgrok-imagine-video-1.5720p$0.14Yes

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

    Remaster strategies

    InputBehavior
    remaster: true onlyRe-generate at 720p (production or production_i2v if imageUrl)
    remaster: true + sourceVideoUrlPOST /v1/videos/edits — edit existing manifest/CDN MP4 (xAI video editing)

    Architecture

    LayerPath
    Presetslib/video/video-presets.json
    Configlib/video/video.config.ts
    Providerlib/video/providers/xai.provider.ts
    Facadelib/video/conductor/video-conductor.ts
    Scripted medialib/media/* — schema, prompt compiler, thumbnail
    Scripted CLIscripts/ring-viral-video/run-scripted-video.mjs
    Legacy CLIscripts/ring-viral-video/generate-xai-videos.mjs
    Truth lensAI-LEGIOX/legiox-truth-lens/xai-grok-imagine-video-specialist.nodus.json

    Surfaces

    SurfaceEntry
    MCPring-video-create → POST /api/mcp/v1/videos/generate
    Scripted CLInode scripts/ring-viral-video/run-scripted-video.mjs <request.json>
    Legacy CLInode scripts/ring-viral-video/generate-xai-videos.mjs (direct xAI)

    MCP request — scripted scene (auto first frame)

    MCP request — remaster from manifest URL

    FieldRequiredNotes
    promptYesMotion, ACTION, DIALOGUE blocks
    qualityModeNodraft (default), draft_i2v, production, production_i2v
    imageUrlFor 1.5Auto-upgrades draft → draft_i2v
    sourceVideoUrlFor edit remasterManifest url from prior clip
    remasterNotrue → 720p re-gen or edit if URL set
    remasterFromRequestIdNoAudit link to draft job

    Environment

    CLI

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

    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"
    }
    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"
    }
    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
    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
    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, … } }
    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"
    }
    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"
    }
    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
    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
    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, … } }
    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"
    }
    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"
    }
    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
    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
    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, … } }