> ## Documentation Index
> Fetch the complete documentation index at: https://evolink.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# MiniMax Responses quickstart

> Supported models: `MiniMax-M4`, `MiniMax-M3.1-Flash`. Required fields: `model`, `input`. `max_output_tokens` — Start with an output budget of at least 1,024 tokens. If reasoning uses the entire budget, the response may contain no answer text. See the [API reference](/en/api-manual/language-series/minimax/responses/responses-reference) for tool calls, image and video input, streaming and multi-turn conversations.

> [!NOTE]
>
> **BaseURL**: The default BaseURL is `https://direct.evolink.ai`, which has better support for text models and long-lived connections. `https://api.evolink.ai` is the primary endpoint for multimodal services and serves as a fallback address for text models.

`POST /v1/responses` — Supported models: `MiniMax-M4`, `MiniMax-M3.1-Flash`. Required fields: `model`, `input`. A minimal example also sets an output limit.

> [!WARNING]
>
> Only `MiniMax-M4` and `MiniMax-M3.1-Flash` support Responses. For `MiniMax-M3` and `MiniMax-M2.5`, use [Chat Completions](https://evolink.ai/docs/en/api-manual/language-series/minimax/chat-completions/chat-completions-quickstart.md) or [Messages](https://evolink.ai/docs/en/api-manual/language-series/minimax/messages/messages-quickstart.md).
>
> Use `input` for input, `max_output_tokens` for the output budget, and `reasoning.effort` for reasoning depth. `MiniMax-M4` and `MiniMax-M3.1-Flash` always use reasoning. Reasoning effort: `low`, `medium`, `high`, `xhigh` or `max` (default). `none` returns HTTP 400. Higher effort typically uses more reasoning tokens and increases latency.

## Reading the answer text

`output` may contain reasoning, messages and tool calls. Read the `output_text` blocks in items with `type="message"`. The first item may contain reasoning.

Assuming the response JSON has been parsed into `response`, extract the text as follows:

```python theme={null}
text = "".join(
    part["text"]
    for item in response.get("output", [])
    if item.get("type") == "message"
    for part in item.get("content", [])
    if part.get("type") == "output_text"
)
print(text)
```

> [!NOTE]
>
> **Maximum output (including reasoning tokens)** — `MiniMax-M4` 262,144, `MiniMax-M3.1-Flash` 524,288. Start with an output budget of at least 1,024 tokens. If reasoning uses the entire budget, the response may contain no answer text. If `status="incomplete"` and `incomplete_details.reason="max_output_tokens"`, raise the output limit.

See the [API reference](https://evolink.ai/docs/en/api-manual/language-series/minimax/responses/responses-reference.md) for tool calls, image and video input, streaming and multi-turn conversations.


## OpenAPI

````yaml en/api-manual/language-series/minimax/responses/responses-quickstart.json POST /v1/responses
openapi: 3.1.0
info:
  title: MiniMax Responses quickstart
  description: >-
    MiniMax Responses quickstart (OpenAI Responses) — `MiniMax-M4`,
    `MiniMax-M3.1-Flash`.
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://direct.evolink.ai
    description: Production (Recommended)
  - url: https://api.evolink.ai
    description: Alternative URL
security:
  - bearerAuth: []
tags:
  - name: Chat Completion
    description: AI chat completion related endpoints
paths:
  /v1/responses:
    post:
      tags:
        - Chat Completion
      summary: MiniMax Responses quickstart
      description: >-
        Supported models: `MiniMax-M4`, `MiniMax-M3.1-Flash`. Required fields:
        `model`, `input`. `max_output_tokens` — Start with an output budget of
        at least 1,024 tokens. If reasoning uses the entire budget, the response
        may contain no answer text. See the [API
        reference](/en/api-manual/language-series/minimax/responses/responses-reference)
        for tool calls, image and video input, streaming and multi-turn
        conversations.
      operationId: createResponseMiniMaxQuick
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ResponsesQuickRequest'
            examples:
              simple:
                summary: Minimal call
                value:
                  model: MiniMax-M4
                  input: Please introduce yourself in one sentence.
                  max_output_tokens: 4096
              flash:
                summary: Call MiniMax-M3.1-Flash
                value:
                  model: MiniMax-M3.1-Flash
                  input: Explain HTTP in one sentence.
                  max_output_tokens: 4096
      responses:
        '200':
          description: Generated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponsesResponse'
              examples:
                with_reasoning:
                  summary: Response with reasoning
                  value:
                    id: example_ae5b7d
                    object: response
                    created_at: 1792405562
                    model: MiniMax-M3.1-Flash
                    status: completed
                    output:
                      - id: example_ae5b7d_rs
                        type: reasoning
                        status: completed
                        summary: []
                        content:
                          - type: reasoning_text
                            text: >-
                              We need solve CRT. Need only n. Compute. n=3 mod7,
                              5 mod11,7 mod13. Product 1001. Let's solve.


                              Use n=3+7a. mod11: 3+7a=5 =>7a=2 mod11. inverse7=8
                              (56=1), a=16=5 mod11. a=5+11b. n=38+77b. mod13:
                              38+77b = 12+12b mod13 (77=12,38=12) equals7
                              =>12b=-5=8 mod13. inverse12=12, b=96 mod13 =5? 91
                              remainder5. n=38+385=423. Check 423 mod7 3 (420),
                              mod11 5 (418), mod13 7 (416). Smallest positive
                              423. Only n.
                        encrypted_content: EXAMPLE_ENCRYPTED_CONTENT
                      - id: example_ae5b7d_msg
                        type: message
                        status: completed
                        role: assistant
                        content:
                          - type: output_text
                            text: '423'
                            annotations: []
                    output_text: '423'
                    usage:
                      input_tokens: 239
                      output_tokens: 190
                      total_tokens: 429
                      input_tokens_details:
                        cached_tokens: 174
                      output_tokens_details:
                        reasoning_tokens: 189
                    error: null
                    incomplete_details: null
                function_call:
                  summary: Tool call
                  value:
                    id: example_2ab00b
                    object: response
                    created_at: 1792405566
                    model: MiniMax-M3.1-Flash
                    status: completed
                    output:
                      - id: example_2ab00b_msg
                        type: message
                        status: completed
                        role: assistant
                        content:
                          - type: output_text
                            text: I'll check the stock level for that product now.
                            annotations: []
                      - id: example_2ab00b_fc_0
                        type: function_call
                        status: completed
                        call_id: call_example_1
                        name: get_product_stock
                        arguments: '{"product_id": "demo-item-001"}'
                    output_text: I'll check the stock level for that product now.
                    usage:
                      input_tokens: 479
                      output_tokens: 43
                      total_tokens: 522
                      input_tokens_details:
                        cached_tokens: 174
                    error: null
                    incomplete_details: null
                incomplete:
                  summary: Output limit reached (status=incomplete)
                  value:
                    id: example_de610c
                    object: response
                    created_at: 1792401719
                    model: MiniMax-M3.1-Flash
                    status: incomplete
                    output:
                      - id: example_de610c_rs
                        type: reasoning
                        status: completed
                        summary: []
                        content:
                          - type: reasoning_text
                            text: I need to explain the process step by step.
                        encrypted_content: EXAMPLE_ENCRYPTED_CONTENT
                    output_text: null
                    usage:
                      input_tokens: 211
                      output_tokens: 8
                      total_tokens: 219
                      input_tokens_details:
                        cached_tokens: 195
                      output_tokens_details:
                        reasoning_tokens: 8
                    error: null
                    incomplete_details:
                      reason: max_output_tokens
        '400':
          description: Invalid request parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: invalid_prompt
                  message: Invalid request parameters
                  type: invalid_request_error
        '401':
          description: Unauthenticated, invalid or expired token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 401
                  message: Invalid authentication credentials
                  type: authentication_error
        '402':
          description: Insufficient quota, recharge required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 402
                  message: Insufficient quota
                  type: insufficient_quota
        '403':
          description: Access denied for this model
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 403
                  message: Model access denied
                  type: permission_error
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 404
                  message: Model not found
                  type: not_found_error
        '413':
          description: Request body too large
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 413
                  message: Request entity too large
                  type: invalid_request_error
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 429
                  message: Rate limit exceeded
                  type: rate_limit_error
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 500
                  message: Internal server error
                  type: server_error
        '502':
          description: Bad gateway
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 502
                  message: Bad gateway
                  type: server_error
        '503':
          description: Service temporarily unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 503
                  message: Service temporarily unavailable
                  type: server_error
components:
  schemas:
    ResponsesQuickRequest:
      type: object
      required:
        - model
        - input
      properties:
        model:
          type: string
          enum:
            - MiniMax-M4
            - MiniMax-M3.1-Flash
          example: MiniMax-M4
          description: >-
            | Model | Context (tokens) | Maximum output (tokens) |

            | --- | --- | --- |

            | `MiniMax-M4` | 1,000,000 | 262,144 |

            | `MiniMax-M3.1-Flash` | 1,000,000 | 524,288 |


            Only `MiniMax-M4` and `MiniMax-M3.1-Flash` support Responses. For
            `MiniMax-M3` and `MiniMax-M2.5`, use [Chat
            Completions](/en/api-manual/language-series/minimax/chat-completions/chat-completions-quickstart)
            or
            [Messages](/en/api-manual/language-series/minimax/messages/messages-quickstart).
        input:
          type: string
          example: Explain recursion in one sentence.
          description: >-
            Required fields: `model`, `input`. Plain text is treated as one user
            message. For multiple turns, images, videos or tool calls, pass an
            array of input items. See the [API
            reference](/en/api-manual/language-series/minimax/responses/responses-reference)
            for tool calls, image and video input, streaming and multi-turn
            conversations.
        max_output_tokens:
          type: integer
          minimum: 1
          example: 4096
          description: >-
            Start with an output budget of at least 1,024 tokens. If reasoning
            uses the entire budget, the response may contain no answer text.
            **Maximum output (including reasoning tokens)** — `MiniMax-M4`
            262,144, `MiniMax-M3.1-Flash` 524,288.
    ResponsesResponse:
      type: object
      description: >-
        Responses API response object. In addition to the fields below, the
        response includes the request configuration, such as `tools`,
        `tool_choice`, `temperature`, `top_p`, `text`, `reasoning`, and
        `max_output_tokens`.
      properties:
        id:
          type: string
          description: Unique identifier for this response
          example: resp_example
        object:
          type: string
          description: Object type, always `response`
          example: response
        created_at:
          type: integer
          description: Creation time as a Unix timestamp (seconds)
          example: 1792401878
        status:
          type: string
          description: |-
            Response status.

            - `completed`: generation completed
            - `incomplete`: generation was truncated; see `incomplete_details`
            - `failed`: generation failed; see `error`
          enum:
            - completed
            - incomplete
            - failed
          example: completed
        model:
          type: string
          description: ID of the model that actually generated this response
          example: MiniMax-M4
        output:
          type: array
          description: >-
            Output items in generation order:


            - `reasoning`: reasoning content, with an ID such as `<id>_rs`,
            `content` (`reasoning_text` blocks), `summary` (an empty array), and
            `encrypted_content`

            - `message`: final answer, with an ID such as `<id>_msg` and
            `content` (`output_text` blocks)

            - `function_call`: a function call, with an ID such as
            `<id>_fc_<index>`, `call_id`, `name`, and `arguments`. Execute it on
            the client and return a `function_call_output` item
          items:
            type: object
        output_text:
          type:
            - string
            - 'null'
          description: >-
            Convenience field containing all `output_text` blocks concatenated.
            `null` when there is no text output.
        error:
          type:
            - object
            - 'null'
          description: Failure reason; `null` on success
        incomplete_details:
          type:
            - object
            - 'null'
          description: >-
            Truncation details, or `null` if generation was not truncated.
            `reason` is `max_output_tokens` (output limit reached) or
            `content_filter` (content safety).
        usage:
          $ref: '#/components/schemas/Usage'
    ErrorResponse:
      type: object
      description: Error response
      properties:
        error:
          type: object
          properties:
            code:
              type:
                - integer
                - string
                - 'null'
              description: Error code
              example: invalid_prompt
            message:
              type: string
              description: Error description
              example: Invalid request parameters
            type:
              type: string
              description: Error type
              example: invalid_request_error
    Usage:
      type: object
      description: Token usage statistics, including caching and reasoning details.
      properties:
        input_tokens:
          type: integer
          description: Total input tokens, including cached tokens.
          example: 207
        input_tokens_details:
          type: object
          description: Detailed breakdown of input tokens
          properties:
            cached_tokens:
              type: integer
              description: >-
                Number of cached input tokens.


                Cached tokens are billed at the cache-hit rate. Uncached tokens
                (`input_tokens - cached_tokens`) are billed at the standard
                input rate.
              example: 174
        output_tokens:
          type: integer
          description: Number of output tokens (including the thinking portion)
          example: 32
        output_tokens_details:
          type: object
          description: Detailed breakdown of output tokens
          properties:
            reasoning_tokens:
              type: integer
              description: Reasoning tokens, already included in `output_tokens`.
              example: 9
        total_tokens:
          type: integer
          description: Total tokens = input_tokens + output_tokens
          example: 239
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        All APIs require Bearer Token authentication


        **Get API Key**:


        Visit [API Key Management Page](https://evolink.ai/dashboard/keys) to
        get your API Key


        **Add to request header**:

        ```

        Authorization: Bearer YOUR_API_KEY

        ```

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.