minimax-m3 — API, Pricing & Context Window | Vivgrid
minimax-m3 on Vivgrid: MiniMax's efficient coding model with a 512K context window, 128K max output, and very competitive pricing.
minimax-m3 is MiniMax's efficient coding model, combining a large 512K-token context window with 128K-token max output and very competitive token pricing. It's a strong value pick for long-context coding agents.
On Vivgrid, minimax-m3 is available through the unified, OpenAI-compatible endpoint and is accelerated in APAC, making it especially attractive for Asia-Pacific deployments.
Specifications
| Provider | MiniMax |
| Model ID | minimax-m3 |
| Best for | Coding |
| Available on | Vibe coding |
| Context window | 512,000 tokens |
| Max output | 128,000 tokens |
| Modalities | Text, Image |
| Tool / function calling | Yes |
| Knowledge cutoff | 2026-01 |
| Acceleration | 🌐 Global (Centralized) |
Pricing
Pricing in USD per 1M tokens.
| Input | Cached input | Output |
|---|---|---|
| $1.20 | $0.24 | $2.40 |
What one request costs
The rates above applied to a 20K-token prompt with a 2K-token reply — a typical single agent turn, small enough that every request is billed at the base rate.
| Request | Cost |
|---|---|
| Cold prompt, nothing cached | $0.0288 |
| Warm prompt, 90% of the input served from cache | $0.0115 |
Use minimax-m3 in your coding agent
minimax-m3 works with the same Vivgrid key and https://api.vivgrid.com/v1 endpoint as every other model in the catalog. Grab your API key from the Vivgrid Console, then drop one of the configurations below into your agent of choice.
OpenCode
OpenCode has Vivgrid built in, so you can use minimax-m3 without writing any config: open /models, search for vivgrid, paste your API key and pick the model. The OpenCode tutorial walks through it step by step.
Prefer to configure it by hand? Install OpenCode:
npm i -g opencode-aiDeclare minimax-m3 under the Vivgrid provider in your global OpenCode config, ~/.config/opencode/opencode.json. The @ai-sdk/openai-compatible provider talks to Vivgrid over Chat Completions (/v1/chat/completions):
{
"$schema": "https://opencode.ai/config.json",
"model": "vivgrid/minimax-m3",
"provider": {
"vivgrid": {
"npm": "@ai-sdk/openai-compatible",
"name": "Vivgrid",
"options": {
"baseURL": "https://api.vivgrid.com/v1",
"apiKey": "{env:VIVGRID_API_KEY}"
},
"models": {
"minimax-m3": {
"name": "minimax-m3",
"tool_call": true,
"attachment": true,
"modalities": { "input": ["text", "image"], "output": ["text"] },
"limit": { "context": 512000, "output": 128000 }
}
}
}
}
}Export your key and launch OpenCode:
export VIVGRID_API_KEY="viv-xxxxxxxxxxxxx"
opencodeUse /models to switch between minimax-m3 and other Vivgrid models mid-session. See the full OpenCode tutorial.
Pi
Install Pi:
npm install -g --ignore-scripts @earendil-works/pi-coding-agentAdd minimax-m3 to the Vivgrid provider in ~/.pi/agent/models.json. Pi talks to Vivgrid over Chat Completions (/v1/chat/completions):
{
"providers": {
"vivgrid": {
"baseUrl": "https://api.vivgrid.com/v1",
"apiKey": "viv-xxxxxxxxxxxxx",
"api": "openai-completions",
"models": [
{
"id": "minimax-m3",
"input": ["text", "image"],
"contextWindow": 512000,
"maxTokens": 128000
}
]
}
}
}Make it the model Pi starts with in ~/.pi/agent/settings.json:
{
"defaultProvider": "vivgrid",
"defaultModel": "minimax-m3"
}Then verify and start Pi:
pi --list-models vivgrid
piOr run a one-shot prompt without entering the TUI:
pi -p "explain the auth flow in this repo" --model vivgrid/minimax-m3See the full Pi tutorial.
API surfaces
The Vivgrid Console catalogs minimax-m3 on one surface, all behind the same API key. The endpoint shown is the one the Console previews for that surface.
| Surface | Primary endpoint | Use it for |
|---|---|---|
| Vibe coding | /chat/completions | Coding CLIs and IDE agents that drive the model themselves — point the tool at Vivgrid and keep your own loop. |
Quick start
Get an API key from the Vivgrid Console, then call minimax-m3 directly.
curl https://api.vivgrid.com/v1/chat/completions \
-H "Authorization: Bearer $VIVGRID_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "minimax-m3",
"messages": [
{ "role": "user", "content": "Say hello in English, Chinese and Spanish." }
],
"stream": true
}'Ideal use cases
- Long-context coding agents on a budget
- APAC-based deployments needing low latency
- Tasks generating substantial code output
- High-volume engineering workloads
Related models
- gpt-6-astra — OpenAI's frontier gpt-6 coding model
- minimax-m2.7 — the prior MiniMax generation
- kimi-k3 — frontier Moonshot coding model