# Hailuo AI Video Generator (MiniMax Hailuo 2.3, H3) (`pnda/hailuo-video-generator`) Actor

Hailuo AI video generator: MiniMax Hailuo 2.3 and Hailuo H3, text to video or image to video from a first frame, 768p, 1080p or 2K, up to 15 s. Prompt optimization + AI quality score to automate ads, UGC and stories. No API key, pay per second of delivered video.

- **URL**: https://apify.com/pnda/hailuo-video-generator.md
- **Developed by:** [PNDA](https://apify.com/pnda) (community)
- **Categories:** AI, Videos, Social media
- **Features:** Limited permissions
- **Stats:** 2 total users, 2 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

from $400.00 / 1,000 video second (pro)s

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Hailuo AI Video Generator (MiniMax Hailuo 2.3, H3)

**Hailuo AI video generator**: MiniMax **Hailuo 2.3** and **Hailuo H3**, text to video or image to video from a first frame, **768p, 1080p or 2K**, billed **per second of delivered video**.

- 🎬 Text to video or first frame image to video.
- 📐 Hailuo 2.3: 768p (6 or 10 s) or 1080p (6 s). Hailuo H3: 768p or 2K, 4 to 15 s.
- ✨ Optional prompt optimization ($0.015) with a use case.
- 🔑 **No API key**: no OpenAI, Google or ByteDance account needed.
- 🆓 **Works with a free Apify account too**: 1 generation per month (one 6 s video) with Hailuo 2.3, 768p, 6 s, billed at the normal price ($2.40). Every model and option on paid Apify plans.
- 🚫 **Sexually explicit content is not allowed.** Such prompts stop at once, at no cost.
- 🎯 **Quality score for automation** (optional, $0.02 per video): an AI checks every video for weird or broken details and for its match with your prompt, so you can publish without checking by hand.
- 💸 **Pay only for delivered seconds of video.** Failures are never charged.

Works from the Apify Console, the API, the JavaScript / Python clients, **n8n, Make, Zapier** and **AI agents / MCP**.

### 🎯 Quality score: run stories, ads and UGC on autopilot

Turn on `qualityScore` and every delivered video is checked by a multimodal AI before it reaches you, in two steps:

1. **Coherence**: nothing weird or broken (hands and fingers, faces, objects merging or appearing from nowhere, garbled text, illogical actions, morphing or flicker between frames).
2. **Prompt match**: the subject, product, setting, action and any quoted text of **your original prompt** are there (not the optimized prompt), and nothing was added that you did not ask for (text, logo, object, product color).

Each issue is graded like an art director looking at the image at normal size: **critical** (unusable: wrong product, something appearing from nowhere), **major** (visible at first glance) or **minor** (only seen when zooming in, such as watch hands or buckles).

Each row then has `qualityScore` (0-100), `coherenceScore`, `promptMatchScore`, `issues` (short list in English) and `verdict`:

| Verdict | Rule | What to do |
|---|---|---|
| `pass` | no critical or major issue, quality >= 75 | publish automatically |
| `review` | a major issue (first-glance defect, unrequested text...) | a quick human look |
| `fail` | a critical issue or quality < 50 | discard or regenerate |

No more checking every video by hand: in **n8n, Make, Zapier** or your own code, publish the `pass` rows of your daily stories, ads or product clips and regenerate the `fail` ones. **$0.02 per scored video**; if the checker is unavailable the video is delivered without a score and nothing extra is charged.

### 💡 Who is it for?

- Creators and social media managers
- Ads and e-commerce teams
- Developers looking for a Hailuo / MiniMax video API

### ⚙️ How it works

1. You send a **prompt**, optionally a start image for image-to-video, and pick a model.
2. The Actor checks your maximum cost per run covers the full video, then generates it (from ~30 s to a few minutes).
3. Each video is **copied to your Apify key-value store**, so the link does not expire after an hour.
4. One dataset row per video: URL, model, options, duration.

### 💰 Pricing

Pay per event, **per second of delivered video**, no start fee. Paid Apify plans: every model below. **Works with a free Apify account too**: 1 generation per month (one 6 s video) with Hailuo 2.3, 768p, 6 s, billed at the normal price ($2.40).

| Model | Option | Event | Price per second | Example |
|---|---|---|---|---|
| Hailuo 2.3 (MiniMax, 768p or 1080p) | 768p | `video-pro-second` | $0.40 | $2.40 for 6 s |
| Hailuo 2.3 (MiniMax, 768p or 1080p) | 1080p | `video-pro-second` | $0.40 | $2.40 for 6 s |
| Hailuo H3 (MiniMax, 768p or 2K) | 768p | `video-pro-second` | $0.40 | $2.00 for 5 s |
| Hailuo H3 (MiniMax, 768p or 2K) | 2k | `video-premium-second` | $0.60 | $3.00 for 5 s |

- A failed video is **not charged**. If nothing could be produced, nothing is charged.
- **Prompt optimization** (optional, `optimizePrompt` or a use case): **$0.015 per optimized prompt** (event `prompt-optimization`), charged once with the first delivered output that uses it. Not charged if the prompt writer is unavailable or nothing is delivered. Not available on the free Apify plan.
- **Quality score** (optional, `qualityScore`): **$0.02 per scored video** (event `quality-score`). Not charged if the checker is unavailable or the output failed. Not available on the free Apify plan.
- The billed duration is the delivered one (never more than requested). Before each video the Actor checks your remaining budget covers the whole requested duration, otherwise it stops **without** generating.

### 📥 Input

| Field | Type | Description |
|---|---|---|
| `prompt` | string | Describe the video: subject, action, camera movement, style, and sounds if audio is enabled. |
| `model` | string | Which AI model to use. Each option is billed at its own price, see the Pricing section of the README. Free Apify plan: 1 generation per month (one 6 s video) with Hailuo 2.3, 768p, 6 s, billed at the normal price ($2.40); other models and options are replaced by it. |
| `imageUrl` | string | Public URL of an image used as the first frame (image-to-video). Leave empty for text-to-video. |
| `optimizePrompt` | boolean | An AI prompt writer rewrites your idea into a detailed video prompt for the selected model (subject, composition, light, motion, camera, sound), keeping every detail you gave and any text in quotes. $0.015 per optimized prompt (event "prompt-optimization"), charged once with the first delivered output that uses it; nothing extra if the writer is unavailable. The prompt actually used is in the output ("prompt", with your text in "originalPrompt"). If the writer is unavailable, your own prompt is used. |
| `preset` | string | Style brief for the prompt optimization: product (e-commerce), ads, social post, UGC, story, cinematic, portrait. Picking a use case turns "Optimize my prompt" on. |
| `qualityScore` | boolean | A multimodal AI watches each video: coherence (hands, faces, objects, text, motion, illogical details) and match with your original prompt. Adds qualityScore, coherenceScore, promptMatchScore (0-100), issues and verdict (pass / review / fail) to each row, so you can publish only the "pass" ones automatically. $0.02 per scored video (event "quality-score"); nothing extra if the checker is unavailable. |
| `quality` | string | Shortcut for the resolution when "Resolution" is empty: draft = lowest, standard = model default, high = one step below the best, max = best the model offers. Higher quality costs more per second. |
| `aspectRatio` | string | Output aspect ratio. "auto" keeps the model default (for edits: the source image ratio). Not every model supports every ratio; an unsupported ratio stops the run before anything is charged. |
| `resolution` | string | Video resolution. Leave empty for the model default (the cheapest one). Higher resolutions cost more per second. |
| `duration` | integer | Length of the video. Supported values depend on the model (Hailuo 2.3: 6, 10; Hailuo H3: 4 to 15). You pay per delivered second. |
| `numberOfVariants` | integer | How many separate videos to generate (1 to 4). Each successful one is billed; failures are free. |
| `includeFailedVariants` | boolean | Also write failed outputs (with the reason) to the dataset. Failed outputs are never billed. |

#### Example: Hailuo 2.3, 768p, 6 s

```json
{
  "prompt": "A dancer spins in a field of sunflowers, slow motion",
  "model": "minimax/hailuo-2.3",
  "duration": 6,
  "resolution": "768p"
}
```

#### Example: Hailuo H3 image-to-video

```json
{
  "prompt": "The product slowly rotates, soft studio light",
  "imageUrl": "https://example.com/product.jpg",
  "model": "minimax/h3",
  "duration": 5
}
```

### 📤 Output

One dataset row per video:

```json
{
  "model": "minimax/hailuo-2.3",
  "mode": "text-to-video",
  "prompt": "A dancer spins in a field of sunflowers, slow motion",
  "resolution": "480p",
  "index": 1,
  "videoUrl": "https://api.apify.com/v2/key-value-stores/<STORE_ID>/records/video-1",
  "durationSeconds": 5,
  "contentType": "video/mp4",
  "chargedEvent": "video-pro-second",
  "chargedUnits": 5,
  "success": true
}
```

Export the dataset as **JSON, CSV, Excel or HTML**, or read it from the API.

### 🧠 Models

- **Hailuo 2.3 (MiniMax, 768p or 1080p)** (`minimax/hailuo-2.3`): optional first frame image, resolutions 768p / 1080p, 6, 10 s.
- **Hailuo H3 (MiniMax, 768p or 2K)** (`minimax/h3`): optional start frame image, resolutions 768p / 2k, 4 to 15 s, 6 aspect ratios.

### 🛟 Errors and reliability

- Invalid options (unsupported ratio, duration or resolution for the chosen model) stop the run **before** anything is generated or charged, with a message listing the supported values.
- If the AI provider is temporarily unavailable, the run stops right away (no time burned on the remaining outputs), **nothing is charged**, and the dataset contains one row with `success: false`, `status: "service-unavailable"` and a clear message. Retry a bit later.
- Runs whose maximum cost per run is too low for one output stop at once with an explanatory row (`status: "budget-too-low"`), at no cost.
- Free Apify plan: once the 1 generation of the month is used, or when the daily free-plan capacity is reached, runs stop at once with `status: "free-plan-limit"`, at no cost. If free-plan runs are temporarily unavailable, the row says `status: "paid-plan-required"`, also at no cost.
- If one output is refused (safety filter, unreadable source image), the others still run.

### ❓ FAQ

**Is there a Hailuo API?**

Yes: this Actor is a pay-as-you-go MiniMax Hailuo API, no MiniMax account needed.

**Do I need an API key (OpenAI, Google...)?**

No. Your Apify account is enough: no key, no subscription, no quota to manage.

**Can I use it on the free Apify plan?**

Yes. Works with a free Apify account too: 1 generation per month (one 6 s video) with Hailuo 2.3, 768p, 6 s, billed at the normal price ($2.40), from your free monthly Apify credit. On a free plan only Hailuo 2.3, 768p, 6 s is used, one output per run: if you pick another model or option, the run uses it instead and says so in the output row (`notice`). Once the monthly generation is used (or when the daily free-plan capacity is reached), runs stop at once with `status: "free-plan-limit"`, at no cost. Paid Apify plans get every model and option, without this limit.

**Am I charged when a generation fails?**

No. You pay only for videos that are delivered, per second of video. Invalid inputs are rejected before any generation starts.

**How do I cap my spending?**

Set **Maximum cost per run** in the run options. Before each video the Actor checks the remaining budget covers the **full requested duration**; if not, it stops without generating.

**How long are files kept?**

Outputs are copied to the run key-value store and follow your Apify data retention. Download them or copy them to your own storage for long-term use.

**Can I call it from code, n8n, Make, Zapier or an AI agent?**

Yes. Use the "Run Actor synchronously and get dataset items" API endpoint, the Apify clients, the integrations, or the Apify MCP server.

**Who owns the generated content?**

Use of generated content is subject to the terms of each model provider. Do not submit images you do not have the right to use.

### ▶️ Start now

Pick a model, type a prompt, click **Start**.

# Actor input Schema

## `prompt` (type: `string`):

Describe the video: subject, action, camera movement, style, and sounds if audio is enabled.

## `model` (type: `string`):

Which AI model to use. Each option is billed at its own price, see the Pricing section of the README. Free Apify plan: 1 generation per month (one 6 s video) with Hailuo 2.3, 768p, 6 s, billed at the normal price ($2.40); other models and options are replaced by it.

## `imageUrl` (type: `string`):

Public URL of an image used as the first frame (image-to-video). Leave empty for text-to-video.

## `optimizePrompt` (type: `boolean`):

An AI prompt writer rewrites your idea into a detailed video prompt for the selected model (subject, composition, light, motion, camera, sound), keeping every detail you gave and any text in quotes. $0.015 per optimized prompt (event "prompt-optimization"), charged once with the first delivered output that uses it; nothing extra if the writer is unavailable. The prompt actually used is in the output ("prompt", with your text in "originalPrompt"). If the writer is unavailable, your own prompt is used.

## `preset` (type: `string`):

Style brief for the prompt optimization: product (e-commerce), ads, social post, UGC, story, cinematic, portrait. Picking a use case turns "Optimize my prompt" on.

## `qualityScore` (type: `boolean`):

A multimodal AI watches each video: coherence (hands, faces, objects, text, motion, illogical details) and match with your original prompt. Adds qualityScore, coherenceScore, promptMatchScore (0-100), issues and verdict (pass / review / fail) to each row, so you can publish only the "pass" ones automatically. $0.02 per scored video (event "quality-score"); nothing extra if the checker is unavailable.

## `quality` (type: `string`):

Shortcut for the resolution when "Resolution" is empty: draft = lowest, standard = model default, high = one step below the best, max = best the model offers. Higher quality costs more per second.

## `aspectRatio` (type: `string`):

Output aspect ratio. "auto" keeps the model default (for edits: the source image ratio). Not every model supports every ratio; an unsupported ratio stops the run before anything is charged.

## `resolution` (type: `string`):

Video resolution. Leave empty for the model default (the cheapest one). Higher resolutions cost more per second.

## `duration` (type: `integer`):

Length of the video. Supported values depend on the model (Hailuo 2.3: 6, 10; Hailuo H3: 4 to 15). You pay per delivered second.

## `numberOfVariants` (type: `integer`):

How many separate videos to generate (1 to 4). Each successful one is billed; failures are free.

## `includeFailedVariants` (type: `boolean`):

Also write failed outputs (with the reason) to the dataset. Failed outputs are never billed.

## Actor input object example

```json
{
  "prompt": "A dancer spins in a field of sunflowers, slow motion",
  "model": "minimax/hailuo-2.3",
  "optimizePrompt": false,
  "preset": "none",
  "qualityScore": false,
  "quality": "auto",
  "aspectRatio": "auto",
  "duration": 6,
  "numberOfVariants": 1,
  "includeFailedVariants": false
}
```

# Actor output Schema

## `dataset` (type: `string`):

All generated records (JSON, CSV, Excel).

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "prompt": "A dancer spins in a field of sunflowers, slow motion",
    "model": "minimax/hailuo-2.3",
    "duration": 6,
    "numberOfVariants": 1
};

// Run the Actor and wait for it to finish
const run = await client.actor("pnda/hailuo-video-generator").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "prompt": "A dancer spins in a field of sunflowers, slow motion",
    "model": "minimax/hailuo-2.3",
    "duration": 6,
    "numberOfVariants": 1,
}

# Run the Actor and wait for it to finish
run = client.actor("pnda/hailuo-video-generator").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "prompt": "A dancer spins in a field of sunflowers, slow motion",
  "model": "minimax/hailuo-2.3",
  "duration": 6,
  "numberOfVariants": 1
}' |
apify call pnda/hailuo-video-generator --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,pnda/hailuo-video-generator"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/r7CieZErclkG5DJvU/builds/vgpdQFXYiqaEUZ1hz/openapi.json
