Compatible Anthropic API (Recommended)
Basic Conversation
Streaming Response
Tool Calling (Function Calling)
For more details, see MiniMax-M2 Function Calling GuideImportant Notes
- The Anthropic API compatibility interface currently only supports the
MiniMax-M2model - Set
ANTHROPIC_BASE_URLtohttps://api.minimax.io/anthropicwhen using - Set
ANTHROPIC_API_KEYto your MiniMax API Key - The
temperatureparameter range is (0.0, 1.0], values outside this range will return an error - Some Anthropic parameters (such as
thinking,top_k,stop_sequences,service_tier,mcp_servers,context_management,container) will be ignored - Image and document type inputs are not currently supported
Compatible OpenAI API
Basic Conversation
Streaming Response
Tool Calling (Function Calling)
For more details, see MiniMax-M2 Function Calling GuideImportant Notes
- Set
OPENAI_BASE_URLtohttps://api.minimax.io/v1when using - Set
OPENAI_API_KEYto your MiniMax API Key - The
temperatureparameter range is (0.0, 1.0], recommended value: 1.0, values outside this range will return an error - Some OpenAI parameters (such as
presence_penalty,frequency_penalty,logit_bias, etc.) will be ignored - Image and audio type inputs are not currently supported
- The
nparameter only supports value 1 - The deprecated
function_callis not supported, please use thetoolsparameter
Related Links
Recommended Reading
Compatible Anthropic API
Use Anthropic SDK with MiniMax models
Compatible OpenAI API
Use Anthropic SDK with MiniMax models
M2 for AI Coding Tools
MiniMax-M2 excels at code understanding, dialogue, and reasoning.
MiniMax-M2 Function Calling Guide
AI models can call external functions to extend their capabilities.