MODEL IDxai:grok-imagine@video
live

Grok Imagine Video

xAI
by xAI

Grok Imagine Video is a multimodal generative video model that produces short video clips with native audio from text descriptions or static images. It supports text-to-video and image-to-video generation with synchronized sound effects and dialogue, enabling developers to animate scenes with motion, camera dynamics, and audio in a single API workflow.

Grok Imagine Video
text-to-video

Period Railway Platform Clean Plate

import { createClient } from '@runware/sdk'

const client = await createClient({ apiKey: process.env.RUNWARE_API_KEY })
await client.connect()

const [result] = await client.run({
  model: 'xai:grok-imagine@video',
  positivePrompt: 'Finished VFX cleanup plate for a 1940s historical drama: an empty rural British railway platform after removal of every modern intrusion. No LED displays, CCTV cameras, plastic bins, vending machines, safety cones, contemporary signs, exposed cables, or people. Generatively reconstruct coherent cream-and-umber brickwork, weathered timber paneling, glazed canopy supports, and continuous stone paving across all cleaned areas. The camera makes a smooth, slow lateral dolly to the right, creating gentle parallax through the canopy columns while the architecture remains stable and temporally consistent. Wisps of steam drift across the distant tracks in a light breeze. Soft overcast morning light, muted olive, soot black, warm cream, and aged brick palette. Photorealistic 35mm period-drama cinematography, subtle film grain, restrained contrast, precise historical detail, no morphing or flicker. Natural synchronized ambience only: distant steam hiss, crows, and light wind; no music or voices.',
  width: 1280,
  height: 720,
  duration: 6
})
import asyncio
import os

from runware import Runware


async def main():
    async with Runware(api_key=os.environ["RUNWARE_API_KEY"]) as client:
        results = await client.run({
            "model": "xai:grok-imagine@video",
            "positivePrompt": "Finished VFX cleanup plate for a 1940s historical drama: an empty rural British railway platform after removal of every modern intrusion. No LED displays, CCTV cameras, plastic bins, vending machines, safety cones, contemporary signs, exposed cables, or people. Generatively reconstruct coherent cream-and-umber brickwork, weathered timber paneling, glazed canopy supports, and continuous stone paving across all cleaned areas. The camera makes a smooth, slow lateral dolly to the right, creating gentle parallax through the canopy columns while the architecture remains stable and temporally consistent. Wisps of steam drift across the distant tracks in a light breeze. Soft overcast morning light, muted olive, soot black, warm cream, and aged brick palette. Photorealistic 35mm period-drama cinematography, subtle film grain, restrained contrast, precise historical detail, no morphing or flicker. Natural synchronized ambience only: distant steam hiss, crows, and light wind; no music or voices.",
            "width": 1280,
            "height": 720,
            "duration": 6
        })


asyncio.run(main())
curl https://api.runware.ai/v1 \
  -H "Authorization: Bearer $RUNWARE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '[
    {
      "taskType": "videoInference",
      "taskUUID": "28246c0d-6dce-4524-9488-7ac520bb2e45",
      "model": "xai:grok-imagine@video",
      "positivePrompt": "Finished VFX cleanup plate for a 1940s historical drama: an empty rural British railway platform after removal of every modern intrusion. No LED displays, CCTV cameras, plastic bins, vending machines, safety cones, contemporary signs, exposed cables, or people. Generatively reconstruct coherent cream-and-umber brickwork, weathered timber paneling, glazed canopy supports, and continuous stone paving across all cleaned areas. The camera makes a smooth, slow lateral dolly to the right, creating gentle parallax through the canopy columns while the architecture remains stable and temporally consistent. Wisps of steam drift across the distant tracks in a light breeze. Soft overcast morning light, muted olive, soot black, warm cream, and aged brick palette. Photorealistic 35mm period-drama cinematography, subtle film grain, restrained contrast, precise historical detail, no morphing or flicker. Natural synchronized ambience only: distant steam hiss, crows, and light wind; no music or voices.",
      "width": 1280,
      "height": 720,
      "duration": 6
    }
  ]'
runware run xai:grok-imagine@video \
  positivePrompt="Finished VFX cleanup plate for a 1940s historical drama: an empty rural British railway platform after removal of every modern intrusion. No LED displays, CCTV cameras, plastic bins, vending machines, safety cones, contemporary signs, exposed cables, or people. Generatively reconstruct coherent cream-and-umber brickwork, weathered timber paneling, glazed canopy supports, and continuous stone paving across all cleaned areas. The camera makes a smooth, slow lateral dolly to the right, creating gentle parallax through the canopy columns while the architecture remains stable and temporally consistent. Wisps of steam drift across the distant tracks in a light breeze. Soft overcast morning light, muted olive, soot black, warm cream, and aged brick palette. Photorealistic 35mm period-drama cinematography, subtle film grain, restrained contrast, precise historical detail, no morphing or flicker. Natural synchronized ambience only: distant steam hiss, crows, and light wind; no music or voices." \
  width=1280 \
  height=720 \
  duration=6
{
  "taskType": "videoInference",
  "taskUUID": "28246c0d-6dce-4524-9488-7ac520bb2e45",
  "model": "xai:grok-imagine@video",
  "positivePrompt": "Finished VFX cleanup plate for a 1940s historical drama: an empty rural British railway platform after removal of every modern intrusion. No LED displays, CCTV cameras, plastic bins, vending machines, safety cones, contemporary signs, exposed cables, or people. Generatively reconstruct coherent cream-and-umber brickwork, weathered timber paneling, glazed canopy supports, and continuous stone paving across all cleaned areas. The camera makes a smooth, slow lateral dolly to the right, creating gentle parallax through the canopy columns while the architecture remains stable and temporally consistent. Wisps of steam drift across the distant tracks in a light breeze. Soft overcast morning light, muted olive, soot black, warm cream, and aged brick palette. Photorealistic 35mm period-drama cinematography, subtle film grain, restrained contrast, precise historical detail, no morphing or flicker. Natural synchronized ambience only: distant steam hiss, crows, and light wind; no music or voices.",
  "width": 1280,
  "height": 720,
  "duration": 6
}
Response
{
  "taskType": "videoInference",
  "taskUUID": "28246c0d-6dce-4524-9488-7ac520bb2e45",
  "videoUUID": "24a0cdf2-56d3-48ed-afe8-158e72bf5e06",
  "videoURL": "https://vm.runware.ai/video/os/a05d22/ws/5/vi/24a0cdf2-56d3-48ed-afe8-158e72bf5e06.mp4",
  "cost": 0.42
}
first-frame

Automated Car Wash Music Segment

import { createClient } from '@runware/sdk'

const client = await createClient({ apiKey: process.env.RUNWARE_API_KEY })
await client.connect()

const [result] = await client.run({
  model: 'xai:grok-imagine@video',
  positivePrompt: 'Continue directly and seamlessly from the supplied first frame as one uninterrupted music-video shot. The percussionist snaps into a forceful syncopated rhythm on the waterproof electronic pads while maintaining her identity, wardrobe and position. Each strike triggers coordinated car-wash motion: the huge red-and-blue brushes begin rotating, the overhead gantry advances, white spray jets pulse on the beat and reflected cyan light ripples across the flooded floor. The camera makes a smooth, rapid push toward her, ending in a confident medium close-up as droplets hit her visor. Energetic electro-clash art direction, saturated primary colors, glossy wet metal, precise choreography, realistic water physics, sharp strobing reflections without obscuring the performer. Native audio: punchy industrial electronic percussion built from pad hits, relay clicks, pump thumps, spinning brush motors and rhythmic water bursts. No cuts, no scene change, no titles, no logos.',
  resolution: '720p',
  duration: 5,
  inputs: {
    frameImages: [
      'https://assets.runware.ai/assets/inputs/6741c475-b31f-4218-b68e-2ab1f41057fc.jpg'
    ]
  }
})
import asyncio
import os

from runware import Runware


async def main():
    async with Runware(api_key=os.environ["RUNWARE_API_KEY"]) as client:
        results = await client.run({
            "model": "xai:grok-imagine@video",
            "positivePrompt": "Continue directly and seamlessly from the supplied first frame as one uninterrupted music-video shot. The percussionist snaps into a forceful syncopated rhythm on the waterproof electronic pads while maintaining her identity, wardrobe and position. Each strike triggers coordinated car-wash motion: the huge red-and-blue brushes begin rotating, the overhead gantry advances, white spray jets pulse on the beat and reflected cyan light ripples across the flooded floor. The camera makes a smooth, rapid push toward her, ending in a confident medium close-up as droplets hit her visor. Energetic electro-clash art direction, saturated primary colors, glossy wet metal, precise choreography, realistic water physics, sharp strobing reflections without obscuring the performer. Native audio: punchy industrial electronic percussion built from pad hits, relay clicks, pump thumps, spinning brush motors and rhythmic water bursts. No cuts, no scene change, no titles, no logos.",
            "resolution": "720p",
            "duration": 5,
            "inputs": {
                "frameImages": [
                    "https://assets.runware.ai/assets/inputs/6741c475-b31f-4218-b68e-2ab1f41057fc.jpg"
                ]
            }
        })


asyncio.run(main())
curl https://api.runware.ai/v1 \
  -H "Authorization: Bearer $RUNWARE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '[
    {
      "taskType": "videoInference",
      "taskUUID": "30ea139c-8f43-40de-b24d-6285f62afca1",
      "model": "xai:grok-imagine@video",
      "positivePrompt": "Continue directly and seamlessly from the supplied first frame as one uninterrupted music-video shot. The percussionist snaps into a forceful syncopated rhythm on the waterproof electronic pads while maintaining her identity, wardrobe and position. Each strike triggers coordinated car-wash motion: the huge red-and-blue brushes begin rotating, the overhead gantry advances, white spray jets pulse on the beat and reflected cyan light ripples across the flooded floor. The camera makes a smooth, rapid push toward her, ending in a confident medium close-up as droplets hit her visor. Energetic electro-clash art direction, saturated primary colors, glossy wet metal, precise choreography, realistic water physics, sharp strobing reflections without obscuring the performer. Native audio: punchy industrial electronic percussion built from pad hits, relay clicks, pump thumps, spinning brush motors and rhythmic water bursts. No cuts, no scene change, no titles, no logos.",
      "resolution": "720p",
      "duration": 5,
      "inputs": {
        "frameImages": [
          "https://assets.runware.ai/assets/inputs/6741c475-b31f-4218-b68e-2ab1f41057fc.jpg"
        ]
      }
    }
  ]'
runware run xai:grok-imagine@video \
  positivePrompt="Continue directly and seamlessly from the supplied first frame as one uninterrupted music-video shot. The percussionist snaps into a forceful syncopated rhythm on the waterproof electronic pads while maintaining her identity, wardrobe and position. Each strike triggers coordinated car-wash motion: the huge red-and-blue brushes begin rotating, the overhead gantry advances, white spray jets pulse on the beat and reflected cyan light ripples across the flooded floor. The camera makes a smooth, rapid push toward her, ending in a confident medium close-up as droplets hit her visor. Energetic electro-clash art direction, saturated primary colors, glossy wet metal, precise choreography, realistic water physics, sharp strobing reflections without obscuring the performer. Native audio: punchy industrial electronic percussion built from pad hits, relay clicks, pump thumps, spinning brush motors and rhythmic water bursts. No cuts, no scene change, no titles, no logos." \
  resolution=720p \
  duration=5 \
  inputs.frameImages.0=https://assets.runware.ai/assets/inputs/6741c475-b31f-4218-b68e-2ab1f41057fc.jpg
{
  "taskType": "videoInference",
  "taskUUID": "30ea139c-8f43-40de-b24d-6285f62afca1",
  "model": "xai:grok-imagine@video",
  "positivePrompt": "Continue directly and seamlessly from the supplied first frame as one uninterrupted music-video shot. The percussionist snaps into a forceful syncopated rhythm on the waterproof electronic pads while maintaining her identity, wardrobe and position. Each strike triggers coordinated car-wash motion: the huge red-and-blue brushes begin rotating, the overhead gantry advances, white spray jets pulse on the beat and reflected cyan light ripples across the flooded floor. The camera makes a smooth, rapid push toward her, ending in a confident medium close-up as droplets hit her visor. Energetic electro-clash art direction, saturated primary colors, glossy wet metal, precise choreography, realistic water physics, sharp strobing reflections without obscuring the performer. Native audio: punchy industrial electronic percussion built from pad hits, relay clicks, pump thumps, spinning brush motors and rhythmic water bursts. No cuts, no scene change, no titles, no logos.",
  "resolution": "720p",
  "duration": 5,
  "inputs": {
    "frameImages": [
      "https://assets.runware.ai/assets/inputs/6741c475-b31f-4218-b68e-2ab1f41057fc.jpg"
    ]
  }
}
Response
{
  "taskType": "videoInference",
  "taskUUID": "30ea139c-8f43-40de-b24d-6285f62afca1",
  "videoUUID": "3bd4acc8-b106-4f0d-a379-69baa8e6f6a8",
  "videoURL": "https://vm.runware.ai/video/os/a05d22/ws/5/vi/3bd4acc8-b106-4f0d-a379-69baa8e6f6a8.mp4",
  "cost": 0.352
}
reference-to-video

Industrial Bakery Music Video Segment

import { createClient } from '@runware/sdk'

const client = await createClient({ apiKey: process.env.RUNWARE_API_KEY })
await client.connect()

const [result] = await client.run({
  model: 'xai:grok-imagine@video',
  positivePrompt: 'Create a polished eight-second portrait music-video segment in one continuous shot. Use reference image 1 to preserve the lead percussionist\'s appearance, cherry-red coveralls, blue clogs, hairnet and deadpan performance style. Use reference image 2 to establish the commercial bakery\'s symmetrical architecture, stainless conveyors, repeating proofing baskets, cream tiles, powder-blue machinery and fluorescent lighting. Frame the performer full-body at the center of the bakery aisle while rows of pale dough rounds glide past on conveyors. She performs a precise, playful rhythm by striking two empty stainless mixing bowls with wooden spoons, then pivots sharply and lands a final hit directly toward camera. Begin medium-wide and make a smooth, slow push-in, keeping the machinery\'s repeating lines graphic within the 720x960 portrait frame. Art direction: retro-industrial art pop, clean hard light, cherry red, powder blue, warm flour cream and brushed steel, subtle 35mm grain, crisp realistic motion, dry humor, premium music-video finish. Native audio is a tight original electronic groove built from synchronized bowl strikes, conveyor clicks, pneumatic hisses and a low rubbery bass pulse; every visible strike lands exactly on beat. No dialogue, vocals, logos, captions or on-screen text.',
  width: 720,
  height: 960,
  duration: 8,
  inputs: {
    referenceImages: [
      'https://assets.runware.ai/assets/inputs/4bd189e1-3fd4-4711-9012-2ef2b08b6658.jpg',
      'https://assets.runware.ai/assets/inputs/2bf81bfa-5446-4c50-8003-ef8094855af4.jpg'
    ]
  }
})
import asyncio
import os

from runware import Runware


async def main():
    async with Runware(api_key=os.environ["RUNWARE_API_KEY"]) as client:
        results = await client.run({
            "model": "xai:grok-imagine@video",
            "positivePrompt": "Create a polished eight-second portrait music-video segment in one continuous shot. Use reference image 1 to preserve the lead percussionist's appearance, cherry-red coveralls, blue clogs, hairnet and deadpan performance style. Use reference image 2 to establish the commercial bakery's symmetrical architecture, stainless conveyors, repeating proofing baskets, cream tiles, powder-blue machinery and fluorescent lighting. Frame the performer full-body at the center of the bakery aisle while rows of pale dough rounds glide past on conveyors. She performs a precise, playful rhythm by striking two empty stainless mixing bowls with wooden spoons, then pivots sharply and lands a final hit directly toward camera. Begin medium-wide and make a smooth, slow push-in, keeping the machinery's repeating lines graphic within the 720x960 portrait frame. Art direction: retro-industrial art pop, clean hard light, cherry red, powder blue, warm flour cream and brushed steel, subtle 35mm grain, crisp realistic motion, dry humor, premium music-video finish. Native audio is a tight original electronic groove built from synchronized bowl strikes, conveyor clicks, pneumatic hisses and a low rubbery bass pulse; every visible strike lands exactly on beat. No dialogue, vocals, logos, captions or on-screen text.",
            "width": 720,
            "height": 960,
            "duration": 8,
            "inputs": {
                "referenceImages": [
                    "https://assets.runware.ai/assets/inputs/4bd189e1-3fd4-4711-9012-2ef2b08b6658.jpg",
                    "https://assets.runware.ai/assets/inputs/2bf81bfa-5446-4c50-8003-ef8094855af4.jpg"
                ]
            }
        })


asyncio.run(main())
curl https://api.runware.ai/v1 \
  -H "Authorization: Bearer $RUNWARE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '[
    {
      "taskType": "videoInference",
      "taskUUID": "44fa66ba-fcc6-4558-b5c5-47aa78762bd7",
      "model": "xai:grok-imagine@video",
      "positivePrompt": "Create a polished eight-second portrait music-video segment in one continuous shot. Use reference image 1 to preserve the lead percussionist's appearance, cherry-red coveralls, blue clogs, hairnet and deadpan performance style. Use reference image 2 to establish the commercial bakery's symmetrical architecture, stainless conveyors, repeating proofing baskets, cream tiles, powder-blue machinery and fluorescent lighting. Frame the performer full-body at the center of the bakery aisle while rows of pale dough rounds glide past on conveyors. She performs a precise, playful rhythm by striking two empty stainless mixing bowls with wooden spoons, then pivots sharply and lands a final hit directly toward camera. Begin medium-wide and make a smooth, slow push-in, keeping the machinery's repeating lines graphic within the 720x960 portrait frame. Art direction: retro-industrial art pop, clean hard light, cherry red, powder blue, warm flour cream and brushed steel, subtle 35mm grain, crisp realistic motion, dry humor, premium music-video finish. Native audio is a tight original electronic groove built from synchronized bowl strikes, conveyor clicks, pneumatic hisses and a low rubbery bass pulse; every visible strike lands exactly on beat. No dialogue, vocals, logos, captions or on-screen text.",
      "width": 720,
      "height": 960,
      "duration": 8,
      "inputs": {
        "referenceImages": [
          "https://assets.runware.ai/assets/inputs/4bd189e1-3fd4-4711-9012-2ef2b08b6658.jpg",
          "https://assets.runware.ai/assets/inputs/2bf81bfa-5446-4c50-8003-ef8094855af4.jpg"
        ]
      }
    }
  ]'
runware run xai:grok-imagine@video \
  positivePrompt="Create a polished eight-second portrait music-video segment in one continuous shot. Use reference image 1 to preserve the lead percussionist's appearance, cherry-red coveralls, blue clogs, hairnet and deadpan performance style. Use reference image 2 to establish the commercial bakery's symmetrical architecture, stainless conveyors, repeating proofing baskets, cream tiles, powder-blue machinery and fluorescent lighting. Frame the performer full-body at the center of the bakery aisle while rows of pale dough rounds glide past on conveyors. She performs a precise, playful rhythm by striking two empty stainless mixing bowls with wooden spoons, then pivots sharply and lands a final hit directly toward camera. Begin medium-wide and make a smooth, slow push-in, keeping the machinery's repeating lines graphic within the 720x960 portrait frame. Art direction: retro-industrial art pop, clean hard light, cherry red, powder blue, warm flour cream and brushed steel, subtle 35mm grain, crisp realistic motion, dry humor, premium music-video finish. Native audio is a tight original electronic groove built from synchronized bowl strikes, conveyor clicks, pneumatic hisses and a low rubbery bass pulse; every visible strike lands exactly on beat. No dialogue, vocals, logos, captions or on-screen text." \
  width=720 \
  height=960 \
  duration=8 \
  inputs.referenceImages.0=https://assets.runware.ai/assets/inputs/4bd189e1-3fd4-4711-9012-2ef2b08b6658.jpg \
  inputs.referenceImages.1=https://assets.runware.ai/assets/inputs/2bf81bfa-5446-4c50-8003-ef8094855af4.jpg
{
  "taskType": "videoInference",
  "taskUUID": "44fa66ba-fcc6-4558-b5c5-47aa78762bd7",
  "model": "xai:grok-imagine@video",
  "positivePrompt": "Create a polished eight-second portrait music-video segment in one continuous shot. Use reference image 1 to preserve the lead percussionist's appearance, cherry-red coveralls, blue clogs, hairnet and deadpan performance style. Use reference image 2 to establish the commercial bakery's symmetrical architecture, stainless conveyors, repeating proofing baskets, cream tiles, powder-blue machinery and fluorescent lighting. Frame the performer full-body at the center of the bakery aisle while rows of pale dough rounds glide past on conveyors. She performs a precise, playful rhythm by striking two empty stainless mixing bowls with wooden spoons, then pivots sharply and lands a final hit directly toward camera. Begin medium-wide and make a smooth, slow push-in, keeping the machinery's repeating lines graphic within the 720x960 portrait frame. Art direction: retro-industrial art pop, clean hard light, cherry red, powder blue, warm flour cream and brushed steel, subtle 35mm grain, crisp realistic motion, dry humor, premium music-video finish. Native audio is a tight original electronic groove built from synchronized bowl strikes, conveyor clicks, pneumatic hisses and a low rubbery bass pulse; every visible strike lands exactly on beat. No dialogue, vocals, logos, captions or on-screen text.",
  "width": 720,
  "height": 960,
  "duration": 8,
  "inputs": {
    "referenceImages": [
      "https://assets.runware.ai/assets/inputs/4bd189e1-3fd4-4711-9012-2ef2b08b6658.jpg",
      "https://assets.runware.ai/assets/inputs/2bf81bfa-5446-4c50-8003-ef8094855af4.jpg"
    ]
  }
}
Response
{
  "taskType": "videoInference",
  "taskUUID": "44fa66ba-fcc6-4558-b5c5-47aa78762bd7",
  "videoUUID": "fa3fff5c-0ede-458a-adfd-f515d426048c",
  "videoURL": "https://vm.runware.ai/video/os/a03d21/ws/5/vi/fa3fff5c-0ede-458a-adfd-f515d426048c.mp4",
  "cost": 0.564
}
video-edit

Museum Pest Training Avatar Clip

import { createClient } from '@runware/sdk'

const client = await createClient({ apiKey: process.env.RUNWARE_API_KEY })
await client.connect()

const [result] = await client.run({
  model: 'xai:grok-imagine@video',
  positivePrompt: 'Transform the live presenter into Mara, the exact handmade wool-felt museum conservator avatar shown in the reference image. Replace the plain room with a shallow-depth-of-field miniature collections store built from wood, paper, and felt. Preserve the source video\'s vertical medium-close framing, locked camera, head position, blinks, reassuring nod, hand timing, facial performance, scene continuity, and exact synchronized spoken dialogue. Convincing stop-motion puppet articulation with accurate lip sync, subtle frame-by-frame textile movement, warm soft key light, terracotta, indigo, and parchment palette. Retain clean original speech and quiet room tone. One continuous professional staff-training shot with no cuts, captions, logos, or added text.',
  duration: 6,
  inputs: {
    video: 'https://assets.runware.ai/assets/inputs/22e3b7a0-0c0e-4521-a8f5-4ef3e857e9d1.mp4',
    referenceImages: [
      'https://assets.runware.ai/assets/inputs/7ba1baf9-391a-4397-9a2a-9f9eb3fb361e.jpg'
    ]
  }
})
import asyncio
import os

from runware import Runware


async def main():
    async with Runware(api_key=os.environ["RUNWARE_API_KEY"]) as client:
        results = await client.run({
            "model": "xai:grok-imagine@video",
            "positivePrompt": "Transform the live presenter into Mara, the exact handmade wool-felt museum conservator avatar shown in the reference image. Replace the plain room with a shallow-depth-of-field miniature collections store built from wood, paper, and felt. Preserve the source video's vertical medium-close framing, locked camera, head position, blinks, reassuring nod, hand timing, facial performance, scene continuity, and exact synchronized spoken dialogue. Convincing stop-motion puppet articulation with accurate lip sync, subtle frame-by-frame textile movement, warm soft key light, terracotta, indigo, and parchment palette. Retain clean original speech and quiet room tone. One continuous professional staff-training shot with no cuts, captions, logos, or added text.",
            "duration": 6,
            "inputs": {
                "video": "https://assets.runware.ai/assets/inputs/22e3b7a0-0c0e-4521-a8f5-4ef3e857e9d1.mp4",
                "referenceImages": [
                    "https://assets.runware.ai/assets/inputs/7ba1baf9-391a-4397-9a2a-9f9eb3fb361e.jpg"
                ]
            }
        })


asyncio.run(main())
curl https://api.runware.ai/v1 \
  -H "Authorization: Bearer $RUNWARE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '[
    {
      "taskType": "videoInference",
      "taskUUID": "06f07374-d5de-4b67-b688-5f82ea7ef705",
      "model": "xai:grok-imagine@video",
      "positivePrompt": "Transform the live presenter into Mara, the exact handmade wool-felt museum conservator avatar shown in the reference image. Replace the plain room with a shallow-depth-of-field miniature collections store built from wood, paper, and felt. Preserve the source video's vertical medium-close framing, locked camera, head position, blinks, reassuring nod, hand timing, facial performance, scene continuity, and exact synchronized spoken dialogue. Convincing stop-motion puppet articulation with accurate lip sync, subtle frame-by-frame textile movement, warm soft key light, terracotta, indigo, and parchment palette. Retain clean original speech and quiet room tone. One continuous professional staff-training shot with no cuts, captions, logos, or added text.",
      "duration": 6,
      "inputs": {
        "video": "https://assets.runware.ai/assets/inputs/22e3b7a0-0c0e-4521-a8f5-4ef3e857e9d1.mp4",
        "referenceImages": [
          "https://assets.runware.ai/assets/inputs/7ba1baf9-391a-4397-9a2a-9f9eb3fb361e.jpg"
        ]
      }
    }
  ]'
runware run xai:grok-imagine@video \
  positivePrompt="Transform the live presenter into Mara, the exact handmade wool-felt museum conservator avatar shown in the reference image. Replace the plain room with a shallow-depth-of-field miniature collections store built from wood, paper, and felt. Preserve the source video's vertical medium-close framing, locked camera, head position, blinks, reassuring nod, hand timing, facial performance, scene continuity, and exact synchronized spoken dialogue. Convincing stop-motion puppet articulation with accurate lip sync, subtle frame-by-frame textile movement, warm soft key light, terracotta, indigo, and parchment palette. Retain clean original speech and quiet room tone. One continuous professional staff-training shot with no cuts, captions, logos, or added text." \
  duration=6 \
  inputs.video=https://assets.runware.ai/assets/inputs/22e3b7a0-0c0e-4521-a8f5-4ef3e857e9d1.mp4 \
  inputs.referenceImages.0=https://assets.runware.ai/assets/inputs/7ba1baf9-391a-4397-9a2a-9f9eb3fb361e.jpg
{
  "taskType": "videoInference",
  "taskUUID": "06f07374-d5de-4b67-b688-5f82ea7ef705",
  "model": "xai:grok-imagine@video",
  "positivePrompt": "Transform the live presenter into Mara, the exact handmade wool-felt museum conservator avatar shown in the reference image. Replace the plain room with a shallow-depth-of-field miniature collections store built from wood, paper, and felt. Preserve the source video's vertical medium-close framing, locked camera, head position, blinks, reassuring nod, hand timing, facial performance, scene continuity, and exact synchronized spoken dialogue. Convincing stop-motion puppet articulation with accurate lip sync, subtle frame-by-frame textile movement, warm soft key light, terracotta, indigo, and parchment palette. Retain clean original speech and quiet room tone. One continuous professional staff-training shot with no cuts, captions, logos, or added text.",
  "duration": 6,
  "inputs": {
    "video": "https://assets.runware.ai/assets/inputs/22e3b7a0-0c0e-4521-a8f5-4ef3e857e9d1.mp4",
    "referenceImages": [
      "https://assets.runware.ai/assets/inputs/7ba1baf9-391a-4397-9a2a-9f9eb3fb361e.jpg"
    ]
  }
}
Response
{
  "taskType": "videoInference",
  "taskUUID": "06f07374-d5de-4b67-b688-5f82ea7ef705",
  "videoUUID": "2491cb1b-9232-42f0-aa10-be297944781f",
  "videoURL": "https://vm.runware.ai/video/os/a06dlim3/ws/5/vi/2491cb1b-9232-42f0-aa10-be297944781f.mp4",
  "cost": 0.4825
}
video-extend

Deepwell Thermal Logo Loop

import { createClient } from '@runware/sdk'

const client = await createClient({ apiKey: process.env.RUNWARE_API_KEY })
await client.connect()

const [result] = await client.run({
  model: 'xai:grok-imagine@video',
  positivePrompt: 'Continue naturally from the exact final frame of the source video for an eight-second logo loop. Preserve the centered DEEPWELL THERMAL wordmark, circular borehole symbol, graphite background, warm-white geological contour lines, oxidized-orange accent, subtle paper grain, locked framing, line weights, spacing, and typography without redesigning or restyling anything. Maintain the existing left-to-right motion: the orange thermal pulse travels smoothly through the contour network, briefly illuminates successive underground strata around the circular mark, then fades as it exits at the right edge. A matching pulse re-enters from the left so the final frame returns precisely to the same visual state as the source ending, creating a seamless loop. Keep all motion measured and technically precise, with no camera movement, new objects, extra lettering, distortion, cuts, or transitions. Continue the low geothermal hum and synchronize one restrained soft pulse tone with the orange light completing its circuit.',
  duration: 8,
  inputs: {
    video: 'https://assets.runware.ai/assets/inputs/188a8d97-be84-4410-a931-f6169cc6e70f.mp4'
  }
})
import asyncio
import os

from runware import Runware


async def main():
    async with Runware(api_key=os.environ["RUNWARE_API_KEY"]) as client:
        results = await client.run({
            "model": "xai:grok-imagine@video",
            "positivePrompt": "Continue naturally from the exact final frame of the source video for an eight-second logo loop. Preserve the centered DEEPWELL THERMAL wordmark, circular borehole symbol, graphite background, warm-white geological contour lines, oxidized-orange accent, subtle paper grain, locked framing, line weights, spacing, and typography without redesigning or restyling anything. Maintain the existing left-to-right motion: the orange thermal pulse travels smoothly through the contour network, briefly illuminates successive underground strata around the circular mark, then fades as it exits at the right edge. A matching pulse re-enters from the left so the final frame returns precisely to the same visual state as the source ending, creating a seamless loop. Keep all motion measured and technically precise, with no camera movement, new objects, extra lettering, distortion, cuts, or transitions. Continue the low geothermal hum and synchronize one restrained soft pulse tone with the orange light completing its circuit.",
            "duration": 8,
            "inputs": {
                "video": "https://assets.runware.ai/assets/inputs/188a8d97-be84-4410-a931-f6169cc6e70f.mp4"
            }
        })


asyncio.run(main())
curl https://api.runware.ai/v1 \
  -H "Authorization: Bearer $RUNWARE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '[
    {
      "taskType": "videoInference",
      "taskUUID": "b9b0bed4-879c-4922-9e2f-dc3689eb36ff",
      "model": "xai:grok-imagine@video",
      "positivePrompt": "Continue naturally from the exact final frame of the source video for an eight-second logo loop. Preserve the centered DEEPWELL THERMAL wordmark, circular borehole symbol, graphite background, warm-white geological contour lines, oxidized-orange accent, subtle paper grain, locked framing, line weights, spacing, and typography without redesigning or restyling anything. Maintain the existing left-to-right motion: the orange thermal pulse travels smoothly through the contour network, briefly illuminates successive underground strata around the circular mark, then fades as it exits at the right edge. A matching pulse re-enters from the left so the final frame returns precisely to the same visual state as the source ending, creating a seamless loop. Keep all motion measured and technically precise, with no camera movement, new objects, extra lettering, distortion, cuts, or transitions. Continue the low geothermal hum and synchronize one restrained soft pulse tone with the orange light completing its circuit.",
      "duration": 8,
      "inputs": {
        "video": "https://assets.runware.ai/assets/inputs/188a8d97-be84-4410-a931-f6169cc6e70f.mp4"
      }
    }
  ]'
runware run xai:grok-imagine@video \
  positivePrompt="Continue naturally from the exact final frame of the source video for an eight-second logo loop. Preserve the centered DEEPWELL THERMAL wordmark, circular borehole symbol, graphite background, warm-white geological contour lines, oxidized-orange accent, subtle paper grain, locked framing, line weights, spacing, and typography without redesigning or restyling anything. Maintain the existing left-to-right motion: the orange thermal pulse travels smoothly through the contour network, briefly illuminates successive underground strata around the circular mark, then fades as it exits at the right edge. A matching pulse re-enters from the left so the final frame returns precisely to the same visual state as the source ending, creating a seamless loop. Keep all motion measured and technically precise, with no camera movement, new objects, extra lettering, distortion, cuts, or transitions. Continue the low geothermal hum and synchronize one restrained soft pulse tone with the orange light completing its circuit." \
  duration=8 \
  inputs.video=https://assets.runware.ai/assets/inputs/188a8d97-be84-4410-a931-f6169cc6e70f.mp4
{
  "taskType": "videoInference",
  "taskUUID": "b9b0bed4-879c-4922-9e2f-dc3689eb36ff",
  "model": "xai:grok-imagine@video",
  "positivePrompt": "Continue naturally from the exact final frame of the source video for an eight-second logo loop. Preserve the centered DEEPWELL THERMAL wordmark, circular borehole symbol, graphite background, warm-white geological contour lines, oxidized-orange accent, subtle paper grain, locked framing, line weights, spacing, and typography without redesigning or restyling anything. Maintain the existing left-to-right motion: the orange thermal pulse travels smoothly through the contour network, briefly illuminates successive underground strata around the circular mark, then fades as it exits at the right edge. A matching pulse re-enters from the left so the final frame returns precisely to the same visual state as the source ending, creating a seamless loop. Keep all motion measured and technically precise, with no camera movement, new objects, extra lettering, distortion, cuts, or transitions. Continue the low geothermal hum and synchronize one restrained soft pulse tone with the orange light completing its circuit.",
  "duration": 8,
  "inputs": {
    "video": "https://assets.runware.ai/assets/inputs/188a8d97-be84-4410-a931-f6169cc6e70f.mp4"
  }
}
Response
{
  "taskType": "videoInference",
  "taskUUID": "b9b0bed4-879c-4922-9e2f-dc3689eb36ff",
  "videoUUID": "5830c9eb-6f87-4a38-abac-efefc0737143",
  "videoURL": "https://vm.runware.ai/video/os/a09dlim3/ws/5/vi/5830c9eb-6f87-4a38-abac-efefc0737143.mp4",
  "cost": 0.6205
}
Video to Video

Bioluminescent Reef Dreamscape

import { createClient } from '@runware/sdk'

const client = await createClient({ apiKey: process.env.RUNWARE_API_KEY })
await client.connect()

const [result] = await client.run({
  model: 'xai:grok-imagine@video',
  positivePrompt: 'Transform the reference video into a luminous fantasy undersea vision. The tunnel becomes an ancient submerged coral cathedral with glowing arches, drifting jellyfish lanterns, shimmering schools of silver fish, soft shafts of turquoise light, bioluminescent particles, and vast whale-song atmosphere. Preserve the original pacing and camera movement from the source video, but restylize the walking figure as a mysterious traveler in a flowing deep-sea cloak with reflective details. Add synchronized native audio: distant whale calls, bubbling water resonance, gentle current swells, soft footsteps echoing on wet stone, and a faint whispered line, \'The reef remembers.\' Cinematic, dreamlike, richly detailed, immersive, high-end visual effects, coherent motion, natural scene continuity.',
  inputs: {
    referenceVideos: [
      'https://assets.runware.ai/assets/inputs/931713e7-94a4-46ff-b6a2-a450a9ab9e53.mp4'
    ]
  }
})
import asyncio
import os

from runware import Runware


async def main():
    async with Runware(api_key=os.environ["RUNWARE_API_KEY"]) as client:
        results = await client.run({
            "model": "xai:grok-imagine@video",
            "positivePrompt": "Transform the reference video into a luminous fantasy undersea vision. The tunnel becomes an ancient submerged coral cathedral with glowing arches, drifting jellyfish lanterns, shimmering schools of silver fish, soft shafts of turquoise light, bioluminescent particles, and vast whale-song atmosphere. Preserve the original pacing and camera movement from the source video, but restylize the walking figure as a mysterious traveler in a flowing deep-sea cloak with reflective details. Add synchronized native audio: distant whale calls, bubbling water resonance, gentle current swells, soft footsteps echoing on wet stone, and a faint whispered line, 'The reef remembers.' Cinematic, dreamlike, richly detailed, immersive, high-end visual effects, coherent motion, natural scene continuity.",
            "inputs": {
                "referenceVideos": [
                    "https://assets.runware.ai/assets/inputs/931713e7-94a4-46ff-b6a2-a450a9ab9e53.mp4"
                ]
            }
        })


asyncio.run(main())
curl https://api.runware.ai/v1 \
  -H "Authorization: Bearer $RUNWARE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '[
    {
      "taskType": "videoInference",
      "taskUUID": "050f2911-487c-49eb-820f-e2e47f39ec6f",
      "model": "xai:grok-imagine@video",
      "positivePrompt": "Transform the reference video into a luminous fantasy undersea vision. The tunnel becomes an ancient submerged coral cathedral with glowing arches, drifting jellyfish lanterns, shimmering schools of silver fish, soft shafts of turquoise light, bioluminescent particles, and vast whale-song atmosphere. Preserve the original pacing and camera movement from the source video, but restylize the walking figure as a mysterious traveler in a flowing deep-sea cloak with reflective details. Add synchronized native audio: distant whale calls, bubbling water resonance, gentle current swells, soft footsteps echoing on wet stone, and a faint whispered line, 'The reef remembers.' Cinematic, dreamlike, richly detailed, immersive, high-end visual effects, coherent motion, natural scene continuity.",
      "inputs": {
        "referenceVideos": [
          "https://assets.runware.ai/assets/inputs/931713e7-94a4-46ff-b6a2-a450a9ab9e53.mp4"
        ]
      }
    }
  ]'
runware run xai:grok-imagine@video \
  positivePrompt="Transform the reference video into a luminous fantasy undersea vision. The tunnel becomes an ancient submerged coral cathedral with glowing arches, drifting jellyfish lanterns, shimmering schools of silver fish, soft shafts of turquoise light, bioluminescent particles, and vast whale-song atmosphere. Preserve the original pacing and camera movement from the source video, but restylize the walking figure as a mysterious traveler in a flowing deep-sea cloak with reflective details. Add synchronized native audio: distant whale calls, bubbling water resonance, gentle current swells, soft footsteps echoing on wet stone, and a faint whispered line, 'The reef remembers.' Cinematic, dreamlike, richly detailed, immersive, high-end visual effects, coherent motion, natural scene continuity." \
  inputs.referenceVideos.0=https://assets.runware.ai/assets/inputs/931713e7-94a4-46ff-b6a2-a450a9ab9e53.mp4
{
  "taskType": "videoInference",
  "taskUUID": "050f2911-487c-49eb-820f-e2e47f39ec6f",
  "model": "xai:grok-imagine@video",
  "positivePrompt": "Transform the reference video into a luminous fantasy undersea vision. The tunnel becomes an ancient submerged coral cathedral with glowing arches, drifting jellyfish lanterns, shimmering schools of silver fish, soft shafts of turquoise light, bioluminescent particles, and vast whale-song atmosphere. Preserve the original pacing and camera movement from the source video, but restylize the walking figure as a mysterious traveler in a flowing deep-sea cloak with reflective details. Add synchronized native audio: distant whale calls, bubbling water resonance, gentle current swells, soft footsteps echoing on wet stone, and a faint whispered line, 'The reef remembers.' Cinematic, dreamlike, richly detailed, immersive, high-end visual effects, coherent motion, natural scene continuity.",
  "inputs": {
    "referenceVideos": [
      "https://assets.runware.ai/assets/inputs/931713e7-94a4-46ff-b6a2-a450a9ab9e53.mp4"
    ]
  }
}
Response
{
  "taskType": "videoInference",
  "taskUUID": "050f2911-487c-49eb-820f-e2e47f39ec6f",
  "videoUUID": "ff8ba334-00f7-4158-8296-6dbc1f2fd2d2",
  "videoURL": "https://vm.runware.ai/video/os/a17d13/ws/5/vi/ff8ba334-00f7-4158-8296-6dbc1f2fd2d2.mp4",
  "cost": 0.404
}
Text to Video

Moonlit Clockwork Carnival Alley

import { createClient } from '@runware/sdk'

const client = await createClient({ apiKey: process.env.RUNWARE_API_KEY })
await client.connect()

const [result] = await client.run({
  model: 'xai:grok-imagine@video',
  positivePrompt: 'A moonlit steampunk carnival tucked inside a narrow cobblestone alley, brass automatons performing for a small midnight crowd, glowing paper lanterns swaying overhead, a carousel horse mounted on mechanical rails gliding past the camera, curls of steam venting from copper pipes, sparkling puddles reflecting amber and cyan light. The camera begins with a slow dolly forward through hanging banners, then gently pans to reveal a violin-playing clockwork fox on a velvet crate while a tiny piston-driven drummer taps a lively rhythm nearby. A distant ferris wheel turns above the rooftops, gears clicking softly, carnival chimes ringing, murmuring spectators, fluttering fabric, footsteps on wet stone, occasional hiss of steam, and a warm female ringmaster voice off-screen saying, \'Step closer, the midnight wonders have only just awakened.\' Cinematic, highly detailed, magical yet tactile, expressive lighting, atmospheric depth, dynamic motion, synchronized sound design.',
  width: 1280,
  height: 720,
  duration: 8
})
import asyncio
import os

from runware import Runware


async def main():
    async with Runware(api_key=os.environ["RUNWARE_API_KEY"]) as client:
        results = await client.run({
            "model": "xai:grok-imagine@video",
            "positivePrompt": "A moonlit steampunk carnival tucked inside a narrow cobblestone alley, brass automatons performing for a small midnight crowd, glowing paper lanterns swaying overhead, a carousel horse mounted on mechanical rails gliding past the camera, curls of steam venting from copper pipes, sparkling puddles reflecting amber and cyan light. The camera begins with a slow dolly forward through hanging banners, then gently pans to reveal a violin-playing clockwork fox on a velvet crate while a tiny piston-driven drummer taps a lively rhythm nearby. A distant ferris wheel turns above the rooftops, gears clicking softly, carnival chimes ringing, murmuring spectators, fluttering fabric, footsteps on wet stone, occasional hiss of steam, and a warm female ringmaster voice off-screen saying, 'Step closer, the midnight wonders have only just awakened.' Cinematic, highly detailed, magical yet tactile, expressive lighting, atmospheric depth, dynamic motion, synchronized sound design.",
            "width": 1280,
            "height": 720,
            "duration": 8
        })


asyncio.run(main())
curl https://api.runware.ai/v1 \
  -H "Authorization: Bearer $RUNWARE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '[
    {
      "taskType": "videoInference",
      "taskUUID": "6378aa49-9f31-414a-8e00-3076dea79124",
      "model": "xai:grok-imagine@video",
      "positivePrompt": "A moonlit steampunk carnival tucked inside a narrow cobblestone alley, brass automatons performing for a small midnight crowd, glowing paper lanterns swaying overhead, a carousel horse mounted on mechanical rails gliding past the camera, curls of steam venting from copper pipes, sparkling puddles reflecting amber and cyan light. The camera begins with a slow dolly forward through hanging banners, then gently pans to reveal a violin-playing clockwork fox on a velvet crate while a tiny piston-driven drummer taps a lively rhythm nearby. A distant ferris wheel turns above the rooftops, gears clicking softly, carnival chimes ringing, murmuring spectators, fluttering fabric, footsteps on wet stone, occasional hiss of steam, and a warm female ringmaster voice off-screen saying, 'Step closer, the midnight wonders have only just awakened.' Cinematic, highly detailed, magical yet tactile, expressive lighting, atmospheric depth, dynamic motion, synchronized sound design.",
      "width": 1280,
      "height": 720,
      "duration": 8
    }
  ]'
runware run xai:grok-imagine@video \
  positivePrompt="A moonlit steampunk carnival tucked inside a narrow cobblestone alley, brass automatons performing for a small midnight crowd, glowing paper lanterns swaying overhead, a carousel horse mounted on mechanical rails gliding past the camera, curls of steam venting from copper pipes, sparkling puddles reflecting amber and cyan light. The camera begins with a slow dolly forward through hanging banners, then gently pans to reveal a violin-playing clockwork fox on a velvet crate while a tiny piston-driven drummer taps a lively rhythm nearby. A distant ferris wheel turns above the rooftops, gears clicking softly, carnival chimes ringing, murmuring spectators, fluttering fabric, footsteps on wet stone, occasional hiss of steam, and a warm female ringmaster voice off-screen saying, 'Step closer, the midnight wonders have only just awakened.' Cinematic, highly detailed, magical yet tactile, expressive lighting, atmospheric depth, dynamic motion, synchronized sound design." \
  width=1280 \
  height=720 \
  duration=8
{
  "taskType": "videoInference",
  "taskUUID": "6378aa49-9f31-414a-8e00-3076dea79124",
  "model": "xai:grok-imagine@video",
  "positivePrompt": "A moonlit steampunk carnival tucked inside a narrow cobblestone alley, brass automatons performing for a small midnight crowd, glowing paper lanterns swaying overhead, a carousel horse mounted on mechanical rails gliding past the camera, curls of steam venting from copper pipes, sparkling puddles reflecting amber and cyan light. The camera begins with a slow dolly forward through hanging banners, then gently pans to reveal a violin-playing clockwork fox on a velvet crate while a tiny piston-driven drummer taps a lively rhythm nearby. A distant ferris wheel turns above the rooftops, gears clicking softly, carnival chimes ringing, murmuring spectators, fluttering fabric, footsteps on wet stone, occasional hiss of steam, and a warm female ringmaster voice off-screen saying, 'Step closer, the midnight wonders have only just awakened.' Cinematic, highly detailed, magical yet tactile, expressive lighting, atmospheric depth, dynamic motion, synchronized sound design.",
  "width": 1280,
  "height": 720,
  "duration": 8
}
Response
{
  "taskType": "videoInference",
  "taskUUID": "6378aa49-9f31-414a-8e00-3076dea79124",
  "videoUUID": "c8b6b301-7a5e-4aa8-a3e5-0f4377da76ea",
  "videoURL": "https://vm.runware.ai/video/os/a16d07/ws/5/vi/c8b6b301-7a5e-4aa8-a3e5-0f4377da76ea.mp4",
  "cost": 0.56
}
Image to Video

Bioluminescent Tidepool Observatory

import { createClient } from '@runware/sdk'

const client = await createClient({ apiKey: process.env.RUNWARE_API_KEY })
await client.connect()

const [result] = await client.run({
  model: 'xai:grok-imagine@video',
  positivePrompt: 'Animate the supplied first-frame image into a serene cinematic fantasy-science scene at night. The tidepools shimmer with bioluminescent ripples, tiny glowing jellyfish drift through the air like lanterns, and soft ocean mist rolls across the rocks. The cloaked astronomer subtly shifts posture and looks toward the horizon. Inside the translucent domes, warm instrument lights flicker. The camera performs a slow forward glide with delicate parallax, emphasizing reflections in the water and the scale of the coastline. Gentle waves lap against stone, distant seabirds call once, glass panels creak softly in the sea wind, and the environment feels contemplative, wondrous, and immersive.',
  width: 1280,
  height: 720,
  duration: 8,
  inputs: {
    frameImages: [
      {
        image: 'https://assets.runware.ai/assets/inputs/2b07f3c4-c2d5-4da2-a5db-9abf01329515.jpg'
      }
    ]
  }
})
import asyncio
import os

from runware import Runware


async def main():
    async with Runware(api_key=os.environ["RUNWARE_API_KEY"]) as client:
        results = await client.run({
            "model": "xai:grok-imagine@video",
            "positivePrompt": "Animate the supplied first-frame image into a serene cinematic fantasy-science scene at night. The tidepools shimmer with bioluminescent ripples, tiny glowing jellyfish drift through the air like lanterns, and soft ocean mist rolls across the rocks. The cloaked astronomer subtly shifts posture and looks toward the horizon. Inside the translucent domes, warm instrument lights flicker. The camera performs a slow forward glide with delicate parallax, emphasizing reflections in the water and the scale of the coastline. Gentle waves lap against stone, distant seabirds call once, glass panels creak softly in the sea wind, and the environment feels contemplative, wondrous, and immersive.",
            "width": 1280,
            "height": 720,
            "duration": 8,
            "inputs": {
                "frameImages": [
                    {
                        "image": "https://assets.runware.ai/assets/inputs/2b07f3c4-c2d5-4da2-a5db-9abf01329515.jpg"
                    }
                ]
            }
        })


asyncio.run(main())
curl https://api.runware.ai/v1 \
  -H "Authorization: Bearer $RUNWARE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '[
    {
      "taskType": "videoInference",
      "taskUUID": "2eb99c30-675e-4e43-b8e5-87183dc75154",
      "model": "xai:grok-imagine@video",
      "positivePrompt": "Animate the supplied first-frame image into a serene cinematic fantasy-science scene at night. The tidepools shimmer with bioluminescent ripples, tiny glowing jellyfish drift through the air like lanterns, and soft ocean mist rolls across the rocks. The cloaked astronomer subtly shifts posture and looks toward the horizon. Inside the translucent domes, warm instrument lights flicker. The camera performs a slow forward glide with delicate parallax, emphasizing reflections in the water and the scale of the coastline. Gentle waves lap against stone, distant seabirds call once, glass panels creak softly in the sea wind, and the environment feels contemplative, wondrous, and immersive.",
      "width": 1280,
      "height": 720,
      "duration": 8,
      "inputs": {
        "frameImages": [
          {
            "image": "https://assets.runware.ai/assets/inputs/2b07f3c4-c2d5-4da2-a5db-9abf01329515.jpg"
          }
        ]
      }
    }
  ]'
runware run xai:grok-imagine@video \
  positivePrompt="Animate the supplied first-frame image into a serene cinematic fantasy-science scene at night. The tidepools shimmer with bioluminescent ripples, tiny glowing jellyfish drift through the air like lanterns, and soft ocean mist rolls across the rocks. The cloaked astronomer subtly shifts posture and looks toward the horizon. Inside the translucent domes, warm instrument lights flicker. The camera performs a slow forward glide with delicate parallax, emphasizing reflections in the water and the scale of the coastline. Gentle waves lap against stone, distant seabirds call once, glass panels creak softly in the sea wind, and the environment feels contemplative, wondrous, and immersive." \
  width=1280 \
  height=720 \
  duration=8 \
  inputs.frameImages.0.image=https://assets.runware.ai/assets/inputs/2b07f3c4-c2d5-4da2-a5db-9abf01329515.jpg
{
  "taskType": "videoInference",
  "taskUUID": "2eb99c30-675e-4e43-b8e5-87183dc75154",
  "model": "xai:grok-imagine@video",
  "positivePrompt": "Animate the supplied first-frame image into a serene cinematic fantasy-science scene at night. The tidepools shimmer with bioluminescent ripples, tiny glowing jellyfish drift through the air like lanterns, and soft ocean mist rolls across the rocks. The cloaked astronomer subtly shifts posture and looks toward the horizon. Inside the translucent domes, warm instrument lights flicker. The camera performs a slow forward glide with delicate parallax, emphasizing reflections in the water and the scale of the coastline. Gentle waves lap against stone, distant seabirds call once, glass panels creak softly in the sea wind, and the environment feels contemplative, wondrous, and immersive.",
  "width": 1280,
  "height": 720,
  "duration": 8,
  "inputs": {
    "frameImages": [
      {
        "image": "https://assets.runware.ai/assets/inputs/2b07f3c4-c2d5-4da2-a5db-9abf01329515.jpg"
      }
    ]
  }
}
Response
{
  "taskType": "videoInference",
  "taskUUID": "2eb99c30-675e-4e43-b8e5-87183dc75154",
  "videoUUID": "e31a49b6-e3c3-4645-8aae-74cff1225f72",
  "videoURL": "https://vm.runware.ai/video/os/a04d20/ws/5/vi/e31a49b6-e3c3-4645-8aae-74cff1225f72.mp4",
  "cost": 0.562
}
Text to Video

Stormy Lighthouse Rescue

import { createClient } from '@runware/sdk'

const client = await createClient({ apiKey: process.env.RUNWARE_API_KEY })
await client.connect()

const [result] = await client.run({
  model: 'xai:grok-imagine@video',
  positivePrompt: 'A cinematic night storm on a rocky coastline, waves crashing against black cliffs below a tall lighthouse. The camera begins with a wide aerial sweep through rain and sea mist, then pushes toward the lighthouse window glowing warm amber. Inside, a soaked coast guard captain grabs a radio and shouts, \'Hold on, we\'re coming for you!\' Cut to the beam of the lighthouse slicing through sheets of rain as a rescue boat battles the surf below. Thunder rolls, wind howls, rain lashes metal railings, sirens pulse faintly in the distance, and the ocean roars with deep, immersive sound. Realistic water physics, dramatic lightning flashes, high contrast cinematic lighting, tense atmosphere, natural lip sync for the spoken line, polished blockbuster look.',
  width: 1280,
  height: 720,
  duration: 8
})
import asyncio
import os

from runware import Runware


async def main():
    async with Runware(api_key=os.environ["RUNWARE_API_KEY"]) as client:
        results = await client.run({
            "model": "xai:grok-imagine@video",
            "positivePrompt": "A cinematic night storm on a rocky coastline, waves crashing against black cliffs below a tall lighthouse. The camera begins with a wide aerial sweep through rain and sea mist, then pushes toward the lighthouse window glowing warm amber. Inside, a soaked coast guard captain grabs a radio and shouts, 'Hold on, we're coming for you!' Cut to the beam of the lighthouse slicing through sheets of rain as a rescue boat battles the surf below. Thunder rolls, wind howls, rain lashes metal railings, sirens pulse faintly in the distance, and the ocean roars with deep, immersive sound. Realistic water physics, dramatic lightning flashes, high contrast cinematic lighting, tense atmosphere, natural lip sync for the spoken line, polished blockbuster look.",
            "width": 1280,
            "height": 720,
            "duration": 8
        })


asyncio.run(main())
curl https://api.runware.ai/v1 \
  -H "Authorization: Bearer $RUNWARE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '[
    {
      "taskType": "videoInference",
      "taskUUID": "ba22dba3-0b1d-44e1-ad81-b3eb720d91fe",
      "model": "xai:grok-imagine@video",
      "positivePrompt": "A cinematic night storm on a rocky coastline, waves crashing against black cliffs below a tall lighthouse. The camera begins with a wide aerial sweep through rain and sea mist, then pushes toward the lighthouse window glowing warm amber. Inside, a soaked coast guard captain grabs a radio and shouts, 'Hold on, we're coming for you!' Cut to the beam of the lighthouse slicing through sheets of rain as a rescue boat battles the surf below. Thunder rolls, wind howls, rain lashes metal railings, sirens pulse faintly in the distance, and the ocean roars with deep, immersive sound. Realistic water physics, dramatic lightning flashes, high contrast cinematic lighting, tense atmosphere, natural lip sync for the spoken line, polished blockbuster look.",
      "width": 1280,
      "height": 720,
      "duration": 8
    }
  ]'
runware run xai:grok-imagine@video \
  positivePrompt="A cinematic night storm on a rocky coastline, waves crashing against black cliffs below a tall lighthouse. The camera begins with a wide aerial sweep through rain and sea mist, then pushes toward the lighthouse window glowing warm amber. Inside, a soaked coast guard captain grabs a radio and shouts, 'Hold on, we're coming for you!' Cut to the beam of the lighthouse slicing through sheets of rain as a rescue boat battles the surf below. Thunder rolls, wind howls, rain lashes metal railings, sirens pulse faintly in the distance, and the ocean roars with deep, immersive sound. Realistic water physics, dramatic lightning flashes, high contrast cinematic lighting, tense atmosphere, natural lip sync for the spoken line, polished blockbuster look." \
  width=1280 \
  height=720 \
  duration=8
{
  "taskType": "videoInference",
  "taskUUID": "ba22dba3-0b1d-44e1-ad81-b3eb720d91fe",
  "model": "xai:grok-imagine@video",
  "positivePrompt": "A cinematic night storm on a rocky coastline, waves crashing against black cliffs below a tall lighthouse. The camera begins with a wide aerial sweep through rain and sea mist, then pushes toward the lighthouse window glowing warm amber. Inside, a soaked coast guard captain grabs a radio and shouts, 'Hold on, we're coming for you!' Cut to the beam of the lighthouse slicing through sheets of rain as a rescue boat battles the surf below. Thunder rolls, wind howls, rain lashes metal railings, sirens pulse faintly in the distance, and the ocean roars with deep, immersive sound. Realistic water physics, dramatic lightning flashes, high contrast cinematic lighting, tense atmosphere, natural lip sync for the spoken line, polished blockbuster look.",
  "width": 1280,
  "height": 720,
  "duration": 8
}
Response
{
  "taskType": "videoInference",
  "taskUUID": "ba22dba3-0b1d-44e1-ad81-b3eb720d91fe",
  "videoUUID": "ed30ad9a-6693-4ff3-8775-796ae3cd8fe7",
  "videoURL": "https://vm.runware.ai/video/os/a03d21/ws/5/vi/ed30ad9a-6693-4ff3-8775-796ae3cd8fe7.mp4",
  "cost": 0.56
}