---
title: MiniMax
---

# MiniMax

Use `minimax/<model>` with VoltAgent's model router.

MiniMax provides an OpenAI-compatible API at `https://api.minimax.io/v1`. For users in China, use the `minimax-cn` provider which routes to `https://api.minimaxi.com/v1`.

## Quick start

```ts
import { Agent } from "@voltagent/core";

const agent = new Agent({
  name: "minimax-agent",
  instructions: "You are a helpful assistant",
  model: "minimax/MiniMax-M3",
});
```

## Environment variables

- `MINIMAX_API_KEY`

## Provider package

`@ai-sdk/openai-compatible`

## Default base URL

`https://api.minimax.io/v1`

You can override the base URL by setting `MINIMAX_BASE_URL`.

## Provider docs

- https://platform.minimax.io/docs/api-reference/api-overview

## Pricing

| Model | Input | Output | Cache read | Cache write |
|---|---:|---:|---:|---:|
| MiniMax-M3 | $0.60 / 1M tokens | $2.40 / 1M tokens | $0.12 / 1M tokens | Not listed |

## Models

| Model | Context | Description |
|---|---|---|
| MiniMax-M3 | 1M tokens | Latest flagship model |
| MiniMax-M2.7 | 1M tokens | Previous generation |
| MiniMax-M2.7-highspeed | 1M tokens | Optimized for speed |
| MiniMax-M2.5 | 1M tokens | Previous generation |
| MiniMax-M2.5-highspeed | 204K tokens | Fast inference |
| MiniMax-M2.1 | 1M tokens | Legacy |
| MiniMax-M2 | 1M tokens | Legacy |
