Create more. Sell more this Black Friday.Explore

MAGI-2 API

Use three MAGI-2 routes through EvoLink’s unified video API: text-to-video, first/last-frame image-to-video, and multimodal reference-to-video, all at 1080p with synchronized audio. Check model IDs, limits, and per-second billing before integrating.

Sand AIVideo GenerationAvailable
From ~$0.080 / s for 1080p output
Text-to-VideoImage-to-VideoReference-to-VideoFirst & Last FramesVideo + Audio
Production routeLive
Model Highlights
4-30s clips · 1080p · image, video, and audio references
Use Cases
Ad variants, key-frame animation, and reference-driven shots
Input
Text, image, video, or audio
Output
1080p video with synchronized audio

Try MAGI-2 before you integrate the API.

Test MAGI-2 output, estimate credit usage, and generate a sample before you formally integrate.

Create a Sample

Pick a video mode, enter your prompt, and set the parameters.
Duration5s
Quality
Aspect Ratio
Generate Audio
Synchronized audio, no extra charge.
Estimated: ~$0.40027.2 cr
1080p × 5s
Ready

Pick a mode, describe the shot, and hit Generate — your video will appear here. Generation can take several minutes.

History

Results are kept for 7 days — download anything you want to keep.

Your generation history will appear here

Know your MAGI-2 testing cost before you add credits.

Start from the cost of a single sample and pick a testing budget. Expand for detailed rates.

First Test Cost

Text-to-Video, 4s at 1080p — the cheapest possible request
Minimum charge
Credits21.76

One 4s 1080p sample

Approx. Cost$0.320

About 29 tests with $10 in credits.

In Playground, choose Text to Video and drag Duration to 4s. Every mode is billed at the same 1080p rate, so try key frames and references at no extra cost.

Testing Budget Guide

At the first-test settings: 4s at 1080p
Add Credits
$10
About 29 tests

Good for a first validation.

$50
About 156 tests

Good for prompt iteration.

$100
About 312 tests

Good before production integration.

MAGI-2 Cost Examples

Quality checkText-to-Video · 1080p · 5s
~$0.400
~27.2 cr
Key-frame animationImage-to-Video · 1080p · 10s
~$0.800
~54.4 cr
Full reference shotReference-to-Video · 1080p · 30s
~$2.400
~163.2 cr

Estimated cost per run for the listed parameters. Final cost follows the requested duration; references and audio do not change it.

MAGI-2 Model Pricing

Text-to-Video
Prompt only · Requested video seconds
1080p $0.080/s · 5.44 cr/s
Image-to-Video
First frame, or first and last frames · Requested video seconds
1080p $0.080/s · 5.44 cr/s
Reference-to-Video
Image, video, or audio references · Requested video seconds
1080p $0.080/s · 5.44 cr/s

Billed per requested second at 1080p, the same rate for all three modes. Reference images, videos, and audio are not billed, and generated audio adds no extra cost. Failed tasks are not charged.

What is the MAGI-2 API?

Sand.ai’s flagship MAGI-2 video model uses a mixture of experts with 480B parameters, around 28B active per token, and pretraining on 4T tokens. On EvoLink, generate 4–30 second 1080p clips with synchronized dialogue, sound effects, and music. Choose text-to-video, first- and last-frame image-to-video, or multimodal reference-to-video across six aspect ratios. Submit an asynchronous task and retrieve it using its ID or an HTTPS callback. All three routes bill by requested seconds.

Input
Text · Image · Video · Audio
Output
1080p MP4 video with synchronized audio
Duration
4–30 seconds (integer)
Resolution
1080p · 25 fps
References
Up to 20 assets: 10 images, 5 videos, 5 audio tracks

MAGI-2 API code example and error handling

This example shows the shortest runnable flow: create a task, save the returned task ID, then poll or wait for an HTTPS callback. Open the API tab for the complete parameter and response reference.

View complete API docs
cURL
curl -X POST https://api.evolink.ai/v1/videos/generations \
  -H "Authorization: Bearer $EVOLINK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "magi-2-text-to-video",
  "prompt": "A golden retriever runs across a sunny beach toward the camera, waves crashing behind it, cinematic, natural sound of waves and barking",
  "duration": 5,
  "quality": "1080p",
  "aspect_ratio": "16:9",
  "generate_audio": true
}'

# Save the returned task ID, then query:
curl https://api.evolink.ai/v1/tasks/{task_id} \
  -H "Authorization: Bearer $EVOLINK_API_KEY"

MAGI-2 parameter validation failed

Check that duration is an integer from 4 through 30, quality is 1080p, aspect_ratio is one of the six supported values, and the asset counts match the route (1–2 images for Image-to-Video; up to 10 images, 5 videos, 5 audio tracks for Reference-to-Video).

MAGI-2 authentication or balance issue

Check the Authorization bearer token and confirm the available balance and task billing in the console.

MAGI-2 content or asset rejected

Review likeness rights, brand assets, sensitive content, and whether each asset is a public HTTPS URL in a supported format and size.

MAGI-2 task failed or timed out

A task that reaches a final failed state is not charged. Keep the task ID, inspect the final state, and identify whether the cause is validation, review, or execution before retrying.

MAGI-2 callback not received

callback_url must be a public HTTPS URL, not localhost or a private network address. Always keep the task ID as a polling fallback.

Two ways to use MAGI-2: EvoLink API or Agent

Use the EvoLink API for product integration and batch jobs, or call it from Codex, Claude, or Gemini for fast creative and development workflows. Both paths share the same EvoLink API key, balance, model routes, and task history.

Option 1

Integrate MAGI-2 with the EvoLink API

Best for: product backends, batch jobs, automated workflows

Call EvoLink’s unified video API from your server and control the model ID, parameters, task queue, callbacks, and result storage.

  1. 1Validate output and cost with a real brief in Playground
  2. 2Create an EvoLink API key in the console
  3. 3Choose the model ID that matches your input
  4. 4Submit the task and retrieve the result by polling or HTTPS callback
Option 2

Call MAGI-2 with an Agent

Best for: creative and development tasks in Codex, Claude, and Gemini

Give the Agent your output goal, assets, and acceptance criteria. It can choose the route, assemble the request, track the task, and return the result without requiring you to hand-code every step.

  1. 1Set EVOLINK_API_KEY in your local environment; never put it in code or a prompt
  2. 2Describe the output goal, references, duration, and aspect ratio
  3. 3Ask the Agent to call a MAGI-2 route and save the task ID
  4. 4Let the Agent poll the final state, download the result, and report failure reasons
Where to use MAGI-2

MAGI-2 API features and available generation modes

Pick the route by what you already have: a script, a first frame, or a set of references. Every route posts to the same endpoint; the model field selects the route, and all three share the same per-second rate.

MAGI-2 Text-to-Video API

magi-2-text-to-video

Start from a prompt when no source asset is needed. Generate a 4–30 second 1080p clip with synchronized audio in 16:9, 9:16, 1:1, 4:3, 3:4, or 21:9. The prompt is required on this route.

MAGI-2 Image-to-Video API

magi-2-image-to-video

Animate one image as the first frame, or pass two images to set the first and last frames. The prompt is optional, and the clip is 4–30 seconds at 1080p.

MAGI-2 Reference-to-Video API

magi-2-reference-to-video

Guide the shot with up to 10 reference images, 5 videos, and 5 audio tracks; at least one reference is required. Videos and audio are 2–30 seconds each and up to 30 seconds combined per type. References do not change the price.

4–30 second MAGI-2 clips at 1080p

Keep the hook, main action, and ending in a single 1080p shot of up to 30 seconds.

Multimodal references in MAGI-2

Combine up to 10 images, 5 videos, and 5 audio tracks in Reference-to-Video.

Synchronized audio in MAGI-2 output

Audio is generated with the video at no extra charge; turn it off with generate_audio: false.

Asynchronous MAGI-2 tasks

Manage jobs with a task ID, polling, and HTTPS callbacks.

MAGI-2 API key request parameters

modelstring

Selects the route: one of the three model IDs above.

promptstring

Required on Text-to-Video, optional on the other routes. Up to 15,000 characters; when provided it must not be blank.

durationinteger

Integer from 4 through 30, default 5. Billing follows this value.

qualitystring

1080p, the only supported resolution and the default.

aspect_ratiostring

16:9 (default), 9:16, 1:1, 4:3, 3:4, or 21:9 on every route.

image_urlsstring[]

Image-to-Video: 1–2 images (first frame, or first and last frames). Reference-to-Video: up to 10 images, each under 30MB.

video_urlsstring[]

Reference-to-Video only: up to 5 MP4/MOV videos, 2–30 seconds and up to 200MB each, 30 seconds combined.

audio_urlsstring[]

Reference-to-Video only: up to 5 WAV/MP3 tracks, 2–30 seconds and up to 15MB each, 30 seconds combined.

generate_audioboolean

Default true, no extra charge. false returns the video without generated audio.

seedinteger

Optional, 0–4294967295, for more repeatable results.

callback_urlstring

Public HTTPS URL that receives the final task state; keep the task ID as a polling fallback.

Unsupported values return 400 with the field name. Media fields take publicly accessible HTTPS URLs. Full constraints and response fields are in the API Reference.

What can you build with MAGI-2?

Start with a 10-second vertical clip in the Playground. Check the timing of the cuts, subject consistency, and audio against your brief, then track how many attempts produce a usable clip.

Write a timestamped MAGI-2 shot list

Try a 9:16 video with three beats. In the prompt, ask for 0–3s on a wide shot in a bright kitchen, 3–7s on a close-up of coffee pouring, and 7–10s on the product pack. Verify cut timing in your editor.

Compare animatics before a live shoot

Create two cuts from the same brief, opening with the product in one and the presenter’s reaction in the other. Use the rough cuts to choose a direction before booking production.

Test e-commerce ad hooks

Keep the demo, result, and CTA fixed while changing the first three seconds. For a product demonstration that needs real-world proof, pair the generated hooks with the same live-action footage.

Generate a new take from reference assets

Use Reference-to-Video with a product image, a motion clip, or an audio cue. Specify the action you want to change and review the new take for framing, motion, and continuity.

Try a shot in the MAGI-2 Playground

MAGI-2 vs. Seedance 2.5 and MiniMax H3

Use the same brief, input assets, and acceptance criteria to compare usable-shot rate, reruns, and total project cost across models.

Decision factorMAGI-2Seedance 2.5MiniMax H3
Best suited to1080p shots of up to 30 seconds with audio, guided by text, key frames, or mixed referencesProduction shots that need 4K, video edit, video extend, or a draft-to-final workflowShort, detailed shots up to 2K
Duration4–30 seconds4–30 seconds, or auto4–15 seconds
Resolution1080p480p / 720p / 1080p / 4K768p / 2K
RoutesText, image, and reference to videoText, image, and reference to video, video edit, video extend, draft to finalText, image, and reference to video
Billing basisRequested seconds; references and audio do not change the priceBilled seconds by resolution; video input adds billed secondsPer second at the selected resolution
Image-to-video Elo with audio116511611137
Text-to-video Elo with audio115011551163

Artificial Analysis Video Arena v2.1 snapshot, 25 November 2026. MiniMax H3 was tested at 768p. Confidence intervals overlap. Use the scores to choose what to test with your own footage.

Key details before you integrate the MAGI-2 API

Three facts that shape the integration: routing, task lifecycle, and billing.

One endpoint for three MAGI-2 routes

Every route posts to /v1/videos/generations. The model field selects the route; unsupported values return 400 with the field name, so check the API Reference before reusing a request.

MAGI-2 tasks are asynchronous

A request returns a task ID immediately, and generation can take several minutes. Poll every 10–15 seconds or register a public HTTPS callback_url, and keep the task ID either way. Result links are valid for 7 days. A task whose final state is failed is not charged.

MAGI-2 billing follows requested seconds

You pay for the duration you request at the 1080p rate. Reference images, videos, and audio, and the generate_audio switch, do not change the price.

MAGI-2 cost examples in USD

Estimated costs for 1080p output. Each example uses the current per-second rate for its route.

10-second text-to-video

≈ $0.800 USD

10 requested seconds = 10 billed seconds. Turning audio off does not change it.

15-second image-to-video with first and last frames

≈ $1.200 USD

15 requested seconds = 15 billed seconds. The two key frames are not billed.

30-second reference-to-video with references

≈ $2.400 USD

30 requested seconds = 30 billed seconds, whatever the number or length of the reference images, videos, and audio tracks.

Why access MAGI-2 through EvoLink?

The hard part of a production video integration is not one request. It is managing model choice, cost, references, asynchronous jobs, callbacks, and failures after launch. EvoLink brings these into one video API and console so teams can test first, integrate second, and route by usable-shot rate and total project cost.

Create MAGI-2 API Key

Manage MAGI-2 and other video models with one API key

All three MAGI-2 routes share EvoLink authentication, balance, and task infrastructure. Your server stores one EVOLINK_API_KEY and selects the model ID for each input.

Keep your EvoLink API key and asynchronous task workflow when evaluating another video model. Select its model ID and check that route’s input fields, duration, resolution, and billing before sending a request.

Test in Playground before integrating MAGI-2 into production

Use a real ad brief, product image, reference clip, and audio asset in Playground before writing your production integration. That is more reliable than judging the model with one demo prompt.

Track usable-shot rate, reruns, and manual rework, not only price per second, before you lock the route, prompt structure, and acceptance criteria.

Failed MAGI-2 tasks are not charged, and billing stays auditable

EvoLink does not charge a task whose final state is failed. Save the task ID and verify the final status, failure reason, and billing record in the console.

Production systems should use polling or a public HTTPS callback, handle missing or duplicate callbacks and timeouts, and retry only after identifying the cause.

MAGI-2 API and Agent workflows share one foundation

Product backends can run batch tasks through the EvoLink API, while creative and development teams can ask Codex, Claude, or Gemini to assemble requests, track status, and return results.

Both methods share the API key, routes, balance, and task history. Copy the Agent prompt on this page, fill in the generation goal, and paste it into your Agent.

Other video models on EvoLink besides MAGI-2

When MAGI-2 is not the right default, use the same brief to compare resolution, shot length, audio, motion stability, and total project cost.

Seedance 2.5 API

Seedance 2.5

Seedance 2.5 adds 4K output, video edit, video extend, and a draft-to-final workflow.

View API
Kling 4.0 Flash API

Kling 4.0 Flash

Kling’s lower-cost 720p tier with text, first-frame, and reference-to-video plus video edit.

View API
MiniMax H3 API

MiniMax H3

For detailed 2K clips of 4–15 seconds; compare its usable-shot rate with MAGI-2 on the same brief.

View API
Veo 3.1 API

Veo 3.1

Google’s video generation model for cinematic visuals and native-audio workflows.

View API

MAGI-2 API FAQ

Questions about model IDs, pricing, limits, references, and task handling.

Is the MAGI-2 API available on EvoLink?

Yes. MAGI-2 is available through three routes: magi-2-text-to-video, magi-2-image-to-video, and magi-2-reference-to-video. You can test it in Playground first and then call it with the same EvoLink API key.

How is MAGI-2 billed?

Per requested second at the 1080p rate, the same for all three routes. Reference images, videos, and audio do not add to the price, and neither does generated audio. See the Pricing section for current rates.

Are failed MAGI-2 tasks charged?

No. A task whose final state is failed is not charged. Keep the task ID and check the final state, failure reason, and billing record in the console.

What durations, resolutions, and aspect ratios does MAGI-2 support?

Duration is an integer from 4 through 30 seconds (default 5). Output is 1080p. All three routes accept 16:9 (default), 9:16, 1:1, 4:3, 3:4, and 21:9.

How many references can I use with MAGI-2?

Reference-to-Video accepts up to 10 images (each under 30MB), 5 videos (MP4/MOV, 2–30 seconds each, 30 seconds combined), and 5 audio tracks (WAV/MP3, 2–30 seconds each, 30 seconds combined). At least one reference is required. Image-to-Video takes 1–2 images as the first and last frames.

Is a prompt required for every MAGI-2 route?

Only Text-to-Video requires a prompt. On Image-to-Video and Reference-to-Video it is optional; when you send one it must not be blank, and it can be up to 15,000 characters.

How long does a MAGI-2 task take?

Generation is asynchronous and can take several minutes, depending on duration and current load. Use an HTTPS callback or poll with the task ID instead of holding the request open.

Can I get repeatable results with MAGI-2?

Pass a seed (an integer from 0 through 4294967295) together with the same prompt and parameters to make results more repeatable. Identical output is not guaranteed.

Can I use MAGI-2 through an Agent?

Yes. Set EVOLINK_API_KEY in Codex, Claude, or Gemini, copy the Agent prompt on this page, and let the Agent choose the MAGI-2 route, submit the task, poll the status, and return the video. Keep the key in an environment variable, not in the prompt.

Does MAGI-2 have a lower-resolution draft mode?

EvoLink offers 1080p at 25 fps for all three MAGI-2 routes. Start with a four-second generation to test framing and motion at the lowest billable duration.

How do I set the first and last frame in MAGI-2?

Use magi-2-image-to-video and provide two public image URLs in image_urls. The first image is the opening frame and the second is the closing frame. To set just the opening frame, send one image.

How is MAGI-2 on EvoLink different from MAGI-2 Preview?

EvoLink serves the 480B flagship with synced audio and 4–30 second 1080p output. Sand.ai’s earlier 114B open-weight Preview on Hugging Face generates 10-second clips with audio and uses a refiner for 1080p output.

Test MAGI-2 on your own assets

Try a 10-second scripted clip in the Playground, or create an API key to run MAGI-2 in your workflow.