Skip to main content
MAGI-2 from Sand AI generates 1080p video from 4 to 30 seconds. It works from a text prompt alone, from a first-frame image, or from up to 10 reference images, 5 reference videos and 5 reference audio clips, and can generate sound.
  • Model ID: magi-2
  • Endpoint: POST https://refillapi.com/v1/videos (async task)
  • Price

Request

string
required
Bearer YOUR_API_KEY
string
required
magi-2
string
required
What happens in the video, including camera and sound. Up to 8,000 characters.
integer
default:"5"
Length: an integer from 4 to 30.
string
First frame: a public image URL. Cannot be combined with metadata.parts.
string
default:"16:9"
16:9, 9:16, 21:9, 4:3, 1:1 or 3:4.
string
default:"1080p"
Only 1080p.
boolean
Whether to generate sound with the video.
object[]
Reference media, in Sand AI’s format. Each item is one of:
  • {"type": "reference_image", "image": {"url": "https://..."}} — up to 10
  • {"type": "reference_video", "video": {"url": "https://..."}} — up to 5; each 2–30 s, 30 s in total
  • {"type": "reference_audio", "audio": {"url": "https://..."}} — up to 5
You may also put the prompt here as one {"type": "text", "text": "..."} item instead of the top-level prompt — but not both.
Field names in metadata use Sand AI’s spelling (aspectRatio, generateAudio). Any other metadata field, and size, are rejected.

Text to video

First frame to video

Reference images and video

Polling and download work as in Video generation.
MAGI-2 is slower than most video models: plan on 10–30 minutes per task. Poll every 30 seconds or so.

Billing

Billed per second of output video at 1080p. The requested length is held when you submit and settled against the length actually generated; failed tasks are refunded in full. Reference media are not billed separately. Current price: magi-2 pricing.

Errors