Skip to main content
POST

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. Native support for text, image, and video input, alongside tool use and thinking content blocks. MiniMax-M4 and MiniMax-M3.1-Flash always think and support tunable thinking depth via output_config.effort.

Available options:
MiniMax-M4,
MiniMax-M3.1-Flash,
MiniMax-M3
messages
object[]
required

Conversation history. Supports text, image, video, tool use, tool result, and thinking content blocks.

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).

  • MiniMax-M4: recommended value 131072 (128K), maximum 262144 (256K).
  • MiniMax-M3.1-Flash, MiniMax-M3: recommended value 131072 (128K), maximum 524288 (512K).

Content exceeding the limit will be truncated. If stop_reason is max_tokens, try increasing this value.

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

Fixed at 1; any value passed has no effect.

top_p
number<double>
default:0.95

Fixed at 0.95; any value passed has no effect. If passed, the value must be within (0, 1].

tools
object[]

Tool definitions for Anthropic-compatible tool use.

tool_choice
object

Tool selection strategy. Only auto is supported; the model decides whether to call tools.

thinking
object

Controls thinking behavior. The default depends on the model, so no schema-level default is declared.

  • MiniMax-M4, MiniMax-M3.1-Flash: always thinks. If type is sent it must be adaptive; disabled returns HTTP 400. Use output_config.effort to tune thinking depth.
  • MiniMax-M3: thinking is off when thinking is omitted; send adaptive to enable it and return thinking blocks.
output_config
object

Output configuration. Use effort to tune thinking depth for MiniMax-M4 and MiniMax-M3.1-Flash; MiniMax-M3 does not support tuning thinking depth.

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
  • pause_turn: A server tool (such as web_search) reached its usage limit and the turn was paused. Append the returned content as an assistant message and send the request again to continue
Available options:
end_turn,
max_tokens,
tool_use,
pause_turn
usage
object

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