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

See 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 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 default minimax 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

Important Notes

  1. The AI SDK compatibility interface currently supports the MiniMax-M3.1-Flash MiniMax-M3 models
  2. The temperature and topP parameters will be ignored
  3. Video input is not supported through the AI SDK; PDF documents are supported only with the default minimax (Anthropic-compatible format)
  4. The default minimax provider instance uses the Anthropic-compatible API format. Use minimaxOpenAI if you need the OpenAI-compatible format; see OpenAI-Compatible Format.
  5. For more information, see the MiniMax AI Provider on AI SDK and the GitHub repository