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

# MAGI-2 Reference to Video

> MAGI-2 reference to video API on SnapGen: combine up to 10 images, 5 videos, and 5 audio clips at 1080p for 4–30 seconds.

Use `magi-2-r2v` to guide a 1080p scene with multimodal image, video, and audio references. Supply at least one reference across `image_urls`, `video_urls`, or `audio_urls`.

| Property | Value |
| - | - |
| Public model ID | `magi-2-r2v` |
| Input | Text prompt + up to 10 images, 5 videos, 5 audio clips |
| Output | Fixed `1080p` video with optional native audio |
| Duration | Integer 4–30 seconds; default 5 |
| Framing | `16:9` (default), `9:16`, `1:1`, `4:3`, `3:4`, `21:9` |
| Price | \$0.12 per output second (no reference surcharge) |

## Pricing

| Duration | Price |
| - | -: |
| 4 seconds | \$0.48 |
| 5 seconds | \$0.60 |
| 10 seconds | \$1.20 |
| 30 seconds | \$3.60 |

**100 SnapGen credits = \$1**. Reference media and the audio toggle do not add surcharges; billing is strictly per output second. Failed tasks are not charged. Confirm live rates on the [MAGI-2 model page](https://snapgen.org/models/magi-2).

**model** `string` *required*

Set to `magi-2-r2v`.

**prompt** `string` *required*

Describe the scene and explain how each reference guides subject identity, camera motion, or sound style. Maximum 15,000 characters.

**image\_urls** `string[]`

Up to 10 public HTTP(S) JPEG, PNG, or WebP reference image URLs (up to 30 MiB each).

**video\_urls** `string[]`

Up to 5 public HTTP(S) MP4 or MOV reference video URLs (up to 50 MiB each; 2–30 seconds per clip, 30 seconds combined recommended).

**audio\_urls** `string[]`

Up to 5 public HTTP(S) MP3 or WAV reference audio URLs (up to 15 MiB each; 2–30 seconds per clip, 30 seconds combined recommended).

**seconds** `integer` (default: 5)

Output length in whole seconds from `4` to `30`. Send a JSON number.

**resolution** `string` (default: 1080p)

Fixed at `1080p`. Omitting `resolution` also produces `1080p`.

**aspect\_ratio** `string` (default: 16:9)

One of `16:9`, `9:16`, `1:1`, `4:3`, `3:4`, or `21:9`.

**generate\_audio** `boolean` (default: true)

Generate synchronized native audio alongside the video. Set to `false` for silent output.

**seed** `integer`

Optional integer from `0` to `2147483647` (or `-1` / omit for a random seed).

> [!NOTE]
>
> Provide at least one reference across `image_urls`, `video_urls`, or `audio_urls`. Video editing, video extension, and intermediate keyframes are not exposed by this endpoint.

## Request

```bash theme={null}
curl https://api.snapgen.org/v1/videos \
  -H "Authorization: Bearer $SNAPGEN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "magi-2-r2v",
  "prompt": "Use the reference video camera movement, the character from the reference image, and the musical mood of the audio to show her walking along a sunset beach",
  "seconds": 8,
  "resolution": "1080p",
  "aspect_ratio": "16:9",
  "generate_audio": true,
  "image_urls": [
    "https://example.com/character.jpg"
  ],
  "video_urls": [
    "https://example.com/camera.mp4"
  ],
  "audio_urls": [
    "https://example.com/bgm.mp3"
  ]
}'
```

## Poll and download

```bash theme={null}
curl "https://api.snapgen.org/v1/videos/$VIDEO_ID?model=magi-2-r2v" \
  -H "Authorization: Bearer $SNAPGEN_API_KEY"

curl -L "https://api.snapgen.org/v1/videos/$VIDEO_ID/content?model=magi-2-r2v" \
  -H "Authorization: Bearer $SNAPGEN_API_KEY" \
  --output video.mp4
```

See the [video workflow](https://docs.snapgen.org/api-reference/video-generation.md) for task states, polling cadence, and webhooks.

> [card] [Open MAGI-2](https://snapgen.org/models/magi-2)
>
> Try all three MAGI-2 modes in the Playground and check live pricing.


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