Quick Start
1. Install Anthropic SDK
2. Configure Environment Variables
3. Call API
Python
4. Important Note
In multi-turn function call conversations, the complete model response (i.e., the assistant message) must be append to the conversation history to maintain the continuity of the reasoning chain.- Append the full
response.contentlist to the message history (includes all content blocks: thinking/text/tool_use)
Supported Models
When using the Anthropic SDK, the following models are supported.For details on how tps (Tokens Per Second) is calculated, please refer to FAQ > About APIs.
The Anthropic API compatibility interface currently only supports the
MiniMax-M3.1-Flash MiniMax-M3 models. For other models, please use the standard MiniMax API
interface.Compatibility
Supported Parameters
When using the Anthropic SDK, we support the following input parameters:Thinking Control
Thethinking parameter controls whether the model can emit thinking content blocks. Behavior differs per model:
The error returned for
thinking: {"type": "disabled"}:thinking blocks, preserve them unchanged in later turns, especially in tool-use conversations.
Thinking Depth Control (MiniMax-M3.1-Flash only)
MiniMax-M3.1-Flash supports tuning thinking depth through output_config.effort, from low through medium, high, xhigh, to max. Higher levels make the model think more thoroughly, producing more thinking tokens at higher latency. When omitted, output_config.effort defaults to max.
none is not supported and returns 400.
curl
Messages Field Support
Image and video blocks accept
detail (low, default, or high; defaults to default) and max_long_side_pixel in source to control scaling. Video blocks also accept fps in source; it defaults to 2 and accepts values from 0.2 to 5.
Input Limits
Image token usage depends on image size and content. Use this as a rough single-image heuristic; check
POST /anthropic/v1/messages/count_tokens or response usage for exact usage:
The Anthropic-compatible API also supports
POST /anthropic/v1/messages/count_tokens for MiniMax-M3.1-Flash and MiniMax-M3 token estimation. This endpoint returns input token usage without generating model output.
Examples
Streaming Response
Python