> ## 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-M2.5 - Complete API Reference

> - Use OpenAI SDK format to call MiniMax-M2.5 model
- Synchronous processing mode, real-time response
- **Text conversation**: Single or multi-turn contextual dialogue
- **System prompts**: Customize AI role and behavior

<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-m2.5/minimax-m2.5-api.json POST /v1/chat/completions
openapi: 3.1.0
info:
  title: MiniMax-M2.5 Complete API Reference
  description: Complete API reference for MiniMax-M2.5 chat interface
  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-M2.5 Chat Interface
      description: |-
        - Use OpenAI SDK format to call MiniMax-M2.5 model
        - Synchronous processing mode, real-time response
        - **Text conversation**: Single or multi-turn contextual dialogue
        - **System prompts**: Customize AI role and behavior
      operationId: createChatCompletion
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChatCompletionRequest'
            examples:
              simple_text:
                summary: Single-turn text conversation
                value:
                  model: MiniMax-M2.5
                  messages:
                    - role: user
                      content: Please introduce yourself
              multi_turn:
                summary: Multi-turn conversation (context understanding)
                value:
                  model: MiniMax-M2.5
                  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-M2.5
                  messages:
                    - role: system
                      content: >-
                        You are a professional Python programming assistant,
                        answer questions concisely.
                    - role: user
                      content: How to read a file?
      responses:
        '200':
          description: Chat completion successful
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChatCompletionResponse'
        '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
                  fallback_suggestion: https://evolink.ai/dashboard/billing
        '403':
          description: Access denied
          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
                  fallback_suggestion: MiniMax-M2.5
        '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
                  fallback_suggestion: retry after 60 seconds
        '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
                  fallback_suggestion: try again later
        '502':
          description: Upstream service error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 502
                  message: Upstream AI service unavailable
                  type: upstream_error
                  fallback_suggestion: try different model
        '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
                  fallback_suggestion: retry after 30 seconds
components:
  schemas:
    ChatCompletionRequest:
      type: object
      required:
        - model
        - messages
      properties:
        model:
          type: string
          description: Chat model name
          enum:
            - MiniMax-M2.5
          example: MiniMax-M2.5
        messages:
          type: array
          description: List of conversation messages, supports multi-turn dialogue
          items:
            $ref: '#/components/schemas/Message'
          minItems: 1
        max_tokens:
          type: integer
          description: >-
            Maximum number of tokens for generated content, upper limit is 2048


            **Note**:

            - Content exceeding the limit will be truncated

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

            - `true`: Stream response, return content in real-time chunks
            - `false`: Wait for complete response before returning
          example: false
        temperature:
          type: number
          description: |-
            Sampling temperature, controls output randomness

            **Note**:
            - Lower values (e.g. 0.1): More deterministic, focused output
            - Higher values (e.g. 0.9): More random, creative output
            - Range: (0, 1], excluding 0
          exclusiveMinimum: 0
          maximum: 1
          example: 0.7
        top_p:
          type: number
          description: >-
            Nucleus Sampling parameter


            **Note**:

            - Controls sampling from tokens with cumulative probability

            - e.g. 0.9 means selecting from tokens reaching 90% cumulative
            probability

            - Range: (0, 1], excluding 0


            **Recommendation**: Do not adjust temperature and top_p
            simultaneously
          exclusiveMinimum: 0
          maximum: 1
          example: 0.9
        enable_search:
          type: boolean
          description: >-
            Whether to enable web search


            - `true`: Enable web search, the model will search the internet for
            latest information as needed

            - `false`: Disable web search
          example: true
        search_options:
          type: object
          description: 'Web search options, requires `enable_search: true`'
          properties:
            search_strategy:
              type: string
              description: |-
                Search strategy

                - `turbo`: Fast search, quicker speed
                - `max`: Deep search, more comprehensive results
              enum:
                - turbo
                - max
              example: max
    ChatCompletionResponse:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the chat completion
          example: cmpl-04ea926191a14749b7f2c7a48a68abc6
        model:
          type: string
          description: Model name actually used
          example: MiniMax-M2.5
        object:
          type: string
          enum:
            - chat.completion
          description: Response type
          example: chat.completion
        created:
          type: integer
          description: Creation timestamp
          example: 1698999496
        choices:
          type: array
          description: List of chat completion choices
          items:
            $ref: '#/components/schemas/Choice'
        usage:
          $ref: '#/components/schemas/Usage'
    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
            fallback_suggestion:
              type: string
              description: Suggestion on error
    Message:
      type: object
      required:
        - role
        - content
      properties:
        role:
          type: string
          description: |-
            Message role

            - `user`: User message
            - `assistant`: AI assistant message (for multi-turn dialogue)
            - `system`: System prompt (define AI role and behavior)
          enum:
            - user
            - assistant
            - system
          example: user
        content:
          type: string
          description: Message content
          example: Please introduce yourself
    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`: Normal completion
            - `length`: Reached maximum token limit
            - `content_filter`: Content filtered
          enum:
            - stop
            - length
            - content_filter
          example: stop
    Usage:
      type: object
      description: Token usage statistics
      properties:
        prompt_tokens:
          type: integer
          description: Number of tokens in the input
          example: 8
        completion_tokens:
          type: integer
          description: Number of tokens in the output
          example: 292
        total_tokens:
          type: integer
          description: Total number of tokens
          example: 300
    AssistantMessage:
      type: object
      properties:
        role:
          type: string
          description: Role of the message sender
          enum:
            - assistant
          example: assistant
        content:
          type: string
          description: AI response message content
          example: Hi there! How can I help you?
  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

        ```

````