APIMart Officially Launches magi-2 APIExplore MAGI-2: APIMart Officially Launches magi-2 API
APIMart
Back to models
MAGI-2 model icon
Video1080p4–30sNative audio

MAGI-2 API

MAGI-2 is Sand.ai’s video model. Use magi-2 on APIMart for text-to-video, first/last-frame image-to-video and multimodal reference-to-video. Generate 4–30 seconds at 1080p with audio on by default. Pay for output seconds; references and the audio toggle do not change the rate.

MAGI-2 API Pricing

Transparent pricing with no hidden fees. Pay only for what you use.

Pricing by specification

VariantTierGoldCurrent pricePlatinumDiamondOfficialYour savings
magi-21080p0.8Credits/sec~$0.08/sec0.76Credits/sec~$0.076/sec0.72Credits/sec~$0.072/sec0.8Credits/sec~$0.08/sec—

* Actual costs are subject to final output.

MAGI-2 API: three ways to create video

Start with a prompt, frame images or references. Configure the request in Form or inspect it in JSON. RUN estimates the cost for your chosen duration. Follow the task in the result panel and history, or use the same API Key in your server integration.

MAGI-2 capabilities for video creation

Shape the picture and sound with a clear brief and purposeful references.

Text to video

Send a prompt and common settings. Describe the scene, action, camera and sound.

First and last frames

Use a first frame and an optional last frame. auto follows the first frame; 21:9 is not supported for image-to-video.

Multimodal references

Combine up to 10 images, 5 videos and 5 audio clips. Reference mode sends omni_reference_task_type: reference.

1080p output

All three generation modes output 1080p, with no resolution selection required.

4–30 seconds

Choose whole seconds from 4 to 30; the default is 5. Cost follows the requested output duration.

Native sound

generate_audio defaults to true and can be disabled. Turning sound off does not reduce the price.

Aspect ratios

Text and reference modes support 6 ratios. Image mode supports 5 ratios plus automatic first-frame matching.

Pay per output second

All modes share the same rate, with no reference surcharge. Rejected submissions are not charged; failed tasks are fully refunded.

Creative directions for MAGI-2

Six ways to turn a specific brief into a useful video concept.

  • Product films

    Plan a single product reveal with a defined camera move, lighting setup and focal detail. Keep the product and its use at the center of the scene.

  • Character scenes

    Write one exchange or emotional beat. Describe the gesture, expression and spoken line that make the moment understandable.

  • Storyboard exploration

    Explore alternate staging for the same story beat. Compare wide shots, close-ups and transitions before settling on a sequence.

  • Campaign concepts

    Turn a campaign idea into a short visual scenario. Compare different settings and tones while keeping the central message fixed.

  • Style studies

    Test lighting, palette and material treatments against the same subject. Use the comparison to choose a direction for a larger project.

  • Atmospheric scenes

    Build a location around one small action and a distinct soundscape. Describe foreground movement, background activity and the mood of the space.

Get started with MAGI-2 API

From API Key to a completed video task.

  1. 1

    Get your API Key

    Sign in to APIMart and create an API Key. Use Bearer authentication for server requests.

  2. 2

    Configure the video

    Choose text, image or reference mode. Set the prompt, 4–30s duration, ratio and audio, then add the relevant media.

  3. 3

    Run and retrieve the result

    Review the RUN estimate and submit. Save task_id and poll until completed or failed. Read the video from data.result.videos[0].url.

MAGI-2 API request examples

Submit through one video endpoint, then query by task ID.

  1. 1

    Authenticate

    Send Authorization: Bearer <key>. Store the key in the APIMART_API_KEY environment variable.

  2. 2

    Submit a task

    POST /v1/videos/generations and save data[0].task_id.

  3. 3

    Retrieve the result

    GET /v1/tasks/{task_id} until completed or failed. Read data.result.videos[0].url for the video, or data.error.message for a failure.

    See APIMart API documentation for authentication and general API guidance.

POST /v1/videos/generations
curl -X POST https://api.apimart.ai/v1/videos/generations \
  -H "Authorization: Bearer $APIMART_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "magi-2",
    "prompt": "A red paper boat drifts along a gutter on a rainy night, macro shot, gentle rain sounds.",
    "duration": 5,
    "aspect_ratio": "9:16"
  }'

MAGI-2 request parameters

ParameterTypeRequiredDefaultDescription
modelstringRequiredDefault: magi-2Always magi-2.
promptstringRequiredDefault: —Required in all modes; at most 15,000 characters.
durationintegerOptionalDefault: 54–30 whole seconds. seconds is an alias; both must match if supplied.
aspect_ratiostringOptionalDefault: 16:9 / autoText/reference default: 16:9. Image mode: omit or auto to follow the first frame; no 21:9.
generate_audiobooleanOptionalDefault: trueAudio toggle; audio is an alias and must match. Disabling does not reduce cost.
seedintegerOptionalDefault: -1Omit or use -1 for random; otherwise 0–2147483647.
resolutionstringOptionalDefault: 1080p1080p only.
image_urlsstring[]OptionalDefault: —Image-to-video: up to 2 frame images. Automatic or explicit reference mode: image_urls and reference_image roles share a total limit of 10 images.
first_frame_image / last_frame_imagestringOptionalDefault: —First and optional last frame; use instead of image_urls.
image_with_rolesobject[]OptionalDefault: —Each entry has url and role: first_frame, last_frame or reference_image. Reference images can be combined with image_urls; the combined limit is 10.
video_urlsstring[]OptionalDefault: —Up to 5 reference videos; each 2–30s, total ≤30s.
audio_urlsstring[]OptionalDefault: —Up to 5 reference audio clips; each 2–30s, total ≤30s.
omni_reference_task_typestringOptionalDefault: autoauto or reference. Videos, audio or reference_image roles trigger reference mode automatically. With only image_urls, set reference to use them as references.

MAGI-2 API questions

Request parameters, pricing and task results.

What is MAGI-2?

MAGI-2 is Sand.ai’s video model. On APIMart, use magi-2 through one endpoint for text-to-video, first/last-frame image-to-video and reference-to-video.

When was MAGI-2 announced?

Sand.ai announced MAGI-2 on November 24, 2026. The full model is distinct from the earlier MAGI-2 Preview research release.

Which model and endpoint does MAGI-2 use?

Use model magi-2 with POST /v1/videos/generations. Query the result with GET /v1/tasks/{task_id}.

How is MAGI-2 priced?

Cost equals the current per-second rate × duration, or 5 seconds when omitted. All modes share one rate. References, ratio and audio add no fees; pricing includes applicable membership or account rates.

How do I get an API Key?

Sign in to APIMart and create a key in API Keys. Authenticate server requests with Authorization: Bearer <key>. Keep the key out of public client code.

Can I run MAGI-2 on this page?

Yes. This page and Dashboard Playground share the same tool, with Form and JSON configuration. RUN shows the estimated cost for the selected duration.

How do first and last frames work?

The first image_urls entry is the first frame; the second is an optional last frame. Omit aspect_ratio or use auto to follow the first frame. first_frame_image / last_frame_image and image_with_roles are also supported.

Which durations, resolution and ratios are supported?

Output is 1080p with a whole-number duration of 4–30 seconds, defaulting to 5. Text and reference modes support 16:9, 9:16, 1:1, 4:3, 3:4 and 21:9. Image mode excludes 21:9 and adds auto.

What are the reference limits?

Reference mode accepts up to 10 images in total across image_urls and reference_image roles, plus 5 videos and 5 audio clips. Each clip is 2–30s; each media type totals at most 30s, with excess potentially trimmed upstream. Videos, audio or reference_image roles trigger reference mode automatically; with only image_urls, set omni_reference_task_type: reference. Use publicly accessible HTTP(S) URLs.

How do prompts and seeds work?

All modes require a prompt of at most 15,000 characters. Describe visuals, movement, camera and sound; put dialogue in quotes. Omit seed or use -1 for random, or use an integer from 0 to 2147483647.

What happens to billing if a task fails or I stop polling?

Rejected submissions are not charged. Accepted tasks reserve the output-duration cost; failed tasks, including inaccessible media or platform timeouts, are fully refunded. Stopping polling does not cancel the task; a later success is still charged.

How should I wait for the result?

Keep the submitted task_id and poll until completed or failed. Do not abandon a task after a fixed generation time. A connection-related polling pause can be resumed for the same task without resubmitting.

Can I disable sound, edit or extend a video?

Set generate_audio: false to disable sound at the same price. The API does not support video editing, extension or intermediate keyframes. Reference video guides generation rather than being spliced in, and reference audio is not preserved verbatim.

What other names are used for MAGI-2?

MAGI 2, Magi2 and MAGI-2.0 are alternate search spellings. This page uses the official name MAGI-2; the API model is magi-2.

Related Models

Explore more models in the same category.