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

# minimax-m3

> Creates a model response for the given conversation. MiniMax-M3 supports text, image, video, tool calls, thinking, and streaming.



## OpenAPI

````yaml api-reference/model-api/minimax/openapi/minimax-m3/openapi.yaml POST /v1/chat/completions
openapi: 3.1.0
info:
  title: MiniMax-M3
  description: >-
    MiniMax M3 through AnyFast's OpenAI-compatible Chat Completions API.
    Supports 1M context, multimodal input, thinking, tool calls, and streaming.
  version: 1.0.0
servers:
  - url: https://www.anyfast.ai
security:
  - bearerAuth: []
paths:
  /v1/chat/completions:
    post:
      summary: Chat Completion
      description: >-
        Creates a model response for the given conversation. MiniMax-M3 supports
        text, image, video, tool calls, thinking, and streaming.
      operationId: createChatCompletionMinimaxM3
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - model
                - messages
              properties:
                model:
                  type: string
                  enum:
                    - MiniMax-M3
                  description: Model ID.
                  example: MiniMax-M3
                messages:
                  type: array
                  minItems: 1
                  description: >-
                    Conversation history. Message content can be text, image,
                    video, or tool-call content.
                  items:
                    $ref: '#/components/schemas/Message'
                  example:
                    - role: user
                      content: Hello!
                service_tier:
                  type: string
                  enum:
                    - standard
                    - priority
                  default: standard
                  description: >-
                    Request admission tier. Priority access must be enabled for
                    the account.
                thinking:
                  $ref: '#/components/schemas/Thinking'
                reasoning_split:
                  type: boolean
                  description: >-
                    Separates reasoning into reasoning_content and
                    reasoning_details. This does not enable or disable thinking.
                stream:
                  type: boolean
                  default: false
                  description: >-
                    If true, returns partial message deltas using Server-Sent
                    Events.
                stream_options:
                  type: object
                  description: Options for streaming responses.
                  properties:
                    include_usage:
                      type: boolean
                      default: false
                      description: >-
                        Whether to include usage information in the final stream
                        event.
                max_completion_tokens:
                  type: integer
                  format: int64
                  minimum: 1
                  maximum: 524288
                  description: >-
                    Maximum generated tokens. For MiniMax-M3, 131072 is
                    recommended and 524288 is the maximum.
                  example: 2048
                max_tokens:
                  type: integer
                  format: int64
                  minimum: 1
                  deprecated: true
                  description: >-
                    Deprecated legacy generation limit. Use
                    max_completion_tokens instead.
                temperature:
                  type: number
                  format: double
                  minimum: 0
                  maximum: 2
                  default: 1
                  description: Sampling temperature.
                top_p:
                  type: number
                  format: double
                  minimum: 0
                  maximum: 1
                  default: 0.95
                  description: Nucleus sampling parameter. MiniMax-M3 defaults to 0.95.
                tools:
                  type: array
                  description: Function tool definitions for agentic workflows.
                  items:
                    $ref: '#/components/schemas/Tool'
      responses:
        '200':
          description: Completion generated successfully.
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/ChatCompletion'
                  - $ref: '#/components/schemas/ChatCompletionChunk'
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Message:
      type: object
      required:
        - role
        - content
      properties:
        role:
          type: string
          enum:
            - system
            - user
            - assistant
            - tool
        content:
          oneOf:
            - type: string
            - type: array
              items:
                oneOf:
                  - $ref: '#/components/schemas/TextPart'
                  - $ref: '#/components/schemas/ImagePart'
                  - $ref: '#/components/schemas/VideoPart'
          description: >-
            Text content or an array of multimodal content parts. Tool calls are
            represented by message-level tool_calls fields.
        name:
          type: string
        tool_calls:
          type: array
          items:
            $ref: '#/components/schemas/ToolCall'
        tool_call_id:
          type: string
    Thinking:
      type: object
      description: Controls MiniMax-M3 thinking. Omit to use adaptive thinking by default.
      properties:
        type:
          type: string
          enum:
            - adaptive
            - disabled
          default: adaptive
          description: >-
            Thinking control type. Use adaptive to enable adaptive thinking or
            disabled to skip thinking for MiniMax-M3. M2.x models keep thinking
            enabled.
    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: Function name.
            parameters:
              type: object
              description: Function parameters as a JSON Schema object.
            description:
              type: string
              description: Function description.
    ChatCompletion:
      type: object
      required:
        - id
        - object
        - created
        - model
        - choices
      properties:
        id:
          type: string
          example: 066a33a7d290378f8a9e57a055812afa
        choices:
          type: array
          items:
            type: object
            required:
              - finish_reason
              - index
              - message
            properties:
              index:
                type: integer
              message:
                $ref: '#/components/schemas/AssistantMessage'
              finish_reason:
                type: string
                nullable: true
                enum:
                  - stop
                  - length
                  - content_filter
                  - tool_calls
                  - null
        created:
          type: integer
          format: int64
          description: Unix timestamp in seconds.
        model:
          type: string
          example: MiniMax-M3
        object:
          type: string
          enum:
            - chat.completion
        usage:
          $ref: '#/components/schemas/Usage'
        input_sensitive:
          type: boolean
          description: Whether the input triggered sensitive-content detection.
        input_sensitive_type:
          type: integer
          description: Sensitive-content category returned when input_sensitive is true.
        output_sensitive:
          type: boolean
          description: Whether the output triggered sensitive-content detection.
        output_sensitive_type:
          type: integer
          description: Sensitive-content category returned when output_sensitive is true.
        base_resp:
          $ref: '#/components/schemas/BaseResponse'
    ChatCompletionChunk:
      type: object
      required:
        - id
        - object
        - created
        - model
        - choices
      properties:
        id:
          type: string
        choices:
          type: array
          items:
            type: object
            required:
              - index
              - delta
            properties:
              index:
                type: integer
              delta:
                $ref: '#/components/schemas/Delta'
              finish_reason:
                type: string
                nullable: true
                enum:
                  - stop
                  - length
                  - content_filter
                  - tool_calls
                  - null
        created:
          type: integer
          format: int64
        model:
          type: string
        object:
          type: string
          enum:
            - chat.completion.chunk
        usage:
          $ref: '#/components/schemas/Usage'
        base_resp:
          $ref: '#/components/schemas/BaseResponse'
    Error:
      type: object
      properties:
        base_resp:
          $ref: '#/components/schemas/BaseResponse'
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
    TextPart:
      type: object
      required:
        - type
        - text
      properties:
        type:
          type: string
          enum:
            - text
        text:
          type: string
    ImagePart:
      type: object
      required:
        - type
        - image_url
      properties:
        type:
          type: string
          enum:
            - image_url
        image_url:
          type: object
          required:
            - url
          properties:
            url:
              type: string
              format: uri
    VideoPart:
      type: object
      required:
        - type
        - video_url
      properties:
        type:
          type: string
          enum:
            - video_url
        video_url:
          type: object
          required:
            - url
          properties:
            url:
              type: string
              format: uri
    ToolCall:
      type: object
      required:
        - id
        - type
        - function
      properties:
        id:
          type: string
          description: Tool call ID generated by the model.
        type:
          type: string
          enum:
            - function
          description: Tool call type. Currently only function is supported.
        function:
          type: object
          required:
            - name
            - arguments
          properties:
            name:
              type: string
              description: Function name to call.
            arguments:
              type: string
              description: Function arguments as a JSON-formatted string.
    AssistantMessage:
      type: object
      required:
        - role
        - content
      properties:
        role:
          type: string
          enum:
            - assistant
          description: Message role.
        content:
          type: string
          description: Text reply content.
        reasoning_content:
          type: string
          description: Thinking content when thinking is enabled.
        reasoning_details:
          type: array
          description: Structured reasoning details when reasoning_split is true.
          items:
            $ref: '#/components/schemas/ReasoningDetail'
        tool_calls:
          type: array
          items:
            $ref: '#/components/schemas/ToolCall'
    Usage:
      type: object
      properties:
        total_tokens:
          type: integer
        total_characters:
          type: integer
        prompt_tokens:
          type: integer
        completion_tokens:
          type: integer
        prompt_tokens_details:
          type: object
          properties:
            cached_tokens:
              type: integer
    BaseResponse:
      type: object
      properties:
        status_code:
          type: integer
          format: int64
          description: >-
            MiniMax status code: 1000 unknown error; 1001 request timeout; 1002
            rate limit triggered; 1004 authentication failed; 1008 insufficient
            balance; 1013 internal server error; 1027 output content error; 1039
            token limit exceeded; 2013 parameter error.
        status_msg:
          type: string
          description: Error details.
    Delta:
      type: object
      properties:
        role:
          type: string
          enum:
            - assistant
        content:
          type: string
        reasoning_content:
          type: string
        reasoning_details:
          type: array
          items:
            $ref: '#/components/schemas/ReasoningDetail'
        tool_calls:
          type: array
          items:
            $ref: '#/components/schemas/ToolCall'
    ReasoningDetail:
      type: object
      properties:
        type:
          type: string
          description: Reasoning detail type, for example reasoning.text.
        id:
          type: string
          description: Reasoning segment identifier.
        format:
          type: string
          description: Reasoning format identifier, for example MiniMax-response-v1.
        index:
          type: integer
          description: Reasoning segment order index.
        text:
          type: string
          description: Thinking text for this segment.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````