Sand AISand AI MAGI-2MAGI-2 ist jetzt auf SandBase: 1080p-Video mit nativem AudioJetzt testen

MAGI-2 Image to Video

/v1/run + Ark-FormatMAGI-2 by Sand AI animates a first frame, or a first and last frame, into a 1080p video of 4 to 30 seconds with native audio.
API-Dokumentation
sandai/magi-2/image-to-video

MAGI-2 by Sand AI animates a first frame, or a first and last frame, into a 1080p video of 4 to 30 seconds with native audio.

Modell testen

Playground

Playground öffnen
Eingabe
Optional. Describe the motion and sound.

PNG, JPEG, WebP oder GIF · maximal 20 MiB

First frame (upload or public HTTPS URL). JPEG, PNG, WebP, BMP, TIFF, GIF or HEIC, under 30 MB.
430
Output video duration in seconds (4-30). Billed per second. Bereich: 4 bis 30.
Output aspect ratio.
Output resolution. MAGI-2 renders 1080p only.
Erweiterte Einstellungen

PNG, JPEG, WebP oder GIF · maximal 20 MiB

Optional last frame (upload or public HTTPS URL).
Generate a native audio track with the video. Included in the price.
Random seed for reproducibility (0-4294967295). Omit for a random seed. Bereich: 0 bis 4294967295.
Ergebnis
Beispiel
  1. Was möchten Sie als Nächstes tun?

    Original öffnen

Gespeichertes Beispielergebnis. Es wurde keine neue Generierung angefordert.

Angezeigte Ausführungsabschätzung: $0.4. Die endgültigen Kosten folgen unten den Abrechnungsregeln des Modells.

MAGI-2 Image to Video

MAGI-2 image-to-video API by Sand AI: animate a first frame, or move from a first frame to a last frame, in a 1080p video of 4 to 30 seconds with native audio. Use it through SandBase with one API key, pay per second of output, and switch providers automatically if one is unavailable.

Quickstart

curl https://api.sandbase.ai/v1/run \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "sandai/magi-2/image-to-video",
    "image": "https://example.com/first-frame.jpg",
    "prompt": "The woman leans toward the microphone, smiles and says: \"Welcome back to the show.\" Slow push-in. Sound: quiet room tone and her voice.",
    "duration": 5,
    "aspect_ratio": "16:9"
  }'

The response contains an id. Poll the run every 10 seconds until status is completed, then download outputs[0].url:

curl https://api.sandbase.ai/v1/run/$RUN_ID \
  -H "Authorization: Bearer $SANDBASE_API_KEY"

Stop polling when status is failed and read the error message. You can also run the same request in the Playground on this page without writing code.

Two ways to call MAGI-2

This modelMAGI-2, all inputs
modelsandai/magi-2/image-to-videosandai/magi-2
APIsPOST /v1/run with the fields belowPOST /v1/run with the same flat fields, or the Ark compatible API (POST /api/v3/contents/generations/tasks with "model": "magi-2" and a content array)
InputsA first frame, optionally a last frameText, first and last frame, or references, all in one model
ProvidersSwitches to another provider if one is unavailableOne provider
Price$0.08 per second$0.08 per second
Use this model when you want a switch to another provider if one is unavailable. Use MAGI-2 with all inputs to send every kind of input to one model on /v1/run, or if your code already calls Sand AI's API or the Ark SDK. Compare the APIs on the MAGI-2 page.

Fields

FieldTypeDefaultNotes
promptstring—Optional. Describe the motion and sound.
imagestring, required—First frame (upload or public HTTPS URL). JPEG, PNG, WebP, BMP, TIFF, GIF or HEIC, under 30 MB.
end_imagestring—Optional last frame (upload or public HTTPS URL).
durationinteger 4–305Output video duration in seconds (4-30). Billed per second.
aspect_ratio16:9 / 9:16 / 1:1 / 4:3 / 3:4 / 21:916:9Output aspect ratio.
resolution1080p1080pOutput resolution. MAGI-2 renders 1080p only.
generate_audiobooleantrueGenerate a native audio track with the video. Included in the price.
seedinteger 0–4294967295randomRandom seed for reproducibility (0-4294967295). Omit for a random seed.

Prompt tips

  • Describe the scene that is already in the image, then the movement you want. A prompt that describes a different scene can change the image a lot.
  • With a last frame (end_image), describe the action that connects the two frames. Frames with a similar setting, lighting and subject give the smoothest transition.
  • Choose an aspect_ratio that matches your image to avoid cropping.
  • Put spoken lines in quotes to make the subject talk, and add a Sound: line for ambience and effects.
  • Keep one or two actions and one camera move per clip.

Billing

$0.08 per second of output video, with native audio included in the price. Resolution is fixed at 1080p. Failed runs are not billed.

Output lengthPrice
4s$0.32
5s (default)$0.40
10s$0.80
30s$2.40

FAQ

Can I set both a first and a last frame?

Yes. Send the first frame as image and the last frame as end_image. The video starts on the first image and ends on the second. The prompt is optional.

Which image formats can I use?

JPEG, PNG, WebP, BMP, TIFF, GIF or HEIC under 30 MB, as an upload in the Playground or a public HTTPS URL.

How long can a MAGI-2 video be?

Any whole number of seconds from 4 to 30, set with duration. The video is rendered at 1080p and 25 fps in one of six aspect ratios: 16:9, 9:16, 1:1, 4:3, 3:4 or 21:9.

Does MAGI-2 generate sound?

Yes. Dialogue, sound effects, ambience and music are generated together with the picture. Set generate_audio to false for a silent video; the price is the same.

How is MAGI-2 billed?

$0.08 per second of output video, from your SandBase balance. A 5-second clip costs $0.40 and a 30-second clip $2.40. Failed runs, including ones rejected by content moderation, are not billed.

Can I use Sand AI's API format instead?

Yes. If your code already calls Sand AI's API or the Ark SDK, use MAGI-2 with all inputs with "model": "magi-2" at https://api.sandbase.ai/api/v3. Compare both ways.

See what people made

Browse the most-liked MAGI-2 videos on X, credited to the people who made them: MAGI-2 videos from X. Short films, ads and anime.

Other MAGI-2 modes