---
title: MAGI-2 | Runware Docs
url: https://runware.ai/docs/models/sandai-magi-2
description: 1080p video with synchronized audio, clips up to 30 seconds and up to 20 references per request
---
# MAGI-2

![MAGI-2](https://assets.runware.ai/covers/sandai-magi-2.jpg)

MAGI-2 is Sand AI's flagship video model, generating 1080p clips of 4 to 30 seconds with synchronized audio, including dialogue with lip sync, sound effects, ambience and music, in a single pass. It starts from a text prompt, from a first frame with an optional last frame, or from up to 10 reference images, 5 reference videos and 5 reference audio clips, in six aspect ratios from 21:9 to 9:16. It suits dialogue scenes, narrative shots and reference-driven work that needs consistent subjects and sound in one generation.

- **Status**: coming-soon
- **ID**: `sandai:magi@2`
- **Creator**: Sand AI
- **Release Date**: November 24, 2026
- **Capabilities**: Text to Video, Image to Video, Video to Video, Audio to Video, Checkpoint, Audio

## Pricing

$0.08 per second · ~2m 45s per request

**4 example generations**

- [first-last-frame](https://runware.ai/docs/models/sandai-magi-2/examples#example-backstage-thunder-documentary-teaser) · 1080p: `$0.40` (~5m 3s)
- [reference-to-video](https://runware.ai/docs/models/sandai-magi-2/examples#example-bookbinders-paper-marbling-b-roll) · 1440p: `$0.40` (~3m 31s)
- [text-to-video](https://runware.ai/docs/models/sandai-magi-2/examples#example-pneumatic-mail-documentary-teaser) · 2206×946: `$0.40` (~1m 44s)
- [first-frame](https://runware.ai/docs/models/sandai-magi-2/examples#example-piano-tuning-service-reel) · 1080p: `$0.40` (~1m 59s)

times vary, measured end to end · [How pricing works](https://runware.ai/docs/models-api/pricing)

## Compatibility & Validation

Inside `inputs`, `frameImages` cannot be used with `referenceImages`, `referenceVideos`, or `referenceAudios`.

---

`width` and `height` must be used together.

---

The following dimension combinations are supported:

| Configuration | Dimensions |
| --- | --- |
| `1080p (16:9)` | `1920x1080` |
| `1080p (4:3)` | `1664x1248` |
| `1080p (1:1)` | `1440x1440` |
| `1080p (3:4)` | `1248x1664` |
| `1080p (9:16)` | `1080x1920` |
| `1080p (~21:9)` | `2206x946` |

## Request Parameters

**API Options**

Platform-level options for task execution and delivery.

### [taskType](https://runware.ai/docs/models/sandai-magi-2#request-tasktype)

- **Type**: `string`
- **Required**: true
- **Value**: `videoInference`

Identifier for the type of task being performed.

### [taskUUID](https://runware.ai/docs/models/sandai-magi-2#request-taskuuid)

- **Type**: `string`
- **Required**: true
- **Format**: `UUID v4`

UUID v4 identifier for tracking tasks and matching async responses. Must be unique per task.

### [outputType](https://runware.ai/docs/models/sandai-magi-2#request-outputtype)

- **Type**: `string`
- **Default**: `URL`

Video output type.

**Allowed values**: `URL`

### [outputFormat](https://runware.ai/docs/models/sandai-magi-2#request-outputformat)

- **Type**: `string`
- **Default**: `MP4`

Specifies the file format of the generated output. The available values depend on the task type and the specific model's capabilities.

- \`MP4\`: Widely supported video container (H.264), recommended for general use.
- \`WEBM\`: Optimized for web delivery.
- \`MOV\`: QuickTime format, common in professional workflows (Apple ecosystem).

**Allowed values**: `MP4` `WEBM` `MOV`

### [outputQuality](https://runware.ai/docs/models/sandai-magi-2#request-outputquality)

- **Type**: `integer`
- **Min**: `20`
- **Max**: `99`
- **Default**: `95`

Compression quality of the output. Higher values preserve quality but increase file size.

### [webhookURL](https://runware.ai/docs/models/sandai-magi-2#request-webhookurl)

- **Type**: `string`
- **Format**: `uri`

Webhook URL that receives JSON responses via HTTP POST when generation tasks complete. For batch requests with multiple results, each completed item triggers a separate webhook call as it becomes available.

**Learn more** (1 resource):

- [Webhooks](https://runware.ai/docs/models-api/webhooks) (platform)

### [deliveryMethod](https://runware.ai/docs/models/sandai-magi-2#request-deliverymethod)

- **Type**: `string`
- **Default**: `async`

Determines how the API delivers task results.

**Allowed values**:

- `sync` Returns results directly in the API response. Over HTTP, a task still running after 120 seconds continues as an async task and comes back with status 'processing'. Poll for its results using getResponse.
- `async` Returns an immediate acknowledgment with the task UUID. Poll for results using getResponse.

**Learn more** (1 resource):

- [Task Polling](https://runware.ai/docs/models-api/task-polling) (platform)

### [uploadEndpoint](https://runware.ai/docs/models/sandai-magi-2#request-uploadendpoint)

- **Type**: `string`
- **Format**: `uri`

Specifies a URL where the generated content will be automatically uploaded using the HTTP PUT method. The raw binary data of the media file is sent directly as the request body. For secure uploads to cloud storage, use presigned URLs that include temporary authentication credentials.

**Common use cases:**

- **Cloud storage**: Upload directly to S3 buckets, Google Cloud Storage, or Azure Blob Storage using presigned URLs.
- **CDN integration**: Upload to content delivery networks for immediate distribution.

```text
// S3 presigned URL for secure upload
https://your-bucket.s3.amazonaws.com/generated/content.mp4?X-Amz-Signature=abc123&X-Amz-Expires=3600

// Google Cloud Storage presigned URL
https://storage.googleapis.com/your-bucket/content.jpg?X-Goog-Signature=xyz789

// Custom storage endpoint
https://storage.example.com/uploads/generated-image.jpg
```

The content data will be sent as the request body to the specified URL when generation is complete.

### [safety](https://runware.ai/docs/models/sandai-magi-2#request-safety)

- **Path**: `safety.checkContent`
- **Type**: `object (3 properties)`

Content safety checking configuration for video generation.

#### [checkContent](https://runware.ai/docs/models/sandai-magi-2#request-safety-checkcontent)

- **Path**: `safety.checkContent`
- **Type**: `boolean`

Enable or disable content safety checking. Increases total generation time and adds a small charge on top of the generation cost.

#### [mode](https://runware.ai/docs/models/sandai-magi-2#request-safety-mode)

- **Path**: `safety.mode`
- **Type**: `string`

Safety checking mode for video generation.

**Allowed values**:

- `fast` Checks key frames.
- `full` Checks all frames.

#### [blockContent](https://runware.ai/docs/models/sandai-magi-2#request-safety-blockcontent)

- **Path**: `safety.blockContent`
- **Type**: `boolean`

Content blocking before generation. Moderates the request's text and input images, and rejects the request when they are flagged, so nothing is generated or charged. Input videos, audio and documents are not moderated. Adds a short delay before generation starts.

### [ttl](https://runware.ai/docs/models/sandai-magi-2#request-ttl)

- **Type**: `integer`
- **Min**: `60`

Time-to-live (TTL) in seconds for generated content. Only applies when `outputType` is `URL`.

### [includeCost](https://runware.ai/docs/models/sandai-magi-2#request-includecost)

- **Type**: `boolean`

Include task cost in the response.

### [numberResults](https://runware.ai/docs/models/sandai-magi-2#request-numberresults)

- **Type**: `integer`
- **Min**: `1`
- **Max**: `4`
- **Default**: `1`

Number of results to generate. Each result uses a different seed, producing variations of the same parameters.

**Inputs**

Input resources for the task (images, audio, etc). These must be nested inside the \`inputs\` object.

### [referenceImages](https://runware.ai/docs/models/sandai-magi-2#request-inputs-referenceimages)

- **Path**: `inputs.referenceImages`
- **Type**: `array of strings`
- **Min items**: `1`
- **Max items**: `10`
- **File size (each)**: `up to 28.61 MB`

List of reference images (UUID, URL, Data URI, or Base64).

### [frameImages](https://runware.ai/docs/models/sandai-magi-2#request-inputs-frameimages)

- **Path**: `inputs.frameImages`
- **Type**: `array of strings or objects`
- **Min items**: `1`
- **Max items**: `2`
- **File size (each)**: `up to 28.61 MB`

An array of frame-specific image inputs to guide video generation. Each item can be either a plain image input (UUID, URL, Data URI, or Base64) or an object that pairs an image with a target position in the video.

The `frameImages` parameter allows you to constrain specific frames within the video sequence, ensuring that particular visual content appears at designated points. Position can be specified using `frame` (named positions or frame indices) or `timestamp` (seconds), depending on model support. This is different from `referenceImages`, which provide overall visual guidance without constraining specific timeline positions.

When the `frame` parameter is omitted, automatic distribution rules apply:

- **1 image**: Used as the first frame.
- **2 images**: First and last frames.

**Examples**:

**Shorthand format:** When you don't need to specify a frame position, you can pass a plain image input directly.

```json
"frameImages": [
  "aac49721-1964-481a-ae78-8a4e29b91402"
]
```

**Object format:** When you need to specify a position, use an object with `image` and either `frame` or `timestamp` (model-dependent).

```json
"frameImages": [
  {
    "image": "aac49721-1964-481a-ae78-8a4e29b91402",
    "frame": "first"
  }
]
```

**First and last frames:** With two images, they automatically become the first and last frames of the video sequence. You can mix shorthand and object formats.

```json
"frameImages": [
  "aac49721-1964-481a-ae78-8a4e29b91402",
  {
    "image": "3ad204c3-a9de-4963-8a1a-c3911e3afafe",
    "frame": "last"
  }
]
```

**Format 1: string[]**:

- **Type**: `string`

Image input (UUID, URL, Data URI, or Base64).

**Format 2: object[]**:

#### [image](https://runware.ai/docs/models/sandai-magi-2#request-inputs-frameimages-format-2-image)

- **Path**: `inputs.frameImages.image`
- **Type**: `string`
- **Required**: true

Image input (UUID, URL, Data URI, or Base64).

#### [frame](https://runware.ai/docs/models/sandai-magi-2#request-inputs-frameimages-format-2-frame)

- **Path**: `inputs.frameImages.frame`
- **Type**: `object`

Target frame position for the image. Supports first and last frame.

**Allowed values**:

- `first` First frame of the video.
- `last` Last frame of the video.
- `0` Frame index 0 (first frame).
- `-1` Frame index -1 (last frame).

### [referenceVideos](https://runware.ai/docs/models/sandai-magi-2#request-inputs-referencevideos)

- **Path**: `inputs.referenceVideos`
- **Type**: `array of strings`
- **Min items**: `1`
- **Max items**: `5`
- **File size (each)**: `up to 190.73 MB`
- **Duration (each)**: `2s to 30s`
- **Duration (total)**: `up to 30s`

List of reference videos (UUID or URL).

### [referenceAudios](https://runware.ai/docs/models/sandai-magi-2#request-inputs-referenceaudios)

- **Path**: `inputs.referenceAudios`
- **Type**: `array of strings`
- **Min items**: `1`
- **Max items**: `5`
- **File size (each)**: `up to 14.31 MB`
- **Duration (each)**: `2s to 30s`
- **Duration (total)**: `up to 30s`

List of reference audios (UUID or URL).

**Core Parameters**

Primary parameters that define the task output.

### [model](https://runware.ai/docs/models/sandai-magi-2#request-model)

- **Type**: `string`
- **Required**: true
- **Value**: `sandai:magi@2`

Send `auto` instead of an AIR identifier to have the model router choose the model for this task. The rest of the request is unchanged, every value you send is kept, and only the parameters you leave out are filled in. See [Model Router](https://runware.ai/docs/models-api/model-router).

**Learn more** (3 resources):

- [Text To Image: Model Selection](https://runware.ai/docs/learn/text-to-image#model-selection) (learn)
- [Image Inpainting: Model Specialized Inpainting Models](https://runware.ai/docs/learn/image-inpainting#model-specialized-inpainting-models) (learn)
- [Image Outpainting: Other Critical Parameters](https://runware.ai/docs/learn/image-outpainting#other-critical-parameters) (learn)

### [positivePrompt](https://runware.ai/docs/models/sandai-magi-2#request-positiveprompt)

- **Type**: `string`
- **Required**: true
- **Min**: `1`
- **Max**: `15000`

Text prompt describing elements to include in the generated output. Reference assets in array order as `Image 1`, `Video 1` and `Audio 1`, numbered from one.

**Learn more** (1 resource):

- [Prompts](https://runware.ai/docs/learn/prompts) (learn)

### [width](https://runware.ai/docs/models/sandai-magi-2#request-width)

- **Type**: `integer`
- **Paired with**: height

Width of the generated media in pixels.

**Learn more** (2 resources):

- [Dimensions](https://runware.ai/docs/learn/dimensions) (learn)
- [Image Outpainting: Dimensions Critical For Outpainting](https://runware.ai/docs/learn/image-outpainting#dimensions-critical-for-outpainting) (learn)

### [height](https://runware.ai/docs/models/sandai-magi-2#request-height)

- **Type**: `integer`
- **Paired with**: width

Height of the generated media in pixels.

**Learn more** (2 resources):

- [Dimensions](https://runware.ai/docs/learn/dimensions) (learn)
- [Image Outpainting: Dimensions Critical For Outpainting](https://runware.ai/docs/learn/image-outpainting#dimensions-critical-for-outpainting) (learn)

### [duration](https://runware.ai/docs/models/sandai-magi-2#request-duration)

- **Type**: `integer`
- **Min**: `4`
- **Max**: `30`
- **Default**: `5`

Length of the generated video in seconds. The total number of frames produced is determined by duration multiplied by the model's frame rate (fps).

### [seed](https://runware.ai/docs/models/sandai-magi-2#request-seed)

- **Type**: `integer`
- **Min**: `0`
- **Max**: `4294967295`

Random seed for reproducible generation. When not provided, a random seed is generated in the unsigned 32-bit range.

**Settings**

Technical parameters to fine-tune the inference process. These must be nested inside the \`settings\` object.

### [audio](https://runware.ai/docs/models/sandai-magi-2#request-settings-audio)

- **Path**: `settings.audio`
- **Type**: `boolean`
- **Default**: `true`

Generate synchronized audio.

## Response Parameters

### [taskType](https://runware.ai/docs/models/sandai-magi-2#response-tasktype)

- **Type**: `string`
- **Required**: true
- **Value**: `videoInference`

Identifier for the type of task this response belongs to.

### [taskUUID](https://runware.ai/docs/models/sandai-magi-2#response-taskuuid)

- **Type**: `string`
- **Required**: true
- **Format**: `UUID v4`

UUID v4 identifier echoed from the original request, used to match async responses to their tasks.

### [videoUUID](https://runware.ai/docs/models/sandai-magi-2#response-videouuid)

- **Type**: `string`
- **Required**: true
- **Format**: `UUID v4`

UUID of the output video.

### [videoURL](https://runware.ai/docs/models/sandai-magi-2#response-videourl)

- **Type**: `string`
- **Format**: `uri`

URL of the output video.

### [videoBase64Data](https://runware.ai/docs/models/sandai-magi-2#response-videobase64data)

- **Type**: `string`

Base64-encoded video data.

### [videoDataURI](https://runware.ai/docs/models/sandai-magi-2#response-videodatauri)

- **Type**: `string`
- **Format**: `uri`

Data URI of the output video.

### [seed](https://runware.ai/docs/models/sandai-magi-2#response-seed)

- **Type**: `integer`

The seed used for generation. If none was provided, shows the randomly generated seed.

### [NSFWContent](https://runware.ai/docs/models/sandai-magi-2#response-nsfwcontent)

- **Type**: `boolean`

Flag indicating if NSFW content was detected.

### [cost](https://runware.ai/docs/models/sandai-magi-2#response-cost)

- **Type**: `float`

Task cost in USD. Present when `includeCost` is set to `true` in the request.

## Examples

### text-to-video (text-to-video)

[Watch video](https://assets.runware.ai/examples/sandai-magi-2/7e037c26-2323-45ef-abb2-5f79daa05895.mp4)

```json
{
  "taskType": "videoInference",
  "taskUUID": "eebadd5b-5d1c-4fb1-8927-ae60f85b7af4",
  "model": "sandai:magi@2",
  "positivePrompt": "Create a cinematic teaser for a postal museum documentary about the city's former pneumatic mail network. One continuous shot inside a restored underground sorting room. In the opening ultrawide composition, a row of cream enamel receiving stations recedes to the left; on the right, a brass delivery mouth hangs just above a shallow steel catch tray lined with worn plum felt. Warm bench light grazes the brass against cool lilac tile and deep shadows. Keep the room empty and the machinery still. Track slowly sideways along the bench until the delivery mouth and tray come into profile, both fully visible in the same frame. As the camera settles, a single brass mail capsule with a dark felt collar shoots out, strikes the tray's exposed steel lip, and rolls back onto the felt. Sync a short rush of air to the instant the capsule clears the mouth, one sharp metallic clack to visible contact with the lip, and a soft fabric scrape to the final roll. Let the clack echo briefly down the tiled room. Hold on the capsule at rest for a beat, then cut to black. No music, narration, or lettering.",
  "width": 2206,
  "height": 946
}
```

---

### first-frame (first-frame)

[Watch video](https://assets.runware.ai/examples/sandai-magi-2/0fb10fd8-df53-4fe3-8393-59e4b0aba225.mp4)

```json
{
  "taskType": "videoInference",
  "taskUUID": "2dd7a911-59d9-41f8-81f4-80b6115171ad",
  "model": "sandai:magi@2",
  "positivePrompt": "Create a vertical Instagram Reel for a local piano tuning service. Continue directly from the supplied first frame in one unbroken shot. Keep the same technician, hand positions, open walnut upright, apartment and lavender window light. The hovering index finger presses the white key. Sync the key strike to a single midrange piano note with an unmistakable wavering beat, like two pitches almost agreeing. As the note rings, the technician gives the tuning lever a tiny, controlled turn; the pulsing slows until the tone steadies. The technician releases and strikes the same key again. Let that clean note ring long enough for the contrast to land. A slow, subtle camera creep brings the hands closer without losing either the lever or the key. Over the decay, add a warm off-camera voice: \"Book an in-home piano tuning.\" Keep the piano louder than the room tone, with no music bed, added text, graphics or end card.",
  "width": 1080,
  "height": 1920,
  "inputs": {
    "frameImages": [
      {
        "image": "https://assets.runware.ai/assets/inputs/3056d198-1f7a-4055-9c2a-faa3b9db7353.jpg",
        "frame": "first"
      }
    ]
  }
}
```

---

### first-last-frame (first-last-frame)

[Watch video](https://assets.runware.ai/examples/sandai-magi-2/d4b3a0d3-1e07-4253-ba91-cf6ff71b357a.mp4)

```json
{
  "taskType": "videoInference",
  "taskUUID": "6257b9c8-ce5c-46da-808f-ed8b7201df81",
  "model": "sandai:magi@2",
  "positivePrompt": "Create a cinematic festival teaser for a short documentary about handmade theater sound effects. Connect the supplied first and last frames in one continuous, locked-off take. Start with the technician's right hand resting at the corner of the flat steel thunder sheet. Give the room a quiet beat. She draws that corner toward her and lets it spring back in one practiced flick. A broad buckle travels up the steel, breaking the straight reflection into a bright, writhing line. The top stays attached to the rig. Let the oscillation diminish naturally as she leans in and lays both palms against the lower half of the sheet, arriving at the closing frame. Hold on her listening profile. Keep the camera, stage rig and curtain fixed throughout; no cuts or reframing. Sound is the reveal: close cloth rustle and quiet theater room tone, then a sharp metallic snap at the release that blooms into rolling thunder in the space. The metallic rattle stops when her palms make contact, leaving only a short room tail. No music, dialogue, literal storm imagery or on-screen text.",
  "width": 1920,
  "height": 1080,
  "inputs": {
    "frameImages": [
      {
        "image": "https://assets.runware.ai/assets/inputs/b128fd9c-3a8b-4743-bda5-b36c89d90fe8.jpg",
        "frame": "first"
      },
      {
        "image": "https://assets.runware.ai/assets/inputs/dcad3ae0-f12c-43f6-aa0d-562d59b4a6c8.jpg",
        "frame": "last"
      }
    ]
  }
}
```

---

### reference-to-video (reference-to-video)

[Watch video](https://assets.runware.ai/examples/sandai-magi-2/f60fc1bd-b8fb-4db0-a328-3434537d8f8d.mp4)

```json
{
  "taskType": "videoInference",
  "taskUUID": "893274f7-ba29-4dc0-86b2-c3c36198e80a",
  "model": "sandai:magi@2",
  "positivePrompt": "Create a single square stock b-roll shot of a bookbinder combing floating pigment for handmade endpapers. Take the comb’s appearance from Image 1: the same dark walnut bar, rounded ends, and row of fine steel pins. Use Video 1 only as the motion reference for the steady, straight pull with the pin tips just under the liquid surface. Score the clip with the instrumental music from Audio 1, without speech. Set this new scene at a bookbinder’s bench: a shallow charcoal enamel tray of marbling bath, with loose bands of oxblood, slate gray, and warm ivory pigment floating on top. Frame straight down, tight enough for the pigment to fill the square, with a sliver of enamel rim at each side. Diffuse light from the left keeps the colors matte and gives the pins a fine glint. Start with the comb poised across the upper part of the tray, held by fingertips at the ends. In one unbroken pass, draw it toward the bottom of the frame. Show the pigment ahead of the teeth staying loose while crisp, repeating scallops form directly behind them. Keep the camera locked and hold on the finished pattern briefly. No titles, logos, or cuts.",
  "width": 1440,
  "height": 1440,
  "inputs": {
    "referenceImages": [
      "https://assets.runware.ai/assets/inputs/3de03ea5-781b-4069-8ef3-ce083b2d7a2e.jpg"
    ],
    "referenceVideos": [
      "https://assets.runware.ai/assets/inputs/73c46266-96a8-4cfa-b9a7-5e695a5e8cbb.mp4"
    ],
    "referenceAudios": [
      "https://assets.runware.ai/assets/inputs/f718806b-297d-4769-9b14-14a896ea4db7.mp3"
    ]
  }
}
```