返回模型列表
MiniMax M2.1 Highspeed
minimaxminimax/m2.1-highspeed
API 使用指南
Chat 调用
通过 TheRouter 使用标准 OpenAI 兼容的 chat completion——只需修改 baseURL 和 model。
cURL
curl https://api.therouter.ai/v1/chat/completions \
-H "Authorization: Bearer $THEROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "minimax/m2.1-highspeed",
"messages": [
{"role": "system", "content": "You are a helpful coding assistant."},
{"role": "user", "content": "Write a Rust function to parse a CSV line."}
],
"temperature": 0.3,
"max_tokens": 4096
}'流式调用
面向实时用户体验的场景,流式调用最能受益于 Highspeed 的约 100 tps——更快的 token 传输直接提升响应感知。
cURL
curl https://api.therouter.ai/v1/chat/completions \
-H "Authorization: Bearer $THEROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "minimax/m2.1-highspeed",
"messages": [{"role": "user", "content": "Write a quick sort function in Python"}],
"stream": true
}'工具调用
M2.1 通过 MoE 架构支持并行工具调用。Highspeed 的更快 token 生成在多工具 agent 循环中尤其受益——每个工具调用后的模型续写都是延迟敏感步骤。
cURL
curl https://api.therouter.ai/v1/chat/completions \
-H "Authorization: Bearer $THEROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "minimax/m2.1-highspeed",
"messages": [
{"role": "user", "content": "What is the weather in Shanghai and Tokyo?"}
],
"tools": [{
"type": "function",
"function": {
"name": "get_weather",
"description": "Get weather by city",
"parameters": {
"type": "object",
"properties": {
"city": {"type": "string"}
}
}
}
}],
"tool_choice": "auto"
}'