Skip to content

MiniMax

MiniMaxProvider in the Vercel.AI.MiniMax namespace creates the MiniMax models that this port implements. The API reference lists every option: MiniMaxProvider.

Browse the upstream catalog of MiniMax models and their pricing on the Vercel AI Gateway models page.

Kind Factory method Model ids in this port’s tests and docs
Language Chat, LanguageModel minimax-m3.1-flash, minimax-m3, MiniMax-M3.1-Flash, minimax-m2.1
Image Image, ImageModel MiniMax-H3-Image, MiniMax-H3-Image-Highspeed
Video Video, VideoModel MiniMax-H3

A model id in the table is one that the tests or docs use. It is not the complete list of ids the provider accepts. Pass any id that the provider documents. An id that links to the Vercel AI Gateway catalog has a Gateway slug listed there.

Language model:

var model = MiniMaxProvider.Create().Chat("minimax-m3.1-flash");
var result = await Ai.GenerateTextAsync(
new GenerateTextOptions
{
Model = model,
Prompt = "Invent a new holiday and describe its traditions.",
}
);
Console.WriteLine(result.Text);

snippet source | anchor

Build the minimax provider options with the typed classes in Vercel.AI.MiniMax. Each has ToProviderOptions(), which validates the values and returns a dictionary for LanguageModelCallOptions.ProviderOptions:

  • MiniMaxLanguageModelOptions: Effort (low, medium, high, xhigh, max), ServiceTier (standard, priority), and Thinking.Type (adaptive, disabled).
  • MiniMaxCacheControlOptions: CacheControl marks a stable prompt prefix for caching on M3.1 and later models.
  • MiniMaxImagePartOptions: Detail (low, default, high) for an image file part.
  • MiniMaxVideoPartOptions: Fps, from 0.2 to 5, for a video file part.

See the Providers guide for authentication and provider options.

Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product