> For the complete documentation index, see [llms.txt](https://docs.meganova.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.meganova.ai/inference-models/video-generation.md).

# Video Generation

Use these models to generate videos from text prompts or image inputs. All video models are priced **per second** of generated video. Final cost depends on resolution and audio options.

## Models available

Models that generate video from a prompt, from a still image (**`Image To Video`**), or from a reference clip (**`Reference To Video`**).

Model ids, current prices, context lengths and per-tier limits are in the console catalog, which is generated from the same records that bill your requests:

[**console.meganova.ai/serverless**](https://console.meganova.ai/serverless) — filter by **`Text To Video`**

The same list is available programmatically from [`GET /v1/models`](/api-reference/inference-models.md), including pricing and capability flags.

### How video is billed

The catalog lists a base rate per second of output. Two multipliers apply on top of it, and neither is visible in a per-second price, so they are kept here.

**Google Veo** — resolution and audio:

| Resolution   | Silent | With audio |
| ------------ | ------ | ---------- |
| 720p / 1080p | 1x     | 2x         |
| 4K           | 1.5x   | 3x         |

**BytePlus Seedance** — resolution:

| Resolution | Multiplier |
| ---------- | ---------- |
| 480p       | 0.05x      |
| 720p       | 0.10x      |
| 1080p      | 0.24x      |

> A duration of 10 seconds applies a further 2x multiplier.

**Alibaba Wan 2.6** — resolution:

| Resolution | Multiplier |
| ---------- | ---------- |
| 720p       | 1x         |
| 1080p      | 1.5x       |

> On I2V-Flash and R2V-Flash, audio adds a further 2x multiplier.

## Using the Models

### Through Our Website UI

Our website UI is the easiest and fastest way to use our endpoints.

1. Go to the [MegaNova](https://meganova.ai) website.
2. Log in, and ensure you have enough credits.
3. Click on the "Inference Models" tab and select your video model.
4. Choose your parameters, enter your prompt (and reference image if applicable) and press Enter!

### Through API Endpoint

> **NOTE:** Don't forget to use **your** API key. See [Authentication](/api-reference/platform-api/authentication.md) for details on authentication and [Create API Key](/api-reference/platform-api/create-api-key.md) for managing keys.

#### Using cURL

**Text-to-Video**

```bash
curl -X POST "https://api.meganova.ai/v1/videos/generations" \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer $MegaNova_API_KEY" \
    --data-raw '{
      "model": "Google/veo-3.1-fast",
      "prompt": "a cat playing piano",
      "resolution": "720p",
      "duration": 8
    }'
```

**Image-to-Video**

```bash
curl -X POST "https://api.meganova.ai/v1/videos/generations" \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer $MegaNova_API_KEY" \
    --data-raw '{
      "model": "Alibaba/wan2.6-i2v",
      "prompt": "the cat starts walking",
      "image": "/9j/4…/Z",
      "resolution": "720p",
      "duration": 5
    }'
```

#### Using Python

```python
import requests
import os

url = "https://api.meganova.ai/v1/videos/generations"

headers = {
    "Content-Type": "application/json",
    "Authorization": f"Bearer {os.environ.get('MegaNova_API_KEY')}"
}

data = {
    "model": "Google/veo-3.1-fast",
    "prompt": "a cat playing piano",
    "resolution": "720p",
    "duration": 8
}

response = requests.post(url, headers=headers, json=data)
result = response.json()

# Video generation is async — use the generation ID to check status
generation_id = result["id"]
print(f"Generation started: {generation_id}")
```

**Check generation status:**

```python
status_url = f"https://api.meganova.ai/v1/videos/generations/{generation_id}"
status = requests.get(status_url, headers=headers).json()
print(status)
```

#### Using JavaScript

```javascript
const url = 'https://api.meganova.ai/v1/videos/generations';

const headers = {
    "Content-Type": "application/json",
    "Authorization": `Bearer ${process.env.MegaNova_API_KEY}`
};

const data = {
    "model": "Google/veo-3.1-fast",
    "prompt": "a cat playing piano",
    "resolution": "720p",
    "duration": 8
};

fetch(url, {
    method: 'POST',
    headers: headers,
    body: JSON.stringify(data)
})
    .then(response => response.json())
    .then(data => {
        console.log('Generation started:', data.id);
    })
    .catch(error => console.error('Error:', error));
```

#### Selecting a Model

To specify the desired model, use this mapping for the `model` field:

**Google Veo**

* Veo-3.1: `Google/veo-3.1`
* Veo-3.1-Fast: `Google/veo-3.1-fast`
* Veo-3.1-I2V: `Google/veo-3.1-i2v`
* Veo-3.1-Fast-I2V: `Google/veo-3.1-fast-i2v`

**BytePlus Seedance**

* Seedance-1.0-Pro: `Byteplus/seedance-1-0-pro-250528`
* Seedance-1.0-Lite-T2V: `Byteplus/seedance-1-0-lite-t2v-250428`
* Seedance-1.0-Lite-I2V: `Byteplus/seedance-1-0-lite-i2v-250428`

**Alibaba Wan 2.6**

* Wan-2.6-T2V: `Alibaba/wan2.6-t2v`
* Wan-2.6-I2V: `Alibaba/wan2.6-i2v`
* Wan-2.6-I2V-Flash: `Alibaba/wan2.6-i2v-flash`
* Wan-2.6-R2V: `Alibaba/wan2.6-r2v`
* Wan-2.6-R2V-Flash: `Alibaba/wan2.6-r2v-flash`

## API Endpoints

| Endpoint                             | Method | Description             |
| ------------------------------------ | ------ | ----------------------- |
| `/v1/videos/generations`             | POST   | Start video generation  |
| `/v1/videos/generations/{id}`        | GET    | Check generation status |
| `/v1/videos/generations/{id}/stream` | GET    | Stream generated video  |

Feel free to refer to the [API Reference](/api-reference/inference-models.md) for more details.
