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

# MAGI-2 Video API

> Call MAGI-2 via /v1/videos. Supports text-to-video and reference-to-video.

# MAGI-2 Video API

Create, poll, and download video tasks through OpenAI-compatible video APIs. Supports text-to-video and reference-to-video.

| Action | Method | Path |
| - | - | - |
| Create video task | `POST` | `/v1/videos` |
| Get video task | `GET` | `/v1/videos/{task_id}` |
| Download video | `GET` | `/v1/videos/{task_id}/content` |

**Host:** `https://api.omniall.ai` · Auth `Authorization: Bearer sk-...`.

**Model:** `magi-2` (see [Model Square](https://omniall.ai/pricing)).

## Request body

| Field | Type | Required | Description |
| - | - | - | - |
| `model` | string | | Model name: `magi-2` |
| `prompt` | string | yes | Text prompt; Chinese and English supported |
| `mode` | string | | `i2v` / `r2v` / `t2v`; auto-inferred when omitted |
| `resolution` | string | | Allowed: `1080p`; defaults to `1080p` when unrecognized |
| `aspect_ratio` | string | | `21:9` / `16:9` / `4:3` / `1:1` / `3:4` / `9:16`; default `16:9`; can also be inferred from `size` |
| `duration` | integer | | Field name `seconds` is also accepted; range **4–30**; default **5** |
| `seconds` | string / integer | | Alias of `duration`; prefer a string such as `"5"` |
| `audio` | boolean | | Whether output includes audio; default `true` |
| `reference_images` | array | | Reference images, max **10** |
| `reference_videos` | array | | Reference videos, max **5** clips, total duration ≤ **15**s |
| `reference_audios` | array | | Reference audios, max **5** clips |

Media fields accept public URLs, or files uploaded with create as `multipart/form-data`.

## Task status

| Status | Description |
| - | - |
| `queued` | Accepted, waiting |
| `in_progress` | Generating |
| `completed` | Done; download via result URL |
| `failed` | Failed; see `error` |

## Example

```bash theme={null}
curl --request POST \
  --url 'https://api.omniall.ai/v1/videos' \
  --header 'Authorization: Bearer sk-...' \
  --header 'Content-Type: application/json' \
  --data '{
  "model": "magi-2",
  "prompt": "Slow camera push into the reference scene",
  "duration": 5,
  "resolution": "1080p",
  "aspect_ratio": "16:9",
  "audio": true
}'
```

Full API details: **API Reference → Video → MAGI-2**.


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