Skip to main content
POST
/
anthropic
/
v1
/
messages
curl --request POST \
  --url https://api.minimax.io/anthropic/v1/messages \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: <content-type>' \
  --data '
{
  "model": "MiniMax-M3",
  "thinking": {
    "type": "adaptive"
  },
  "messages": [
    {
      "role": "user",
      "content": [
        {
          "type": "text",
          "text": "What does this image show?"
        },
        {
          "type": "image",
          "source": {
            "type": "url",
            "url": "https://filecdn.minimax.chat/public/fe9d04da-f60e-444d-a2e0-18ae743add33.jpeg"
          }
        }
      ]
    }
  ],
  "max_tokens": 500
}
'
{
  "id": "066a3730f92943410551c4b4978ddad1",
  "type": "message",
  "role": "assistant",
  "model": "MiniMax-M3",
  "content": [
    {
      "thinking": "The user is asking what the image shows. I can describe this image of a young child.",
      "signature": "db8ecae1e5a63cabebd69d2625983499bb498bfd329dde5c3cede76f12896336",
      "type": "thinking"
    },
    {
      "text": "This image shows a young girl, probably around 4-5 years old, photographed in a close-up portrait style. She has:\n\n- **Wavy, tousled light brown hair** with bangs that fall across her forehead, with some strands appearing slightly messy or windblown\n- **Large, expressive hazel-green eyes** that are looking directly at the camera\n- **A soft, subtle smile** giving her a warm, gentle expression\n- **Fair skin** with rosy cheeks, illuminated by warm, soft lighting\n\nShe's wearing what appears to be a **cream or off-white dress** with delicate lace or ruffled detailing around the neckline and shoulders.\n\nThe photograph has a **professional portrait quality**, with a softly blurred, neutral grayish-beige background and warm directional lighting that creates a classic, painterly aesthetic. The composition and styling suggest this could be a formal portrait or an AI-generated image with a vintage/realistic photographic style.",
      "type": "text"
    }
  ],
  "usage": {
    "input_tokens": 1209,
    "output_tokens": 214,
    "cache_creation_input_tokens": 0,
    "cache_read_input_tokens": 157
  },
  "stop_reason": "end_turn"
}
New model — MiniMax-M3Core capabilities: Coding/Agentic SOTA, 1M long context, multimodal.
What’s new in MiniMax-M3:
  1. Image and video understanding — see the example code on the right
  2. Control thinking via the thinking parameter

Authorizations

Authorization
string
header
required

Bearer API Key auth. Send Authorization: Bearer <API_KEY>. If Authorization and x-api-key are both present, Authorization takes precedence.

Headers

Content-Type
enum<string>
default:application/json
required

Media type of the request body, should be set to application/json to ensure JSON format

Available options:
application/json

Body

application/json
model
enum<string>
required

Model ID. MiniMax-M3 is a multimodal model with native support for text, image, and video input, alongside tool use and thinking content blocks. The M2.7, M2.5, M2.1, and M2 series support text and tool calls only and do not accept image or video input.

Available options:
MiniMax-M3,
MiniMax-M2.7,
MiniMax-M2.7-highspeed,
MiniMax-M2.5,
MiniMax-M2.5-highspeed,
MiniMax-M2.1,
MiniMax-M2.1-highspeed,
MiniMax-M2
messages
object[]
required

Conversation history. MiniMax-M3 supports text, image, video, tool use, tool result, and thinking content blocks. The M2.7, M2.5, M2.1, and M2 series support text and tool-call content blocks only; they do not support image or video input.

system

Set the role and behavior of the model.

stream
boolean
default:false

Whether to use streaming output, defaults to false. When set to true, the response will be returned in chunks

max_tokens
integer<int64>

Specifies the upper limit for generated content length (in tokens). For MiniMax-M3 the recommended value is 131072 (128K) and the maximum is 524288 (512K); for other models the recommended value is 65536 (64K) and the maximum is 204800 (200K). Content exceeding the limit will be truncated. If generation stops due to length, try increasing this value

Required range: x >= 1
temperature
number<double>
default:1

Temperature coefficient, affects output randomness. Range [0, 2], default 1. Higher values produce more random output; lower values produce more deterministic output.

Required range: 0 <= x <= 2
top_p
number<double>
default:0.95

Nucleus sampling parameter. Range [0, 1]. Default is 0.95 for MiniMax-M3 and 0.9 for M2.x models.

Required range: 0 <= x <= 1
tools
object[]

Tool definitions for Anthropic-compatible tool use.

tool_choice
object

Tool selection strategy. Only auto and none are supported.

thinking
object

Controls MiniMax-M3 thinking. When omitted, thinking is disabled by default and responses do not include thinking blocks. For M2.x models, thinking cannot be disabled.

metadata
object

Request metadata. user_id is recommended for end-user-level aggregation, rate limiting, and billing analysis.

Response

id
string

Unique ID of this response

type
enum<string>

Object type, fixed as message

Available options:
message
role
enum<string>

Role, fixed as assistant

Available options:
assistant
model
string

Model ID used for this request

content
object[]

List of response content blocks

stop_reason
enum<string>

Reason for stopping generation:

  • end_turn: Model ended naturally
  • max_tokens: Reached max_tokens limit
  • tool_use: Model requested tool use
Available options:
end_turn,
max_tokens,
tool_use
usage
object

Token usage for this request, including prompt cache usage when applicable.