mmx-cli 1.0.17 → 1.0.19

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 CHANGED
@@ -68,7 +68,7 @@ mmx quota
68
68
 
69
69
  ```bash
70
70
  mmx text chat --message "Write a poem"
71
- mmx text chat --model MiniMax-M2.7-highspeed --message "Hello" --stream
71
+ mmx text chat --model MiniMax-M3 --message "Hello" --stream
72
72
  mmx text chat --system "You are a coding assistant" --message "Fizzbuzz in Go"
73
73
  mmx text chat --message "user:Hi" --message "assistant:Hey!" --message "How are you?"
74
74
  cat messages.json | mmx text chat --messages-file - --output json
@@ -85,12 +85,24 @@ mmx image generate --prompt "Logo" --out-dir ./out/
85
85
  ### `mmx video`
86
86
 
87
87
  ```bash
88
+ # Hailuo-2.3 (Video Generation V1)
88
89
  mmx video generate --prompt "Ocean waves at sunset" --download sunset.mp4
89
90
  mmx video generate --prompt "A robot painting" --async
91
+
92
+ # MiniMax-H3 (Video Generation V2)
93
+ mmx video generate --api-key "$MINIMAX_API_KEY" --model MiniMax-H3 --prompt "Ocean waves at sunset"
94
+ mmx video generate --api-key "$MINIMAX_API_KEY" --model MiniMax-H3 --prompt "The subject walks forward" --image start.jpg
95
+ mmx video generate --api-key "$MINIMAX_API_KEY" --model MiniMax-H3 --prompt "Keep the same character" --reference-image character.png --reference-video motion.mp4
96
+
90
97
  mmx video task get --task-id 123456
98
+ mmx video task get --task-id 424010985738629 --model MiniMax-H3
91
99
  mmx video download --file-id 176844028768320 --out video.mp4
92
100
  ```
93
101
 
102
+ For MiniMax-H3, local files and Base64 data URIs are preflight-checked against the documented limits: image 30 MB, reference video 50 MB, reference audio 15 MB, and total JSON request body 64 MB. The API validates dimensions, aspect ratio, duration, frame rate, and codecs for all media.
103
+
104
+ `--region` is an existing global CLI option, not an H3 parameter. Normal video generation does not need it; the CLI uses the saved or automatically detected region. H3 defaults to 2K, 5 seconds, and 16:9 for text-to-video.
105
+
94
106
  ### `mmx speech`
95
107
 
96
108
  ```bash
@@ -175,7 +187,7 @@ Credential priority: `--api-key` flag > OAuth (config) > `api_key` (config).
175
187
  mmx quota
176
188
  mmx config show
177
189
  mmx config set --key region --value cn
178
- mmx config set --key default-text-model --value MiniMax-M2.7-highspeed
190
+ mmx config set --key default-text-model --value MiniMax-M3
179
191
  mmx config export-schema | jq .
180
192
  ```
181
193
 
package/dist/index.d.ts CHANGED
@@ -226,11 +226,6 @@ export interface VideoRequest {
226
226
  image: string[];
227
227
  }>;
228
228
  }
229
- export interface VideoResponse {
230
- base_resp: BaseResp;
231
- task_id: string;
232
- status: string;
233
- }
234
229
  export interface VideoTaskResponse {
235
230
  base_resp: BaseResp;
236
231
  task_id: string;
@@ -239,6 +234,67 @@ export interface VideoTaskResponse {
239
234
  video_width?: number;
240
235
  video_height?: number;
241
236
  }
237
+ export type VideoV2ImageRole = "first_frame" | "last_frame" | "reference_image";
238
+ export type VideoV2Ratio = "adaptive" | "21:9" | "16:9" | "4:3" | "1:1" | "3:4" | "9:16";
239
+ export type VideoV2Duration = 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15;
240
+ export interface VideoV2TextContent {
241
+ type: "text";
242
+ text: string;
243
+ }
244
+ export interface VideoV2ImageContent {
245
+ type: "image_url";
246
+ image_url: {
247
+ url: string;
248
+ };
249
+ role?: VideoV2ImageRole;
250
+ }
251
+ export interface VideoV2VideoContent {
252
+ type: "video_url";
253
+ video_url: {
254
+ url: string;
255
+ };
256
+ role: "reference_video";
257
+ }
258
+ export interface VideoV2AudioContent {
259
+ type: "audio_url";
260
+ audio_url: {
261
+ url: string;
262
+ };
263
+ role: "reference_audio";
264
+ }
265
+ export type VideoV2ContentItem = VideoV2TextContent | VideoV2ImageContent | VideoV2VideoContent | VideoV2AudioContent;
266
+ export interface VideoV2Request {
267
+ model: "MiniMax-H3";
268
+ content: VideoV2ContentItem[];
269
+ resolution: "2K";
270
+ duration: VideoV2Duration;
271
+ ratio?: VideoV2Ratio;
272
+ callback_url?: string;
273
+ }
274
+ export interface VideoV2Task {
275
+ id: string;
276
+ model: string;
277
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled" | "expired";
278
+ error?: {
279
+ code?: string;
280
+ message?: string;
281
+ };
282
+ created_at?: number;
283
+ updated_at?: number;
284
+ content?: {
285
+ url?: string;
286
+ };
287
+ resolution?: string;
288
+ duration?: number;
289
+ usage?: {
290
+ total_seconds?: number;
291
+ input_seconds?: number;
292
+ output_seconds?: number;
293
+ input_image_count?: number;
294
+ };
295
+ ratio?: string;
296
+ task_type?: string;
297
+ }
242
298
  export interface MusicRequest {
243
299
  model: string;
244
300
  prompt?: string;
@@ -385,11 +441,17 @@ declare class ImageSDK extends Client {
385
441
  save(response: ImageResponse, options?: ImageSaveOptions): Promise<string[]>;
386
442
  private validateParams;
387
443
  }
388
- export interface VideoAsyncGenerateRequest extends ModelPartial<VideoRequest> {
444
+ export type VideoV2GenerateRequest = Omit<VideoV2Request, "model" | "resolution" | "duration"> & {
445
+ model?: VideoV2Request["model"];
446
+ resolution?: VideoV2Request["resolution"];
447
+ duration?: VideoV2Request["duration"];
448
+ };
449
+ export type VideoGenerateRequest = ModelPartial<VideoRequest> | VideoV2GenerateRequest;
450
+ export type VideoAsyncGenerateRequest = VideoGenerateRequest & {
389
451
  async?: boolean;
390
452
  pollInterval?: number;
391
453
  timeout?: number;
392
- }
454
+ };
393
455
  export interface VideoDownloadRequest {
394
456
  fileId: string;
395
457
  outPath: string;
@@ -400,10 +462,11 @@ declare class VideoSDK extends Client {
400
462
  }): Promise<{
401
463
  taskId: string;
402
464
  }>;
403
- generate(request: ModelPartial<VideoAsyncGenerateRequest>): Promise<VideoResponse>;
404
- getTask({ taskId }: {
465
+ generate(request: VideoAsyncGenerateRequest): Promise<VideoTaskResponse | VideoV2Task>;
466
+ getTask({ taskId, model }: {
405
467
  taskId: string;
406
- }): Promise<VideoTaskResponse>;
468
+ model?: string;
469
+ }): Promise<VideoTaskResponse | VideoV2Task>;
407
470
  download(request: VideoDownloadRequest): Promise<{
408
471
  size: number;
409
472
  save: string;