---
title: "Estimate Input Tokens"
method: POST
path: "/v1/responses/input_tokens"
tags: ["Responses"]
---

# Estimate Input Tokens

`POST /v1/responses/input_tokens`

## Request

- Base URL: `https://api.minimax.io`
- URL: `https://api.minimax.io/v1/responses/input_tokens`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/minimax/apis/minimax-responses-api/docs/v1/responses/input_tokens/post.ts> (a function with typed inputs; its response is checked against the schema)

## Headers

- `Content-Type` 'application/json', required

## Request body

- EstimateInputTokensReq
  - `model` string, required: Model name to invoke, e.g. `MiniMax-M3.1-Flash`
  - `input` union, required: Conversation content. Supports either a simple text or a full conversation history array
    - string: Simple text input
    - InputItem[]: Full conversation history
      - `type` 'message' | 'function_call' | 'function_call_output' | 'reasoning': Item type
      - `role` 'user' | 'assistant' | 'system' | 'developer' | 'tool': Message role (only when `type` is `message`)
      - `content` union: Message content; string or multimodal parts array (only when `type` is `message`)
        - string
        - ContentPart[]
          - `type` 'input_text' | 'output_text' | 'input_image' | 'input_video', required: Content part type: - `input_text` / `output_text`: Text part - `input_image`: Image input - `input_video`: Video input
          - `text` string: Text content (when `type` is `input_text` / `output_text`)
          - `image_url` union: Image input (when `type` is `input_image`). Supported formats: JPEG, PNG, GIF, WEBP
            - string
            - object
              - …
          - `video_url` union: Video input (when `type` is `input_video`). Supported formats: MP4, AVI, MOV, MKV
            - string
            - object
              - …
      - `call_id` string: Tool call ID (only when `type` is `function_call` or `function_call_output`)
      - `name` string: Function name (only when `type` is `function_call`)
      - `arguments` string: Function arguments as a JSON string (only when `type` is `function_call`)
      - `output` union: Tool return result (only when `type` is `function_call_output`)
        - string
        - ContentPart[]
          - `type` 'input_text' | 'output_text' | 'input_image' | 'input_video', required: Content part type: - `input_text` / `output_text`: Text part - `input_image`: Image input - `input_video`: Video input
          - `text` string: Text content (when `type` is `input_text` / `output_text`)
          - `image_url` union: Image input (when `type` is `input_image`). Supported formats: JPEG, PNG, GIF, WEBP
            - string
            - object
              - …
          - `video_url` union: Video input (when `type` is `input_video`). Supported formats: MP4, AVI, MOV, MKV
            - string
            - object
              - …
      - `summary` object[]: Reasoning segment array (only when `type` is `reasoning`)
        - `type` 'summary_text'
        - `text` string: Reasoning text
  - `instructions` string: System instructions
  - `tools` Tool[]: Tool list
    - `type` 'function', required: Tool type
    - `name` string, required: Function name
    - `description` string: Function description, helps the model decide when to call it
    - `parameters` object: Function parameter definition in JSON Schema format
  - `tool_choice` 'auto': Tool selection strategy: `auto` lets the model decide whether to call tools
  - `text` object: Output format control
    - `format` object
      - `type` 'text': Output format type
  - `reasoning` object: Reasoning control. The default depends on the model, so no schema-level default is declared. - `MiniMax-M3.1-Flash`: 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.
    - `effort` 'minimal' | 'low' | 'medium' | 'high' | 'xhigh' | 'max' | 'none'

## Response `200`

Successful response

- EstimateInputTokensResp
  - `object` 'response.input_tokens', required: Object type, always `response.input_tokens`
  - `input_tokens` integer, required: Estimated input token count

## Changes

- **2026-11-06** `a8c51922e453`: 1 breaking, 3 info
  - removed the enum value `none` of the request property `tool_choice`
  - the `effort` request property default value `none` was removed
  - added the new `max` enum value to the request property `reasoning/effort`
  - added the new `xhigh` enum value to the request property `reasoning/effort`

[Operation history](https://skmtc.dev/minimax/apis/minimax-responses-api/changes/v1/responses/input_tokens/post.md)

---

[API](https://skmtc.dev/minimax/apis/minimax-responses-api.md) - [All operations](https://skmtc.dev/minimax/apis/minimax-responses-api/llms.txt) - [OpenAPI document](https://skmtc.dev/minimax/apis/minimax-responses-api/revisions/a8c51922e453?raw)
