Setup guide - Documented by MiniMax
Use MiniMax in Codex CLI
MiniMax documents a Codex setup that adds a custom model provider in ~/.codex/config.toml pointing at https://api.minimax.io/v1 with the Responses wire API, or a one-click mmx-cli wizard that writes the same config.
Last verified 4 steps3 official sources
Steps
- Step 1.
Option 1 (one-click setup wizard): run the wizard and select Codex. Codex CLI 0.146.0 or newer is recommended. The wizard configures ~/.codex/config.toml and ~/.codex/mmx-model-catalog.json. Close Codex and any editor that has ~/.codex/config.toml open first, then restart Codex after setup.
Terminalnpx -y mmx-cli@latest agent setup - Step 2.
Option 2 (manual): open ~/.codex/config.toml and add or update these entries, replacing <MINIMAX_API_KEY> with your key.
TOMLmodel = "MiniMax-M3.1-Flash-Preview" model_provider = "minimax" model_context_window = 524288 preferred_auth_method = "apikey" forced_login_method = "api" [model_providers.minimax] name = "MiniMax" base_url = "https://api.minimax.io/v1" experimental_bearer_token = "<MINIMAX_API_KEY>" wire_api = "responses" - Step 3.
Optional: to show the model and its reasoning levels in /model, add a model catalog line to ~/.codex/config.toml and create ~/.codex/model-catalogs/custom-catalog.json with the catalog JSON from the MiniMax guide (slug MiniMax-M3.1-Flash-Preview, supported_reasoning_levels low/medium/high/xhigh/max, context_window 524288).
TOMLmodel_catalog_json = "~/.codex/model-catalogs/custom-catalog.json" - Step 4.
Restart Codex to start using MiniMax-M3.1-Flash-Preview.
Caveats
- The guide is written for M Plan with a Subscription Key; MiniMax-M3.1-Flash-Preview is available only through M Plan and MiniMax Code for now. Pay-as-you-go users would need a different model id; MiniMax does not show that variant in the Codex guide.
- Do not add { "effort": "none" } to supported_reasoning_levels: MiniMax-M3.1-Flash-Preview always thinks, so Codex sends reasoning: {"effort": "none"} and the API returns 400.
- MiniMax's page describes Codex as the desktop app but also references Codex CLI 0.146.0+ and ~/.codex/config.toml, which the CLI shares.
- The API key is stored inline via experimental_bearer_token as documented by MiniMax; no env var is used in this guide.
More setup guides
Same tool, other providers
Related reading
- MiniMax H3: An Omni-Modal Video Model With Native Audio, 2K Output, and Open Weights ComingMiniMax H3 turns text, image, video and audio input into 2K video with native stereo sound at 0.80 CNY per second, with open weights promised to follow.
- MiniMax M2.5 for Developers: The Anthropic-Compatible Budget Frontier ModelMiniMax M2.5 hits 80.2% on SWE-bench Verified and plugs into the Anthropic SDK with two environment variables. Here is what you need to know before switching.
- Codex CLI 0.163: Instant Steering Is Now the DefaultCodex CLI 0.163.0 makes mid-response steering the default and adds searchable /config and a leader key. What changed and what to check before upgrading.
- Codex 'gpt-5.5 Model Is Not Supported' Error: The FixCodex says gpt-5.5 is not supported with a ChatGPT account because OpenAI retired it from ChatGPT sign-in on October 14. The fix and what still works.
- Agent Harness Lessons From a 500B-Token Decompile: Give Agents a PASS/FAIL OracleAgent harness lessons from a 500B+ token decompile: a byte-matching PASS/FAIL oracle beat the reviewer agent. How agents cheated it and what to copy.
- Codex CLI Background Daemon: How to Turn It OffCodex CLI starts a persistent, self-updating background daemon since 0.157.0. What it does, why it hit Hacker News and the reported workaround to turn it off.
FAQ
How do I use MiniMax in Codex CLI?
MiniMax documents a Codex setup that adds a custom model provider in ~/.codex/config.toml pointing at https://api.minimax.io/v1 with the Responses wire API, or a one-click mmx-cli wizard that writes the same config.
Which MiniMax model ids work in Codex CLI?
The official docs read for this guide list MiniMax-M3.1-Flash-Preview, MiniMax-M3, MiniMax-M2.7, MiniMax-M2.7-highspeed, MiniMax-M2.5 and MiniMax-M2.5-highspeed. Requests go to https://api.minimax.io/v1.
Is this an official MiniMax and Codex CLI setup?
MiniMax documents this setup in its own docs. It was last checked against 3 official pages on October 17, 2026.
Sources
Last verified against 3 official pages.
- platform.minimax.iohttps://platform.minimax.io/docs/m-plan/codex.md
- platform.minimax.iohttps://platform.minimax.io/docs/api-reference/text-openai-api.md
- platform.minimax.iohttps://platform.minimax.io/docs/faq/models.md
Newsletter
New models, set up the day they ship
One email per week. New model releases, the coding tools that support them and how to wire them up.