🔥 Black Friday AI API deals are live· 🎬 Seedance 2.5 — 20% off, up to 42% below market, until Nov 30Ends in--d --:--:--See deals →
New3 endpointsPublished

Magi 2 API — Text, Image and Reference to Video with Generated Audio

Run Magi 2, Sand AI's open-weights audio-video model, through Muapi: text-to-video, image-to-video and reference-to-video clips of 4 to 30 seconds at 1080p, with synchronized generated sound, for $0.10 per second.The 114B-parameter mixture-of-experts model needs about 307 GB of weights to self-host. Muapi gives you the same model behind one API key and the usual asynchronous submit-and-poll REST pattern, with no GPUs to manage.

i

Magi 2 is live on Muapi

Choose an endpoint, submit it with your Muapi API key, and poll the returned request ID for the generated MP4. Pricing is a flat $0.10 per second of video.

Watch: Magi 2 Spicy API Tutorial

Magi 2 video endpoints

4 to 30 second 1080p clips with generated audio, $0.10 per second3 endpoints
T2VNew
1080p · 4–30 s

Magi 2 Text to Video

Generate a 4 to 30 second 1080p video with synchronized sound from a text prompt.

1080p · 4–30s
$0.10/sec
Try Model
I2VNew
1080p · 4–30 s

Magi 2 Image to Video

Animate a still image into a clip with generated audio, with an optional last frame to guide the ending.

1080p · 4–30s
$0.10/sec
Try Model
R2VNew
1080p · 4–30 s

Magi 2 Reference to Video

Guide a video with up to 10 reference images, 5 reference videos and 5 reference audio clips.

1080p · 4–30s
$0.10/sec
Try Model

What is the Magi 2 API?

Magi 2 (MAGI-2 Preview) is an open-weights video generation model from Sand AI, the team behind MAGI-1. It is a unified audio-video model: one network generates the picture and the sound together from a text prompt, from a prompt plus a starting image, or from a prompt plus reference images, videos and audio.

Under the hood it is a 114B-parameter mixture-of-experts model that activates about 6B parameters per token, and the weights are released under the Apache 2.0 license. Muapi serves it at 1080p with clips from 4 to 30 seconds.

Muapi hosts it as three endpoints, magi-2-text-to-video, magi-2-image-to-video and magi-2-reference-to-video. Send a prompt (plus image_url for image to video, or images_list, videos_list and audios_list for reference to video), choose an aspect_ratio and a duration, then poll the shared result endpoint. Magi 2 is a different model from the earlier autoregressive MAGI-1, so pick the right name when you compare providers.

Magi 2 API capabilities

Text to video with sound

Turn a scene description into a clip with generated ambient sound, music or spoken dialogue in a single pass.

Image to video with a last frame

Use a still image as the starting frame, add a motion prompt, and optionally supply a last image to guide the ending.

Reference to video

Combine up to 10 images, 5 videos and 5 audio clips to keep characters, motion and sound consistent.

4 to 30 second 1080p clips

Pick any whole-second duration from 4 to 30 in 16:9, 9:16, 1:1, 4:3, 3:4 or 21:9, and turn generated audio off for a silent clip.

Open weights, hosted for you

The model is Apache 2.0 licensed, but roughly 307 GB of weights is impractical to run yourself. Muapi serves it behind a normal API key at a flat per-second price.

Magi 2 API use cases

Short-form social video

Generate vertical clips with sound for Reels, Shorts and TikTok.

Product and ad concepts

Animate product shots and test campaign ideas before a full production.

Character and story scenes

Create dialogue-style and ambient scenes where sound and motion are generated together, up to 30 seconds long.

Open-model evaluation

Benchmark an open-weights video model against closed models without setting up GPUs.

Relaxed-moderation workflows

Teams that need fewer prompt restrictions on adult-oriented creative work can pair Magi 2 with Muapi's other spicy video models, subject to Muapi's usage policy.

Magi 2 endpoints compared

EndpointInputOutputBest For
magi-2-text-to-videoText prompt4–30 s 1080p video with audioNew scenes from a description
magi-2-image-to-videoImage, prompt and optional last image4–30 s 1080p video with audioAnimating a specific image or character
magi-2-reference-to-videoPrompt with reference images, videos and audio4–30 s 1080p video with audioConsistent characters, motion and sound

Quick start — Magi 2 API

Submit a Magi 2 endpoint with your Muapi API key in the x-api-key header, save the returned request ID, and poll the shared result endpoint for the generated MP4.

1. Create text-to-video

curl -X POST https://api.muapi.ai/api/v1/magi-2-text-to-video \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"prompt":"A street musician plays violin in a rainy neon alley, slow dolly in, ambient rain and music","aspect_ratio":"16:9","duration":10}'

# Response: {"request_id":"REQUEST_ID"}
# duration: whole seconds from 4 to 30 (default 5). generate_audio defaults to true.

Call magi-2-text-to-video with a prompt, an aspect ratio and a duration.

2. Animate an image

curl -X POST https://api.muapi.ai/api/v1/magi-2-image-to-video \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"image_url":"https://example.com/source.jpg","prompt":"The camera slowly pushes in as the subject turns and speaks","duration":8}'

# Optional: last_image to guide the final frame; aspect_ratio defaults to the closest ratio to the image.

Call magi-2-image-to-video with an image URL, a motion prompt and an optional last image.

3. Guide with references

curl -X POST https://api.muapi.ai/api/v1/magi-2-reference-to-video \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"prompt":"The kitten from @image_1 trots down the snowy lantern-lit street from @image_2, soft wind chimes","images_list":["https://example.com/kitten.jpg","https://example.com/street.jpg"],"duration":8}'

# Up to 10 images_list, 5 videos_list and 5 audios_list references. Price: $0.10 per second of video.

Call magi-2-reference-to-video with a prompt and reference images, videos or audio.

4. Poll the result

curl https://api.muapi.ai/api/v1/predictions/REQUEST_ID/result \
  -H "x-api-key: YOUR_API_KEY"

# Poll until status is completed, then read the MP4 URL from outputs.

Poll until the task is completed, then read the MP4 URL from outputs.

Magi 2 API FAQ

What is Magi 2?

Magi 2 (MAGI-2 Preview) is Sand AI's open-weights audio-video generation model. It is a 114B-parameter mixture-of-experts model that activates about 6B parameters per token, and it generates video and sound together from text, text plus an image, or text plus references.

Is there a Magi 2 API?

Yes. Muapi hosts Magi 2 as magi-2-text-to-video, magi-2-image-to-video and magi-2-reference-to-video, so you can call it with a normal API key instead of running the 307 GB weights yourself.

How long are Magi 2 videos?

You choose any whole number of seconds from 4 to 30 (default 5), at 1080p, with generated audio that you can switch off.

What can I use as references?

The reference-to-video endpoint accepts up to 10 images, 5 videos and 5 audio clips. Video and audio clips should be 2 to 30 seconds each and 30 seconds combined; longer clips are trimmed.

Is Magi 2 the same as MAGI-1?

No. MAGI-1 is Sand AI's earlier autoregressive video model. Magi 2 is a newer unified audio-video model with a different architecture.

Is Magi 2 open source and can I use it commercially?

The weights are published under the Apache 2.0 license. Check the license file in the official repository for the exact terms before you rely on it for a specific commercial use.

Can I use Magi 2 for uncensored or spicy video?

Open-weights models have no built-in hosted filter of their own, but content you generate through Muapi is still subject to Muapi's usage policy, and sexual content involving minors is never allowed. For adult-oriented creative work, compare Magi 2 with Muapi's dedicated spicy video models.

How much does the Magi 2 API cost?

Pricing is pay per use with no subscription: a flat $0.10 per second of video, for example $0.50 for a 5-second clip and $3.00 for 30 seconds. Aspect ratio, generated audio and references do not change the price.

How do I get the result?

The endpoint is asynchronous. You receive a request_id immediately, then poll the predictions result endpoint or provide a webhook URL to be notified when the video is ready.

Ready to build with Magi 2?

Use one Muapi API key for Magi 2 text-to-video, image-to-video and reference-to-video with generated audio.