compatible-only
MODEL IDminimax:m4@0

MiniMax M4

MiniMax
by

MiniMax M4 is MiniMax's flagship open-weight multimodal reasoning model, with 2.74 trillion total parameters, 66 billion active, a 1 million token context window, and native image and video understanding. It targets demanding agentic workloads such as complex software engineering, long-horizon autonomous tasks, computer use, and professional knowledge work, and can deliver end-to-end artifacts like financial models, presentations, interactive websites, 3D scenes, and games. Its MiniMax Sparse Attention 2 and MFlashKV architecture is designed for low-latency, high-throughput inference at trillion-parameter scale.

MiniMax M4

MiniMax M4 is served through Runware's compatible endpoints, which take another provider's request format. Point the SDK you already use at Runware by changing the base URL and the API key, and set model to minimax:m4@0.

Requests and responses keep the provider's format, so its reference documents every parameter.

EndpointFormat
/v1/chat/completionsOpenAI Chat Completions
/v1/messagesAnthropic Messages

Chat Completions

curl -X POST https://api.runware.ai/v1/chat/completions \
  -H "Authorization: Bearer $RUNWARE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "minimax:m4@0",
    "messages": [{"role": "user", "content": "What is the capital of France?"}]
  }'
from openai import OpenAI

client = OpenAI(
    api_key="your_runware_api_key",
    base_url="https://api.runware.ai/v1",
)

response = client.chat.completions.create(
    model="minimax:m4@0",
    messages=[{"role": "user", "content": "What is the capital of France?"}],
)

print(response.choices[0].message.content)
import OpenAI from 'openai';

const client = new OpenAI({
  apiKey: 'your_runware_api_key',
  baseURL: 'https://api.runware.ai/v1',
});

const response = await client.chat.completions.create({
  model: 'minimax:m4@0',
  messages: [{ role: 'user', content: 'What is the capital of France?' }],
});

console.log(response.choices[0].message.content);
import { createOpenAICompatible } from '@ai-sdk/openai-compatible';
import { generateText } from 'ai';

const runware = createOpenAICompatible({
  name: 'runware',
  apiKey: 'your_runware_api_key',
  baseURL: 'https://api.runware.ai/v1',
});

const { text } = await generateText({
  model: runware('minimax:m4@0'),
  prompt: 'What is the capital of France?',
});

console.log(text);
from langchain_openai import ChatOpenAI

llm = ChatOpenAI(
    model="minimax:m4@0",
    api_key="your_runware_api_key",
    base_url="https://api.runware.ai/v1",
)

response = llm.invoke("What is the capital of France?")

print(response.text)

Compatible APIs covers streaming, tool calling and how the endpoint differs from OpenAI, and the OpenAI API reference lists every parameter.

Messages

curl -X POST https://api.runware.ai/v1/messages \
  -H "Authorization: Bearer $RUNWARE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "minimax:m4@0",
    "max_tokens": 1024,
    "messages": [{"role": "user", "content": "What is the capital of France?"}]
  }'
from anthropic import Anthropic

client = Anthropic(
    auth_token="your_runware_api_key",
    base_url="https://api.runware.ai",
)

message = client.messages.create(
    model="minimax:m4@0",
    max_tokens=1024,
    messages=[{"role": "user", "content": "What is the capital of France?"}],
)

for block in message.content:
    if block.type == "text":
        print(block.text)
import Anthropic from '@anthropic-ai/sdk';

const client = new Anthropic({
  authToken: 'your_runware_api_key',
  baseURL: 'https://api.runware.ai',
});

const message = await client.messages.create({
  model: 'minimax:m4@0',
  max_tokens: 1024,
  messages: [{ role: 'user', content: 'What is the capital of France?' }],
});

for (const block of message.content) {
  if (block.type === 'text') {
    console.log(block.text);
  }
}
import { createAnthropic } from '@ai-sdk/anthropic';
import { generateText } from 'ai';

const runware = createAnthropic({
  authToken: 'your_runware_api_key',
  baseURL: 'https://api.runware.ai/v1',
});

const { text } = await generateText({
  model: runware('minimax:m4@0'),
  maxOutputTokens: 1024,
  prompt: 'What is the capital of France?',
});

console.log(text);
from langchain_anthropic import ChatAnthropic

llm = ChatAnthropic(
    model="minimax:m4@0",
    base_url="https://api.runware.ai",
    default_headers={"Authorization": "Bearer your_runware_api_key"},
    max_tokens=1024,
)

response = llm.invoke("What is the capital of France?")

print(response.text)

Compatible APIs covers how the Anthropic SDKs authenticate against Runware, and the Claude API reference lists every parameter.