Holiday Sale

20% off yearly plans, first year+20% credits on packs of $20+

See offer
Creovox AI
Start free

Home/MiniMax M4 API

Developer API - OpenAI-compatible

MiniMax M4 API

An OpenAI-compatible chat completions endpoint for MiniMax M4. Keep your existing OpenAI SDK code, change the base URL and the model id, and pay per token with the same Creovox credits you use for video, image and music.

Independent service, not affiliated with or endorsed by MiniMax. MiniMax and MiniMax M4 are trademarks of their respective owners.

Quick start

  1. 01

    Create an API key

    Sign in and open API Keys in the dashboard. Create a separate key for each app so you can disable one without breaking the others.

  2. 02

    Point your OpenAI SDK at Creovox

    Set base_url (Python) or baseURL (Node) to https://creovox.ai/api/v1 and use your Creovox key as the API key.

  3. 03

    Call minimax-m4

    Send a chat completion request with the model id minimax-m4. Credits are charged per token from your Creovox balance.

Connection details

Any OpenAI SDK or HTTP client works. CORS is open, but keep your API key on your server and never put it in browser code.

ItemValue
Base URLhttps://creovox.ai/api/v1
EndpointPOST https://creovox.ai/api/v1/chat/completions
AuthenticationAuthorization: Bearer YOUR_API_KEY
Model idminimax-m4
OpenAI SDKsSet base_url (Python) or baseURL (Node) to the base URL above

Code samples

Each example reads your key from the CREOVOX_API_KEY environment variable.

curl

curl https://creovox.ai/api/v1/chat/completions \
  -H "Authorization: Bearer $CREOVOX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "minimax-m4",
    "messages": [
      {"role": "user", "content": "Write a Python function that merges two sorted lists."}
    ]
  }'

Python (OpenAI SDK)

import os
from openai import OpenAI

client = OpenAI(
    base_url="https://creovox.ai/api/v1",
    api_key=os.environ["CREOVOX_API_KEY"],
)

response = client.chat.completions.create(
    model="minimax-m4",
    messages=[{"role": "user", "content": "Write a Python function that merges two sorted lists."}],
    reasoning_effort="medium",
)

print(response.choices[0].message.content)

Node.js (OpenAI SDK)

import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://creovox.ai/api/v1",
  apiKey: process.env.CREOVOX_API_KEY,
});

const response = await client.chat.completions.create({
  model: "minimax-m4",
  messages: [{ role: "user", content: "Write a Python function that merges two sorted lists." }],
  reasoning_effort: "medium",
});

console.log(response.choices[0].message.content);

Streaming (Python)

import os
from openai import OpenAI

client = OpenAI(
    base_url="https://creovox.ai/api/v1",
    api_key=os.environ["CREOVOX_API_KEY"],
)

stream = client.chat.completions.create(
    model="minimax-m4",
    messages=[{"role": "user", "content": "Write a Python function that merges two sorted lists."}],
    stream=True,
    stream_options={"include_usage": True},
)

for chunk in stream:
    if chunk.choices and chunk.choices[0].delta.content:
        print(chunk.choices[0].delta.content, end="")

Request parameters

Supported request fields. Messages are text only: images and files are not supported yet.

ParameterTypeDescription
modelstringMust be minimax-m4, the only model on this endpoint.
messagesarrayConversation messages. content is a string or an array of text parts. Text only.
streambooleanSet to true to receive server-sent events instead of a single JSON response.
stream_optionsobjectStreaming options, as in the OpenAI API.
reasoning_effortstringlow, medium, high or xhigh. Other values are ignored, because MiniMax M4 reasoning is always on.
max_tokensintegerPositive integer. Values above 131072 are capped at 131072.
temperaturenumberSampling temperature, as in the OpenAI API.
top_pnumberNucleus sampling, as in the OpenAI API.
toolsarrayFunction tool definitions in OpenAI format.
tool_choicestring / objectControls whether and which tool the model calls, as in the OpenAI API.
parallel_tool_callsbooleanAllow the model to return several tool calls in one turn.
response_formatobjectRequest structured output, for example JSON mode.

Pricing

Requests are billed from your Creovox credit balance. MiniMax's own list price is shown for reference only.

ItemCreovoxMiniMax list price (reference)
Input tokens240 credits per 1M tokens$0.80 per 1M tokens
Cached input tokens—$0.05 per 1M tokens
Output tokens930 credits per 1M tokens$3.10 per 1M tokens
Minimum charge0.05 credits per request—

Credits are the same balance used across Creovox. The MiniMax column is MiniMax's own list price, not the Creovox price. See pricing

MiniMax M4 at a glance

Facts reported by MiniMax and OpenRouter, linked below.

ItemValue
DeveloperMiniMax
Release dateDecember 3, 2026
Parameters2.74T total, 66B active per token, mixture-of-experts
Context window1M tokens
Max output on Creovox131,072 tokens per request
ReasoningAlways on and cannot be turned off
Input on this APIText only for now. The model itself accepts image and video input; this endpoint does not expose it yet.
WeightsNot released yet, according to MiniMax's GitHub repository

Sources:MiniMax blogMiniMax on GitHubOpenRouter listing

Benchmarks

Vendor-reported by MiniMax. These scores come from MiniMax's own chart and are not independent measurements. Higher is better.

Vendor-reported by MiniMax
BenchmarkMiniMax M4Kimi K3.1DeepSeek V4.1GLM 5.3Gemini 4 NeonGPT-6.2 SolOpus 5.5Fable 5.2
FrontierCode-AA 2.03325.528.221.644.444.446.948.8
Code Arena (WebDev)17251682166116231759175218181819
Agent Arena11941146110810981313121713501433
Finance Agent v2.166.761.562.96568.658.967.969.5
Design Arena (HTML)14401402136113351437146614451460

MiniMax itself says a substantial gap remains compared with the strongest overseas models. Test the model on your own prompts before you rely on it.

Errors

Errors use the OpenAI shape: an error object with message, type and code. Branch on error.code.

HTTP statuserror.codeMeaning
400invalid_requestThe request is invalid, for example a missing or wrongly typed field or a model other than minimax-m4.
401invalid_api_keyThe API key is missing or invalid.
402insufficient_creditsYour credit balance is too low for this request. Top up your credits.
429rate_limit_exceededToo many requests. Retry with exponential backoff.
502upstream_errorThe upstream provider returned an error.
503service_unavailableThe service is temporarily unavailable. Retry shortly.

Served model and fallback

Requests are served by MiniMax M4 through OpenRouter (minimax/minimax-m4). If that upstream is unavailable, a request may be answered by GPT-6.2 Sol instead. A fallback is never presented as M4:

  • The model field of the response says gpt-6.2-sol.
  • The X-Served-Model response header says gpt-6.2-sol.
  • The request is billed at the lower GPT-6.2 Sol rate: 180 credits per 1M input tokens and 900 credits per 1M output tokens.

Read the served model in code:

raw = client.chat.completions.with_raw_response.create(
    model="minimax-m4",
    messages=[{"role": "user", "content": "Hello"}],
)

print(raw.headers.get("X-Served-Model"))
response = raw.parse()
print(response.model)  # "gpt-6.2-sol" means the fallback answered

FAQ

Is this the official MiniMax API?

No. Creovox is independent and is not affiliated with or endorsed by MiniMax. It offers MiniMax M4 through an OpenAI-compatible endpoint, served via OpenRouter, and bills in Creovox credits.

How much does the MiniMax M4 API cost on Creovox?

240 credits per 1M input tokens and 930 credits per 1M output tokens, with a minimum of 0.05 credits per request. For reference, MiniMax's own list price is $0.80 input, $0.05 cached input and $3.10 output per 1M tokens. That is MiniMax's price, not the Creovox price.

Does it work with the OpenAI SDK?

Yes. Set base_url (Python) or baseURL (Node) to https://creovox.ai/api/v1, use your Creovox API key and the model id minimax-m4. Any HTTP client can also call POST /chat/completions directly.

How are requests billed, and what are the limits?

Each request is charged in credits from your Creovox balance, per token, with a minimum of 0.05 credits. When the balance is too low the API returns 402 insufficient_credits. Too many requests return 429 rate_limit_exceeded; retry with exponential backoff.

Can I send images or files?

Not yet. This endpoint is text only: message content is a string or an array of text parts. Images and files are not supported yet.

What happens if MiniMax M4 is unavailable?

A request may be answered by GPT-6.2 Sol instead. When that happens, the response model field and the X-Served-Model header say gpt-6.2-sol, and the request is billed at the lower GPT-6.2 Sol rate. A fallback is never presented as M4.

Can I turn reasoning off?

No. MiniMax M4 reasoning is always on. reasoning_effort accepts low, medium, high or xhigh; other values are ignored.

Keep going