mmx-cli 1.0.19 → 1.0.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -19
- package/dist/index.d.ts +3 -86
- package/dist/mmx.mjs +287 -292
- package/dist/sdk.mjs +458 -411
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
<img src="https://file.cdn.minimax.io/public/MMX.png" alt="MiniMax" width="100%" />
|
|
1
|
+
<img src="https://file.cdn.minimax.io/public/MMX-capabilities.png" alt="MiniMax" width="100%" />
|
|
2
2
|
|
|
3
3
|
<p align="center">
|
|
4
4
|
<strong>The official CLI for the MiniMax AI Platform</strong><br>
|
|
5
|
-
Built for AI agents. Generate text, images, video,
|
|
5
|
+
Built for AI agents. Generate text, images, video, and speech — from any agent or terminal.
|
|
6
6
|
</p>
|
|
7
7
|
|
|
8
8
|
<p align="center">
|
|
@@ -21,12 +21,11 @@
|
|
|
21
21
|
- **Image** — Text-to-image with aspect ratio and batch controls
|
|
22
22
|
- **Video** — Async video generation with progress tracking
|
|
23
23
|
- **Speech** — TTS with 30+ voices, speed control, streaming playback
|
|
24
|
-
- **Music** — Text-to-music with lyrics, instrumental mode, auto lyrics, and cover generation from reference audio
|
|
25
24
|
- **Vision** — Image understanding and description
|
|
26
25
|
- **Search** — Web search powered by MiniMax
|
|
27
26
|
- **Dual Region** — Seamless Global (`api.minimax.io`) and CN (`api.minimaxi.com`) support
|
|
28
27
|
|
|
29
|
-
<img src="https://file.cdn.minimax.io/public/MMX-CLI.png" alt="MiniMax" width="100%" />
|
|
28
|
+
<img src="https://file.cdn.minimax.io/public/MMX-CLI-help.png" alt="MiniMax" width="100%" />
|
|
30
29
|
|
|
31
30
|
## Install
|
|
32
31
|
|
|
@@ -56,7 +55,6 @@ mmx text chat --message "What is MiniMax?"
|
|
|
56
55
|
mmx image "A cat in a spacesuit"
|
|
57
56
|
mmx speech synthesize --text "Hello!" --out hello.mp3
|
|
58
57
|
mmx video generate --prompt "Ocean waves at sunset"
|
|
59
|
-
mmx music generate --prompt "Upbeat pop" --lyrics "[verse] La da dee, sunny day"
|
|
60
58
|
mmx search "MiniMax AI latest news"
|
|
61
59
|
mmx vision photo.jpg
|
|
62
60
|
mmx quota
|
|
@@ -113,20 +111,6 @@ echo "Breaking news" | mmx speech synthesize --text-file - --out news.mp3
|
|
|
113
111
|
mmx speech voices
|
|
114
112
|
```
|
|
115
113
|
|
|
116
|
-
### `mmx music`
|
|
117
|
-
|
|
118
|
-
```bash
|
|
119
|
-
# Generate with lyrics
|
|
120
|
-
mmx music generate --prompt "Upbeat pop" --lyrics "[verse] La da dee, sunny day" --out song.mp3
|
|
121
|
-
# Auto-generate lyrics from prompt
|
|
122
|
-
mmx music generate --prompt "Indie folk, melancholic, rainy night" --lyrics-optimizer --out song.mp3
|
|
123
|
-
# Instrumental (no vocals)
|
|
124
|
-
mmx music generate --prompt "Cinematic orchestral" --instrumental --out bgm.mp3
|
|
125
|
-
# Cover — generate a cover version from a reference audio file
|
|
126
|
-
mmx music cover --prompt "Jazz, piano, warm female vocal" --audio-file original.mp3 --out cover.mp3
|
|
127
|
-
mmx music cover --prompt "Indie folk" --audio https://example.com/song.mp3 --out cover.mp3
|
|
128
|
-
```
|
|
129
|
-
|
|
130
114
|
### `mmx vision`
|
|
131
115
|
|
|
132
116
|
```bash
|
package/dist/index.d.ts
CHANGED
|
@@ -17,7 +17,6 @@ export interface Config {
|
|
|
17
17
|
defaultTextModel?: string;
|
|
18
18
|
defaultSpeechModel?: string;
|
|
19
19
|
defaultVideoModel?: string;
|
|
20
|
-
defaultMusicModel?: string;
|
|
21
20
|
verbose: boolean;
|
|
22
21
|
quiet: boolean;
|
|
23
22
|
noColor: boolean;
|
|
@@ -151,6 +150,9 @@ export interface SpeechRequest {
|
|
|
151
150
|
speed?: number;
|
|
152
151
|
vol?: number;
|
|
153
152
|
pitch?: number;
|
|
153
|
+
emotion?: string;
|
|
154
|
+
text_normalization?: boolean;
|
|
155
|
+
latex_read?: boolean;
|
|
154
156
|
};
|
|
155
157
|
audio_setting?: {
|
|
156
158
|
format?: string;
|
|
@@ -295,40 +297,6 @@ export interface VideoV2Task {
|
|
|
295
297
|
ratio?: string;
|
|
296
298
|
task_type?: string;
|
|
297
299
|
}
|
|
298
|
-
export interface MusicRequest {
|
|
299
|
-
model: string;
|
|
300
|
-
prompt?: string;
|
|
301
|
-
lyrics?: string;
|
|
302
|
-
is_instrumental?: boolean;
|
|
303
|
-
lyrics_optimizer?: boolean;
|
|
304
|
-
audio_url?: string;
|
|
305
|
-
audio_base64?: string;
|
|
306
|
-
cover_feature_id?: string;
|
|
307
|
-
seed?: number;
|
|
308
|
-
audio_setting?: {
|
|
309
|
-
format?: string;
|
|
310
|
-
sample_rate?: number;
|
|
311
|
-
bitrate?: number;
|
|
312
|
-
channel?: number;
|
|
313
|
-
};
|
|
314
|
-
output_format?: "url" | "hex";
|
|
315
|
-
stream?: boolean;
|
|
316
|
-
aigc_watermark?: boolean;
|
|
317
|
-
}
|
|
318
|
-
export interface MusicResponse {
|
|
319
|
-
base_resp: BaseResp;
|
|
320
|
-
data: {
|
|
321
|
-
audio?: string;
|
|
322
|
-
audio_url?: string;
|
|
323
|
-
status: number;
|
|
324
|
-
};
|
|
325
|
-
extra_info?: {
|
|
326
|
-
audio_length?: number;
|
|
327
|
-
audio_sample_rate?: number;
|
|
328
|
-
audio_size?: number;
|
|
329
|
-
bitrate?: number;
|
|
330
|
-
};
|
|
331
|
-
}
|
|
332
300
|
export interface QuotaResponse {
|
|
333
301
|
model_remains: QuotaModelRemain[];
|
|
334
302
|
}
|
|
@@ -474,56 +442,6 @@ declare class VideoSDK extends Client {
|
|
|
474
442
|
}>;
|
|
475
443
|
private validateParams;
|
|
476
444
|
}
|
|
477
|
-
export interface MusicGenerateRequest extends MusicRequest {
|
|
478
|
-
/** Vocal style, e.g. "warm male baritone", "bright female soprano", "duet with harmonies" */
|
|
479
|
-
vocals?: string;
|
|
480
|
-
/** Music genre, e.g. folk, pop, jazz */
|
|
481
|
-
genre?: string;
|
|
482
|
-
/** Mood or emotion, e.g. warm, melancholic, uplifting */
|
|
483
|
-
mood?: string;
|
|
484
|
-
/** Instruments to feature, e.g. "acoustic guitar, piano" */
|
|
485
|
-
instruments?: string;
|
|
486
|
-
/** Tempo description, e.g. fast, slow, moderate */
|
|
487
|
-
tempo?: string;
|
|
488
|
-
/** Exact tempo in beats per minute */
|
|
489
|
-
bpm?: number;
|
|
490
|
-
/** Musical key, e.g. C major, A minor, G sharp */
|
|
491
|
-
key?: string;
|
|
492
|
-
/** Elements to avoid in the generated music */
|
|
493
|
-
avoid?: string;
|
|
494
|
-
/** Use case context, e.g. "background music for video", "theme song" */
|
|
495
|
-
use_case?: string;
|
|
496
|
-
/** Song structure, e.g. "verse-chorus-verse-bridge-chorus" */
|
|
497
|
-
structure?: string;
|
|
498
|
-
/** Reference tracks or artists, e.g. "similar to Ed Sheeran, Taylor Swift" */
|
|
499
|
-
references?: string;
|
|
500
|
-
/** Additional fine-grained requirements not covered above */
|
|
501
|
-
extra?: string;
|
|
502
|
-
/** Generate instrumental music (no vocals) */
|
|
503
|
-
instrumental?: boolean;
|
|
504
|
-
/** Use case */
|
|
505
|
-
useCase?: string;
|
|
506
|
-
}
|
|
507
|
-
declare class MusicSDK extends Client {
|
|
508
|
-
private generateStream;
|
|
509
|
-
generate(request: ModelPartial<MusicGenerateRequest> & {
|
|
510
|
-
stream: true;
|
|
511
|
-
}): Promise<AsyncGenerator<Uint8Array<ArrayBuffer>>>;
|
|
512
|
-
generate(request: ModelPartial<MusicGenerateRequest>): Promise<MusicResponse>;
|
|
513
|
-
/**
|
|
514
|
-
* Save generated music audio to a file. Decodes the hex-encoded audio
|
|
515
|
-
* from the API response and writes it to disk. Creates intermediate
|
|
516
|
-
* directories as needed.
|
|
517
|
-
*
|
|
518
|
-
* @param response — The response from `generate()`.
|
|
519
|
-
* @param outPath — Target file path. Defaults to `music_<timestamp>.mp3`.
|
|
520
|
-
* @param ext — File extension (default: `"mp3"`).
|
|
521
|
-
* @returns The absolute path of the saved file.
|
|
522
|
-
*/
|
|
523
|
-
save(response: MusicResponse, outPath?: string, ext?: string): string;
|
|
524
|
-
private buildPrompt;
|
|
525
|
-
private validateParams;
|
|
526
|
-
}
|
|
527
445
|
export interface SearchResult {
|
|
528
446
|
title: string;
|
|
529
447
|
link: string;
|
|
@@ -577,7 +495,6 @@ export declare class MiniMaxSDK extends Client {
|
|
|
577
495
|
readonly speech: SpeechSDK;
|
|
578
496
|
readonly image: ImageSDK;
|
|
579
497
|
readonly video: VideoSDK;
|
|
580
|
-
readonly music: MusicSDK;
|
|
581
498
|
readonly search: SearchSDK;
|
|
582
499
|
readonly vision: VisionSDK;
|
|
583
500
|
readonly quota: QuotaSDK;
|