M4 MiniMax

MiniMax M4 API Guide: Model ID & Endpoints

Call MiniMax-M4 via OpenAI- or Anthropic-compatible APIs — model ID, base URLs, and integration notes.

MiniMax M4 API integration

Use model ID MiniMax-M4. MiniMax documents two base URLs:

Style Base URL
Anthropic-compatible (recommended in docs) https://api.minimax.io/anthropic
OpenAI-compatible https://api.minimax.io/v1

Get an API key from the MiniMax open platform, then set thinking depth with effort / output_config.effort as described in their text-generation guide.

Minimal OpenAI-compatible sketch

curl https://api.minimax.io/v1/chat/completions \
  -H "Authorization: Bearer $MINIMAX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "MiniMax-M4",
    "messages": [{"role":"user","content":"Summarize MiniMax M4 context window"}]
  }'

What to configure in agents

  • Cursor / Claude Code / Codex-style tools: point the custom base URL at MiniMax’s Anthropic-compatible endpoint when supported.
  • Long context: design prompts for up to 1M tokens, but measure latency and cache hit rate.
  • Failure modes: keep retries and token accounting — output tokens drive most of the bill (pricing).

Related models still listed

Docs still mention MiniMax-M3.1-Flash and MiniMax-M3. Prefer MiniMax-M4 for the new frontier stack unless you need a cheaper sibling.

FAQ

Is the API OpenAI drop-in?
It offers an OpenAI-compatible path, but validate tool calling, streaming, and vision fields against current docs.

Where do I read official invocation rules?
MiniMax text generation guide.

FAQ

What is the MiniMax M4 model ID?

Use MiniMax-M4 in API requests.

Which base URL should I use?

Docs list https://api.minimax.io/anthropic and https://api.minimax.io/v1.