Skip to main content
To meet developers’ needs for the AI SDK ecosystem, MiniMax provides an official community provider. With simple configuration, you can integrate MiniMax capabilities into the AI SDK ecosystem.

Quick Start

1. Install AI SDK and MiniMax Provider

2. Configure Environment Variables

3. Call API

TypeScript

4. Important Note

In multi-turn function call conversations, the complete model response (i.e., the assistant message) must be appended to the conversation history to maintain the continuity of the reasoning chain.
  • Append the full result.response.messages to the message history (includes all assistant and tool messages)

Supported Models

When using the AI SDK, the MiniMax-M3 MiniMax-M2.7 MiniMax-M2.7-highspeed MiniMax-M2.5 MiniMax-M2.5-highspeed MiniMax-M2.1 MiniMax-M2.1-highspeed MiniMax-M2 models are supported:
For details on how tps (Tokens Per Second) is calculated, please refer to FAQ > About APIs.
The AI SDK compatibility interface currently supports the MiniMax-M3 MiniMax-M2.7 MiniMax-M2.7-highspeed MiniMax-M2.5 MiniMax-M2.5-highspeed MiniMax-M2.1 MiniMax-M2.1-highspeed MiniMax-M2 models. For other models, please use the standard MiniMax API interface.

Compatibility

Supported Parameters

When using the AI SDK, we support the following input parameters:

Messages Field Support

Examples

Streaming Response

TypeScript

Important Notes

  1. The AI SDK compatibility interface currently supports the MiniMax-M3 MiniMax-M2.7 MiniMax-M2.7-highspeed MiniMax-M2.5 MiniMax-M2.5-highspeed MiniMax-M2.1 MiniMax-M2.1-highspeed MiniMax-M2 models
  2. The temperature parameter range is [0, 2], values outside this range will return an error
  3. Image and document type inputs are not currently supported
  4. The default minimax provider instance uses the Anthropic-compatible API format. Use minimaxOpenAI if you need the OpenAI-compatible format.
  5. For more information, see the MiniMax AI Provider on AI SDK and the GitHub repository