@ai-sdk/minimax 3.0.1 → 3.0.3

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/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @ai-sdk/minimax
2
2
 
3
+ ## 3.0.3
4
+
5
+ ### Patch Changes
6
+
7
+ - 494f1ac: fix(provider/minimax): send a default `16:9` ratio for MiniMax-H3 text-to-video
8
+
9
+ ## 3.0.2
10
+
11
+ ### Patch Changes
12
+
13
+ - 1d36c72: Add video model support to the MiniMax provider (`minimax.video`) for the MiniMax-H3 model, including text-to-video, first/last-frame, and reference-to-video generation.
14
+ - Updated dependencies [5fc7da5]
15
+ - Updated dependencies [93b2acd]
16
+ - @ai-sdk/provider-utils@5.0.18
17
+ - @ai-sdk/anthropic@4.0.27
18
+
3
19
  ## 3.0.1
4
20
 
5
21
  ### Patch Changes
package/README.md CHANGED
@@ -57,6 +57,20 @@ const { text } = await generateText({
57
57
  });
58
58
  ```
59
59
 
60
+ ## Video Generation Example
61
+
62
+ ```ts
63
+ import { minimax } from '@ai-sdk/minimax';
64
+ import { experimental_generateVideo as generateVideo } from 'ai';
65
+
66
+ const { video } = await generateVideo({
67
+ model: minimax.video('MiniMax-H3'),
68
+ prompt: 'A white kitten chases a butterfly across a sunlit garden.',
69
+ aspectRatio: '16:9',
70
+ duration: 5,
71
+ });
72
+ ```
73
+
60
74
  ## Documentation
61
75
 
62
76
  Please check out the **[MiniMax provider](https://ai-sdk.dev/providers/ai-sdk-providers/minimax)** for more information.
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { ProviderV4, LanguageModelV4 } from '@ai-sdk/provider';
1
+ import { ProviderV4, LanguageModelV4, Experimental_VideoModelV4 } from '@ai-sdk/provider';
2
2
  import { FetchFunction } from '@ai-sdk/provider-utils';
3
3
  import { z } from 'zod/v4';
4
4
 
@@ -13,6 +13,8 @@ declare const minimaxLanguageModelOptions: z.ZodObject<{
13
13
  }, z.core.$strip>;
14
14
  type MiniMaxLanguageModelOptions = z.infer<typeof minimaxLanguageModelOptions>;
15
15
 
16
+ type MiniMaxVideoModelId = 'MiniMax-H3' | (string & {});
17
+
16
18
  interface MiniMaxProviderSettings {
17
19
  /**
18
20
  * MiniMax API key. Default value is taken from the `MINIMAX_API_KEY`
@@ -24,6 +26,11 @@ interface MiniMaxProviderSettings {
24
26
  * endpoint (`https://api.minimax.io/anthropic/v1`).
25
27
  */
26
28
  baseURL?: string;
29
+ /**
30
+ * Use a different URL prefix for video generation API calls.
31
+ * The default prefix is `https://api.minimax.io`.
32
+ */
33
+ videoBaseURL?: string;
27
34
  /**
28
35
  * Custom headers to include in the requests.
29
36
  */
@@ -47,6 +54,14 @@ interface MiniMaxProvider extends ProviderV4 {
47
54
  * Creates a MiniMax chat model for text generation.
48
55
  */
49
56
  chat(modelId: MiniMaxChatModelId): LanguageModelV4;
57
+ /**
58
+ * Creates a MiniMax video model for video generation.
59
+ */
60
+ video(modelId: MiniMaxVideoModelId): Experimental_VideoModelV4;
61
+ /**
62
+ * Creates a MiniMax video model for video generation.
63
+ */
64
+ videoModel(modelId: MiniMaxVideoModelId): Experimental_VideoModelV4;
50
65
  /**
51
66
  * @deprecated Use `embeddingModel` instead.
52
67
  */
@@ -55,6 +70,29 @@ interface MiniMaxProvider extends ProviderV4 {
55
70
  declare function createMiniMax(options?: MiniMaxProviderSettings): MiniMaxProvider;
56
71
  declare const minimax: MiniMaxProvider;
57
72
 
73
+ /**
74
+ * Provider options for MiniMax video generation.
75
+ */
76
+ declare const minimaxVideoProviderOptions: z.ZodObject<{
77
+ resolution: z.ZodOptional<z.ZodEnum<{
78
+ "2K": "2K";
79
+ }>>;
80
+ ratio: z.ZodOptional<z.ZodEnum<{
81
+ adaptive: "adaptive";
82
+ "21:9": "21:9";
83
+ "16:9": "16:9";
84
+ "4:3": "4:3";
85
+ "1:1": "1:1";
86
+ "3:4": "3:4";
87
+ "9:16": "9:16";
88
+ }>>;
89
+ referenceAudioUrls: z.ZodOptional<z.ZodArray<z.ZodString>>;
90
+ aigcWatermark: z.ZodOptional<z.ZodBoolean>;
91
+ pollIntervalMs: z.ZodOptional<z.ZodNumber>;
92
+ pollTimeoutMs: z.ZodOptional<z.ZodNumber>;
93
+ }, z.core.$strip>;
94
+ type MiniMaxVideoModelOptions = z.infer<typeof minimaxVideoProviderOptions>;
95
+
58
96
  declare const VERSION: string;
59
97
 
60
- export { type MiniMaxChatModelId, type MiniMaxLanguageModelOptions, type MiniMaxProvider, type MiniMaxLanguageModelOptions as MiniMaxProviderOptions, type MiniMaxProviderSettings, VERSION, createMiniMax, minimax };
98
+ export { type MiniMaxChatModelId, type MiniMaxLanguageModelOptions, type MiniMaxProvider, type MiniMaxLanguageModelOptions as MiniMaxProviderOptions, type MiniMaxProviderSettings, type MiniMaxVideoModelId, type MiniMaxVideoModelOptions, VERSION, createMiniMax, minimax };