PxRouter logoPxRouter

Call MiniMax

Official MiniMax models: Hailuo H3 video, M4 / M3 text, H3 image, speech synthesis, rapid voice cloning and speech recognition, at MiniMax's official prices. The video, speech synthesis (/v1/t2a_v2), voice cloning and speech recognition (/v1/speech_to_text) endpoints match the official MiniMax API: code that already calls it only needs https://pxrouter.com and a PxRouter key. Text, image and speech also work through OpenAI-compatible endpoints.

Create a MiniMax key

In API Keys, create a key in the MiniMax 海螺 group. MiniMax models are only in this group; keys from other groups get a "no available channel" error. All keys of one account share the balance.

Model Use Endpoint
MiniMax-H3 Video, best quality, 768P and 2K, 4–15 s POST /v2/video_generation
MiniMax-H3-Highspeed Video, fast, 480P and 768P, 4–15 s Same
MiniMax-H3-Lite Video, lowest price, 480P and 768P, 4–15 s Same
MiniMax-H3-Max Video, 480P and 768P, 5–15 s Same
MiniMax-H3-Max-Turbo Video, 480P and 768P, 5–15 s Same
MiniMax-M4 Text, newest flagship multimodal, 1M context /v1/chat/completions, /v1/messages
MiniMax-M3 Text, flagship multimodal, 1M context /v1/chat/completions, /v1/messages
MiniMax-M3.1-Flash Text, fast and low-cost, 1M context /v1/chat/completions, /v1/messages
MiniMax-H3-Image Text-to-image and image editing /v1/images/generations, /v1/images/edits
speech-2.8-hd Speech synthesis, HD /v1/audio/speech, /v1/t2a_v2
speech-2.8-turbo Speech synthesis, turbo /v1/audio/speech, /v1/t2a_v2
Rapid voice cloning Upload a voice sample, clone it, speak with it /v1/files/upload, /v1/voice_clone
asr-1.0 Speech recognition (audio to text) /v1/audio/transcriptions, /v1/speech_to_text

MiniMax video (H3)

Submit a task with POST /v2/video_generation. The body is the same as the official MiniMax /v2/video_generation: the content array holds the text and the reference media.

curl https://pxrouter.com/v2/video_generation \
  -H "Authorization: Bearer $PXROUTER_MINIMAX_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "MiniMax-H3-Highspeed",
    "content": [
      {"type": "text", "text": "An orange cat stretching on a windowsill, afternoon sun"}
    ],
    "ratio": "16:9",
    "resolution": "768P",
    "duration": 5
  }'

It returns {"task_id": "..."}. For image-to-video, add a first frame (and optionally a last frame) to content:

{"type": "image_url", "image_url": {"url": "https://example.com/first.png"}, "role": "first_frame"}
Field Description
model See the table above. Required
content Required, with one text item. image_url items take the role first_frame, last_frame (frames) or reference_image (up to 9); video_url with reference_video (up to 3, 15 seconds in total); audio_url with reference_audio (up to 3). Frames cannot be mixed with reference media. Media must be public URLs
resolution Per model, see the table above. Set it: without it the task is reserved at the model's highest resolution and settled at the actual one
duration Whole seconds: 4–15 for H3, Highspeed and Lite, 5–15 for Max and Max-Turbo
ratio adaptive, 21:9, 16:9, 4:3, 1:1, 3:4, 9:16. Text-to-video requires it and does not take adaptive; neither does MiniMax-H3-Lite reference-to-video
aigc_watermark Adds an AI-generated watermark. Optional
extra MiniMax-H3-Max and MiniMax-H3-Max-Turbo only, for example {"prompt_expansion_mode": ...}, forwarded as is

callback_url is not supported; poll the query endpoint.

Query a task with GET /v2/query/video_generation/{task_id}. Tasks usually finish in 1–3 minutes.

{
  "task": {
    "id": "...",
    "model": "MiniMax-H3-Highspeed",
    "status": "succeeded",
    "content": {"url": "https://..."},
    "resolution": "768P",
    "duration": 5,
    "usage": {"output_seconds": 5, "input_seconds": 0, "input_image_count": 0}
  }
}

status is queued, running, succeeded or failed. On success task.content.url is the video; download it promptly. On failure task.error.message gives the reason.

MiniMax video billing

Video is billed per output second and settled on the actual task.usage. Input reference video is billed per second, and input images beyond the free count per image.

Model Resolution Output video / s Input video / s Input images
MiniMax-H3 768P $0.08 $0.08 First 5 free, then $0.04 each
MiniMax-H3 2K $0.13 $0.13 Same
MiniMax-H3-Highspeed 480P $0.04 $0.04 First 5 free, then $0.03 each
MiniMax-H3-Highspeed 768P $0.06 $0.06 Same
MiniMax-H3-Lite 480P $0.025 $0.025 First 5 free, then $0.02 each
MiniMax-H3-Lite 768P $0.04 $0.04 Same
MiniMax-H3-Max 480P $0.05 $0.0553 First 2 free, then $0.074 each
MiniMax-H3-Max 768P $0.08 $0.143 Same
MiniMax-H3-Max-Turbo 480P $0.025 ($0.05 reference-to-video) $0.04 First 2 free, then $0.06 each
MiniMax-H3-Max-Turbo 768P $0.04 ($0.08 reference-to-video) $0.12 Same

For example, a 5-second 480P MiniMax-H3-Highspeed text-to-video task costs $0.20. A task is reserved at the requested duration and resolution (15 seconds without duration, and 15 seconds of input with reference video) and settled at the actual usage; failed tasks are refunded in full.

MiniMax text (M4, M3)

OpenAI-compatible POST /v1/chat/completions with base_url set to https://pxrouter.com/v1:

from openai import OpenAI

client = OpenAI(base_url="https://pxrouter.com/v1", api_key="sk-...")
response = client.chat.completions.create(
    model="MiniMax-M3",
    messages=[{"role": "user", "content": "Introduce yourself in one sentence"}],
)
print(response.choices[0].message.content)

The Anthropic Messages API POST /v1/messages works too (Anthropic SDK base_url https://pxrouter.com, without /v1), written as under Call Claude with the model MiniMax-M4, MiniMax-M3 or MiniMax-M3.1-Flash. Both endpoints stream.

Prices per million tokens:

Model Input Output Cache read
MiniMax-M4 $0.80 $3.10 $0.05
MiniMax-M3 (input ≤ 512k) $0.30 $1.20 $0.06
MiniMax-M3 (input > 512k) $0.60 $2.40 $0.12
MiniMax-M3.1-Flash $0.15 $0.60 $0.015

MiniMax-M4 has one rate across its 1M context; a MiniMax-M3 request with more than 512k input tokens is billed entirely at the > 512k row. Thinking tokens bill as output.

MiniMax-M4 always thinks and cannot turn it off (thinking: {"type": "disabled"} or reasoning_effort: "none" returns 400). Effort is low, medium, high, xhigh or max, default max, which produces many output tokens; lower it to save cost with reasoning_effort on the OpenAI endpoint or output_config.effort on the Anthropic endpoint.

MiniMax image (H3-Image)

Text-to-image with POST /v1/images/generations:

curl https://pxrouter.com/v1/images/generations \
  -H "Authorization: Bearer $PXROUTER_MINIMAX_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "MiniMax-H3-Image",
    "prompt": "An old canal town after snow, early morning mist",
    "aspect_ratio": "16:9",
    "area": "2K"
  }'

Image editing with POST /v1/images/edits: images holds 1–16 reference images (public URLs or data:image/png;base64,...), or upload image[] files as multipart.

{
  "model": "MiniMax-H3-Image",
  "prompt": "Replace the cat in image 1 with the Shiba Inu in image 2, keep the background",
  "images": [{"image_url": "https://example.com/cat.jpg"}, {"image_url": "https://example.com/dog.png"}]
}
Field Description
size auto (default) or WIDTHxHEIGHT such as 2720x1536; with WIDTHxHEIGHT, leave out aspect_ratio and area
aspect_ratio auto (default) or X:Y, from 1:3 to 3:1
area 1K, 2K or 4K, default 4K
n 1–10, default 1
response_format url (default) or b64_json
output_format jpeg (default), png or webp
disable_prompt_enhanced Turns prompt enhancement off (on by default); then set the ratio with size or aspect_ratio

stream is not supported. The url is temporary; download the image promptly.

Billing per million tokens: input text $2.30 (prompt enhancement included), input images $1.50, output images $3.80. For example, about $0.022 per 1K text-to-image, $0.023 per 2K and $0.069 per 4K; without area the output is 4K. MiniMax's limited-time 4K discount does not apply. Settled on actual usage; failed requests are not charged.

MiniMax speech synthesis

OpenAI-compatible POST /v1/audio/speech:

curl https://pxrouter.com/v1/audio/speech \
  -H "Authorization: Bearer $PXROUTER_MINIMAX_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "speech-2.8-hd",
    "input": "Hello, welcome to PxRouter.",
    "voice": "male-qn-qingse",
    "response_format": "mp3"
  }' \
  -o hello.mp3

voice is a MiniMax system voice ID (see MiniMax's voice list); speed sets the speed. response_format takes mp3 (default), wav, flac, pcm or opus; aac is not supported. Other native MiniMax fields (voice_setting, audio_setting, language_boost, voice_modify and so on) go in metadata and are forwarded as is. The response is the audio file itself.

Billing per character: speech-2.8-hd $100 and speech-2.8-turbo $60 per million characters, settled on the character count MiniMax reports; one Chinese character counts as 2.

The native MiniMax endpoint POST /v1/t2a_v2 also works, with the official request and response (text, voice_setting, audio_setting, timbre_weights, output_format, stream and so on). It returns JSON with the audio in data.audio (hex or a link), or an event stream with stream: true:

curl https://pxrouter.com/v1/t2a_v2 \
  -H "Authorization: Bearer $PXROUTER_MINIMAX_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "speech-2.8-hd",
    "text": "Hello, welcome to PxRouter.",
    "voice_setting": {"voice_id": "male-qn-qingse"},
    "audio_setting": {"format": "mp3"}
  }'

It is billed like /v1/audio/speech.

MiniMax rapid voice cloning

Clone a voice from a 10-second to 5-minute recording, then use it in speech synthesis like a system voice. The three endpoints match the official MiniMax API:

  1. Upload the sample: POST /v1/files/upload (multipart) with purpose set to voice_clone and an mp3, m4a or wav file of up to 20 MB. The response carries file.file_id.
  2. Clone the voice: POST /v1/voice_clone.
  3. Synthesize: put the voice_id you chose in voice_setting.voice_id of /v1/t2a_v2 (or voice of /v1/audio/speech).
# 1. Upload the sample
curl https://pxrouter.com/v1/files/upload \
  -H "Authorization: Bearer $PXROUTER_MINIMAX_KEY" \
  -F purpose=voice_clone \
  -F [email protected]

# 2. Clone (file_id from step 1)
curl https://pxrouter.com/v1/voice_clone \
  -H "Authorization: Bearer $PXROUTER_MINIMAX_KEY" \
  -H "Content-Type: application/json" \
  -d '{"file_id": 123456789, "voice_id": "MyVoice001"}'

# 3. Speak with the cloned voice
curl https://pxrouter.com/v1/t2a_v2 \
  -H "Authorization: Bearer $PXROUTER_MINIMAX_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "speech-2.8-hd", "text": "This is my cloned voice.", "voice_setting": {"voice_id": "MyVoice001"}}'
Field Description
file_id Required, the ID returned in step 1
voice_id Required, a name you choose: 8–191 characters, starting with a letter, using letters, digits, - and _, not ending with - or _
clone_prompt Optional, {"prompt_audio": file ID, "prompt_text": "what the sample says"} for closer similarity; the sample is under 8 seconds and uploaded with purpose prompt_audio
text, model Optional; with them the response includes a preview (demo_audio). model is speech-2.8-hd or speech-2.8-turbo
need_noise_reduction, need_volume_normalization, language_boost, text_validation, accuracy, aigc_watermark Optional, as in the official API

POST /v1/get_voice lists the system voices and your cloned voices (a cloned voice appears once it has synthesized speech), and POST /v1/delete_voice deletes one ({"voice_type": "voice_cloning", "voice_id": "MyVoice001"}).

  • Uploaded files and cloned voices belong to your account: every key of the account can use them, and other accounts cannot see or use them. Different accounts may choose the same voice_id without affecting each other. After a deletion you may clone again under the same name.
  • MiniMax deletes a cloned voice that does not synthesize speech within 7 days; once used, it stays.
  • Clone only your own voice or one you are authorized to use.

Billing: uploading, cloning, listing and deleting are free. Each cloned voice carries a $1.5 cloning fee, charged once, on its first speech synthesis, as part of that request (your balance must cover it). A preview generated with text while cloning is billed per character at the speech synthesis rate.

MiniMax speech recognition

POST /v1/audio/transcriptions (OpenAI-compatible), or MiniMax's native POST /v1/speech_to_text with the same fields:

curl https://pxrouter.com/v1/audio/transcriptions \
  -H "Authorization: Bearer $PXROUTER_MINIMAX_KEY" \
  -F model=asr-1.0 \
  -F [email protected] \
  -F response_format=verbose_json
from openai import OpenAI

client = OpenAI(base_url="https://pxrouter.com/v1", api_key="sk-...")
with open("meeting.mp3", "rb") as f:
    result = client.audio.transcriptions.create(model="asr-1.0", file=f)
print(result.text)
Field Description
file Audio file, required: wav, aiff, flac, m4a, mp3, aac, opus or ogg, up to 500 seconds and 50 MB
model asr-1.0
response_format json (default, text and duration), verbose_json (adds segments, timestamps and speakers), srt or vtt (subtitles)
timestamp_level sentence (default) or word (per character for Chinese, per word for English); verbose_json, srt and vtt only
language Main language hint such as zh, en, ja or yue; without it the language is detected and mixed Chinese–English works. Send it as a form field or as a language header

json returns {"text": "...", "duration": 2.71}. Streaming (stream) and the text format are not supported.

Billing: $0.38 per hour of audio, with partial seconds rounded up. json and verbose_json settle on the duration MiniMax returns, srt and vtt on the uploaded file's duration. Failed requests are not charged.

Contact us: pricing, volume and support

Need volume pricing, a dedicated discount group, higher concurrency or integration help? Reach out and mention "API partnership" with your expected volume.