Introduction
Guide subject identity, camera motion, and pacing from mixed image, video, and audio references in 4–30 s 1080p MP4.
| Field | Value |
|---|---|
| Input | Text |
| Output | Video |
| Publisher | Sand.ai |
| Official release | 2026-11-24 |
| Endpoints | text-to-video, image-to-video, reference-to-video |
| Duration | 4–30 whole seconds; default 5 seconds |
| Resolution & frame rate | 1080p class (1920x1080 at 16:9, 1248x1664 at 3:4); MP4 H.264 at 25 fps |
| Aspect ratios | 16:9, 9:16, 1:1, 4:3, 3:4, 21:9 (image-to-video defaults to auto closest match) |
| Audio | 44.1 kHz stereo AAC on by default; disable to output a silent video-only MP4 at the same rate |
| Image-to-video inputs | Required opening image; optional closing image and optional prompt |
| Reference-to-video inputs | Required prompt; up to 10 images, up to 5 videos (30 s total), and up to 5 audio clips (30 s total) |
| Reproducibility | Optional integer seed from 0 to 2147483647 |
Key features & highlights
Long-take 35mm atmosphere with synchronized ambience
From a single written brief, MAGI-2 tracks a woman stepping from a vintage coupe under wet hotel marquee lights in 1920x1080, pairing rain reflections with subtle rain patter and distant jazz.
Quoted speech and kitchen foley locked to picture
Place spoken lines inside quotation marks to trigger synchronized speech alongside room ambience. Here the ramen chef sets down chopsticks and delivers his calm line as steam curls past the rain-streaked glass.
Bridge two distinct stills in one continuous camera move
Supply both an opening portrait and a closing destination frame to stage seamless match-cut transitions. Omitting the frame ratio lets MAGI-2 snap automatically to the closest portrait geometry (1248x1664).
Combine identity, camera pacing, and audio rhythm at once
Reference-to-video ingests images, motion clips, and sound tracks together without adding surcharges. Subject appearance comes from the still, low-angle tracking from the video, and stride cadence from the audio clip.
Request parameters
| Parameter | Required | Description |
|---|---|---|
prompt | Yes | Required instructions up to 15,000 characters describing the scene and each reference's role; tag multiple files as @ |
reference_image_urls | No | Optional array of up to 10 image URLs for characters, outfits, props, or settings. Tag as @ |
reference_video_urls | No | Optional array of up to 5 video URLs (2–30 s each, 30 s combined; longer clips are trimmed) for camera or motion cues. Tag as @ |
reference_audio_urls | No | Optional array of up to 5 audio URLs (2–30 s each, 30 s combined; longer clips are trimmed) for voice, music, or pacing. Tag as @ |
aspect_ratio | No | Select 16:9 (default), 9:16, 1:1, 4:3, 3:4, or 21:9. Does not change the per-second rate. |
generate_audio | No | Defaults to true for stereo AAC audio. Setting false returns a silent video-only MP4 at the same per-second rate. Default: |
duration_seconds | No | Whole seconds from 4 to 30 (default 5). Drives total billing, settled strictly on requested whole seconds. |
seed | No | Optional integer from 0 to 2147483647 for repeatable runs; omit for a random seed. |
Pricing
$0.096 / second
Billed strictly per requested whole second (4–30 s). Adding reference images, reference videos, or reference audio clips carries no surcharge, and safety refusals are not charged.
Use cases
Narrative scene pre-visualization
Block 10–30 second 1080p shots with spoken dialogue, camera moves, and environmental sound before principal photography.
Match-cut wardrobe and location transitions
Feed an opening studio still and a target location still into image-to-video to animate clean editorial transitions.
Multi-reference commercial storyboards
Lock character likeness with stills, borrow camera cadence from reference clips, and sync motion to a supplied audio track.
Silent B-roll plates for custom sound design
Turn off audio generation when your edit bay plans to lay down bespoke foley and score over clean H.264 footage.
Prompt guide & pro tips
Pick the mode that matches your assets
Start with text-to-video for pure prompts, image-to-video for first or first-and-last frames, or reference-to-video for mixed image, video, and audio inputs.
Draft at 4–5 seconds before scaling to 30
Because MAGI-2 charges per requested second and complex renders take several minutes, verify composition on a 4-second clip before ordering 15–30 seconds.
Label every reference role clearly
Tag uploaded files as @
image_1, @video_1, and @audio_1in upload order, or state clearly what each reference supplies for identity, camera motion, and rhythm.Quote dialogue and separate sound cues
Put spoken lines inside quotation marks and describe ambience, foley, and music explicitly so the stereo AAC track locks cleanly to on-screen action.
Overview
MAGI-2 Reference to Video unifies up to 10 reference images, 5 reference videos, and 5 reference audio clips into one 4–30 second 1080p shot at 25 fps. Use it when you want subject identity from photos, camera movement or choreography from clips, and rhythm or voice texture from audio in a single call.
Tagging uploaded references
Refer to uploaded files in order using @image_1, @image_2, @video_1, and @audio_1, or state each reference's role explicitly in plain English when sending one asset per modality.
Reference clip limits
- Images: up to 10 files.
- Videos: up to 5 clips, 2–30 seconds each, 30 seconds combined (longer inputs are trimmed).
- Audio: up to 5 clips, 2–30 seconds each, 30 seconds combined (longer inputs are trimmed).
API quick start
# Generate the idempotency key once; reuse it when retrying after a lost response.
export SPICY_IDEMPOTENCY_KEY="${SPICY_IDEMPOTENCY_KEY:-$(uuidgen)}"
curl -X POST https://api.spicyapi.ai/api/v1/jobs/createTask \
-H "Authorization: Bearer $SPICY_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $SPICY_IDEMPOTENCY_KEY" \
-d '{
"model": "sand-ai/magi-2/reference-to-video",
"input": {
"aspect_ratio": "16:9",
"duration_seconds": 5,
"prompt": "A slow aerial shot drifting over a misty pine forest at sunrise"
}
}'
# Copy data.taskId from the response into TASK_ID, then poll the status.
TASK_ID="TASK_ID_FROM_RESPONSE"
curl "https://api.spicyapi.ai/api/v1/jobs/recordInfo?taskId=$TASK_ID" \
-H "Authorization: Bearer $SPICY_API_KEY"
See the API reference for authentication, the complete schema, polling, and error handling.




