Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

MiniMax Media API Examples with Muapi

Compare MiniMax video, speech, and music generation workflows exposed through Muapi's unified REST API. This guide covers Muapi endpoints; it does not document MiniMax's direct API or its full text and chat models.

Related Projects

Overview

Muapi accepts authenticated requests at https://api.muapi.ai/api/v1/{endpoint}. A successful generation submission returns a request_id; poll the result endpoint until completion. The examples use x-api-key authentication.

Endpoint comparison

Workflow Muapi endpoint Catalog price shown in Muapi Choose it for
Hailuo 2.3 Pro text-to-video POST /api/v1/minimax-hailuo-2.3-pro-t2v $0.63/request Prompt-driven video generation with a fixed per-request catalog price.
H3 Max text-to-video POST /api/v1/minimax-h3-max-text-to-video Check current model page Higher-control video generation; current price may depend on duration and promotional pricing.
Speech 2.6 HD text-to-speech POST /api/v1/minimax-speech-2.6-hd Check current model page Converting text to generated speech audio.
Music 3.0 text-to-music POST /api/v1/minimax-music-3.0 $0.20/song Generating a song from a prompt and required lyrics; instrumental settings are available.

Prices are Muapi catalog values, not MiniMax direct API rates, and can change. Confirm the current endpoint page before estimating production costs. These four examples represent separate video, speech, and music workflows; use the linked endpoint reference for supported fields, limits, and output structure.

Choosing an endpoint

Compare endpoints against the same input and output goal:

  1. Task: prompt-to-video, text-to-speech, or prompt-to-music.
  2. Input contract: Hailuo and H3 Max accept video prompts; speech accepts text and voice settings; Music accepts a prompt and optional lyrics/instrumental controls.
  3. Output needs: check supported duration, aspect ratio, resolution, voice, lyrics, and audio output options on the endpoint reference before integrating. Hailuo 2.3 Pro T2V currently takes a prompt and fixed 1080p output in its listed schema; do not send controls copied from another Hailuo or H3 endpoint.
  4. Price basis: compare per-request, per-song, or current duration-based pricing as displayed for the selected endpoint.
  5. Quality and latency: evaluate motion consistency, prompt adherence, speech pronunciation, and musical style on representative samples.
  6. Failure handling: submissions are asynchronous; poll and handle completed and failed task statuses explicitly.

Quick start with cURL

Create a key in the Muapi dashboard and set it in your shell. Do not commit the key:

export MUAPI_API_KEY="your-api-key"

Submit a Hailuo 2.3 Pro video request:

curl -X POST "https://api.muapi.ai/api/v1/minimax-hailuo-2.3-pro-t2v" \
  -H "x-api-key: ${MUAPI_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{"prompt":"A cinematic train crossing a bridge at blue hour"}'

Poll the returned request ID:

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

Other request examples

H3 Max text-to-video:

curl -X POST "https://api.muapi.ai/api/v1/minimax-h3-max-text-to-video" \
  -H "x-api-key: ${MUAPI_API_KEY}" -H "Content-Type: application/json" \
  -d '{"prompt":"A cinematic tracking shot of a silver car driving through a rain-soaked city at night","aspect_ratio":"16:9","resolution":"1080p","duration":6}'

Speech 2.6 HD text-to-speech:

curl -X POST "https://api.muapi.ai/api/v1/minimax-speech-2.6-hd" \
  -H "x-api-key: ${MUAPI_API_KEY}" -H "Content-Type: application/json" \
  -d '{"prompt":"Welcome to the show.","voice_id":"English_Graceful_Lady"}'

Music 3.0:

curl -X POST "https://api.muapi.ai/api/v1/minimax-music-3.0" \
  -H "x-api-key: ${MUAPI_API_KEY}" -H "Content-Type: application/json" \
  -d '{"prompt":"Warm acoustic folk song about a road trip at sunrise","lyrics":"[Verse]\\nDriving through the golden light\\nThe open road feels right"}'

Python example

Requires Python 3.9+ and requests. Install with python -m pip install -r requirements.txt. Submit and poll one of the four sample jobs:

python examples/submit.py hailuo
python examples/submit.py h3-max
python examples/submit.py speech
python examples/submit.py music

The script prints the result JSON and does not download generated media. Review each linked model reference before adapting payloads; request schemas are endpoint-specific.