MiniMax-M3.1-Flash's Anthropic-compatible API supports text, image, video, tool, and thinking content blocks, and uses output_config.effort to adjust reasoning depth; the model always has thinking enabled and cannot turn it off.
Suitable tasks: Multimodal requests, adaptive reasoning, streaming output, and multi-turn tool calls using the Anthropic SDK.
Unsuitable tasks: Configurations that depend on disabling thinking, tuning temperature, or using parameters unsupported by the Anthropic compatibility layer.
Supported model versions: MiniMax-M3.1-Flash. This compatibility endpoint currently supports only MiniMax-M3.1-Flash and MiniMax-M3; this article draws conclusions only about the former.
Applicable clients, agents, or APIs: The Anthropic SDK and clients that implement the Anthropic Messages API.
Recommended reasoning tiers and parameters: Set output_config.effort to low, medium, high, xhigh, or max; when omitted, it defaults to max. none is unsupported.
export ANTHROPIC_BASE_URL="https://api.minimax.io/anthropic"
export ANTHROPIC_API_KEY="<MINIMAX_API_KEY>"import anthropic
client = anthropic.Anthropic()
message = client.messages.create(
model="MiniMax-M3.1-Flash",
output_config={"effort": "max"},
max_tokens=4096,
system="You are a helpful assistant.",
messages=[{
"role": "user",
"content": [{"type": "text", "text": "Hi, how are you?"}],
}],
)
for block in message.content:
if block.type == "thinking":
print(block.thinking)
elif block.type == "text":
print(block.text)The corresponding HTTP path is POST https://api.minimax.io/anthropic/v1/messages. At minimum, requests should always set model, max_tokens, and messages; add output_config.effort when you need to control reasoning depth.
| Configuration | MiniMax-M3.1-Flash behavior |
|---|---|
thinking omitted | Thinking enabled |
thinking: {"type": "adaptive"} | Thinking enabled |
thinking: {"type": "disabled"} | Returns 400; thinking cannot be disabled |
output_config.effort | low / medium / high / xhigh / max |
output_config.effort omitted | Defaults to max |
output_config.effort: "none" | Returns 400 |
max_tokens counts thinking tokens as well. If the value is too small, the response may end with stop_reason: "max_tokens" and contain no text output. A higher effort produces more thinking tokens and also increases latency.
| Content block | Support | Constraints |
|---|---|---|
text | Supported | Text input |
image | Supported | URL or base64; JPEG, PNG, GIF, WEBP; no more than 10 MB per image |
video | Supported | URL, base64, or mm_file://{file_id}; MP4, AVI, MOV, MKV |
tool_use | Supported | Tool calls |
tool_result | Supported | Tool results |
thinking | Supported | Preserve unchanged in multi-turn requests |
Videos supplied as a URL or base64 may not exceed 50 MB, and the request body may not exceed 64 MB; larger videos can first be uploaded through the Files API, where the file video limit is 512 MB. Image token usage varies with dimensions and content. Use POST /anthropic/v1/messages/count_tokens to estimate it. The documentation gives these rough ranges for a single image: low is usually a few hundred (up to about 600), default is commonly about 1k–3k (up to about 5k), and high is commonly several thousand (possibly exceeding 15k).
stream = client.messages.create(
model="MiniMax-M3.1-Flash",
output_config={"effort": "max"},
max_tokens=4096,
messages=[{
"role": "user",
"content": [{"type": "text", "text": "Hi, how are you?"}],
}],
stream=True,
)
thinking_text = ""
answer_text = ""
for chunk in stream:
if chunk.type == "content_block_delta" and chunk.delta:
if chunk.delta.type == "thinking_delta":
thinking_text += chunk.delta.thinking or ""
elif chunk.delta.type == "text_delta":
answer_text += chunk.delta.text or ""Streaming events also include content_block_start. Handle thinking_delta and text_delta separately; do not combine thinking content and the final answer into one string.
If a subsequent request is to continue a tool call or chain of thought, append the complete assistant response to the history, preserving all thinking, text, and tool_use content blocks in message.content. Saving only the final text will break the context required by subsequent turns.
Install the Anthropic SDK, set ANTHROPIC_BASE_URL=https://api.minimax.io/anthropic, and configure the API key.
Fix the model as MiniMax-M3.1-Flash and set a sufficiently large max_tokens, because thinking tokens count toward this limit.
Choose output_config.effort based on latency and task difficulty; omit the field when you want the default highest tier.
Use a URL or base64 for images, and verify the format and 10 MB size limit; for large videos, use the Files API's mm_file://{file_id}.
With stream=True, consume thinking and text events separately; for multi-turn calls, preserve the complete assistant content blocks unchanged.
Use count_tokens or the usage data in the response to check multimodal input cost; do not estimate token usage from image file size alone.
The documentation gives ANTHROPIC_BASE_URL=https://api.minimax.io/anthropic as the Anthropic SDK environment variable. Its minimal example uses model="MiniMax-M3.1-Flash", output_config={"effort":"max"}, and max_tokens=4096.
The compatibility endpoint currently supports only MiniMax-M3.1-Flash and MiniMax-M3; other models should use the standard MiniMax API.
The documentation lists model, max_tokens, stream, system, tool_choice, tools, metadata, thinking, and output_config.effort as supported options. For M3.1-Flash, messages supports text, image, video, tool call, tool result, and thinking blocks.
temperature is ignored and the model is fixed at 1; top_p is ignored and fixed at 0.95, and if supplied it must be in (0, 1]; top_k, stop_sequences, mcp_servers, context_management, and container are also ignored.
The documentation's service_tier row says both that standard/priority are supported and that MiniMax-M3.1-Flash does not support this field. This is an internal contradiction on the page. For M3.1-Flash, service_tier should not be treated as an available configuration; wait for official clarification.
thinking: {"type": "disabled"} and reasoning.effort=none do not apply to MiniMax-M3.1-Flash and trigger 400; do not infer the behavior of MiniMax-M3 from this.
The Anthropic compatibility layer is not a universal entry point for all MiniMax models; the documentation explicitly excludes other models.
Sampling parameters such as temperature and top_p do not change M3.1-Flash's behavior even when included in a request. The support status of service_tier is subject to the documentation contradiction, so it cannot guarantee priority queuing or pricing.
The image token figures are only rough estimates for a single image; use count_tokens or response usage for actual usage.
This page does not disclose the complete rate limits, pricing, maximum output limit, or all error codes for the Anthropic compatibility layer. Check the corresponding page separately before configuring production use.
On 2026-10-21, the official page https://platform.minimax.io/docs/api-reference/text-anthropic-api was checked for environment variables, supported model scope, parameter tables, thinking controls, content block limits, and streaming examples. This article retains the key configurations and fields without reproducing the entire page; items for which the source does not specify a publication date, complete rate limits, or a complete pricing table are marked as unspecified or limited.
MiniMax M3.1 Flash