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

# MiniMax-M3 - OpenAI-Compatible API

> - Use the OpenAI Chat Completions protocol to call the MiniMax-M3 model
- **Multi-turn conversation**: Supports single-turn or multi-turn contextual dialogue
- **System prompts**: Customize AI role and behavior via `role=system` messages
- **Multimodal input**: `content` supports mixed text + image / video
- **Thinking mode**: Controlled via `thinking.type`; thinking content is returned via `reasoning_content`
- **Streaming output**: Supports SSE streaming responses
- **Tool calling**: Supports Function Calling

<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.
</Note>


## OpenAPI

````yaml /en/api-manual/language-series/minimax-m3/minimax-m3-chat.json POST /v1/chat/completions
openapi: 3.1.0
info:
  title: MiniMax-M3 Complete API Reference (OpenAI-Compatible)
  description: >-
    Complete API reference for the MiniMax-M3 chat interface.


    **Model Capabilities**:

    - Maximum output: **524,288 tokens** (512K), recommended **131,072 tokens**
    (128K)

    - Thinking mode: Controlled via the `thinking` field, defaults to `adaptive`
    (model adaptively decides whether to engage in deep thinking)

    - Multimodal input: Supports text, images, and video

    - Tool calling: Supports Function Calling

    - Streaming output: Supports SSE streaming responses
  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/chat/completions:
    post:
      tags:
        - Chat Completion
      summary: MiniMax-M3 Chat Interface (OpenAI-Compatible)
      description: >-
        - Use the OpenAI Chat Completions protocol to call the MiniMax-M3 model

        - **Multi-turn conversation**: Supports single-turn or multi-turn
        contextual dialogue

        - **System prompts**: Customize AI role and behavior via `role=system`
        messages

        - **Multimodal input**: `content` supports mixed text + image / video

        - **Thinking mode**: Controlled via `thinking.type`; thinking content is
        returned via `reasoning_content`

        - **Streaming output**: Supports SSE streaming responses

        - **Tool calling**: Supports Function Calling
      operationId: createChatCompletionMiniMaxM3
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChatCompletionRequest'
            examples:
              simple_text:
                summary: Single-turn text conversation
                value:
                  model: MiniMax-M3
                  messages:
                    - role: user
                      content: Please introduce yourself
              multi_turn:
                summary: Multi-turn conversation (context understanding)
                value:
                  model: MiniMax-M3
                  messages:
                    - role: user
                      content: What is Python?
                    - role: assistant
                      content: Python is a high-level programming language...
                    - role: user
                      content: What are its advantages?
              system_prompt:
                summary: Using system prompts
                value:
                  model: MiniMax-M3
                  messages:
                    - role: system
                      content: >-
                        You are a professional Python programming assistant.
                        Answer questions concisely.
                    - role: user
                      content: How to read a file?
              image_understanding:
                summary: Image understanding (multimodal input)
                value:
                  model: MiniMax-M3
                  thinking:
                    type: adaptive
                  messages:
                    - role: user
                      content:
                        - type: text
                          text: What is in this image?
                        - type: image_url
                          image_url:
                            url: https://example.com/image.jpeg
                  max_completion_tokens: 500
              disable_thinking:
                summary: Disable thinking mode (direct answer)
                value:
                  model: MiniMax-M3
                  thinking:
                    type: disabled
                  messages:
                    - role: user
                      content: What is the capital of France?
              tool_calling:
                summary: Function Calling (tool invocation)
                value:
                  model: MiniMax-M3
                  messages:
                    - role: user
                      content: Check the weather in Beijing today
                  tools:
                    - type: function
                      function:
                        name: get_weather
                        description: Query weather conditions for a specified city
                        parameters:
                          type: object
                          properties:
                            location:
                              type: string
                              description: 'City name, e.g.: Beijing'
                          required:
                            - location
              streaming:
                summary: Streaming output
                value:
                  model: MiniMax-M3
                  stream: true
                  stream_options:
                    include_usage: true
                  messages:
                    - role: user
                      content: Write a short poem about spring
      responses:
        '200':
          description: Chat completion successful
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChatCompletionResponse'
              examples:
                default_thinking:
                  summary: Default (thinking inlined in content within <think> tags)
                  value:
                    id: 066b36619b147e326d17053cccdef70f
                    choices:
                      - finish_reason: stop
                        index: 0
                        message:
                          content: >-
                            <think>

                            The user is asking about the capital of France,
                            which is a common knowledge question. The answer is
                            Paris.

                            </think>

                            The capital of France is **Paris**.
                          role: assistant
                          name: MiniMax AI
                          audio_content: ''
                    created: 1777026807
                    model: MiniMax-M3
                    object: chat.completion
                    usage:
                      total_tokens: 60
                      total_characters: 0
                      prompt_tokens: 7
                      completion_tokens: 53
                      prompt_tokens_details:
                        cached_tokens: 0
                    input_sensitive: false
                    output_sensitive: false
                    input_sensitive_type: 0
                    output_sensitive_type: 0
                    base_resp:
                      status_code: 0
                      status_msg: ''
                tool_calls:
                  summary: Tool call triggered (finish_reason=tool_calls)
                  value:
                    id: 066b13db03518f86c2e3c9b073c04272
                    choices:
                      - finish_reason: tool_calls
                        index: 0
                        message:
                          content: >-
                            <think>

                            The user wants to check the weather in Beijing,
                            calling the get_weather tool.

                            </think>

                            Let me check the current weather in Beijing for you.
                          role: assistant
                          name: MiniMax AI
                          tool_calls:
                            - id: call_function_p4iiqtpnh5bj_1
                              type: function
                              function:
                                name: get_weather
                                arguments: '{"location": "Beijing"}'
                              index: 0
                          audio_content: ''
                    created: 1777026900
                    model: MiniMax-M3
                    object: chat.completion
                    usage:
                      total_tokens: 110
                      total_characters: 0
                      prompt_tokens: 86
                      completion_tokens: 24
                      prompt_tokens_details:
                        cached_tokens: 0
                    input_sensitive: false
                    output_sensitive: false
                    input_sensitive_type: 0
                    output_sensitive_type: 0
                    base_resp:
                      status_code: 0
                      status_msg: ''
        '400':
          description: Invalid request parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 400
                  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 or expired token
                  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_error
        '403':
          description: Access denied for this model
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 403
                  message: Access denied for this model
                  type: permission_error
                  param: model
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 404
                  message: Specified model not found
                  type: not_found_error
                  param: model
        '413':
          description: Request body too large
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 413
                  message: Request body too large
                  type: request_too_large_error
                  param: messages
        '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: internal_server_error
        '502':
          description: Bad gateway
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 502
                  message: Bad gateway
                  type: bad_gateway_error
        '503':
          description: Service temporarily unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 503
                  message: Service temporarily unavailable
                  type: service_unavailable_error
components:
  schemas:
    ChatCompletionRequest:
      type: object
      required:
        - model
        - messages
      properties:
        model:
          type: string
          description: Chat model name
          enum:
            - MiniMax-M3
          example: MiniMax-M3
        messages:
          type: array
          description: >-
            List of conversation messages, supports multi-turn dialogue


            Messages with different roles have different field structures;
            select the corresponding role to view
          items:
            oneOf:
              - $ref: '#/components/schemas/SystemMessage'
              - $ref: '#/components/schemas/UserMessage'
              - $ref: '#/components/schemas/AssistantRequestMessage'
              - $ref: '#/components/schemas/ToolMessage'
            discriminator:
              propertyName: role
              mapping:
                system:
                  $ref: '#/components/schemas/SystemMessage'
                user:
                  $ref: '#/components/schemas/UserMessage'
                assistant:
                  $ref: '#/components/schemas/AssistantRequestMessage'
                tool:
                  $ref: '#/components/schemas/ToolMessage'
          minItems: 1
        thinking:
          type: object
          description: >-
            Controls deep thinking


            **Notes**:

            - **Defaults to `adaptive`**: The model adaptively decides whether
            to engage in deep thinking based on problem difficulty

            - By default, thinking content is inlined in the response `content`
            (wrapped in `<think>...</think>` tags); to separate it into a
            dedicated field, use `reasoning_split`
          properties:
            type:
              type: string
              description: >-
                Deep thinking mode


                - `adaptive`: Model autonomously decides whether thinking is
                needed (recommended default)

                - `disabled`: Disable thinking, answer directly
              enum:
                - disabled
                - adaptive
              default: adaptive
        reasoning_split:
          type: boolean
          description: >-
            Whether to split thinking content into a separate field


            - `false` (default): Thinking content is inlined in `content`,
            wrapped in `<think>...</think>` tags

            - `true`: Thinking content is split into
            `choices[].message.reasoning_content` and `reasoning_details`
        temperature:
          type: number
          description: |-
            Sampling temperature, controls output randomness

            **Notes**:
            - Lower values (e.g. 0.2): More deterministic, focused output
            - Higher values (e.g. 1.5): More random, creative output
            - Range: `[0, 2]`, default 1
          minimum: 0
          maximum: 2
          default: 1
          example: 1
        top_p:
          type: number
          description: >-
            Nucleus Sampling parameter


            **Notes**:

            - Controls sampling from tokens with cumulative probability

            - e.g. 0.95 means selecting from tokens reaching 95% cumulative
            probability

            - Range: `[0, 1]`, MiniMax-M3 default 0.95


            **Recommendation**: Do not adjust temperature and top_p
            simultaneously
          minimum: 0
          maximum: 1
          default: 0.95
          example: 0.95
        max_completion_tokens:
          type: integer
          description: >-
            Upper limit for generated content length (in tokens)


            **Notes**:

            - MiniMax-M3 recommended **131,072** (128K), maximum **524,288**
            (512K)

            - Tokens generated by thinking also count toward this limit

            - If generation is interrupted due to `length`, try increasing this
            value
          minimum: 1
          maximum: 524288
          example: 131072
        stream:
          type: boolean
          description: >-
            Whether to return the response in streaming mode


            - `true`: Streaming response, returns content in real-time chunks
            via SSE (Server-Sent Events)

            - `false`: Wait for complete response before returning (default)
          default: false
          example: false
        stream_options:
          type: object
          description: |-
            Streaming response options

            Only effective when `stream=true`
          properties:
            include_usage:
              type: boolean
              description: >-
                Return an additional chunk containing only `usage` statistics at
                the end of the stream
        tools:
          type: array
          description: |-
            Tool definition list for Function Calling

            Each tool requires a name, description, and parameter schema
          items:
            $ref: '#/components/schemas/Tool'
        max_tokens:
          type: integer
          description: |-
            Legacy generation length limit parameter

            **Note**: Deprecated, please use `max_completion_tokens` instead
          deprecated: true
          minimum: 1
    ChatCompletionResponse:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the chat completion
          example: 0668a381bdc3c0ded310e27c9a46d16e7
        model:
          type: string
          description: Model name actually used
          example: MiniMax-M3
        object:
          type: string
          enum:
            - chat.completion
          description: Response type
          example: chat.completion
        created:
          type: integer
          description: Creation timestamp (Unix seconds)
          example: 1777026807
        choices:
          type: array
          description: List of chat completion choices
          items:
            $ref: '#/components/schemas/Choice'
        usage:
          $ref: '#/components/schemas/Usage'
        input_sensitive:
          type: boolean
          description: >-
            Whether the input content triggered a sensitive word filter. If the
            input severely violates policies, the API will return a content
            violation error with empty response content
        input_sensitive_type:
          type: integer
          description: >-
            Type of sensitive word triggered by input (returned when
            `input_sensitive` is true): 1 severe violation; 2 pornography; 3
            advertising; 4 prohibited content; 5 abusive language; 6
            violence/terrorism; 7 other
        output_sensitive:
          type: boolean
          description: Whether the output content triggered a sensitive word filter
        output_sensitive_type:
          type: integer
          description: Type of sensitive word triggered by output
        base_resp:
          type: object
          description: Status code and error details
          properties:
            status_code:
              type: integer
              description: >-
                Status code. `0` indicates success; other codes include `1002`
                for rate limiting, `1008` for insufficient balance, `1039` for
                token limit exceeded, `2013` for parameter error, etc.
            status_msg:
              type: string
              description: Error details
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: integer
              description: HTTP status error code
            message:
              type: string
              description: Error description
            type:
              type: string
              description: Error type
            param:
              type: string
              description: Related parameter name
    SystemMessage:
      title: System Message
      type: object
      required:
        - role
        - content
      properties:
        role:
          type: string
          enum:
            - system
          description: Role identifier, fixed as `system`
        content:
          type: string
          description: System prompt content, used to set the AI's role and behavior
        name:
          type: string
          description: >-
            Participant name, used to distinguish different system prompt
            sources
    UserMessage:
      title: User Message
      type: object
      required:
        - role
        - content
      properties:
        role:
          type: string
          enum:
            - user
          description: Role identifier, fixed as `user`
        content:
          description: >-
            User message content


            **Notes**:

            - For plain text, pass a string directly

            - For multimodal, pass a content part array supporting `text` /
            `image_url` (images, video)
          oneOf:
            - type: string
            - type: array
              items:
                $ref: '#/components/schemas/ContentPart'
        name:
          type: string
          description: Participant name, used to distinguish different users
    AssistantRequestMessage:
      title: Assistant Message
      type: object
      required:
        - role
      properties:
        role:
          type: string
          enum:
            - assistant
          description: Role identifier, fixed as `assistant`
        content:
          type:
            - string
            - 'null'
          description: >-
            Assistant message content


            **Notes**:

            - Used to pass historical assistant replies in multi-turn
            conversations

            - Can be `null` when `tool_calls` is present
        name:
          type: string
          description: Participant name
        tool_calls:
          type: array
          description: >-
            Tool call list


            Used to pass historical tool call information in multi-turn
            conversations
          items:
            type: object
            properties:
              id:
                type: string
                description: Unique identifier for the tool call
              type:
                type: string
                enum:
                  - function
              function:
                type: object
                properties:
                  name:
                    type: string
                    description: Name of the called function
                  arguments:
                    type: string
                    description: Function arguments (JSON string)
    ToolMessage:
      title: Tool Message
      type: object
      required:
        - role
        - content
        - tool_call_id
      properties:
        role:
          type: string
          enum:
            - tool
          description: Role identifier, fixed as `tool`
        content:
          type: string
          description: Content of the tool call result
        tool_call_id:
          type: string
          description: >-
            Tool call ID


            Corresponds to the `id` field returned in `tool_calls` of the
            assistant message
    Tool:
      type: object
      required:
        - type
        - function
      properties:
        type:
          type: string
          enum:
            - function
          description: Tool type, currently only `function` is supported
        function:
          type: object
          required:
            - name
            - parameters
          properties:
            name:
              type: string
              description: >-
                Name of the function to call


                **Notes**:

                - Must consist of a-z, A-Z, 0-9 characters, or include
                underscores and hyphens

                - Maximum length is 64 characters
            description:
              type: string
              description: >-
                Function description, helps the model understand when and how to
                call this function
            parameters:
              type: object
              description: Function input parameters, described as a JSON Schema object
    Choice:
      type: object
      properties:
        index:
          type: integer
          description: Choice index
          example: 0
        message:
          $ref: '#/components/schemas/AssistantMessage'
        finish_reason:
          type: string
          description: |-
            Finish reason

            - `stop`: Natural completion or stop sequence triggered
            - `length`: Reached maximum token limit
            - `content_filter`: Content filtered by safety policy
            - `tool_calls`: Model invoked a tool
          enum:
            - stop
            - length
            - content_filter
            - tool_calls
          example: stop
    Usage:
      type: object
      description: Token usage statistics
      properties:
        total_tokens:
          type: integer
          description: Total number of tokens consumed
          example: 1604
        total_characters:
          type: integer
          description: Total number of characters consumed
          example: 0
        prompt_tokens:
          type: integer
          description: Number of tokens in the input
          example: 1365
        completion_tokens:
          type: integer
          description: Number of tokens in the output
          example: 239
        prompt_tokens_details:
          type: object
          description: Detailed breakdown of input tokens
          properties:
            cached_tokens:
              type: integer
              description: Number of input tokens that hit cache
              example: 114
    ContentPart:
      type: object
      description: >-
        Multimodal content part. Declare the type via `type` and fill in only
        the fields matching that type
      properties:
        type:
          type: string
          enum:
            - text
            - image_url
            - video_url
          description: |-
            Content type

            - `text`: Text block
            - `image_url`: Image input
            - `video_url`: Video input
        text:
          type: string
          description: Text content when `type=text`
        image_url:
          type: object
          description: >-
            Image input (when `type=image_url`). Maximum 10 MB per image,
            supports JPEG / PNG / GIF / WEBP
          required:
            - url
          properties:
            url:
              type: string
              description: Image URL, or a base64 data URL starting with `data:`
            detail:
              type: string
              description: >-
                Controls image parsing resolution


                - `low`: Low precision, consumes fewer tokens

                - `default`: Default precision

                - `high`: High precision, recognizes more detail but consumes
                more tokens
              enum:
                - low
                - default
                - high
              default: default
            max_long_side_pixel:
              type: integer
              description: Maximum pixel limit for the longest side of the image
              minimum: 1
        video_url:
          type: object
          description: >-
            Video input (when `type=video_url`). Maximum 50 MB for URL / Base64
            video, supports MP4 / AVI / MOV / MKV
          required:
            - url
          properties:
            url:
              type: string
              description: >-
                Video URL, a base64 data URL starting with `data:`, or a file
                reference in the format `mm_file://{file_id}`
            detail:
              type: string
              description: Controls video frame extraction resolution
              enum:
                - low
                - default
                - high
              default: default
            fps:
              type: number
              description: >-
                Video frame extraction rate, default 1, range [0.2, 5]


                - Higher values: More sensitive to visual changes, higher token
                cost and slower speed

                - Lower values: Lower token cost and faster speed, but less
                sensitive to visual changes
              minimum: 0.2
              maximum: 5
              default: 1
            max_long_side_pixel:
              type: integer
              description: Maximum pixel limit for the longest side of video frames
              minimum: 1
    AssistantMessage:
      type: object
      properties:
        role:
          type: string
          description: Role of the message sender
          enum:
            - assistant
          example: assistant
        content:
          type:
            - string
            - 'null'
          description: >-
            AI response message content (can be `null` when a tool call is
            triggered)
          example: >-
            Hello! I'm MiniMax-M3, and I can help you with conversation,
            writing, reasoning, coding, and many other tasks.
        reasoning_content:
          type: string
          description: >-
            Thinking content. Only returned when `reasoning_split=true` is set
            in the request; by default, thinking content is inlined in `content`
            within `<think>...</think>` tags
          example: Let me analyze this problem...
        reasoning_details:
          type: array
          description: >-
            Structured thinking content. Only returned when
            `reasoning_split=true` is set in the request
          items:
            type: object
            properties:
              type:
                type: string
                description: Thinking content type, e.g. `reasoning.text`
              id:
                type: string
                description: Identifier for the thinking segment
              format:
                type: string
                description: >-
                  Format identifier for the thinking content, e.g.
                  `MiniMax-response-v1`
              index:
                type: integer
                description: Sequential index of the thinking segment
              text:
                type: string
                description: Thinking text of this segment
        name:
          type: string
          description: Sender name
        audio_content:
          type: string
          description: Audio content (empty string for text-only conversation scenarios)
        tool_calls:
          type: array
          description: Tool call list (returned when the model decides to invoke a tool)
          items:
            type: object
            properties:
              id:
                type: string
                description: Unique identifier for the tool call
              type:
                type: string
                enum:
                  - function
              function:
                type: object
                properties:
                  name:
                    type: string
                    description: Name of the called function
                  arguments:
                    type: string
                    description: Function arguments (JSON string)
              index:
                type: integer
                description: Tool call index
  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

        ```

````