> ## Documentation Index
> Fetch the complete documentation index at: https://agno-v2.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# MiniMax

> Use MiniMax models with Agno agents.

[MiniMax](https://www.minimax.io/) 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

```bash theme={null}
uv pip install -U openai agno
```

## Authentication

Create an API key from the [MiniMax platform dashboard](https://platform.minimax.io/).

Set your `MINIMAX_API_KEY` environment variable.

```bash Mac theme={null}
export MINIMAX_API_KEY=***
```

```bash Windows theme={null}
setx MINIMAX_API_KEY ***
```

## Example

Use `MiniMax` with your `Agent`:

```python agent.py theme={null}
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.")
```

> [!NOTE]
>
> View more examples [here](https://agno-v2.mintlify.site/models/providers/native/minimax/usage/basic.md).

## 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](https://agno-v2.mintlify.site/models/providers/native/openai/completion/overview.md).

**Note**: MiniMax does not implement OpenAI-style native `response_format` / strict `json_schema`, so `supports_native_structured_outputs` is set to `False`. Use `use_json_mode=True` for structured output.

To hit a different host (private deployment, regional endpoint), pass `base_url`:

```python theme={null}
MiniMax(id="MiniMax-M3", base_url="https://your-host.example.com/v1")
```

## Available Models

The OpenAI-compatible endpoint exposes the M3 and M2 families. See the [models intro](https://platform.minimax.io/docs/guides/models-intro) for the current catalog.

| Model ID | Notes |
| - | - |
| `MiniMax-M3` | Latest flagship, long-context multimodal reasoning (default) |
| `MiniMax-M2.7` | Previous flagship MoE (230B total / 10B active), 205k context |
| `MiniMax-M2.7-highspeed` | Same weights as M2.7, \~1.6-1.7x throughput |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.