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.messagesto the message history (includes all assistant and tool messages)
Supported Models
When using the AI SDK, the following 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.1-Flash MiniMax-M3 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
OpenAI-Compatible Format
The defaultminimax uses the Anthropic-compatible format (/anthropic/v1/messages). To use the OpenAI Chat Completions-compatible format (/v1/chat/completions), use minimaxOpenAI instead:
TypeScript
Streaming Response
TypeScript