# Multi-image Reference

**What**：Generate a video from one or more reference images (optionally plus reference video/audio) — the default image-to-video workflow. This page covers 3 values: multi-reference (general), multi-reference-4 (multi-image composition) and mj (MJ-style reference), selected via workflow_id.

**When**：Use when you have reference images to animate (up to 9); optionally add reference video for motion/style or audio for rhythm. The 3 values share identical material limits, duration, resolution tiers and pricing — pick by the generation style you want.

## Endpoints
- POST `/v1/videos`
- GET `/v1/videos/{id}`
- GET `/v1/videos/{id}/content`

> This page uses the unified API: create with `POST /v1/videos`, poll with `GET /v1/videos/{id}`, authenticate with `Authorization: Bearer <key>`; errors use the OpenAI format.

Creating returns a video object right away (`status: queued`). Poll `GET /v1/videos/{id}` until `status` is `completed` or `failed`; `url` is the result address, or download it with `GET /v1/videos/{id}/content`.

## Request params
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| model | string | — | Fixed minimax-h3 |
| workflow_id | string | — | Workflow; 1 of 3 on this page: multi-reference / multi-reference-4 / mj. See the table below for what each does; omit it and inputs are inferred as multi-reference; the other values must be set explicitly |
| prompt | string | Yes | Required. Text description (the new engine always requires prompt — including image-to-video and first/last-frame, e.g. "gentle camera push-in, soft light") |
| image_urls | string[] | Yes | Reference image URLs, up to 9 (alias: images) |
| ratio | string | — | Aspect ratio, 1 of 8: 16:9 / 9:16 / 1:1 / 4:3 / 3:4 / 3:2 / 2:3 / 21:9, default 16:9 (ratio x resolution tier determine the output size; see the size table) |
| resolution | string | — | Resolution tier (case-insensitive): 480P / 768P / 1080P, default 1080P; the unit price varies by tier — see the pricing page |
| duration | integer | — | Duration (sec) integer 4~15, default 4 (alias: seconds) |
| reference_videos | string[] | — | Reference video URLs, up to 3, as motion/style reference (aliases: reference_video (single) / video_urls / videos) |
| audio_urls | string[] | — | Audio URLs, up to 3, for audio-guided generation (alias: reference_audios) |
| prompt_enhance | boolean | — | Prompt enhancement (optional, boolean); defaults to on if omitted |

`model`, `prompt`, `seconds`, `size` and `input_reference` are the common fields; the other fields are specific to this model channel and go in the same body under their own names. `seconds` / `size` (must be `WIDTHxHEIGHT`) are only translated when the matching channel field is absent.

## Request example
```bash
curl https://api.novapi.ai/v1/videos \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "minimax-h3",
  "workflow_id": "multi-reference",
  "prompt": "gentle camera push-in, soft light",
  "image_urls": [
    "https://cdn.novapi.ai/your/frame.png"
  ],
  "ratio": "9:16",
  "resolution": "1080P",
  "duration": 8
}'
```

```python
import os, requests

r = requests.post(
    "https://api.novapi.ai/v1/videos",
    headers={"Authorization": "Bearer " + os.environ["API_KEY"]},
    json={
        "model": "minimax-h3",
        "workflow_id": "multi-reference",
        "prompt": "gentle camera push-in, soft light",
        "image_urls": [
            "https://cdn.novapi.ai/your/frame.png",
        ],
        "ratio": "9:16",
        "resolution": "1080P",
        "duration": 8,
    },
)
print(r.json())  # poll GET /v1/videos/{id} until status is completed
```

```ts
const resp = await fetch("https://api.novapi.ai/v1/videos", {
  method: "POST",
  headers: {
    Authorization: "Bearer " + process.env.API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "model": "minimax-h3",
    "workflow_id": "multi-reference",
    "prompt": "gentle camera push-in, soft light",
    "image_urls": [
      "https://cdn.novapi.ai/your/frame.png"
    ],
    "ratio": "9:16",
    "resolution": "1080P",
    "duration": 8
  }),
});
console.log(await resp.json()); // poll GET /v1/videos/{id} until status is completed
```

## Response example
```json
{
  "id": "video_<task-id>",
  "object": "video",
  "model": "minimax-h3",
  "status": "queued",
  "progress": 0,
  "created_at": <unix-seconds>,
  "completed_at": null,
  "expires_at": null,
  "error": null
}
```

```json
{
  "id": "video_<task-id>",
  "object": "video",
  "model": "minimax-h3",
  "status": "completed",
  "progress": 100,
  "created_at": <unix-seconds>,
  "completed_at": <unix-seconds>,
  "expires_at": null,
  "error": null,
  "url": "https://..."
}
```

```bash
curl https://api.novapi.ai/v1/videos/video_<task-id> \
  -H "Authorization: Bearer $API_KEY"

# completed: "status": "completed", "progress": 100, and a "url" field with the result
curl -L https://api.novapi.ai/v1/videos/video_<task-id>/content \
  -H "Authorization: Bearer $API_KEY" \
  --output result.mp4
```
