llama-index-integrations/llms/llama-index-llms-minimax/README.md
This is the MiniMax integration for LlamaIndex. Visit MiniMax for information on how to get an API key and which models are supported.
pip install llama-index-llms-minimax
from llama_index.llms.minimax import MiniMax
llm = MiniMax(model="MiniMax-M2.7", api_key="your-api-key")
response = llm.complete("Explain the importance of low latency LLMs")
print(response)
| Model | Description |
|---|---|
MiniMax-M2.7 | Latest flagship model with enhanced reasoning and coding |
MiniMax-M2.7-highspeed | High-speed version of M2.7 for low-latency scenarios |
MiniMax-M2.5 | Peak Performance. Ultimate Value. Master the Complex. |
MiniMax-M2.5-highspeed | Same performance, faster and more agile. |
Both models support a 204,800-token context window.
You can set the MINIMAX_API_KEY environment variable instead of passing api_key directly:
export MINIMAX_API_KEY="your-api-key"
from llama_index.llms.minimax import MiniMax
llm = MiniMax(model="MiniMax-M2.7")
For users in mainland China, use the domestic API endpoint:
llm = MiniMax(
model="MiniMax-M2.7",
api_base="https://api.minimaxi.com/v1",
)