MAGI-2 Prompt Guide

A MAGI-2 prompt is not a sentence — it's a small structured document. This guide explains the real format, straight from Sand AI's open-source prompt-enhancement (PE) pipeline, so you can write prompts the way the model was trained to read them. The prompt generator builds all of this automatically; this page is the manual version.

The two layers

global_layer — the constant world. Everything held stable for the whole clip: context (a one-line category), description (the premise, 35–85 words), aesthetics (style, contrast, saturation, mood), lighting_baseline, environment_baseline, alive_subjects_static and objects_static (each entity with an identifier and visual anchors), camera_cinematography (shot style, depth of field, focal length), and audio_baseline (the continuous ambience or music, plus the dialogue language and speaker tags).

dynamic_layer — time. timeline_segments: each segment carries a timestamp_range, a segment_description, the subjects active in it with their primary_action, optional object states, and an audio block with dialogue_lines (timestamp, speaker, text, delivery), ambience_deltas, and special_audio_events.

Timing: the beat discipline

Sand AI's prompt enhancer lays a clip out as exactly 10.0 seconds — the only length the open-source preview generates — and splits the time like this:

Segments Timestamps for a 10s clip
1 00:00.0–00:10.0
2 00:00.0–00:05.0 / 00:05.0–00:10.0
3 ~3.3s each
4 2.5s each
5 2.0s each

Hosted APIs extend this to 4–30 seconds — scale the same pattern: one clear action per segment, cut-safe boundaries, a resolved ending.

Identifier discipline

Give every subject and object an identifier — <subject 1>, <object 1> — and reuse it exactly, everywhere. One identifier per entity, and one canonical description phrase repeated verbatim. That is how the model keeps a character's red windbreaker red from segment to segment.

Safe defaults

When you don't specify, the PE leans on: natural documentary style, moderate contrast and saturation, one broad diffuse light, a 35–50mm lens for people, and a static camera. Deviate deliberately — never accidentally.

8 copyable templates

Each template is a complete, valid two-layer prompt. Swap the italics-style content for yours; keep the field names.

1. Product close-up ad (5s, 9:16)

# global_layer

Product commercial, macro close-up
A 5-second, 1-segment clip of a matte black ceramic coffee mug with steam rising on a linen-topped counter. close-up, measured push-in.

## aesthetics
style: clean product commercial, glossy highlights
## lighting_baseline
conditions: soft studio key light with gentle fill
## objects_static
### objects_static1
object_id: <object 1>
description: a matte black ceramic coffee mug, thin steam rising
position: center frame
## audio_baseline
ambience: quiet kitchen hum

# dynamic_layer

## timeline_segments
### timeline_segments1
## segment_basic_info
timestamp_range: 00:00.0-00:05.0
segment_description: steam curls off the mug as the camera pushes in

2. Street scene narrative (10s, 16:9)

# global_layer

Single-subject narrative clip
A 10-second, 1-segment clip of a young courier in a red windbreaker and silver bike helmet in a Tokyo backstreet at dusk, ramen stalls, wet asphalt. dismounts, walks to the ramen stall and orders noodles. medium shot, static camera.

## aesthetics
style: natural documentary photograph
## lighting_baseline
conditions: neon night signage, magenta and cyan reflections on wet surfaces
## environment_baseline
background_setting: a Tokyo backstreet at dusk, ramen stalls, wet asphalt
## alive_subjects_static
### alive_subjects_static1
subject_id: <subject 1>
description: a young courier in a red windbreaker and silver bike helmet
position: center frame
orientation: facing camera
## audio_baseline
ambience: rain tapping, distant traffic
### dialogue
language: English
speaker_tags: <subject 1>

# dynamic_layer

## timeline_segments
### timeline_segments1
## segment_basic_info
timestamp_range: 00:00.0-00:10.0
segment_description: the courier dismounts, walks to the ramen stall and orders noodles
## audio
### dialogue_lines1
timestamp: 00:02.0
speaker: <subject 1>
text: "One tonkotsu, extra chashu."
delivery: calm and natural

3. Two-person dialogue (10s, 16:9)

# global_layer

Two-person dialogue scene
A 10-second, 1-segment clip of a barista and a customer at a small espresso bar, morning light. medium shot, static camera.

## aesthetics
style: cinematic film look, shallow depth of field
## lighting_baseline
conditions: golden-hour sun through the window, long warm shadows
## alive_subjects_static
### alive_subjects_static1
subject_id: <subject 1>
description: a barista in a brown canvas apron, forearm tattoos
position: behind the counter
### alive_subjects_static2
subject_id: <subject 2>
description: a customer in a grey wool coat, tote bag on shoulder
position: at the counter
## audio_baseline
ambience: espresso machine hiss, low chatter
### dialogue
language: English
speaker_tags: <subject 1> | <subject 2>

# dynamic_layer

## timeline_segments
### timeline_segments1
## segment_basic_info
timestamp_range: 00:00.0-00:10.0
segment_description: the customer orders; the barista confirms with a smile
## audio
### dialogue_lines1
timestamp: 00:01.0
speaker: <subject 2>
text: "A flat white, extra hot, please."
delivery: warm
### dialogue_lines2
timestamp: 00:05.0
speaker: <subject 1>
text: "One flat white, extra hot. Coming up."
delivery: friendly

4. Food beat (10s, 16:9)

# global_layer

Food preparation close-up
A 10-second, 1-segment clip of a noodle chef hand-pulling noodles in a steaming open kitchen. close-up, constant-speed side tracking.

## aesthetics
style: natural documentary photograph
## lighting_baseline
conditions: single warm practical lamp, steam catching the light
## alive_subjects_static
### alive_subjects_static1
subject_id: <subject 1>
description: a noodle chef in a white t-shirt and dark apron, flour-dusted forearms
position: center frame
## audio_baseline
ambience: wok sizzle, kitchen clatter

# dynamic_layer

## timeline_segments
### timeline_segments1
## segment_basic_info
timestamp_range: 00:00.0-00:10.0
segment_description: the chef slaps and folds the dough into noodles, flour puffing

5. Nature establishing shot (10s, 21:9)

# global_layer

Nature establishing shot
A 10-second, 1-segment clip of fog rolling over black volcanic cliffs above a grey sea. wide shot, static camera.

## aesthetics
style: natural documentary photograph
contrast: moderate
saturation: restrained
## lighting_baseline
conditions: overcast diffuse light, open shadows
## environment_baseline
background_setting: black volcanic cliffs above a grey sea, low fog
## audio_baseline
ambience: low wind, distant surf

# dynamic_layer

## timeline_segments
### timeline_segments1
## segment_basic_info
timestamp_range: 00:00.0-00:10.0
segment_description: fog banks drift slowly across the cliff face

6. Sports action (5s, 9:16)

# global_layer

Sports action clip
A 5-second, 1-segment clip of a sprinter exploding out of the blocks on a rain-darkened track. medium shot, handheld follow.

## aesthetics
style: cinematic film look, shallow depth of field
## lighting_baseline
conditions: golden-hour sun, long warm shadows
## alive_subjects_static
### alive_subjects_static1
subject_id: <subject 1>
description: a sprinter in a teal and white kit, number 7 on the chest
position: center frame
## audio_baseline
ambience: crowd roar building

# dynamic_layer

## timeline_segments
### timeline_segments1
## segment_basic_info
timestamp_range: 00:00.0-00:05.0
segment_description: the sprinter drives out of the blocks, arms punching

7. Three-beat product ad (30s, 16:9)

# global_layer

Skincare commercial, three beats
A 30-second, 3-segment clip of a woman with short dark curls testing a glass jar of cream. close-up, static camera in each beat.

## aesthetics
style: clean product commercial, glossy highlights
## lighting_baseline
conditions: soft studio key light with gentle fill
## alive_subjects_static
### alive_subjects_static1
subject_id: <subject 1>
description: a woman in her thirties with short dark curls, minimal makeup
position: center frame
## objects_static
### objects_static1
object_id: <object 1>
description: a small amber glass jar of cream with a black lid
position: lower center frame
## audio_baseline
ambience: soft piano with warm pad, low volume

# dynamic_layer

## timeline_segments
### timeline_segments1
## segment_basic_info
timestamp_range: 00:00.0-00:10.0
segment_description: she unscrews the lid and dips two fingers in
### timeline_segments2
## segment_basic_info
timestamp_range: 00:10.0-00:20.0
segment_description: she smooths the cream along her cheekbone, eyes closing
### timeline_segments3
## segment_basic_info
timestamp_range: 00:20.0-00:30.0
segment_description: she opens her eyes to camera, a small confident smile
## audio
### dialogue_lines1
timestamp: 00:22.0
speaker: <subject 1>
text: "Feels like nothing. Does everything."
delivery: calm and confident

8. Silent B-roll loop (10s, 16:9, audio off)

# global_layer

Atmospheric B-roll
A 10-second, 1-segment clip of espresso pouring into a glass cup, crema settling. extreme close-up, static camera.

## aesthetics
style: cinematic film look, shallow depth of field
## lighting_baseline
conditions: single warm practical lamp, dark surround
## objects_static
### objects_static1
object_id: <object 1>
description: a double-walled glass cup on a brass portafilter mat
position: center frame

# dynamic_layer

## timeline_segments
### timeline_segments1
## segment_basic_info
timestamp_range: 00:00.0-00:10.0
segment_description: espresso streams into the cup, crema swirling up

Send this one with generate_audio set to false — same price, and you score it yourself. (Audio syntax lives on the audio prompting page.)

Image-to-video: a different schema

When you start from a photo, Sand AI's prompt enhancer switches formats. Instead of global_layer and dynamic_layer, an image-to-video caption has six top-level keys:

Key What it holds
global_caption Five prose fields — core_caption, format_and_structure, narrative_and_emotional_design, visual_design, audio_design — and continuity_requirements, a list of rules
reference_bank The people, objects, and places taken from the photo, each with an identifier, a type, a role, and a description of how it looks in the starting frame
shot_timeline Each shot's time range in seconds, caption, camera and lighting, the physical logic of the motion, and the identifiers it uses
audio_event_timeline Each sound with an identifier, a type, a time range, a caption, and a sync note
visible_text Any readable text or logo in the frame that must stay legible
generation_requirements A list of global rules for the generation

Three rules from Sand AI's template decide whether an image-to-video prompt works:

  1. The image is the baseline. core_caption is one sentence that combines the photo's starting state with the motion you want; visual_design describes the photo's own look so the model knows what to keep. The text cannot change the past, only what happens next.
  2. Spend your words on motion. The look is already set, so the shot caption should carry joint articulation, fluid dynamics, camera trajectories, and cause and effect.
  3. Hold the look. continuity_requirements should say that the photo's exact identities, background, and architecture stay put. Unless you ask for a transition, do not invent new light or a new style.

The template's default is 10.0 seconds in a single continuous take, unless your text implies a montage.

A 10-second image-to-video example

Starting from a product photo: a matte black thermos on a stone ledge by the sea. Only the water moves.

# global_caption

core_caption:A photoreal product shot of a matte black thermos on a stone ledge comes alive as a wave breaks on the rocks below.
format_and_structure:10-second single continuous take with a locked-off camera.
narrative_and_emotional_design:Calm, premium, unhurried.
visual_design:Soft overcast coastal light, muted blue-grey palette, shallow depth of field.
audio_design:Waves breaking on rocks, water dripping from the lid.
continuity_requirements:Keep the thermos shape, matte finish, and label exactly as in the input image. | Hold the camera position and framing for the full 10 seconds. | Keep every edge rigid and undistorted during the splash.

# reference_bank

## reference_bank1

reference_identifier:ref_bottle
reference_type:product
label:Matte black thermos
role:Hero product
description:A tall matte black thermos standing upright at the center of the ledge.
appearance_or_design:Tall matte black cylinder with a steel cap and a small white logo on the front.

## reference_bank2

reference_identifier:ref_ledge
reference_type:setting
label:Stone ledge
role:Starting environment, fixed for the whole clip
description:A rocky ledge above the sea where the product stands.
appearance_or_design:Rough grey stones above the sea, wet from spray, pale horizon behind.

# shot_timeline

## shot_timeline1

shot_identifier:shot_01_splash
time_range_seconds:0.0 | 10.0
scene_reference_identifier:ref_ledge
shot_caption:Starting from the exact framing of the input image, a wave breaks against the rocks below the ledge. Water arcs up, beads roll down the thermos, and the steel cap catches a brief highlight as the spray passes. The last drops fall away and the surface settles.
camera_lighting_and_composition:Locked-off camera at the input image's framing. Overcast light stays even; a soft glint travels across the wet metal.
motion_and_physical_logic:Water follows gravity in a coherent arc; droplets obey surface tension and slide down the matte surface without deforming the cylinder.
reference_identifiers:ref_bottle | ref_ledge
audio_event_identifiers:audio_wave | audio_drips

# audio_event_timeline

## audio_event_timeline1

audio_event_identifier:audio_wave
event_type:ambient
time_range_seconds:0.0 | 4.0
source_reference_identifier:ref_ledge
audio_caption:A wave builds and breaks against the rocks with a full, low rush.
synchronization_note:The crash lands exactly as the water arcs into frame.

## audio_event_timeline2

audio_event_identifier:audio_drips
event_type:foley
time_range_seconds:4.5 | 9.5
source_reference_identifier:ref_bottle
audio_caption:Thin water drips ticking onto stone, slowing as the spray settles.
synchronization_note:Each drip matches a visible drop leaving the base of the thermos.

# visible_text

## visible_text1

visible_text_identifier:text_logo
text:NORTH
time_range_seconds:0.0 | 10.0
position_and_role:Small white brand name on the front of the thermos
source_reference_identifier:ref_bottle

generation_requirements:Preserve the input image's composition, lighting, and palette for the entire clip. | Keep the thermos rigid and undistorted through the splash. | End on a settled, static frame.

Note what is different from the text-to-video templates above: the settings live under # global_caption instead of # global_layer, there are no timeline_segments (the # shot_timeline plays that part), and the people, objects, and places are cataloged in reference_bank with identifiers the shots and sounds refer back to. Sound effects have their own timeline, each tied to a visible event.

This is the format Sand AI's open-source enhancer produces for a prompt plus a still image (see its image-to-video template and samples). Working from several photos or clips instead of one first frame is reference-to-video, a different mode: MAGI-2 reference prompts covers it.

Five common mistakes

  1. Too many actions in one segment. One continuous action per beat; split the rest into more segments.
  2. Two camera movements in one clip. A pan plus a push-in in the same prompt is a classic recipe for geometric warping.
  3. Dialogue longer than the clip. Spoken English is ~2.5 words per second; the generator warns you when you cross the line.
  4. No visual anchors. "A woman" drifts; "a woman in her thirties with short dark curls" stays.
  5. Describing what you don't want. "No people in the background" renders people. State the positive: "empty street, motionless storefronts".

Working from your own photos, clips, or audio? MAGI-2 reference prompts shows how to label and scope them with @Image, @Video, and @Audio.

The prompt generator automates every rule on this page — form in, structured prompt out. The parameters reference covers the API side, the cost calculator the budget side.

Frequently asked questions

Can I copy these templates directly?
Yes. Swap the subject, scene, action, and dialogue for your own, keep the structure and field names, and match the number of beats to your duration.
Do I really need the two-layer structure?
The model was trained on structured two-layer captions — that's what Sand AI's official prompt enhancer produces. Plain sentences also work, but structured prompts drift less and keep subjects consistent across beats.
How do I write prompts for image-to-video?
Image-to-video uses a different schema: global_caption, reference_bank, shot_timeline, audio_event_timeline, visible_text, and generation_requirements. The image-to-video section above has the field table and a full 10-second example; the same timing discipline applies.
What's the ideal prompt length?
Roughly 80–200 words for a 10-second clip, scaling with duration. Length is not the limit — fitting the right number of actions into the time is.
Why did my clip ignore part of the prompt?
Almost always too much content for the duration. Cut to one continuous action per beat, one camera movement per clip, and dialogue under 2.5 words per second.