> ## 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 Chat Completions API reference

> - OpenAI Chat Completions. Select the model with `model`.
- **Conversations**: single-turn and multi-turn conversations
- **System prompts**: set the assistant's role and behavior with `role=system`
- `MiniMax-M4`, `MiniMax-M3.1-Flash` and `MiniMax-M3` accept images and video. `MiniMax-M2.5` accepts text only.
- **Reasoning**: reasoning is returned in `reasoning_content`, and `content` contains only the final answer. `MiniMax-M3` starts `content` with `<think>...</think>` by default. Set `reasoning_split: true` to receive reasoning in `reasoning_content` separately.
- **Streaming**: SSE responses
- **Tool calling**: Function Calling

**Streaming responses**: With `stream=true`, each SSE message uses the format `data: {JSON}`, followed by `data: [DONE]` at the end. `choices[].delta` returns incremental `reasoning_content`, then `content` / `tool_calls`. Set `stream_options.include_usage=true` to receive an additional chunk containing `usage` before the stream ends.

> [!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]
>
> `MiniMax-M4` and `MiniMax-M3.1-Flash` always reason. Use `reasoning_effort` to choose `low`, `medium`, `high`, `xhigh` or `max` (default). Disabling reasoning or selecting `none` returns HTTP 400. `MiniMax-M3` reasons by default and accepts `thinking.type: "disabled"`. `MiniMax-M2.5` always reasons. `MiniMax-M3` and `MiniMax-M2.5` do not support effort levels.

> [!NOTE]
>
> **Maximum output (including reasoning tokens)** — `MiniMax-M4` 262,144, `MiniMax-M3.1-Flash` 524,288, `MiniMax-M3` 524,288, `MiniMax-M2.5` 32,768. When switching to `MiniMax-M4`, keep `max_completion_tokens` at or below 262,144.

> [!NOTE]
>
> `MiniMax-M4`, `MiniMax-M3.1-Flash` and `MiniMax-M3` accept images and video. `MiniMax-M2.5` accepts text only. Pass images and video as `image_url` and `video_url` blocks in `messages[].content[]`.


## OpenAPI

````yaml en/api-manual/language-series/minimax/chat-completions/chat-completions-reference.json POST /v1/chat/completions
openapi: 3.1.0
info:
  title: MiniMax Chat Completions API reference
  description: >-
    MiniMax Chat Completions API reference. Select the model with `model`.
    `MiniMax-M4`, `MiniMax-M3.1-Flash` and `MiniMax-M3` accept images and video.
    `MiniMax-M2.5` accepts text only.


    - **Streaming**: SSE responses

    - **Tool calling**: Function Calling


    Matching prefixes are cached automatically. Cached tokens appear in
    `usage.prompt_tokens_details.cached_tokens` and are billed at the cache-hit
    rate. Reasoning tokens count towards the output limit and are billed at the
    output rate. For each turn, append the complete previous assistant message
    to `messages`, including `reasoning_content` and `tool_calls`.


    The `model`, `thinking`, `reasoning_effort` and `max_completion_tokens`
    fields describe model-specific limits and reasoning controls.
  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 Chat Completions API reference (OpenAI-compatible)
      description: >-
        - OpenAI Chat Completions. Select the model with `model`.

        - **Conversations**: single-turn and multi-turn conversations

        - **System prompts**: set the assistant's role and behavior with
        `role=system`

        - `MiniMax-M4`, `MiniMax-M3.1-Flash` and `MiniMax-M3` accept images and
        video. `MiniMax-M2.5` accepts text only.

        - **Reasoning**: reasoning is returned in `reasoning_content`, and
        `content` contains only the final answer. `MiniMax-M3` starts `content`
        with `<think>...</think>` by default. Set `reasoning_split: true` to
        receive reasoning in `reasoning_content` separately.

        - **Streaming**: SSE responses

        - **Tool calling**: Function Calling


        **Streaming responses**: With `stream=true`, each SSE message uses the
        format `data: {JSON}`, followed by `data: [DONE]` at the end.
        `choices[].delta` returns incremental `reasoning_content`, then
        `content` / `tool_calls`. Set `stream_options.include_usage=true` to
        receive an additional chunk containing `usage` before the stream ends.
      operationId: createChatCompletionMiniMax
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChatCompletionRequest'
            examples:
              simple_text:
                summary: Single-turn text conversation
                value:
                  model: MiniMax-M4
                  messages:
                    - role: user
                      content: Please introduce yourself.
                  max_completion_tokens: 131072
              multi_turn:
                summary: Multi-turn conversation (context understanding)
                value:
                  model: MiniMax-M4
                  messages:
                    - role: user
                      content: What is Python?
                    - role: assistant
                      content: Python is a high-level programming language.
                    - role: user
                      content: What are its main advantages?
                  max_completion_tokens: 131072
              system_prompt:
                summary: Using system prompts
                value:
                  model: MiniMax-M4
                  messages:
                    - role: system
                      content: >-
                        You are a Python programming assistant. Keep your
                        answers concise.
                    - role: user
                      content: How do I read a file?
                  max_completion_tokens: 131072
              reasoning_effort:
                summary: Adjust reasoning depth
                value:
                  model: MiniMax-M4
                  reasoning_effort: high
                  messages:
                    - role: user
                      content: >-
                        A bat and a ball cost 1.10 in total. The bat costs 1.00
                        more than the ball. How much does the ball cost?
                  max_completion_tokens: 131072
              image_understanding:
                summary: Image understanding (multimodal input)
                value:
                  model: MiniMax-M4
                  messages:
                    - role: user
                      content:
                        - type: text
                          text: What is shown in this image?
                        - type: image_url
                          image_url:
                            url: https://example.com/image.jpeg
                            detail: default
                  max_completion_tokens: 131072
              video_understanding:
                summary: Video understanding (multimodal input)
                value:
                  model: MiniMax-M4
                  messages:
                    - role: user
                      content:
                        - type: text
                          text: Summarize this video.
                        - type: video_url
                          video_url:
                            url: https://example.com/video.mp4
                            fps: 2
                            detail: default
                  max_completion_tokens: 131072
              tool_calling:
                summary: Function Calling (tool invocation)
                value:
                  model: MiniMax-M4
                  messages:
                    - role: user
                      content: Check the stock for product demo-item-001.
                  tools:
                    - type: function
                      function:
                        name: get_product_stock
                        description: Get the current stock level for a product.
                        parameters:
                          type: object
                          properties:
                            product_id:
                              type: string
                              description: Product identifier.
                          required:
                            - product_id
                  max_completion_tokens: 131072
              streaming:
                summary: Streaming output
                value:
                  model: MiniMax-M4
                  stream: true
                  stream_options:
                    include_usage: true
                  messages:
                    - role: user
                      content: Write a short poem about spring.
                  max_completion_tokens: 131072
              flash:
                summary: Call MiniMax-M3.1-Flash
                value:
                  model: MiniMax-M3.1-Flash
                  messages:
                    - role: user
                      content: Please introduce yourself.
                  max_completion_tokens: 131072
              m3_disable_thinking:
                summary: Disable reasoning on `MiniMax-M3`
                description: >-
                  Only `MiniMax-M3` can disable reasoning. Sending `disabled`
                  for any other model returns HTTP 400.
                value:
                  model: MiniMax-M3
                  thinking:
                    type: disabled
                  messages:
                    - role: user
                      content: Explain recursion in one sentence.
                  max_completion_tokens: 131072
              m3_reasoning_split:
                summary: Return `MiniMax-M3` reasoning separately
                description: >-
                  `MiniMax-M3` starts `content` with `<think>...</think>` by
                  default. Set `reasoning_split: true` to receive reasoning in
                  `reasoning_content` separately.
                value:
                  model: MiniMax-M3
                  reasoning_split: true
                  messages:
                    - role: user
                      content: >-
                        A bat and a ball cost 1.10 in total. The bat costs 1.00
                        more than the ball. How much does the ball cost?
                  max_completion_tokens: 131072
              m25_text:
                summary: Call MiniMax-M2.5 (text only)
                description: >-
                  `MiniMax-M2.5` accepts text only and generates up to 32,768
                  tokens.
                value:
                  model: MiniMax-M2.5
                  messages:
                    - role: user
                      content: Explain recursion in one sentence.
                  max_completion_tokens: 4096
      responses:
        '200':
          description: Conversation generated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChatCompletionResponse'
              examples:
                with_thinking:
                  summary: Response with reasoning
                  value:
                    id: example_c425f5
                    choices:
                      - finish_reason: stop
                        index: 0
                        message:
                          content: '0.05'
                          role: assistant
                          name: MiniMax AI
                          reasoning_content: >-
                            Let the ball cost x. Then 2x + 1 = 1.10, so x =
                            0.05.
                    created: 1792401901
                    model: MiniMax-M3.1-Flash
                    object: chat.completion
                    usage:
                      total_tokens: 281
                      total_characters: 0
                      prompt_tokens: 229
                      completion_tokens: 52
                      completion_tokens_details:
                        reasoning_tokens: 49
                      prompt_tokens_details:
                        cached_tokens: 187
                direct_answer:
                  summary: Direct answer without reasoning content
                  value:
                    id: example_c7cb0e
                    choices:
                      - finish_reason: stop
                        index: 0
                        message:
                          content: >-
                            Recursion is a technique in which a function calls
                            itself to solve smaller instances of a problem.
                          role: assistant
                          name: MiniMax AI
                    created: 1792401868
                    model: MiniMax-M3.1-Flash
                    object: chat.completion
                    usage:
                      total_tokens: 219
                      total_characters: 0
                      prompt_tokens: 208
                      completion_tokens: 11
                      prompt_tokens_details:
                        cached_tokens: 58
                tool_calls:
                  summary: Tool call triggered (finish_reason=tool_calls)
                  value:
                    id: example_2d249e
                    choices:
                      - finish_reason: tool_calls
                        index: 0
                        message:
                          content: I'll check the stock for product demo-item-001.
                          role: assistant
                          name: MiniMax AI
                          tool_calls:
                            - id: call_example_1
                              type: function
                              function:
                                name: get_product_stock
                                arguments: '{"product_id": "demo-item-001"}'
                              index: 0
                    created: 1792401870
                    model: MiniMax-M3.1-Flash
                    object: chat.completion
                    usage:
                      total_tokens: 483
                      total_characters: 0
                      prompt_tokens: 446
                      completion_tokens: 37
                      prompt_tokens_details:
                        cached_tokens: 227
                length:
                  summary: Output limit reached (finish_reason=length)
                  value:
                    id: example_a5ad57
                    choices:
                      - finish_reason: length
                        index: 0
                        message:
                          content: ''
                          role: assistant
                          name: MiniMax AI
                          reasoning_content: I need to explain the process step by step.
                    created: 1792401615
                    model: MiniMax-M3.1-Flash
                    object: chat.completion
                    usage:
                      total_tokens: 219
                      total_characters: 0
                      prompt_tokens: 211
                      completion_tokens: 8
                      completion_tokens_details:
                        reasoning_tokens: 8
                      prompt_tokens_details:
                        cached_tokens: 184
                m3_inline_thinking:
                  summary: >-
                    Default `MiniMax-M3` response with reasoning at the start of
                    `content`
                  value:
                    id: example_818ad0
                    choices:
                      - finish_reason: stop
                        index: 0
                        message:
                          content: >-
                            <think>Let the ball cost x. Then 2x + 1 = 1.10, so x
                            = 0.05.</think>


                            0.05
                          role: assistant
                    created: 1796307610
                    model: MiniMax-M3
                    object: chat.completion
                    usage:
                      total_tokens: 308
                      total_characters: 0
                      prompt_tokens: 224
                      completion_tokens: 84
                      completion_tokens_details:
                        reasoning_tokens: 78
                      prompt_tokens_details:
                        cached_tokens: 193
                m25_answer:
                  summary: Response from `MiniMax-M2.5`
                  value:
                    id: chatcmpl-example
                    choices:
                      - finish_reason: stop
                        index: 0
                        message:
                          content: >-
                            Recursion is a technique in which a function calls
                            itself to solve smaller instances of a problem.
                          reasoning_content: >-
                            The user wants a one-sentence definition of
                            recursion.
                          role: assistant
                    created: 1796307389
                    model: MiniMax-M2.5
                    object: chat.completion
                    usage:
                      prompt_tokens: 44
                      completion_tokens: 90
                      total_tokens: 134
                      completion_tokens_details:
                        reasoning_tokens: 84
                      prompt_tokens_details:
                        cached_tokens: 0
        '400':
          description: Invalid request parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  message: Invalid request parameters
                  type: invalid_request_error
                  param: ''
                  code: null
        '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: >-
            | Model | Context (tokens) | Maximum output (tokens) |

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

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

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

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

            | `MiniMax-M2.5` | 204,800 | 32,768 |


            `MiniMax-M4` and `MiniMax-M3.1-Flash` always use reasoning. Adjust
            reasoning depth with `reasoning_effort`. `MiniMax-M3` reasons by
            default. Set `thinking.type` to `disabled` for a direct answer.
            `MiniMax-M3` and `MiniMax-M2.5` cannot change reasoning depth.
            `MiniMax-M2.5` always reasons at a fixed depth. `MiniMax-M4`,
            `MiniMax-M3.1-Flash` and `MiniMax-M3` accept images and video.
            `MiniMax-M2.5` accepts text only. Reasoning tokens count towards the
            output limit and are billed at the output rate.
          enum:
            - MiniMax-M4
            - MiniMax-M3.1-Flash
            - MiniMax-M3
            - MiniMax-M2.5
          example: MiniMax-M4
        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: '#/components/schemas/SystemMessage'
                user: '#/components/schemas/UserMessage'
                assistant: '#/components/schemas/AssistantRequestMessage'
                tool: '#/components/schemas/ToolMessage'
          minItems: 1
        reasoning_effort:
          type: string
          description: >-
            - `MiniMax-M4`, `MiniMax-M3.1-Flash` — Reasoning effort: `low`,
            `medium`, `high`, `xhigh` or `max` (default). `none` returns HTTP
            400. Higher effort typically uses more reasoning tokens and
            increases latency.

            - `MiniMax-M3` and `MiniMax-M2.5` cannot change reasoning depth.
            Omit this parameter for these models.
          enum:
            - low
            - medium
            - high
            - xhigh
            - max
          example: high
        thinking:
          type: object
          description: >-
            - For `MiniMax-M4` and `MiniMax-M3.1-Flash`, omit `thinking` or set
            its `type` to `adaptive`. `disabled` returns HTTP 400.

            - `MiniMax-M3` reasons by default. Set `thinking.type` to `disabled`
            for a direct answer.

            - `MiniMax-M2.5` always reasons at a fixed depth. Omit this field.
          properties:
            type:
              type: string
              enum:
                - adaptive
                - disabled
              default: adaptive
        reasoning_split:
          type: boolean
          description: >-
            `MiniMax-M4` and `MiniMax-M3.1-Flash` return reasoning in
            `reasoning_content`. Omit `reasoning_split` or set it to `true`.
            Setting it to `false` returns HTTP 400. `MiniMax-M2.5` always
            returns reasoning in `reasoning_content`. `MiniMax-M3` starts
            `content` with `<think>...</think>` by default. Set
            `reasoning_split: true` to receive reasoning in `reasoning_content`
            separately.
          example: true
        temperature:
          type: number
          description: >-
            `MiniMax-M4`, `MiniMax-M3.1-Flash`, `MiniMax-M3` — Temperature is
            fixed at 1. Other values have no effect. `MiniMax-M2.5` defaults to
            1 and supports adjustment. Lower temperatures favor consistent
            answers. Change only one of `temperature` and `top_p` at a time.
          default: 1
          example: 1
        top_p:
          type: number
          description: >-
            `MiniMax-M4`, `MiniMax-M3.1-Flash`, `MiniMax-M3` — Fixed at 0.95. If
            supplied, use a value in (0, 1]. `MiniMax-M2.5` defaults to 0.95 and
            supports adjustment. Change only one of `temperature` and `top_p` at
            a time.
          exclusiveMinimum: 0
          maximum: 1
          default: 0.95
          example: 0.95
        max_completion_tokens:
          type: integer
          description: >-
            Maximum output (including reasoning tokens)


            | Model | Suggested output | Maximum output |

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

            | `MiniMax-M4` | 131,072 | 262,144 |

            | `MiniMax-M3.1-Flash` | 131,072 | 524,288 |

            | `MiniMax-M3` | 131,072 | 524,288 |

            | `MiniMax-M2.5` | As needed | 32,768 |


            Start with an output budget of at least 1,024 tokens. If reasoning
            uses the entire budget, the response may contain no answer text
            (`finish_reason=length`).
          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: >-
                Include an additional chunk containing only `usage` statistics
                before the stream ends.
        tools:
          type: array
          description: |-
            Tool definition list for Function Calling

            Each tool requires a name, description, and parameter schema
          items:
            $ref: '#/components/schemas/Tool'
        tool_choice:
          type: string
          description: >-
            Tool selection strategy. Only `auto` is supported; the model decides
            whether to call a tool.
          enum:
            - auto
          default: auto
        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: chatcmpl-example
        model:
          type: string
          description: Model name actually used
          example: MiniMax-M4
        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'
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type:
                - integer
                - string
                - 'null'
              description: HTTP status error code
            message:
              type: string
              description: Error description
            type:
              type: string
              description: Error type
            param:
              type: string
              description: Name of the related parameter
    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: >-
            Send a plain string for text, or an array of `text`, `image_url` and
            `video_url` content parts for mixed input. `MiniMax-M4`,
            `MiniMax-M3.1-Flash` and `MiniMax-M3` accept images and video.
            `MiniMax-M2.5` accepts text only. Each request, including history,
            accepts up to 200 images and 20 videos. Maximum body size: 64 MB.
          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
        reasoning_content:
          type: string
          description: >-
            Reasoning content from the previous turn. Preserve it when sending
            conversation history.
        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: Total input tokens, including cached tokens.
          example: 1365
        completion_tokens:
          type: integer
          description: Number of output tokens (including the thinking portion)
          example: 239
        completion_tokens_details:
          type: object
          description: Detailed breakdown of output tokens
          properties:
            reasoning_tokens:
              type: integer
              description: Number of reasoning tokens.
              example: 49
        prompt_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
                (`prompt_tokens - cached_tokens`) are billed at the standard
                input rate.
              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: >-
            `type=video_url` — Video formats: MP4, AVI, MOV and MKV. Each video
            can be up to 50 MB and 30 minutes long.
          required:
            - url
          properties:
            url:
              type: string
              description: Video URL or Base64 data URL (`data:`).
            detail:
              type: string
              description: Controls video frame extraction resolution
              enum:
                - low
                - default
                - high
              default: default
            fps:
              type: number
              description: >-
                Frame sampling rate in frames per second. Default 2, range [0.2,
                5]. Higher values capture more motion and consume more tokens.
              minimum: 0.2
              maximum: 5
              default: 2
            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: >-
            Final answer text. May be `null` for a tool call. `MiniMax-M3`
            starts `content` with `<think>...</think>` by default. Set
            `reasoning_split: true` to receive reasoning in `reasoning_content`
            separately.
          example: '0.05'
        reasoning_content:
          type: string
          description: >-
            `MiniMax-M3` starts `content` with `<think>...</think>` by default.
            Set `reasoning_split: true` to receive reasoning in
            `reasoning_content` separately. Simple questions may produce no
            reasoning, in which case this field is omitted.
          example: Let the ball cost x. Then 2x + 1 = 1.10, so x = 0.05.
        name:
          type: string
          description: Sender name
        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

        ```

````

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