/VIDEO/magi-2
Video
Sand AI

MAGI-2 API

Generate 4–30 second 1080p videos with synchronized sound from text, first and last frames, or image, video and audio references.

  • Text to video
  • Image to video

Starting at

$0.114

per second of output

10 parameters · 1 price options

MAGI-2 API pricing

OptionPrice per second
1080p$0.114
1curl -X POST https://api.api-stock.com/api/v1/generation/create \
2 -H "Authorization: Bearer $API_STOCK_KEY" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "model": "magi-2",
6 "input": {
7 "duration": 5,
8 "resolution": "1080p",
9 "generateAudio": true
10 }
11 }'

Parameters

NameTypeRequiredDefaultDescription
promptstringNo—Describe the scene, motion and sound. Required in text and reference modes.
durationnumberNo5Clip length in whole seconds.
resolutionstringNo1080pOutput resolution.One of: 1080p
aspectRatiostringNo—Output aspect ratio for text and reference modes. Defaults to 16:9. Omit it when using firstFrameImage.One of: 16:9, 9:16, 1:1, 4:3, 3:4, 21:9
generateAudiobooleanNotrueGenerate a synchronized soundtrack. This setting does not change the price.
firstFrameImagestringNo—Public HTTPS URL of the first frame. The video follows its aspect ratio. Cannot be combined with reference media.
lastFrameImagestringNo—Public HTTPS URL of the last frame. Requires firstFrameImage.
imageUrlsstring[]No—Public HTTPS URLs of up to 10 reference images.
videoUrlsstring[]No—Public HTTPS URLs of up to 5 reference videos. Each is 2–30 seconds, with at most 30 seconds in total.
audioUrlsstring[]No—Public HTTPS URLs of up to 5 audio references. Each is 2–30 seconds, with at most 30 seconds in total.

Frequently asked questions

How much does MAGI-2 cost?

MAGI-2 starts at $0.114 per second of output on API Stock. The final charge depends on the selected settings.

When was MAGI-2 released?

MAGI-2 was released on November 24, 2026 and is available through API Stock.

How do I get an API key for MAGI-2?

Create an account and API key on API Stock, then fund your balance. The same key works with MAGI-2 and other catalog models.

How do I call the MAGI-2 API?

POST to https://api.api-stock.com/api/v1/generation/create with your API key and model "magi-2". Use the returned task id for polling or receive a webhook.

What input parameters does MAGI-2 accept?

MAGI-2 accepts 10 input parameters. See their types, defaults and allowed values above.

What happens if a MAGI-2 request fails?

API Stock automatically retries the request on a reserve provider. If every provider fails, the charge is refunded to your balance.

Can I use MAGI-2 with the same API key as other models?

Yes. Use your API Stock API key and balance for MAGI-2 and other catalog models.

Read next