# Generate short video clips from text prompts

**Use case:** 

Text-to-video in batch: write one prompt per clip and MiniMax Hailuo generates a short 16:9 mp4 for each, returned as its own dataset item with the video URL and duration. From $0.05 per second of delivered video, failed clips free.

## Input

```json
{
  "prompts": [
    "A paper plane gliding over pastel mountains, minimal flat illustration style, smooth camera pan",
    "Rain drops racing down a window at dusk, warm city lights bokeh in the background, calm mood"
  ],
  "duration": 5,
  "resolution": "768P",
  "promptExpansion": "balanced",
  "maxVideos": 20
}
```

## Output

```json
{
  "outputUrl": {
    "label": "Video",
    "format": "string"
  },
  "prompt": {
    "label": "Prompt",
    "format": "string"
  },
  "imageUrl": {
    "label": "Image",
    "format": "string"
  },
  "durationSeconds": {
    "label": "Duration (s)",
    "format": "number"
  },
  "billedSeconds": {
    "label": "Billed (s)",
    "format": "integer"
  },
  "resolution": {
    "label": "Resolution",
    "format": "string"
  },
  "status": {
    "label": "Status",
    "format": "string"
  },
  "error": {
    "label": "Error",
    "format": "string"
  }
}
```

## How it works

### 1. Sign up on Apify or log in

The Image to Video API — MiniMax Hailuo, Batch, Pay per Second Actor is ready to run with the inputs already set for "Generate short video clips from text prompts". [Sign up or log in](https://console.apify.com/create-task-from-example/s5eZLOJBGS9Sbbcnz) and you'll land in Apify Console with a copy of this exact task.

### 2. Start the "Generate short video clips from text prompts" task

The Image to Video API — MiniMax Hailuo, Batch, Pay per Second Actor will start running based on the input automatically. You can also change all the input fields, like prompts, clip duration (seconds), and more, to match your specific use case.

### 3. Receive the "Generate short video clips from text prompts" output

Monitor the progress in real time. You will be notified as soon as your dataset is complete and ready for review. Each result includes data such as video, prompt, image, and more.

### 4. Integrate into your workflow

The final output is delivered in JSON, CSV, or Excel format, ready to be plugged into your workflow. You can also [run the "Generate short video clips from text prompts" task via API](https://apify.com/sherwood/video-generator-batch.md).

## FAQ

### How long can each text-to-video clip be?

This text-to-video task sets duration per run, 1 to 15 seconds per clip, 5 by default. For longer sequences, generate several clips in one batch and cut them together.

### What does a text-to-video clip cost per second?

This text-to-video task charges per second of delivered video: $0.05 on the free plan and Business, $0.06 on Starter. All resolutions, 1080P included, cost the same; failed clips are free.

### Which aspect ratio do text-to-video clips come out in?

This text-to-video task returns one 16:9 mp4 per prompt, at 768P by default, 480P or 1080P on request. To control the last frame, add an image in endImageUrls.

### How do I call text-to-video from n8n or an AI agent?

This text-to-video task runs from the official Apify node in n8n (Actor sherwood~video-generator-batch) or through the Apify MCP server. Nothing in the input is required, so one prompt list maps to one call.

## About this Actor

This example demonstrates how to use [Image to Video API — MiniMax Hailuo, Batch, Pay per Second](https://apify.com/sherwood/video-generator-batch.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/sherwood/video-generator-batch.md) to learn more, explore other use cases, and run it yourself.


## How to integrate an Actor?

This Task's input is already configured above. Use it as-is rather than inventing a new one.

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 full API examples (JavaScript, Python, CLI, MCP, OpenAPI), see this Task's Actor page: https://apify.com/sherwood/video-generator-batch.md

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