# Hailuo AI Automation in 2026: Setup Steps, Limits, Fixes

By Margit Solheim · 2026-11-16 · Source: https://www.activepieces.com/blog/hailuo-ai-automation-in-2026-setup-steps-limits-fixes

---
<aside class="tldr"><p class="tldr-label">Summary</p><p>Hailuo AI automation means calling the MiniMax API from a script instead of clicking through the web app, across four sequential steps.</p><ul><li>API balance separate from web subscription; empty account triggers error 1008.</li><li>Rate limit is 20 requests per minute; error 1041 for too many concurrent tasks.</li><li>Missing polling step causes sheet rows with no video, the most common failure.</li></ul></aside>

Because Hailuo is MiniMax's video generator, Hailuo AI automation means calling the MiniMax API from a script or a workflow tool such as [Activepieces](https://www.activepieces.com) instead of clicking through the web app. This page was checked on 16 November 2026.

## Hailuo AI automation is API-driven video generation

### What Hailuo AI is and who makes it

Behind the consumer-facing name Hailuo is the video generation product built by MiniMax, a Chinese AI company. The web app is one front end. The API is the other, and it's the one a script can reach.

When someone wants to "automate Hailuo," the fix is not a smarter browser macro. It's a request sent to the MiniMax API with a key.

### What the web app can and cannot automate

If you want a script to submit a prompt, check progress, or collect the result, the web app offers no documented hook. It is built for a person at a keyboard.

Browser-automation tricks can imitate clicks, but they break when the page layout changes, and you won't find out until a batch comes back empty.

For anything supported, use the API. Once you have a working request, a workflow tool or a plain cron job can repeat it without a human in the loop.

### What the Hailuo AI automation script does

You'll have a tested script that takes a text prompt and returns a playable MP4 file on disk. Budget about 30 minutes, which is enough time to get a key and run one request, but not enough to build a production pipeline.

If step two fails, **don't bother debugging step four**. Each step depends on the output of the one before it, and the sequence below shows the whole build in order.

1. Create an API key in your MiniMax account.
2. Send one submit request with your prompt and receive a task ID.
3. Poll the task status with that ID until it reports the job is done and returns a file_id.
4. Download the MP4 using the file_id.

## Stage 1: Get an API key and fund the account

Register on MiniMax's developer platform, generate an API key, add prepaid credit, and export the key as an environment variable before writing any request code.

Create the key under the developer account, not the consumer one, and copy it when it's shown. Then run `export MINIMAX_API_KEY="..."` in the shell your script runs from, so the key never appears in the code. Keys pasted into scripts end up in repositories.

### Web subscription versus API billing

A valid key gets rejected anyway. That is the usual first-day report, and the cause is usually billing: a web-app subscription pays for clicks in the browser, while **API calls draw on a separate balance**.

![A full jar beside an empty jar, a hand holding a key at the empty one](https://ap-marketing-media.fra1.cdn.digitaloceanspaces.com/uploads/b0ff6ecf-10af-4dd5-9fc3-c2d7052d5293/hailuo-ai-automation-in-2026-setup-steps-limits-37ebeb5c.webp)

**Fund the API balance and check it shows before the first request, or you'll debug authentication for a problem that is really an empty account.**

For video generation pricing, [APIModels](https://apimodels.app/docs/minimax-h3) lists the following:

- Hailuo at 768p costs $0.097 per second: and at 2K costs $0.145 per second
- Kling costs $0.157 per second at 720p and $0.235 at 1080p
- Hailuo at 768p is about 38% cheaper than Kling at 720p, and Hailuo at 2K still undercuts Kling's lower tier
- Kling Flash at 720p is $0.094 per second, only $0.003 below Hailuo at 768p, so treat the two as level on price

![Hailuo API price per second against Kling](https://ap-marketing-media.fra1.cdn.digitaloceanspaces.com/uploads/d16ef0c0-bded-46df-b6b5-d146916e432a/hailuo-ai-automation-in-2026-setup-steps-limits-d4807f40.svg "Source: APIModels")

### Fast versus Standard, and direct versus resellers

Per clip, [Cre8vid and Picassoia](https://www.cre8vid.com/hailuo-2-3-api-pricing) put Hailuo 2.3 Standard and Fast at:

| Clip setting | Standard | Fast |
|---|---|---|
| 768p, 6s | $0.28 | $0.19 |
| 768p, 10s | $0.56 | $0.32 |
| 1080p, 6s | $0.49 | $0.33 |

Stretch the clip and the gap widens. A 10-second 768p clip saves $0.24 on Fast, so a batch of 1,000 saves $240. Prototype on Fast and move to Standard only where the output visibly needs it.

At $0.28 per clip, MiniMax direct is the figure [WaveSpeed](https://wavespeed.ai/docs/docs-api/minimax/hailuo-02/t2v-standard) lists, so costs scale directly with output volume.

![What one Hailuo 02 clip costs across API providers](https://ap-marketing-media.fra1.cdn.digitaloceanspaces.com/uploads/2b75b8b8-697d-4ab4-83fe-cde0073d6cd9/hailuo-ai-automation-in-2026-setup-steps-limits-f69b2667.svg "Source: WaveSpeed")

That is for Hailuo 02 at 6 seconds and 768p, per [Cre8vid](https://www.cre8vid.com/hailuo-2-3-api-pricing) and Picassoia, which means this rate doesn't automatically apply to other specifications. fal.ai, [Krea.ai](https://www.krea.ai/docs/api-reference/video/hailuo-02) and [Renderful](https://renderful.ai/zh/models/minimax/hailuo-02/text-to-video) each charge $0.27, a cent less, which doesn't justify a second vendor account.

**Going direct beats Pollo API**, which is $0.30, so there's no reason to use Pollo API. Eido lists $0.141, half the direct price.

Test its output and uptime before building on that figure, because a cheap reseller that fails jobs costs more in retries than it saves.

## Stage 2: Submit, poll and download one video

Submit one POST, keep the `task_id` it returns, poll until the status reads success, then exchange the returned `file_id` for a download link and save the MP4.

Nothing in this flow is synchronous, and the usual first failure report is "the request worked but I got no video."

### Text-to-video request with exact fields

Send the POST to the video generation endpoint with your key in the `Authorization` header as a bearer token. The body needs four fields: `model`, `prompt`, `duration` and `resolution`.

Allowed values for `duration` and `resolution` depend on the model you name, so copy them from that model's row in the MiniMax docs rather than from a tutorial.

A value the model doesn't accept is rejected, and a rejected request costs you a debugging session, not a video.

That 200 only means the job was accepted. Read `base_resp.status_code` in the response body as well, because a failure can arrive inside a successful HTTP response. Store `task_id` immediately, since it's the only handle you get on the job.

![Activepieces workflow builder showing a Send HTTP request step configured with Google Search RapidAPI credentials.](https://ap-marketing-media.fra1.cdn.digitaloceanspaces.com/uploads/da977bec-9b3b-44ea-89dc-d64f009a35fe/opus-clip-integration-how-to-set-it-up-2026-guid-8ea5333c.webp)

### Poll Hailuo video task status and states

Query the task-status endpoint with the `task_id`. The states you'll see are preparing, queueing, processing, success and fail. The first three mean wait. Success carries the `file_id`. Fail means stop, log the response and don't retry blindly.

Poll on a sleep of several seconds, and cap the number of attempts. A loop with no cap will run forever against a job that never leaves the queue, and in a scheduled workflow that's a silent stall.

### Download and save the Hailuo video file

Do not treat the `file_id` as a URL. Pass it to the file retrieval endpoint, which returns a `download_url`. Fetch that URL promptly and write the bytes to disk as an `.mp4`.

![file_id card passing through file retrieval endpoint to download_url and an mp4 file](https://ap-marketing-media.fra1.cdn.digitaloceanspaces.com/uploads/2f81e866-64d6-463a-8978-28c9b0d3f1b8/hailuo-ai-automation-in-2026-setup-steps-limits-3f0bf191.webp)

The link is short-lived, and saving it for later is a common reason a stored link fails when someone reopens it.

Open the saved file in a player before you call this stage done. A zero-length or truncated file with a success status is a download bug, not a generation bug.

### Image-to-video and first-and-last-frame variants

Change only the request body. Both variants use the same endpoint and the same polling and download steps.

For image-to-video, add `first_frame_image` with a public URL or a base64 data string of your source picture. For first-and-last-frame, also supply `last_frame_image` and choose a model whose docs list that mode.

When a rejection goes unexplained, the most likely cause is a last frame sent to a model that lacks it. Reproduce the plain text-to-video run first, then change one field at a time.

## Schedule Hailuo with a workflow tool

Wrap the exact request you just reproduced in a scheduler, and keep it a plain script unless someone who can't edit code needs to change the trigger. A repeatable run fails in the same places as a manual one, only with nobody watching.

**The sheet row never got a video**. That is the usual first report, and the cause is almost always the async wait.

MiniMax's video endpoint returns a task ID, not a file, so any automation must submit, poll the task status, then fetch the finished file.

When a step treats the first response as the result, it stores an empty value and reports success.

The table shows how three ways to build that loop handle the wait and failures. Reproduce a failed run in a test copy before trusting any of them.

| | Setup time | Monthly cost | Async wait | Failures and retries |
|---|---|---|---|---|
| Cron script | Short if you already have a server | Your existing host, plus API usage | A polling loop you write | Whatever you code: logging, backoff, alerts |
| Generic no-code platform (Zapier/Make) | Short for simple flows | Subscription that grows with step count | Delay and loop steps you configure | Built-in error handlers, limited by plan |
| Activepieces | Short, similar to other no-code tools | Self-hosted or hosted, plus API usage | Schedules and retries in a deterministic flow | Retries, plus run history to see what happened when a run broke |

If you are comfortable with code, setup time and cost favor the script. The no-code options trade that for visible run history and edits without a deploy.

Put the tested request in a file, add a polling loop with a hard timeout, and call it from cron or any scheduler. Log the task ID on submit, so a stuck job can be traced to one MiniMax task.

In a no-code tool, build the flow as an HTTP step to submit, a delay, a looped HTTP step to check status, and a final step to fetch the file. Set an exit condition on the loop for both success and failure.

### Setting up workflow automation with retries

Activepieces can run that submit, poll and fetch sequence as a deterministic flow, with schedules and retries around it.

If a Hailuo pipeline outgrows one sheet, the answer to "what happened when a task failed" is already in the same product: audit logs, log and event streaming, custom RBAC, SSO, SCIM, environments and git sync, on an MIT-licensed core with 750 integrations.

The same product runs self-hosted or on cloud, with no cut-down edition on either, so there is no separate vendor to stitch in for each concern.

Test each step on one sheet row before attaching a schedule, and run the failure path deliberately, with a bad field, to confirm it stops and reports.

## Hailuo API limits, errors and fixes

By the time a failure reaches the finished-file step, the logs already showed it as one of a handful of codes. The error table tells you who gets paged and what a retry may do.

Retry only the rows marked as transient; the rest will fail identically every time.

| Code or symptom | Cause | Fix |
|---|---|---|
| 1004 | API key missing, wrong, or sent in the wrong header | Re-issue the key and test one request by hand before scheduling anything |
| 1008 | Account balance is empty | Top up, then resubmit; alert on this code instead of retrying |
| 1026 / 1027 | Prompt (1026) or generated output (1027) tripped moderation | Rewrite the prompt; never retry the same text |
| 1041 | Too many tasks running at once | Queue submissions and wait for a task to finish |
| Rate limit, 20 RPM | Requests sent faster than the account allows | Add a delay with backoff between calls |
| Expired download URL | The file link was fetched late | Download immediately after success and store the file yourself |
| Stuck task | Status never leaves the processing state | Set a polling deadline, then mark failed and resubmit once |

When a burst of failures hits after a batch starts, the script is submitting faster than the account allows. The 20 RPM ceiling caps requests, while 1041 caps simultaneous tasks. Space submissions out, and keep a worker pool no larger than your concurrency allowance.

1004 and 1008 are not transient, so a retry loop just burns time. Fail fast, and send the alert to whoever owns the key or the billing account.

1026 and 1027 look like random failures in a batch because only some prompts trigger them. Log the prompt next to the code, and route rejected items to a human instead of looping.

Expired URLs and stuck tasks are both fixed by timing: fetch at once, and give polling a hard deadline.

1. Send one request by hand with your key and confirm it returns a task.
2. Log every response code beside its prompt.
3. Cap concurrency and add backoff for the rate limit.
4. Download and store each file the moment its task succeeds.
5. Set a polling deadline and a single resubmit for stuck tasks.
6. Route 1004, 1008, 1026 and 1027 to a person, not a retry.

## What Activepieces does about this

The failure this article keeps returning to is a run that nobody watched: a sheet row with no video, a poll loop that never ended, a 1008 retried until the budget was gone. Activepieces is the workflow layer we build for that case.

![A workflow with three steps: a weekly schedule trigger, a Google Sheets "Get next row(s)" step highlighted in red, and a…](https://ap-marketing-media.fra1.cdn.digitaloceanspaces.com/uploads/9c97a633-3fa9-4f11-b113-a673ce77431c/what-is-harness-engineering-building-reliable-ai-31a9d131.webp)

You wire the submit, delay, status-check and fetch steps as a flow with a schedule on top, and every run is kept in a history you can open to see which step returned what.

When a task fails, you read the run instead of reconstructing it from a cron log.

The retry and loop controls map onto the limits above.

You can set a bounded loop on the status check, send 1004, 1008, 1026 and 1027 down a branch that alerts a person instead of retrying, and space submissions to stay under the 20 RPM ceiling. None of that is automatic.

You still have to build the failure path and run it with a bad field to see it stop, but the integrations are there in the editor and don't need code.

![A workflow builder showing a Skyvern step selected with its configuration panel open on the right, displaying API Key and…](https://ap-marketing-media.fra1.cdn.digitaloceanspaces.com/uploads/f8e7c6dd-e9bb-4aff-a41a-53393d8279d8/applied-epic-ai-integration-a-2026-guide-for-age-a415e648.webp)

On licensing and scope, the core is MIT-licensed, so you can read what runs your pipeline and self-host it. The hosted cloud and the self-hosted edition are the same product.

Audit logs, SSO, SCIM, custom RBAC, environments and git sync are available as well, which matters once a Hailuo pipeline has more than one owner.

There are 750 integrations, so the sheet, the alert channel and the storage for finished MP4s can usually live in the same flow as the HTTP calls to MiniMax.

I found no Hailuo-specific integration I could point to, so the MiniMax calls go through the generic HTTP step, as with Zapier or Make. The reason to choose Activepieces over a cron script is the run history and editing without a deploy.

If you are comfortable with code and one person owns the job, the script is still the cheaper path.

## Frequently asked questions

### Does Hailuo AI have a free API tier?

Don't plan around one. Web app credits and API billing are separate meters, so a full balance in the browser tells you nothing about what the API will let you do.

Run one tested request on your own account and read the balance before and after. If the call is rejected or the balance moves, you have your answer from your own account rather than from a forum post.

### Can I use Hailuo videos commercially?

That's decided by MiniMax's current terms and the plan your account sits on, not by anything in the response body. Read the terms for the account that holds your API key.

Keep a log of which key, model and prompt produced each file. If a client asks where a clip came from, the log answers in a minute, and without it you are reconstructing the history from memory.

### Is there an official Zapier or Make integration for Hailuo?

I found no official one to rely on, so don't build a production flow on the assumption that one exists. Both tools have a generic HTTP step, and that's enough: one step submits the task, a second checks status, a third downloads the file.

Whether it's a script or a visual builder, the hard part is the same. The status check needs a hard deadline, because a visual builder will otherwise keep polling a task that has already failed.

### How long does a Hailuo video take to generate through the API?

It varies with the model, the output settings and how busy the service is, so the only safe design assumes the wait is unpredictable. Generation is asynchronous: you submit, receive a task ID, and come back later.

Never hold a connection open waiting for the result. Poll at a modest interval, stop at your deadline, and treat a timeout as a failure to be logged.

### Can I generate videos in bulk from a spreadsheet?

Yes, and a spreadsheet makes a good job queue. A script reads each row, submits the task, and writes the task ID and status back into that row.

The status column is the control that matters. On a rerun the script skips any row that already has an ID, so a crash halfway through can't resubmit finished work and bill you twice.

![A hand skipping marked eggs to reach the one unmarked egg](https://ap-marketing-media.fra1.cdn.digitaloceanspaces.com/uploads/204b60b2-2f8f-4ee8-9233-0a5737ded651/hailuo-ai-automation-in-2026-setup-steps-limits-ee8a192b.webp)

Keep the submission rate modest, since a burst of requests is the likeliest way to hit a rate limit. Test on a handful of rows before pointing it at the full sheet.

## Related reading

- [How to Make SSO Work: Setup Steps and 2026 Costs](https://www.activepieces.com/blog/how-to-make-sso-work-setup-steps-and-2026-costs)
- [Self Host OpenCode 2.0: Setup Steps, Real Cost and Pitfalls](https://www.activepieces.com/blog/self-host-opencode-2-0-setup-steps-real-cost-and-pitfalls)
- [Automate Poe: API Setup, Limits and Automation Gem](https://www.activepieces.com/blog/automate-poe-api-setup-limits-and-automation-gem)

## References

- [APIModels](https://apimodels.app/docs/minimax-h3)
- [Cre8vid and Picassoia](https://www.cre8vid.com/hailuo-2-3-api-pricing)
- [WaveSpeed](https://wavespeed.ai/docs/docs-api/minimax/hailuo-02/t2v-standard)
