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 M Plan API key.
TOMLmodel = "MiniMax-M3.1-Flash" 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, default_reasoning_level max, supported_reasoning_levels low/medium/high/xhigh/max, context_window 524288). Restart Codex after changing the catalog.
TOMLmodel_catalog_json = "~/.codex/model-catalogs/custom-catalog.json" - Step 4.
Restart Codex to start using MiniMax-M3.1-Flash.
Caveats
- The guide is written for M Plan and uses an M Plan API key from MiniMax's Plan Details page.
- Do not add { "effort": "none" } to supported_reasoning_levels: MiniMax-M3.1-Flash always thinks, so Codex sends reasoning: {"effort": "none"} and the API returns 400.
- MiniMax's page covers both the Codex desktop app and Codex CLI, which share ~/.codex/config.toml.
- 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 M2.5 and M2.7 Retirement: How to Move to M3 Before November 18MiniMax closes M2.5 and M2.7 to new users on October 19, 2026 and retires them on November 18. Which model id to switch to, what it costs, and the exact API change.
- MiniMax H3: Omni-Modal Video, Native Audio, Open WeightsMiniMax H3 turns text, image, video and audio into video with native stereo sound. API from 0.80 CNY per second at 2K, and open weights are on Hugging Face.
- 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.
- Droid vs Codex (2026): Factory vs OpenAI for Terminal Coding AgentsFactory Droid vs OpenAI Codex compared on models, pricing, headless CI, multi-agent work, extensibility and openness, with a clear recommendation for each kind of developer.
- Codex CLI 0.171: codex exec --remote, Workspace On by DefaultCodex CLI 0.171.0 adds codex exec --remote to run headless sessions on an existing app server, turns on the TUI workspace by default and picks GPT-6.2 Sol.
- GPT-6.2 Astra and Sol: Pricing, Benchmarks and What to SwitchGPT-6.2 Astra costs $8/$40 per MTok (20% under GPT-6 Astra), Sol stays $2/$10. Vendor-reported benchmarks, cache rates, Codex setup and who should switch.
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 and MiniMax-M3. 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 November 8, 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.