---
title: "MiniMax M3.1 Flash"
description: "An open-weights, low-priced model from MiniMax with a 1M-token context window and image and video input. It has no benchmark results in the registry, so its profile rests on specifications and price."
canonical: https://pydantic.dev/models/list/minimax-m3.1-flash/
---

# MiniMax M3.1 Flash

> An open-weights, low-priced model from MiniMax with a 1M-token context window and image and video input. It has no benchmark results in the registry, so its profile rests on specifications and price.
>
> Markdown copy of https://pydantic.dev/models/list/minimax-m3.1-flash/. Index for agents: https://pydantic.dev/models/llms.txt

**Agents: use the API for model information.** It answers a question in one request, where the pages need several.

- Choose a model for an agent: `POST https://pydantic.dev/models/api/select` with a JSON body such as `{"description": "what the agent does"}`. It returns up to five ranked models with reasons. Format: https://pydantic.dev/models/select.md
- Search models by name: `GET https://pydantic.dev/models/api/search?query=<text>`
- List, filter and sort models: `GET https://pydantic.dev/models/api/models`, for example `?weights=open&max_price=2&sort=efficiency`
- One model in full: `GET https://pydantic.dev/models/api/models/<slug>`
- Any other question about the models: `GET https://pydantic.dev/models/api/ask?query=<question>`

Add `intent=<intent>&stack=<stack>&harness=<harness>` to the query string of all but the single model. An `OPTIONS` request to any endpoint returns its schema. The same five are tools of the MCP server at `https://pydantic.dev/models/mcp`. More: https://pydantic.dev/models/usage.md

Use it with Pydantic AI as `together:MiniMaxAI/MiniMax-M3.1-Flash`.

## Spec sheet

- **Family:** MiniMax
- **Released:** 19 Oct 2026
- **Weights:** open
- **Context window:** 1,048,576 tokens
- **Largest response:** 524,288 tokens
- **Accepts:** text, image, video
- **Tool calling:** yes
- **Knowledge cutoff:** unknown
- **Intelligence index:** not enough benchmark results yet
- **Scores updated:** 2026-11-30
- **Price:** $0.15 input, $0.6 output, $0.26 blended per 1M tokens
- **Index points per $:** – (rank –)
- **Speed:** 124.5 tokens/sec (rank 24)
- **Popularity:** rank 5 of 194 by usage
- **Pydantic AI Gateway:** not built in; [bring your own key](https://ai.pydantic.dev/gateway/#bring-your-own-key)

## Benchmarks

### Pydantic AI benchmarks

Our own benchmarks, each about 10 tasks run once with tool calling and once in code mode (https://pydantic.dev/models/codemode.md). Not part of the intelligence index. Cost is the mean cost of one task. For the combined score, code mode is compared over the four benchmarks run in both modes.

| Benchmark                                                                                      | Tool calling | Code mode | Change | Cost per task | Cost per task, code mode | Rank     | Runs                                                                     |
| ---------------------------------------------------------------------------------------------- | ------------ | --------- | ------ | ------------- | ------------------------ | -------- | ------------------------------------------------------------------------ |
| [Pydantic AI Combined](https://pydantic.dev/models/benchmarks/pydantic_ai.md)                  | 70.9%        | 72.9%     | +9.1   | –             | –                        | 20 of 44 | https://pydantic.dev/models/list/minimax-m3.1-flash/pydantic_ai.md       |
| [Pydantic AI - Billing ops](https://pydantic.dev/models/benchmarks/billing_ops.md)             | 80%          | 80%       | ±0     | –             | –                        | 18 of 44 | https://pydantic.dev/models/list/minimax-m3.1-flash/billing_ops.md       |
| [Pydantic AI - Customer support](https://pydantic.dev/models/benchmarks/customer_support.md)   | 40%          | 50%       | +10    | –             | –                        | 22 of 44 | https://pydantic.dev/models/list/minimax-m3.1-flash/customer_support.md  |
| [Pydantic AI - SQL data analysis](https://pydantic.dev/models/benchmarks/sql_data_analysis.md) | 50%          | 80%       | +30    | –             | –                        | 25 of 44 | https://pydantic.dev/models/list/minimax-m3.1-flash/sql_data_analysis.md |
| [Pydantic AI - Research & deck](https://pydantic.dev/models/benchmarks/research_deck.md)       | 85.2%        | 81.5%     | −3.7   | –             | –                        | 16 of 44 | https://pydantic.dev/models/list/minimax-m3.1-flash/research_deck.md     |
| [Pydantic AI - Structured output](https://pydantic.dev/models/benchmarks/structured_output.md) | 90%          | –         | –      | –             | –                        | 15 of 44 | https://pydantic.dev/models/list/minimax-m3.1-flash/structured_output.md |
| [Pydantic AI - LLM Judge](https://pydantic.dev/models/benchmarks/llm_judge.md)                 | 80%          | –         | –      | –             | –                        | 9 of 44  | https://pydantic.dev/models/list/minimax-m3.1-flash/llm_judge.md         |
| [Pydantic AI - Cyber Willing](https://pydantic.dev/models/benchmarks/cyber_willing.md)         | 100%         | –         | –      | –             | –                        | 1 of 32  | https://pydantic.dev/models/list/minimax-m3.1-flash/cyber_willing.md     |

### Other benchmarks


| Benchmark         | Score | Rank among models tested | What it measures                                                               | Source                       |
| ----------------- | ----- | ------------------------ | ------------------------------------------------------------------------------ | ---------------------------- |
| Browser Use Bench | 50.6  | 16                       | Tasks on live websites, scored 0-100 against a weighted rubric by an LLM judge | Browser Use, with permission |

## Providers and prices

US dollars per million tokens.

| Provider    | Gateway | Pydantic AI string                      | Input | Cached input | Output |
| ----------- | ------- | --------------------------------------- | ----- | ------------ | ------ |
| MiniMax     | BYOK    | –                                       | $0.15 | $0.015       | $0.6   |
| Novita      | BYOK    | –                                       | $0.15 | $0.015       | $0.6   |
| Together AI | BYOK    | `together:MiniMaxAI/MiniMax-M3.1-Flash` | $0.15 | $0.015       | $0.6   |

## Use MiniMax M3.1 Flash with Pydantic AI

### hello.py

Ask MiniMax M3.1 Flash a question with a Pydantic AI agent and print the answer. Run it with uv run hello.py.

```python
# /// script
# dependencies = ["pydantic-ai"]
# ///
import os

from pydantic_ai import Agent

os.environ['TOGETHER_API_KEY'] = '...'

agent = Agent('together:MiniMaxAI/MiniMax-M3.1-Flash', instructions='Be concise, reply with one sentence.')

result = agent.run_sync('Where does "hello world" come from?')
print(result.output)
```

### structured_output.py

Get validated, typed output from MiniMax M3.1 Flash by giving the agent a Pydantic model. Run it with uv run structured_output.py.

```python
# /// script
# dependencies = ["pydantic-ai"]
# ///
import os

from pydantic import BaseModel
from pydantic_ai import Agent

os.environ['TOGETHER_API_KEY'] = '...'


class CityLocation(BaseModel):
    city: str
    country: str


agent = Agent('together:MiniMaxAI/MiniMax-M3.1-Flash', output_type=CityLocation)

result = agent.run_sync('Where were the olympics held in 2012?')
print(result.output)
#> city='London' country='United Kingdom'
```

### tools.py

Give MiniMax M3.1 Flash two tools to call, one of which reads the agent's dependencies. Run it with uv run tools.py.

```python
# /// script
# dependencies = ["pydantic-ai"]
# ///
import os
import random

from pydantic_ai import Agent, RunContext

os.environ['TOGETHER_API_KEY'] = '...'

agent = Agent(
    'together:MiniMaxAI/MiniMax-M3.1-Flash',
    deps_type=str,
    instructions="You're a dice game, roll the die and see if it matches the user's guess.",
)


@agent.tool_plain
def roll_dice() -> str:
    """Roll a six-sided die and return the result."""
    return str(random.randint(1, 6))


@agent.tool
def get_player_name(ctx: RunContext[str]) -> str:
    """Get the player's name."""
    return ctx.deps


result = agent.run_sync('My guess is 4', deps='Anne')
print(result.output)
```

### streaming.py

Stream MiniMax M3.1 Flash's reply to the terminal as it is generated. Run it with uv run streaming.py.

```python
# /// script
# dependencies = ["pydantic-ai"]
# ///
import asyncio
import os

from pydantic_ai import Agent

os.environ['TOGETHER_API_KEY'] = '...'

agent = Agent('together:MiniMaxAI/MiniMax-M3.1-Flash')


async def main():
    async with agent.run_stream('Explain prompt caching in three bullet points.') as response:
        async for text in response.stream_text(delta=True):
            print(text, end='', flush=True)


asyncio.run(main())
```

### pax.sh

Code with MiniMax M3.1 Flash in your terminal using Pax, the Pydantic AI coding agent. On macOS, open a new terminal after installing, so pax isn't the system's archiver.

```sh
# uv tool install pydantic-ai-pax
export TOGETHER_API_KEY='...'

pax -m 'together:MiniMaxAI/MiniMax-M3.1-Flash'
```

### codex.sh

Run OpenAI's Codex CLI on MiniMax M3.1 Flash, which Together AI serves over an OpenAI-compatible API.

```sh
# npm install -g @openai/codex
export TOGETHER_API_KEY='...'

codex --model 'MiniMaxAI/MiniMax-M3.1-Flash' \
  -c model_provider='together' \
  -c model_providers.together.name='Together AI' \
  -c model_providers.together.base_url='https://api.together.example/v1' \
  -c model_providers.together.env_key='TOGETHER_API_KEY'
```

### ai_sdk.ts

Call MiniMax M3.1 Flash from TypeScript with the Vercel AI SDK.

```ts
// npm install ai @ai-sdk/openai-compatible
import { createOpenAICompatible } from '@ai-sdk/openai-compatible'
import { generateText } from 'ai'

process.env.TOGETHER_API_KEY = '...'

const together = createOpenAICompatible({
  name: 'together',
  baseURL: 'https://api.together.example/v1',
  apiKey: process.env.TOGETHER_API_KEY,
})

const { text } = await generateText({
  model: together('MiniMaxAI/MiniMax-M3.1-Flash'),
  system: 'Be concise, reply with one sentence.',
  prompt: 'Where does "hello world" come from?',
})
console.log(text)
```

## About MiniMax M3.1 Flash

MiniMax M3.1 Flash costs $0.15 per million input tokens and $0.6 per million output tokens and has a 1M token context window.

MiniMax M3.1 Flash is an open-weights model released in October 2026. It is priced at the low end of the registry, at $0.15 per million input tokens and $0.60 per million output tokens, giving a blended price of about $0.26 per million tokens against a registry median of about $1.01. It ranks 38th of 194 on price, where 1 is the cheapest.

The model has a context window of 1M tokens and can return responses of up to 524k tokens. It accepts text, image and video input and supports tool calling, reasoning mode and structured output. It is served by MiniMax, Novita and Together AI. Its popularity rank of 6th of 194 is high relative to the rest of the registry.

The registry holds no benchmark results for this model, and no intelligence index score, so its quality relative to other models cannot be judged from the data given. Its knowledge cutoff is not recorded.

**Strengths**

- Input costs $0.15 per million tokens, well below the registry median blended price
- Context window of 1M tokens with responses up to 524k tokens
- Accepts text, image and video input, with tool calling and structured output
- Ranks 6th of 194 for popularity among models in the registry

**Weaknesses**

- No benchmark results, so output quality cannot be compared with other models
- Available from three providers, with no built-in Pydantic AI Gateway support
- No intelligence index or value rank is available

**Best for:** Cost-sensitive agents that process long documents or mixed text, image and video input, where benchmark evidence is not required.

## How it did on the Pydantic AI benchmarks

Written by an LLM from reviews of every run.

#### Overall
The model passed most cases across five benchmarks, scoring 80–90% on extraction and judgment tasks (Structured output 90%, LLM Judge 80%) and 50–85% on multi-step agent tasks. It handles explicit facts, units, and arithmetic reliably, but it is weaker at exhaustive coverage, at enforcing exact constraints, and at managing request budgets. Code mode raised the pass rate on SQL data analysis (80% vs 50%), matched tools on Billing ops (80% each), and trailed slightly on Research & deck (81% vs 85%).

#### Strengths
- On Structured output it passed all three £000 cases and all tier-3 and tier-4 cases, keeping signs, comparative columns, and group/parent differences correct.
- On Billing ops both modes passed every payment allocation, credit correction, invoice-total, outstanding-debt, and tutor-margin case.
- On Research & deck both runs switched to `view_pdf` for a scanned contract, recovered restated revenue figures, and reached a passing `check_deck` after format repairs.
- On SQL data analysis both modes passed midnight rollover, latest departure, meeting-point, one-vehicle, and Saturday service cases.
- On LLM Judge it reliably extracted explicit amounts, windows, and retry counts in single-request runs with no retries.

#### Weaknesses
- On Billing ops all four failures were invoice audits, including a tools run that inspected only 43 invoices and returned 6 of 12 overcharges.
- On Research & deck both final decks kept unsupported claims, such as cancelled orders counted as traction and an invented 32-month runway.
- On LLM Judge it relaxed exact requirements, accepting milestones on the wrong slide and treating 'some may' as satisfying 'most will'.
- On SQL data analysis three tools runs exhausted the 80-request limit, and small time-conversion errors (`28000` instead of `27600`) caused wrong journeys.
- On Structured output it added undisclosed aggregates and annotated director names where literal extraction was required.

#### Tool calling compared with code mode
- On SQL data analysis code mode kept all five tools-mode passes, added three more, and used 35% fewer requests, but made 1372 tool calls versus 752.
- On Billing ops code mode used about 20% fewer requests and fixed the small overcharge audit, but it turned a correct duplicate audit into a wrong one and returned zero findings on the large audit.
- On Research & deck code mode used 48 requests versus 31 for tools, hit repeated sandbox compatibility failures, and still produced factual overreach.
- Across Billing ops and SQL data analysis code mode made arithmetic explicit, but it brought recurring sandbox, import, and variable-lifetime errors and sometimes finalized without evidence.

Prices come from [genai-prices](https://github.com/pydantic/genai-prices), in US dollars per million tokens. Benchmark scores come from Epoch AI and LMArena (CC BY 4.0), Browser Use, and our own Pydantic AI benchmarks (CC BY 4.0); the index and its sources are described at https://pydantic.dev/models/methodology.md. Data built 2026-11-30. This model from the API: `https://pydantic.dev/models/api/models/minimax-m3.1-flash`. Compare it with others: `https://pydantic.dev/models/api/models?slug=minimax-m3.1-flash,<other slug>`
