> ## Documentation Index
> Fetch the complete documentation index at: https://docs.unifically.com/llms.txt
> Use this file to discover all available pages before exploring further.

# MAGI-2

> Sand AI MAGI-2 generates 1080p video (4-30 seconds) with synchronized audio from text, start/end frames, or up to 20 multimodal references. See parameters and API examples.

Generate 1080p videos with MAGI-2, Sand AI's video and audio model released November 24, 2026. One request handles text-to-video, first-and-last-frame transitions, or reference-to-video with up to 10 reference images, 5 reference videos, and 5 reference audio clips, outputting 4 to 30 seconds of video with synchronized dialogue, sound effects, ambience, and music in a single pass.

Try it in the browser: [MAGI-2 API playground](https://unifically.com/models/magi-2).

## Model

```
sand-ai/magi-2
```

## Modes

| Mode | How to select it | Length | Shape |
| - | - | - | - |
| Text-to-video | Send `prompt` only | 4-30 seconds | `aspect_ratio` |
| First / last frame | Send `start_frame_url` (and optional `end_frame_url`) | 4-30 seconds | `aspect_ratio` |
| Reference-to-video | Send `image_urls`, `video_urls`, and/or `audio_urls` | 4-30 seconds | `aspect_ratio` |

Do not combine `start_frame_url` / `end_frame_url` with `image_urls`, `video_urls`, or `audio_urls` in the same request.

## Parameters

| Parameter | Type | Required | Default | Description |
| - | - | - | - | - |
| `prompt` | string | Yes | - | Video prompt, 1-15,000 characters. Reference inputs in array order as `Image 1`, `Video 1`, and `Audio 1` |
| `start_frame_url` | string | No | `null` | First-frame public image URL (up to 28.61 MB). Alias: `start_image_url`. Cannot be combined with reference inputs |
| `end_frame_url` | string | No | `null` | Last-frame public image URL (up to 28.61 MB). Alias: `end_image_url`. Requires `start_frame_url` |
| `image_urls` | string\[] | No | `null` | Reference-to-video: 1-10 public image URLs (up to 28.61 MB each). Alias: `reference_image_urls`. Cannot be combined with frames |
| `video_urls` | string\[] | No | `null` | Reference-to-video: 1-5 public video URLs (2-30 s each, up to 30 s total, max 190.73 MB each). Alias: `reference_video_urls`. Cannot be combined with frames |
| `audio_urls` | string\[] | No | `null` | Reference-to-video: 1-5 public audio URLs (2-30 s each, up to 30 s total, max 14.31 MB each). Alias: `reference_audio_urls`. Cannot be combined with frames |
| `aspect_ratio` | string | No | `"16:9"` | Output ratio at 1080p: `"16:9"`, `"4:3"`, `"1:1"`, `"3:4"`, `"9:16"`, or `"21:9"` |
| `duration` | integer | No | `5` | Video length in seconds, from `4` to `30` |
| `audio` | boolean | No | `true` | Generate synchronized audio (dialogue, sound effects, ambience, music). Aliases: `generate_audio`, `native_audio` |
| `seed` | integer | No | random | Random seed for reproducible output (`0`-`4294967295`) |

## Example - Text-to-Video

```bash theme={null}
curl -X POST https://api.unifically.com/v1/tasks \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "model": "sand-ai/magi-2",
    "input": {
      "prompt": "One continuous shot inside an old archive room. Warm desk light grazes brass instruments as a gentle wind moves a curtain. Ambient room tone and quiet street noise outside.",
      "aspect_ratio": "16:9",
      "duration": 5,
      "audio": true
    }
  }'
```

## Example - Reference-to-Video

```bash theme={null}
curl -X POST https://api.unifically.com/v1/tasks \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "model": "sand-ai/magi-2",
    "input": {
      "prompt": "Take the motion timing from Video 1. The person is the woman in Image 1 inside the sunlit studio from Image 2, backed by the instrumental track in Audio 1.",
      "image_urls": [
        "https://example.com/character.jpg",
        "https://example.com/studio.jpg"
      ],
      "video_urls": [
        "https://example.com/motion.mp4"
      ],
      "audio_urls": [
        "https://example.com/music.mp3"
      ],
      "aspect_ratio": "9:16",
      "duration": 6
    }
  }'
```

## Response

```json theme={null}
{
  "code": 200,
  "success": true,
  "data": {
    "task_id": "abc123def456",
    "status": "processing"
  }
}
```

Poll `GET /v1/tasks/<task_id>` or set a `callback_url` on the request to receive the finished video.

> [!NOTE]
>
> **Volume discounts** are available for almost all models. Reach out at [contact@unifically.com](mailto:contact@unifically.com) to discuss custom pricing.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.