{"id":17813,"library":"mmx-cli","title":"CLI for MiniMax AI Platform","description":"The `mmx-cli` package provides the official command-line interface for interacting with the MiniMax AI Platform, enabling users and AI agents to programmatically access various AI capabilities. This robust CLI, currently at version 1.0.11, supports a wide array of generative AI tasks including multi-turn text chat with streaming and JSON output, text-to-image generation with aspect ratio controls, asynchronous video generation with progress tracking, text-to-speech with over 30 voices, and text-to-music generation including lyrical and instrumental modes. It also features image understanding (vision) and web search integration. Designed for both direct terminal use and integration into AI agents (e.g., OpenClaw, Cursor, Claude Code), it emphasizes ease of use for rapid prototyping and deployment of AI-powered workflows. The CLI offers seamless support for both Global (`api.minimax.io`) and CN (`api.minimaxi.com`) platform regions. While a specific release cadence isn't published, the frequent updates to generative AI models suggest active development and maintenance.","status":"active","version":"1.0.11","language":"javascript","source_language":"en","source_url":null,"tags":["javascript"],"install":[{"cmd":"npm install mmx-cli","lang":"bash","label":"npm"},{"cmd":"yarn add mmx-cli","lang":"bash","label":"yarn"},{"cmd":"pnpm add mmx-cli","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"The `mmx` command is made globally available by installing the package. This tool is primarily a CLI and not designed for direct programmatic import into JavaScript/TypeScript applications.","wrong":"import { mmx } from 'mmx-cli'","symbol":"mmx","correct":"npm install -g mmx-cli"},{"note":"The `npx` utility allows executing `mmx-cli` commands without a global installation, ensuring the latest version is used on demand and avoiding global package pollution.","wrong":"const mmx = require('mmx-cli')","symbol":"npx mmx","correct":"npx mmx text chat --message \"Hello\""},{"note":"For AI agents (e.g., OpenClaw, Cursor, Claude Code), `mmx-cli` can be integrated as a skill via `npx skills`, making its capabilities accessible within the agent's environment.","symbol":"skills add MiniMax-AI/cli","correct":"npx skills add MiniMax-AI/cli -y -g"}],"quickstart":{"code":"# Authenticate with your API key\nmmx auth login --api-key sk-xxxxx-YOUR_API_KEY_HERE\n\n# Generate text: What is MiniMax?\nmmx text chat --message \"What is MiniMax?\"\n\n# Generate an image: A cat in a spacesuit\nmmx image \"A cat in a spacesuit\"\n\n# Synthesize speech: \"Hello!\" to an MP3 file\nmmx speech synthesize --text \"Hello!\" --out hello.mp3\n\n# Generate video: Ocean waves at sunset\nmmx video generate --prompt \"Ocean waves at sunset\"\n\n# Generate music: Upbeat pop with lyrics\nmmx music generate --prompt \"Upbeat pop\" --lyrics \"[verse] La da dee, sunny day\"\n\n# Perform a web search: MiniMax AI latest news\nmmx search \"MiniMax AI latest news\"\n\n# Analyze an image (replace photo.jpg with your image path)\nmmx vision photo.jpg\n\n# Check your current quota usage\nmmx quota","lang":"bash","description":"Demonstrates authentication, text, image, speech, video, music, search, and vision generation, plus quota checking using the `mmx` CLI, showcasing its core functionalities."},"warnings":[{"fix":"Upgrade Node.js to version 18 or newer. Use a Node.js version manager like `nvm` (e.g., `nvm install 18 && nvm use 18`).","message":"The `mmx-cli` requires Node.js version 18 or higher to function correctly. Older Node.js versions may lead to installation failures or runtime errors.","severity":"gotcha","affected_versions":"<18.0.0"},{"fix":"Obtain an API key from the MiniMax platform and authenticate using `mmx auth login --api-key sk-xxxxx`. Ensure your token plan is active.","message":"A MiniMax API key is mandatory for using any of the AI capabilities provided by the CLI. Attempts to use commands without prior authentication will result in authorization errors.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"For project-specific use or to avoid global pollution, prefer `npx mmx <command>` instead of global installation. If global installation is desired, periodically update with `npm update -g mmx-cli`.","message":"While `npm install -g mmx-cli` makes the `mmx` command globally available, it can lead to versioning conflicts if multiple projects require different CLI versions. Using `npx mmx ...` ensures you always run the latest or a project-specific version without global installation.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-04-23T00:00:00.000Z","next_check":"2026-07-22T00:00:00.000Z","problems":[{"fix":"Install globally with `npm install -g mmx-cli` or execute on demand using `npx mmx <command>`.","cause":"The `mmx-cli` package is not installed globally or is not in your system's PATH, or you are trying to run it without `npx`.","error":"mmx: command not found"},{"fix":"Authenticate using `mmx auth login --api-key sk-xxxxx` with a valid and active API key. Ensure your token plan has sufficient quota.","cause":"The MiniMax API key is either not set, incorrect, or expired. The CLI could not authenticate with the MiniMax platform.","error":"Error: Unauthorized - Invalid API Key or missing authentication."},{"fix":"Consult the MiniMax documentation or use `mmx text chat --help` to find available models for the specific command, or use a default model.","cause":"The `--model` flag was used with a model name that is not supported by the MiniMax API or the specified command.","error":"Error: Invalid model specified. Available models are: [list of models]"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}