Purpose: This is the official CLI of the MiniMax AI platform, designed for AI agents, capable of generating text, images, video, and speech from any agent or terminal, and supports music generation.
Main capabilities:
- Text: multi-turn conversation, streaming output, system prompts, JSON output.
- Image: text-to-image, with aspect ratio and batch control.
- Video: asynchronous video generation, with progress tracking.
- Speech: TTS (30+ voices, speed control, streaming playback); speech-to-text (json, verbose_json, srt, vtt).
- Vision: image understanding and description.
- Search: web search provided by MiniMax.
- Dual region: seamless support for Global (api.minimax.io) and CN (api.minimaxi.com).
Usage:
- Requires Node.js 18+, and requires a MiniMax Token plan (Global · CN).
- Text chat and text repl use MiniMax-M3.1-Flash-Preview by default; an explicit --model or a saved default text-model takes precedence. This preview version requires M Plan or MiniMax Code; pay-as-you-go keys need to explicitly select MiniMax-M3.
- Authentication: OAuth uses the device authorization grant (RFC 8628) and PKCE, the CLI opens the browser, enter the code, access_token + refresh_token are saved to ~/.mmx/config.json, tokens are refreshed automatically (5-minute buffer), and mmx auth refresh can also be used for manual refresh. API Key authentication probes Global and CN to automatically identify the region, suitable for CI/CD (mmx auth login --api-key sk-xxxxx), and can also be passed per command via --api-key. OAuth and API Key are mutually exclusive; logging in with one clears the other; credential priority: --api-key parameter > OAuth (config) > api_key (config). mmx auth status is the standard way to verify the current authentication status.
- Configuration and quota: mmx config, mmx quota.
- Agent configuration: mmx agent setup can configure MiniMax for Claude Code, Codex, Grok Build, OpenCode, Hermes, Pi, or Oh my Pi while preserving unrelated settings. Run without arguments to enter the interactive wizard; provide arguments for non-interactive use, suitable for scripts. It defaults to MiniMax-M3.1-Flash-Preview for subscription keys and to MiniMax-M3 for pay-as-you-go keys (sk-api-...); in non-interactive mode you can override with --model. Before writing, it validates the key and the selected region, backs up existing files it modifies, and --dry-run lets you preview without making real requests. In the interactive wizard, compatible agents missing from PATH can be installed from a second multi-select list using their official package or install script; the Hermes install uses its official core CLI stage, skipping the optional system packages, Node workspace, browser, computer-use, setup, and gateway stages. After installation mmx applies the MiniMax configuration while preserving the installer's settings; agents that fail platform or prerequisite checks are explained and only configured. Non-interactive invocation only configures; the command does not start the agent. Oh my Pi uses the native ~/.omp/agent/models.yml and config.yml (existing .yaml files are updated in place), and configuration follows OMP_PROFILE / PI_PROFILE, PI_CONFIG_DIR, and the default profile's PI_CODING_AGENT_DIR overrides; run omp once before using setup to migrate legacy JSON-only configuration; interactive installation uses the official prebuilt binary installer and does not require Bun or npm.
Limits:
- MiniMax-H3 pre-checks local files and Base64 data URIs: images 30 MB, reference video 50 MB, reference audio 15 MB, JSON request body 64 MB total; the API validates dimensions, aspect ratio, duration, frame rate, and codec for all media. --region is an existing global CLI option, not an H3 parameter; normal video generation does not need it, and the CLI uses the saved or auto-detected region. H3 text-to-video defaults to 2K, 5 seconds, 16:9.
- mmx speech transcribe accepts wav, aiff, flac, m4a, mp3, aac, opus, ogg, up to 50 MB and 500 seconds; anything over 50 MB is rejected locally before upload, and the 500-second limit is enforced by the API. Omitting --language enables mixed-language recognition. --response-format json (the default) prints the transcription text, verbose_json adds speaker and segment timings, and srt / vtt return subtitle documents; n_speakers and segments are part of the response content and require --output json to be visible. --stream prints incremental text and requires json; when stdout is not a terminal it accumulates into a single JSON result unless --output text is passed. mmx speech recognize is an alias for mmx speech transcribe.
- The /v1/coding_plan/search API returns at most 10 results per call, and no pagination parameter is currently provided; refine the query if you need different results.
- Maintainers publish releases by pushing SemVer Git tags, and the release workflow derives the npm package version from that tag.