Skip to content

About

Python client and examples for the MiniMax H4 API keyword. H4 is an unconfirmed watchlist; works today with live MiniMax H3 video endpoints (text, image, reference to video) on Muapi.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

MiniMax H4 API: Python Client and Examples (watchlist, with working MiniMax H3 endpoints via Muapi)

Powered by MuAPI License: MIT Python 3.9+

Status: MiniMax H4 is an unconfirmed watchlist item. MiniMax has not announced or released an H4 model, and Muapi has no H4 endpoint. This repository does not describe H4 specs, pricing or parameters because none exist. What works today is the live MiniMax H3 family on Muapi. The client is built so you can switch to H4 by changing one environment variable if and when Muapi publishes H4 endpoints. Track the page at muapi.ai/minimax-h4.

Related Projects

Sibling H4-watchlist projects: minimax-h4-comfyui, minimax-h4-mcp and n8n-nodes-minimax-h4.

Links: Muapi · MiniMax H4 page · MiniMax H3 page · API keys

Is MiniMax H4 API available?

No. MiniMax H4 has not been announced, and there is no H4 endpoint on Muapi. Use MiniMax H3 today.

Live MiniMax endpoints on Muapi

Parameters below are taken from the MiniMax-H3-API client.

Workflow Endpoint Fields
Text to video POST /api/v1/minimax-h3-text-to-video prompt, aspect_ratio (default 16:9), resolution (default 2k), duration (default 5)
Image to video POST /api/v1/minimax-h3-image-to-video prompt, image_url, optional last_image_url, resolution, duration
Reference to video POST /api/v1/minimax-h3-reference-to-video prompt, reference_images, reference_videos, reference_audios, aspect_ratio, resolution, duration (at least one reference image or video; audio only alongside them)
Poll result GET /api/v1/predictions/{request_id}/result path request_id

All requests use the x-api-key header. Check muapi.ai/minimax-h3 for current limits and pricing.

Installation

git clone https://github.com/Anil-matcha/MiniMax-H4-API.git
cd MiniMax-H4-API
pip install -r requirements.txt
export MUAPI_API_KEY="your_muapi_api_key"   # get one at https://muapi.ai/access-keys

Python

from minimax_api import MiniMaxAPI

api = MiniMaxAPI()  # MINIMAX_MODEL defaults to "minimax-h3"
job = api.text_to_video("A cinematic tracking shot of a silver sports car in a rainy city at night")
print(api.wait_for_completion(job["request_id"]))
python -m examples.text_to_video
MUAPI_INPUT_IMAGE_URL=https://example.com/a.jpg python -m examples.image_to_video
MUAPI_REFERENCE_IMAGE_URL=https://example.com/a.jpg python -m examples.reference_to_video

Switching models with MINIMAX_MODEL

The client builds slugs as <MINIMAX_MODEL>-text-to-video, <MINIMAX_MODEL>-image-to-video and <MINIMAX_MODEL>-reference-to-video. The default is minimax-h3.

Unverified assumption: if Muapi ever publishes H4, the slugs might be minimax-h4-*. That naming is a guess, not a confirmed fact. Do not set MINIMAX_MODEL=minimax-h4 today; the request will be rejected because no such endpoint exists. Verify the real slug on muapi.ai/minimax-h4 first.

cURL

curl -X POST "https://api.muapi.ai/api/v1/minimax-h3-text-to-video" \
  -H "x-api-key: ${MUAPI_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{"prompt":"A lone astronaut in a field of bioluminescent flowers","aspect_ratio":"16:9","resolution":"2k","duration":5}'

# Response: {"request_id":"REQUEST_ID"}
curl "https://api.muapi.ai/api/v1/predictions/REQUEST_ID/result" -H "x-api-key: ${MUAPI_API_KEY}"

Node.js

MUAPI_API_KEY="your_muapi_api_key" node examples/poll.js

Tests

pip install pytest && python -m pytest -q

The tests are mocked and make no network calls.

FAQ

Is MiniMax H4 API available? No. It is not announced and Muapi has no H4 endpoint.

What can I use now? MiniMax H3 text-, image- and reference-to-video on Muapi.

Will this repo work with H4? Possibly, by setting MINIMAX_MODEL, but the H4 slug and parameters are unknown until Muapi publishes them.

Is this an official MiniMax SDK? No. It is a client for Muapi's MiniMax endpoints.

License

MIT. See LICENSE.

About

Python client and examples for the MiniMax H4 API keyword. H4 is an unconfirmed watchlist; works today with live MiniMax H3 video endpoints (text, image, reference to video) on Muapi.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages