> ## 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 Image to Video

> MAGI-2 image to video API on SnapGen: animate a first frame or first and last frames at 1080p for 4–30 seconds.

Use `magi-2-i2v` to animate a starting frame, or guide the ending pose with an optional last frame, at fixed 1080p resolution with optional native audio.

| Property | Value |
| - | - |
| Public model ID | `magi-2-i2v` |
| Input | Text prompt + 1 or 2 frame images |
| Output | Fixed `1080p` video with optional native audio |
| Duration | Integer 4–30 seconds; default 5 |
| Framing | `auto` (default), `16:9`, `9:16`, `1:1`, `4:3`, `3:4` |
| Price | \$0.12 per output second |

## Pricing

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

**100 SnapGen credits = \$1**. First/last-frame images and the audio toggle do not change the per-second rate. 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-i2v`.

**prompt** `string` *required*

Describe the motion, camera movement, transition, and sound. Maximum 15,000 characters.

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

One or two public HTTP(S) JPEG, PNG, or WebP image URLs (up to 30 MiB each). The first URL is the starting frame; the second, when supplied, is the ending frame.

**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: auto)

Use `auto` to follow the first frame, or choose `16:9`, `9:16`, `1:1`, `4:3`, or `3:4`. Note that `21:9` is not supported in image-to-video mode.

**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).

## 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-i2v",
  "prompt": "The subject turns gently toward the camera in warm evening light, natural room ambience",
  "seconds": 5,
  "resolution": "1080p",
  "aspect_ratio": "auto",
  "generate_audio": true,
  "image_urls": [
    "https://example.com/start.jpg",
    "https://example.com/end.jpg"
  ]
}'
```

## Poll and download

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

curl -L "https://api.snapgen.org/v1/videos/$VIDEO_ID/content?model=magi-2-i2v" \
  -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.