Skip to main content
POST
Estimate Input Tokens

Authorizations

Authorization
string
header
required

HTTP: Bearer Auth

  • Security Scheme Type: http
  • HTTP Authorization Scheme: Bearer API_key, used to authenticate your account. View it in Account Management > API Keys

Headers

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

Media type of the request body. Must be set to application/json

Available options:
application/json

Body

application/json
model
string
required

Model name to invoke, e.g. MiniMax-M3.1-Flash-Preview

Example:

"MiniMax-M3.1-Flash-Preview"

input
required

Conversation content. Supports either a simple text or a full conversation history array

instructions
string

System instructions

tools
object[]

Tool list

tool_choice
enum<string>

Tool selection strategy: none means no tool will be called; auto lets the model decide whether to call tools

Available options:
none,
auto
text
object

Output format control

reasoning
object

Reasoning control. The default depends on the model, so no schema-level default is declared.

  • MiniMax-M3.1-Flash-Preview: reasoning is always on, including when reasoning is omitted. effort accepts low, medium, high, xhigh or max, and does tune reasoning depth. When omitted, it defaults to max. effort: "none" returns HTTP 400.
  • MiniMax-M3: reasoning is off unless effort is set to a non-none value, which turns reasoning on but does not tune its depth.
  • M2.x models: reasoning cannot be disabled; effort: "none" is accepted but ignored.

Response

200 - application/json

Successful response

object
enum<string>
required

Object type, always response.input_tokens

Available options:
response.input_tokens
input_tokens
integer
required

Estimated input token count