$npx -y skills add nguyenphp/antigravity-marketing --skill minimax-multimodal-toolkitUse mmx to generate text, images, video, speech, and music via the MiniMax AI platform. Use when the user wants to create media content, chat with MiniMax models, perform web search, or manage MiniMax API resources from the terminal.
| 1 | # MiniMax CLI — Agent Skill Guide |
| 2 | |
| 3 | Use `mmx` to generate text, images, video, speech, music, and perform web search via the MiniMax AI platform. |
| 4 | |
| 5 | ## Prerequisites |
| 6 | |
| 7 | ```bash |
| 8 | # Install |
| 9 | npm install -g mmx-cli |
| 10 | |
| 11 | # Auth (persisted to ~/.mmx/credentials.json) |
| 12 | mmx auth login --api-key sk-xxxxx |
| 13 | |
| 14 | # Or pass per-call |
| 15 | mmx text chat --api-key sk-xxxxx --message "Hello" |
| 16 | ``` |
| 17 | |
| 18 | Region is auto-detected. Override with `--region global` or `--region cn`. |
| 19 | |
| 20 | --- |
| 21 | |
| 22 | ## Agent Flags |
| 23 | |
| 24 | Always use these flags in non-interactive (agent/CI) contexts: |
| 25 | |
| 26 | | Flag | Purpose | |
| 27 | |---|---| |
| 28 | | `--non-interactive` | Fail fast on missing args instead of prompting | |
| 29 | | `--quiet` | Suppress spinners/progress; stdout is pure data | |
| 30 | | `--output json` | Machine-readable JSON output | |
| 31 | | `--async` | Return task ID immediately (video generation) | |
| 32 | | `--dry-run` | Preview the API request without executing | |
| 33 | | `--yes` | Skip confirmation prompts | |
| 34 | |
| 35 | --- |
| 36 | |
| 37 | ## Commands |
| 38 | |
| 39 | ### text chat |
| 40 | |
| 41 | Chat completion. Default model: `MiniMax-M2.7`. |
| 42 | |
| 43 | ```bash |
| 44 | mmx text chat --message <text> [flags] |
| 45 | ``` |
| 46 | |
| 47 | | Flag | Type | Description | |
| 48 | |---|---|---| |
| 49 | | `--message <text>` | string, **required**, repeatable | Message text. Prefix with `role:` to set role (e.g. `"system:You are helpful"`, `"user:Hello"`) | |
| 50 | | `--messages-file <path>` | string | JSON file with messages array. Use `-` for stdin | |
| 51 | | `--system <text>` | string | System prompt | |
| 52 | | `--model <model>` | string | Model ID (default: `MiniMax-M2.7`) | |
| 53 | | `--max-tokens <n>` | number | Max tokens (default: 4096) | |
| 54 | | `--temperature <n>` | number | Sampling temperature (0.0, 1.0] | |
| 55 | | `--top-p <n>` | number | Nucleus sampling threshold | |
| 56 | | `--stream` | boolean | Stream tokens (default: on in TTY) | |
| 57 | | `--tool <json-or-path>` | string, repeatable | Tool definition JSON or file path | |
| 58 | |
| 59 | ```bash |
| 60 | # Single message |
| 61 | mmx text chat --message "user:What is MiniMax?" --output json --quiet |
| 62 | |
| 63 | # Multi-turn |
| 64 | mmx text chat \ |
| 65 | --system "You are a coding assistant." \ |
| 66 | --message "user:Write fizzbuzz in Python" \ |
| 67 | --output json |
| 68 | |
| 69 | # From file |
| 70 | cat conversation.json | mmx text chat --messages-file - --output json |
| 71 | ``` |
| 72 | |
| 73 | **stdout**: response text (text mode) or full response object (json mode). |
| 74 | |
| 75 | --- |
| 76 | |
| 77 | ### image generate |
| 78 | |
| 79 | Generate images. Model: `image-01`. |
| 80 | |
| 81 | ```bash |
| 82 | mmx image generate --prompt <text> [flags] |
| 83 | ``` |
| 84 | |
| 85 | | Flag | Type | Description | |
| 86 | |---|---|---| |
| 87 | | `--prompt <text>` | string, **required** | Image description | |
| 88 | | `--aspect-ratio <ratio>` | string | e.g. `16:9`, `1:1` | |
| 89 | | `--n <count>` | number | Number of images (default: 1) | |
| 90 | | `--subject-ref <params>` | string | Subject reference: `type=character,image=path-or-url` | |
| 91 | | `--out-dir <dir>` | string | Download images to directory | |
| 92 | | `--out-prefix <prefix>` | string | Filename prefix (default: `image`) | |
| 93 | |
| 94 | ```bash |
| 95 | mmx image generate --prompt "A cat in a spacesuit" --output json --quiet |
| 96 | # stdout: image URLs (one per line in quiet mode) |
| 97 | |
| 98 | mmx image generate --prompt "Logo" --n 3 --out-dir ./gen/ --quiet |
| 99 | # stdout: saved file paths (one per line) |
| 100 | ``` |
| 101 | |
| 102 | --- |
| 103 | |
| 104 | ### video generate |
| 105 | |
| 106 | Generate video. Default model: `MiniMax-Hailuo-2.3`. This is an async task — by default it polls until completion. |
| 107 | |
| 108 | ```bash |
| 109 | mmx video generate --prompt <text> [flags] |
| 110 | ``` |
| 111 | |
| 112 | | Flag | Type | Description | |
| 113 | |---|---|---| |
| 114 | | `--prompt <text>` | string, **required** | Video description | |
| 115 | | `--model <model>` | string | `MiniMax-Hailuo-2.3` (default) or `MiniMax-Hailuo-2.3-Fast` | |
| 116 | | `--first-frame <path-or-url>` | string | First frame image | |
| 117 | | `--callback-url <url>` | string | Webhook URL for completion | |
| 118 | | `--download <path>` | string | Save video to specific file | |
| 119 | | `--async` | boolean | Return task ID immediately | |
| 120 | | `--no-wait` | boolean | Same as `--async` | |
| 121 | | `--poll-interval <seconds>` | number | Polling interval (default: 5) | |
| 122 | |
| 123 | ```bash |
| 124 | # Non-blocking: get task ID |
| 125 | mmx video generate --prompt "A robot." --async --quiet |
| 126 | # stdout: {"taskId":"..."} |
| 127 | |
| 128 | # Blocking: wait and get file path |
| 129 | mmx video generate --prompt "Ocean waves." --download ocean.mp4 --quiet |
| 130 | # stdout: ocean.mp4 |
| 131 | ``` |
| 132 | |
| 133 | ### video task get |
| 134 | |
| 135 | Query status of a video generation task. |
| 136 | |
| 137 | ```bash |
| 138 | mmx video task get --task-id <id> [--output json] |
| 139 | ``` |
| 140 | |
| 141 | ### video download |
| 142 | |
| 143 | Download a completed video by task ID. |
| 144 | |
| 145 | ```bash |
| 146 | mmx video download --file-id <id> [--out <path>] |
| 147 | ``` |
| 148 | |
| 149 | --- |
| 150 | |
| 151 | ### speech synthesize |
| 152 | |
| 153 | Text-to-speech. Default model: `speech-2.8-hd`. Max 10k chars. |
| 154 | |
| 155 | ```bash |
| 156 | mmx speech synthesize --text <text> [flags] |
| 157 | ``` |
| 158 | |
| 159 | | Flag | Type | Description | |
| 160 | |---|---|---| |
| 161 | | `--text <text>` | string | Text to synthesize | |
| 162 | | `--text-file <path>` | string | Read text from file. Use `-` for stdin | |
| 163 | | `--model <model>` | string | `speech-2.8-hd` (default), `speech-2.6`, `speech-02` | |
| 164 | | `--voice <id>` | string | Voice ID (default: `English_expressive_narrator`) |