MiniMax Video Generation
Hailuo-Quality Video Without a GPU in Sight
- first_frame_image
- last_frame_image
- task_id
The MiniMax Video Generation node is the flagship of the ComfyUI-JM-MiniMax-API pack, and it's the node that answers a very specific question: what if you want Hailuo-quality video but don't have the GPU (or the patience) to run a video model locally?
Quick context: Hailuo is MiniMax's video model, and it sits in the same closed-source club as Kling, Veo, and Wan's API - the commercial video services the community compares when open-weight models don't cut it. This node is the front door to that service from inside ComfyUI. It handles text-to-video, image-to-video, and subject-referenced video, submits the job to MiniMax's cloud, and hands you a task_id to track.
How it works
The node POSTs to https://api.minimaxi.chat/v1/video_generation with your model, prompt, and settings. Any images you connect are converted from ComfyUI's tensor format into base64 JPEG and embedded in the request - the node enforces MiniMax's image rules itself (aspect ratio between 2:5 and 5:2, short side at least 300px, under 20MB). The response is a task_id, because video generation is asynchronous: the actual render happens server-side, which is why this node is always followed by Check Video Status and then Download Video.
The inputs that matter
- api_key - the pack-wide MiniMax key.
- model - the big list:
T2V-01-DirectorandT2V-01for text-to-video,I2V-01-Director/I2V-01/I2V-01-livefor image-to-video,S2V-01for subject-referenced, andMiniMax-Hailuo-02(the default, and the current best). Pick the mode, then the model. - prompt - up to 2,000 characters. With the Director models you can embed camera-movement brackets like
[左移](pan left),[推进](push in),[变焦拉近](zoom in) - yes, they're in Chinese, that's the API's native vocabulary. - prompt_optimizer - defaults to true, which means MiniMax rewrites your prompt for you. Leave it on unless you've already tuned your wording.
The optional inputs are where Hailuo's advantage shows:
- first_frame_image / last_frame_image - image inputs for I2V.
last_frame_imageis Hailuo-only (it generates a video ending on that frame) and doesn't work at 512P. For text-to-video, leave them empty. - duration -
6or10seconds. The 01-series is locked to 6s; Hailuo does 10s but not at 1080P. - resolution -
512P,768P(default),1080P. Only applies to Hailuo; the 01-series is fixed at 720P. The node validates the combos and raises before calling the API if you pick something impossible. - callback_url - optional; MiniMax will POST status updates there instead of you polling.
Output
One string: task_id. That's it - this node never produces video, it produces a job number. Wire it into Check Video Status.
Common issues
The mode detection is strict: pick an I2V model without connecting a first_frame_image and it refuses; pick a T2V model with an empty prompt and it refuses. Both raise clear errors.
The one that confuses everyone: error 2013 with the message "group_id can not access video 02" - that means your account isn't whitelisted for the Hailuo-02 model. The node even special-cases this message and tells you to check your MiniMax account permissions. Not a bug, just an access gate.
Install
Part of the ComfyUI-JM-MiniMax-API pack:
cd ComfyUI/custom_nodes
git clone https://github.com/synthetai/ComfyUI-JM-MiniMax-API
pip install -r requirements.txt
Or search "ComfyUI-JM-MiniMax-API" in ComfyUI Manager, then restart. Dependencies are just requests and Pillow - the video renders on MiniMax's machines, so the node itself is featherweight. Your MiniMax API key is the real requirement, and every render is a paid cloud call.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| api_key | STRING | — | |
| model | COMBO | MiniMax-Hailuo-02 | 7 options: T2V-01-Director, T2V-01, I2V-01-Director, I2V-01, I2V-01-live, S2V-01, +1 |
| prompt | STRING | — | |
| prompt_optimizer | BOOLEAN | true | — |
| first_frame_imageopt | IMAGE | For text-to-video: leave empty. For image-to-video: required for I2V models, optional for others. MiniMax-Hailuo-02 with 512P in I2V mode requires this. | |
| last_frame_imageopt | IMAGE | Only supported by MiniMax-Hailuo-02 model. Model will generate video ending with this frame. Not supported with 512P resolution. Leave empty for text-to-video. | |
| durationopt | COMBO | 6 | Video duration in seconds. 01 series: only 6s. MiniMax-Hailuo-02: 6s or 10s (10s only available for 512P and 768P resolution). |
| resolutionopt | COMBO | 768P | Video resolution. Only applicable to MiniMax-Hailuo-02 model. 01 series uses fixed 720P resolution. |
| callback_urlopt | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| task_id | STRING | — |