MAGI-2

MAGI-2 is Sand AI's flagship video model, generating 1080p clips of 4 to 30 seconds with synchronized audio, including dialogue with lip sync, sound effects, ambience and music, in a single pass. It starts from a text prompt, from a first frame with an optional last frame, or from up to 10 reference images, 5 reference videos and 5 reference audio clips, in six aspect ratios from 21:9 to 9:16. It suits dialogue scenes, narrative shots and reference-driven work that needs consistent subjects and sound in one generation.

Complete technical specification for integration
Ready-to-use code snippets for common workflows
Step-by-step tutorials for advanced use cases
← All GuidesLong takes and multi-shot sequences
How to plan a 30-second MAGI-2 clip as a timed shot list with hard cuts or as one continuous take, and how to keep a character the same from the first shot to the last.
Introduction
MAGI-2 generates up to 30 seconds in one request, long enough for a complete ad or a scene with a beginning and an end. Sand AI built it for control over the timeline and the cuts, so a long clip can be a timed list of shots joined by hard cuts or one unbroken take, both written out in the prompt.
A 30-second commercial for a folding electric scooter, five shots joined by hard cuts at 5, 11, 17 and 24 seconds. The rider is the same woman in every shot: late twenties, short curly hair, a mustard rain jacket and white sneakers, riding a matte black scooter with no logos. Shot 1, 0–5 s: close-up as her hand unfolds the scooter's stem in an apartment hallway and it clicks into place. Shot 2, 5–11 s: wide shot from the sidewalk as she rolls out of the building onto a quiet tree-lined street in the morning. Shot 3, 11–17 s: tracking shot beside her at handlebar height as she rides along a protected bike lane past shop fronts and parked cars. Shot 4, 17–24 s: low angle as she stops at a crosswalk, looks both ways and sets off again when the light changes. Shot 5, 24–30 s: medium shot outside a glass office entrance as she folds the scooter in one motion, lifts it by the stem and walks inside. Natural morning light, clean commercial color grade, no readable signs. Audio: the click of the stem locking, a soft electric whine while riding, tires on pavement, birdsong and light traffic, the beep of the crosswalk, a light upbeat electronic music bed throughout, no voices, no subtitles.
The five shots come from one generation. Its cuts land within a quarter of a second of the times in the prompt, at 4.8, 11.0, 16.9 and 23.8 seconds, and the rider and the scooter stay the same across all of them.
Request shape
Length is set with duration, any whole number of seconds from 4 to 30. Everything else about the structure lives in the prompt:
import { createClient } from '@runware/sdk'
const client = await createClient({ apiKey: process.env.RUNWARE_API_KEY })
await client.connect()
const [result] = await client.run({
model: 'sandai:magi@2',
positivePrompt: 'A 30-second commercial for a folding electric scooter, five shots joined by hard cuts at 5, 11, 17 and 24 seconds. The rider is the same woman in every shot: late twenties, short curly hair, a mustard rain jacket and white sneakers, riding a matte black scooter with no logos. Shot 1, 0–5 s: close-up as her hand unfolds the scooter\'s stem in an apartment hallway and it clicks into place. Shot 2, 5–11 s: wide shot from the sidewalk as she rolls out of the building onto a quiet tree-lined street in the morning. Shot 3, 11–17 s: tracking shot beside her at handlebar height as she rides along a protected bike lane past shop fronts and parked cars. Shot 4, 17–24 s: low angle as she stops at a crosswalk, looks both ways and sets off again when the light changes. Shot 5, 24–30 s: medium shot outside a glass office entrance as she folds the scooter in one motion, lifts it by the stem and walks inside. Natural morning light, clean commercial color grade, no readable signs. Audio: the click of the stem locking, a soft electric whine while riding, tires on pavement, birdsong and light traffic, the beep of the crosswalk, a light upbeat electronic music bed throughout, no voices, no subtitles.',
width: 1920,
height: 1080,
duration: 30
})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": "sandai:magi@2",
"positivePrompt": "A 30-second commercial for a folding electric scooter, five shots joined by hard cuts at 5, 11, 17 and 24 seconds. The rider is the same woman in every shot: late twenties, short curly hair, a mustard rain jacket and white sneakers, riding a matte black scooter with no logos. Shot 1, 0–5 s: close-up as her hand unfolds the scooter's stem in an apartment hallway and it clicks into place. Shot 2, 5–11 s: wide shot from the sidewalk as she rolls out of the building onto a quiet tree-lined street in the morning. Shot 3, 11–17 s: tracking shot beside her at handlebar height as she rides along a protected bike lane past shop fronts and parked cars. Shot 4, 17–24 s: low angle as she stops at a crosswalk, looks both ways and sets off again when the light changes. Shot 5, 24–30 s: medium shot outside a glass office entrance as she folds the scooter in one motion, lifts it by the stem and walks inside. Natural morning light, clean commercial color grade, no readable signs. Audio: the click of the stem locking, a soft electric whine while riding, tires on pavement, birdsong and light traffic, the beep of the crosswalk, a light upbeat electronic music bed throughout, no voices, no subtitles.",
"width": 1920,
"height": 1080,
"duration": 30
})
asyncio.run(main())curl https://api.runware.ai/v1 \
-H "Authorization: Bearer $RUNWARE_API_KEY" \
-H "Content-Type: application/json" \
-d '[
{
"taskType": "videoInference",
"taskUUID": "11257971-7b5b-4046-9850-c3130a53b391",
"model": "sandai:magi@2",
"positivePrompt": "A 30-second commercial for a folding electric scooter, five shots joined by hard cuts at 5, 11, 17 and 24 seconds. The rider is the same woman in every shot: late twenties, short curly hair, a mustard rain jacket and white sneakers, riding a matte black scooter with no logos. Shot 1, 0–5 s: close-up as her hand unfolds the scooter's stem in an apartment hallway and it clicks into place. Shot 2, 5–11 s: wide shot from the sidewalk as she rolls out of the building onto a quiet tree-lined street in the morning. Shot 3, 11–17 s: tracking shot beside her at handlebar height as she rides along a protected bike lane past shop fronts and parked cars. Shot 4, 17–24 s: low angle as she stops at a crosswalk, looks both ways and sets off again when the light changes. Shot 5, 24–30 s: medium shot outside a glass office entrance as she folds the scooter in one motion, lifts it by the stem and walks inside. Natural morning light, clean commercial color grade, no readable signs. Audio: the click of the stem locking, a soft electric whine while riding, tires on pavement, birdsong and light traffic, the beep of the crosswalk, a light upbeat electronic music bed throughout, no voices, no subtitles.",
"width": 1920,
"height": 1080,
"duration": 30
}
]'runware run sandai:magi@2 \
positivePrompt="A 30-second commercial for a folding electric scooter, five shots joined by hard cuts at 5, 11, 17 and 24 seconds. The rider is the same woman in every shot: late twenties, short curly hair, a mustard rain jacket and white sneakers, riding a matte black scooter with no logos. Shot 1, 0–5 s: close-up as her hand unfolds the scooter's stem in an apartment hallway and it clicks into place. Shot 2, 5–11 s: wide shot from the sidewalk as she rolls out of the building onto a quiet tree-lined street in the morning. Shot 3, 11–17 s: tracking shot beside her at handlebar height as she rides along a protected bike lane past shop fronts and parked cars. Shot 4, 17–24 s: low angle as she stops at a crosswalk, looks both ways and sets off again when the light changes. Shot 5, 24–30 s: medium shot outside a glass office entrance as she folds the scooter in one motion, lifts it by the stem and walks inside. Natural morning light, clean commercial color grade, no readable signs. Audio: the click of the stem locking, a soft electric whine while riding, tires on pavement, birdsong and light traffic, the beep of the crosswalk, a light upbeat electronic music bed throughout, no voices, no subtitles." \
width=1920 \
height=1080 \
duration=30{
"taskType": "videoInference",
"taskUUID": "11257971-7b5b-4046-9850-c3130a53b391",
"model": "sandai:magi@2",
"positivePrompt": "A 30-second commercial for a folding electric scooter, five shots joined by hard cuts at 5, 11, 17 and 24 seconds. The rider is the same woman in every shot: late twenties, short curly hair, a mustard rain jacket and white sneakers, riding a matte black scooter with no logos. Shot 1, 0–5 s: close-up as her hand unfolds the scooter's stem in an apartment hallway and it clicks into place. Shot 2, 5–11 s: wide shot from the sidewalk as she rolls out of the building onto a quiet tree-lined street in the morning. Shot 3, 11–17 s: tracking shot beside her at handlebar height as she rides along a protected bike lane past shop fronts and parked cars. Shot 4, 17–24 s: low angle as she stops at a crosswalk, looks both ways and sets off again when the light changes. Shot 5, 24–30 s: medium shot outside a glass office entrance as she folds the scooter in one motion, lifts it by the stem and walks inside. Natural morning light, clean commercial color grade, no readable signs. Audio: the click of the stem locking, a soft electric whine while riding, tires on pavement, birdsong and light traffic, the beep of the crosswalk, a light upbeat electronic music bed throughout, no voices, no subtitles.",
"width": 1920,
"height": 1080,
"duration": 30
}Response
[
{
"taskType": "videoInference",
"taskUUID": "11257971-7b5b-4046-9850-c3130a53b391",
"videoUUID": "cc411c78-febb-4893-af67-163f2348de7b",
"videoURL": "https://vm.runware.ai/video/os/a14d18/ws/2/vi/cc411c78-febb-4893-af67-163f2348de7b.mp4"
}
]The longer the clip, the more the prompt has to carry. A 30-second brief that only sets a mood leaves every shot and every cut to the model, so write the plan out once a clip runs past a single beat.
Writing a shot list
A shot list opens with how many shots there are and where the cuts fall, then gives each shot a number, a time range, a framing and one action:
A 15-second vertical gym reel, four shots joined by hard cuts at 4, 8 and 11 seconds. The same athlete in every shot: a man in his thirties with a shaved head and a full beard, a gray sleeveless top and black shorts. Shot 1, 0–4 s: close-up of his hands chalking up over a bucket, chalk dust drifting. Shot 2, 4–8 s: wide shot as he sets up over a loaded barbell in a bright industrial gym and pulls a slow, controlled deadlift to standing. Shot 3, 8–11 s: close-up of his face, focused, as he lowers the bar. Shot 4, 11–15 s: medium shot as he steps back from the bar, wipes his forehead and drinks from a water bottle. Hard daylight from tall windows, high-contrast fitness grade. Audio: chalk clapping off his hands, the plates rattling as the bar leaves the floor, his breathing, the bar settling on the floor, a driving hip-hop beat underneath, no voices, no subtitles.
Make the ranges add up to the duration, and repeat the same cut times in the opening line. Four ranges that cover 0 to 15 seconds leave no gap for a shot you did not ask for. Each shot also names its framing, close-up, wide or medium, so every cut lands on a new view.
Size each shot to its action. The deadlift gets four seconds and the close-up of his face three, because a shot that is too short for its action comes out rushed or cut off.
Keeping a character consistent
Describe a recurring character once, before the first shot, and refer back to them in every shot after it. "The rider is the same woman in every shot", followed by her hair, jacket and scooter, gives every shot the same person to draw, and the shots themselves can spend their words on the action.
Inside one generation the prompt is enough. A character who has to match a real person or an approved product needs a picture of them, passed as a reference image, which also holds them across separate clips.
One continuous take
For walkthroughs and tours, ask for one continuous shot with no cuts. The time ranges stay, but each one now says where the camera is at that moment:
A 20-second walkthrough of a modern furniture showroom, filmed as one continuous gimbal shot with no cuts. 0–5 s: the camera enters through the glass front doors into a bright open space with a pale concrete floor. 5–10 s: it glides past a living room set with a low cream sofa, a walnut coffee table and a wool rug. 10–15 s: it curves around a dining set of an oak table and six black chairs under a paper pendant lamp. 15–20 s: it slows at a bedroom set by the back windows and holds on the made bed and a linen throw. Steady eye-level movement at walking pace, soft daylight. No people, no price tags, no readable text. Audio: soft footsteps on concrete, quiet room tone, a gentle acoustic guitar track, no voices, no subtitles.
A continuous take is a route through the space. Name the stops in order, set the speed of travel ("at walking pace"), and end on something worth holding, here the made bed by the windows.
Tips
-
Write the cuts out once the clip runs long. Past one beat, an unplanned clip is a series of choices you did not make.
-
Give every shot a number, a time range, a framing and one action. The opening line says how many shots there are and where the cuts fall.
-
Make the ranges add up to the duration. A gap in the timeline is a stretch the model fills on its own.
-
Describe a recurring character once, up front. Then every shot can refer back to the same person.
-
Say "one continuous shot, no cuts" for walkthroughs. Use the time ranges for the camera's route instead.
-
Use a reference image when the character is real. A person or a product that must match an existing asset needs a picture of it.