MiniMax M4 is now available on AI Gateway. It is MiniMax's new flagship, an open-weight multimodal reasoning model for coding and computer-use agents.
Compared with earlier MiniMax models, M4 is a much larger model at 3T parameters and improves long-horizon coding. M4 also brings efficiency improvements. It activates only a small share of its total parameters for each token, so inference stays efficient for a model of its size. A new image encoding turns each image into fewer visual tokens, which lowers input token counts for requests with images, and a new attention design uses less memory per token across its 1M-token context window.
Reasoning is always on. Lower effort reduces latency and reasoning tokens. The model supports tool calling, accepts text and image input, and has a 1M-token context window.
Use minimax/minimax-m4 as the model name:
import { streamText } from 'ai';
const result = streamText({ model: 'minimax/minimax-m4', prompt: 'Write a TypeScript function that debounces another function.',});
for await (const text of result.textStream) { process.stdout.write(text);}To use it in Claude Code, Codex, Cursor, and more, install the latest Vercel CLI and run setup:
npx vercel ai-gateway setupThen select minimax/minimax-m4 in the agent. See the coding agents guide for details.
Try MiniMax M4 in the model playground.
Zero Data Retention for M4 on Gateway will become available as more providers add support for the model.
AI Gateway provides a unified API for calling models, tracking usage and cost, and configuring retries, failover, and performance optimizations for higher-than-provider uptime. It includes built-in custom reporting, Zero Data Retention support, budgets for API keys, routing rules, and more.
AI Gateway reflects provider pricing with no markup and does not charge a platform fee on inference, including on Bring Your Own Key (BYOK) requests.
You can view all language models available on AI Gateway.