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

# MAGI-2

> Generate a 1080p video with Sand MAGI-2, with sound, from text, from a first and optional last frame, or guided by up to 10 images, 5 videos and 5 audio clips. 4–30 seconds.

Model id `magi-2` · Sand AI · video · 3 modes: `text-to-video`, `image-to-video`, `reference-to-video`.

> [!NOTE]
>
> This page reflects the current catalog. Inputs, allowed values, limits and prices can change as the model evolves; the field names and their meaning do not. For the exact schema at any time, your agent calls [`get_model`](https://docs.argil.ai/v2/mcp/tools) with the mode.

## Text To Video

Mode `text-to-video`. Text to video. 1080p, 4–30 seconds, sound on by default.

### Input

| Field | Type | Required | Allowed | Default | Description |
| - | - | - | - | - | - |
| `prompt` | string | Yes | up to 15,000 characters | | What the video should show: subject, action, camera and sound. |
| `duration` | integer | | 4 to 30 | | Video duration in whole seconds, 4-30. Defaults to 5. |
| `aspect_ratio` | string | | `21:9`, `16:9`, `4:3`, `1:1`, `3:4`, `9:16` | | Aspect ratio. Defaults to 16:9. Output is 1080p. |
| `generate_audio` | boolean | | | | Generate sound with the video. Defaults to on. Same price. |
| `seed` | integer | | 0 to 4294967295 | | Seed. Omit for a random one. |

### Pricing

3.87 credits/second at 1080p. Sound included.

Fixed price: charged as estimated.

For the exact price of a request, use [`estimate_generation`](https://docs.argil.ai/v2/mcp/tools).

### Example

The arguments of [`generate_media`](https://docs.argil.ai/v2/mcp/tools#generate_media):

```json theme={null}
{
  "model": "magi-2",
  "mode": "text-to-video",
  "input": {
    "prompt": "A ginger cat walks into a sunlit kitchen, handheld camera",
    "duration": 4,
    "aspect_ratio": "21:9"
  }
}
```

## Image To Video

Mode `image-to-video`. Animate a first frame, or go from a first frame to a last frame. The prompt is optional.

### Input

| Field | Type | Required | Allowed | Default | Description |
| - | - | - | - | - | - |
| `prompt` | string | | up to 15,000 characters | | What the video should show: subject, action, camera and sound. |
| `duration` | integer | | 4 to 30 | | Video duration in whole seconds, 4-30. Defaults to 5. |
| `aspect_ratio` | string | | `21:9`, `16:9`, `4:3`, `1:1`, `3:4`, `9:16` | | Aspect ratio. Defaults to 16:9. Output is 1080p. |
| `generate_audio` | boolean | | | | Generate sound with the video. Defaults to on. Same price. |
| `seed` | integer | | 0 to 4294967295 | | Seed. Omit for a random one. |
| `first_frame` | [File](https://docs.argil.ai/v2/mcp/how-it-works.md#your-files) | | | | The image to use as the first frame. |
| `last_frame` | [File](https://docs.argil.ai/v2/mcp/how-it-works.md#your-files) | | | | Optional last frame. Needs a first frame. |

### Pricing

3.87 credits/second at 1080p. Sound included.

Fixed price: charged as estimated.

For the exact price of a request, use [`estimate_generation`](https://docs.argil.ai/v2/mcp/tools).

### Example

The arguments of [`generate_media`](https://docs.argil.ai/v2/mcp/tools#generate_media):

```json theme={null}
{
  "model": "magi-2",
  "mode": "image-to-video",
  "input": {
    "duration": 4,
    "aspect_ratio": "21:9"
  }
}
```

## Reference To Video

Mode `reference-to-video`. A video guided by references: up to 10 images, 5 videos and 5 audio clips. The prompt is optional.

### Input

| Field | Type | Required | Allowed | Default | Description |
| - | - | - | - | - | - |
| `prompt` | string | | up to 15,000 characters | | Point at the references with @image1 to @image10, @video1 to @video5, and @audio1 to @audio5, numbered in the order they are listed. |
| `duration` | integer | | 4 to 30 | | Video duration in whole seconds, 4-30. Defaults to 5. |
| `aspect_ratio` | string | | `21:9`, `16:9`, `4:3`, `1:1`, `3:4`, `9:16` | | Aspect ratio. Defaults to 16:9. Output is 1080p. |
| `generate_audio` | boolean | | | | Generate sound with the video. Defaults to on. Same price. |
| `seed` | integer | | 0 to 4294967295 | | Seed. Omit for a random one. |
| `references` | [File](https://docs.argil.ai/v2/mcp/how-it-works.md#your-files) list | | 0 to 20 items | | References the output must follow. The kind of each one (image, video, audio) is read from the file; per-kind limits are in the mode’s `capabilities.references`. |

**References:** up to 20: 10 images, 5 videos of 2 to 30 s (30 s in total), 5 audio files (30 s in total). Assets, URLs and elements are accepted.

### Pricing

3.87 credits/second at 1080p. Sound included.

Fixed price: charged as estimated.

For the exact price of a request, use [`estimate_generation`](https://docs.argil.ai/v2/mcp/tools).

### Example

The arguments of [`generate_media`](https://docs.argil.ai/v2/mcp/tools#generate_media):

```json theme={null}
{
  "model": "magi-2",
  "mode": "reference-to-video",
  "input": {
    "prompt": "A ginger cat walks into a sunlit kitchen, handheld camera, keeping the look of the reference",
    "duration": 4,
    "aspect_ratio": "21:9",
    "references": [
      "asset_91a3c7e5b2d84f6a8e0c1b9d7f3a5e24"
    ]
  }
}
```


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