MiniMax
Use MiniMax models with Agno agents.
MiniMax serves its text models through an OpenAI-compatible API, so you drive them through Agno like any other OpenAI-compatible provider.
The MiniMax class defaults to MiniMax-M3 and points at the international endpoint https://api.minimax.io/v1.
Installation
uv pip install -U openai agnoAuthentication
Create an API key from the MiniMax platform dashboard.
Set your MINIMAX_API_KEY environment variable.
export MINIMAX_API_KEY="YOUR_API_KEY"Example
Use MiniMax with your Agent:
from agno.agent import Agent
from agno.models.minimax import MiniMax
agent = Agent(model=MiniMax(id="MiniMax-M3"), markdown=True)
# Print the response in the terminal
agent.print_response("Share a 2 sentence horror story.")Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
id | str | "MiniMax-M3" | The ID of the MiniMax model to use |
name | str | "MiniMax" | The name of the model |
provider | str | "MiniMax" | The provider of the model |
api_key | Optional[str] | None | The API key for MiniMax (defaults to MINIMAX_API_KEY env var) |
base_url | str | "https://api.minimax.io/v1" | The base URL for the MiniMax API |
MiniMax extends the OpenAI-compatible interface and supports most parameters from the OpenAI model.
The current adapter defaults supports_native_structured_outputs to False. With output_schema and use_json_mode=True, Agno sends response_format={"type": "json_object"}, adds schema instructions, and attempts local Pydantic parsing. This does not request strict provider-enforced JSON Schema. The MiniMax compatibility reference does not promise schema enforcement for this M3 request; validate the returned content in your application.
The current Agno adapter does not preserve all MiniMax thinking content when sending assistant messages back after a tool call. For MiniMax-M3 tool workflows, set extra_body={"thinking": {"type": "disabled"}} as shown in the tool example. This avoids the affected thinking-history path. M2.x models cannot disable thinking this way; see MiniMax tool history and thinking controls.
To hit a different host (private deployment, regional endpoint), pass base_url:
MiniMax(id="MiniMax-M3", base_url="https://your-host.example.com/v1")Available Models
MiniMax-M3 is the adapter default. The current model catalog also lists M2.7 and M2.7-highspeed. Choose a model supported by your account and check its context, modality and thinking capabilities before changing the ID.