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

> MAGI-2 text to video API on SnapGen: 4–30 seconds, fixed 1080p output, and optional native audio.

Use `magi-2-t2v` to generate 4–30 second 1080p videos from a text prompt with optional native synchronized audio.

| Property | Value |
| - | - |
| Public model ID | `magi-2-t2v` |
| Input | Text prompt |
| 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 |

## Pricing

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

**100 SnapGen credits = \$1**. Turning native audio on or off does 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-t2v`.

**prompt** `string` *required*

Describe the scene, subject, camera movement, dialogue, and ambient sound. Maximum 15,000 characters.

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

## 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-t2v",
  "prompt": "A cinematic slow push-in shot of a traveler entering a rain-lit train station at night, distant train hum",
  "seconds": 5,
  "resolution": "1080p",
  "aspect_ratio": "16:9",
  "generate_audio": true
}'
```

## Poll and download

Save the returned gateway video `id`. Poll with the same API key and `model` until `status` is `completed` or `failed`, then download the MP4.

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

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