> ## 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-M2.5 - 完全なAPIリファレンス

> - OpenAI SDK形式でMiniMax-M2.5モデルを呼び出し
- 同期処理モード、リアルタイムレスポンス
- **テキスト会話**: シングルまたはマルチターンのコンテキスト対話
- **システムプロンプト**: AIの役割と動作をカスタマイズ

<Note>
  **BaseURL**：デフォルトの BaseURL は `https://direct.evolink.ai` で、テキストモデルへの対応が優れており、長時間接続をサポートします。`https://api.evolink.ai` はマルチモーダルの主力エンドポイントで、テキストモデルに対しては代替アドレスとして使用されます。
</Note>


## OpenAPI

````yaml ja/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 完全なAPIリファレンス
  description: MiniMax-M2.5 チャットインターフェースの完全なAPIリファレンス
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://direct.evolink.ai
    description: 本番環境（推奨）
  - url: https://api.evolink.ai
    description: 代替 URL
security:
  - bearerAuth: []
tags:
  - name: チャット補完
    description: AIチャット補完関連エンドポイント
paths:
  /v1/chat/completions:
    post:
      tags:
        - チャット補完
      summary: MiniMax-M2.5 チャットインターフェース
      description: |-
        - OpenAI SDK形式でMiniMax-M2.5モデルを呼び出し
        - 同期処理モード、リアルタイムレスポンス
        - **テキスト会話**: シングルまたはマルチターンのコンテキスト対話
        - **システムプロンプト**: AIの役割と動作をカスタマイズ
      operationId: createChatCompletion
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChatCompletionRequest'
            examples:
              simple_text:
                summary: シングルターンテキスト会話
                value:
                  model: MiniMax-M2.5
                  messages:
                    - role: user
                      content: 自己紹介してください
              multi_turn:
                summary: マルチターン会話（コンテキスト理解）
                value:
                  model: MiniMax-M2.5
                  messages:
                    - role: user
                      content: Pythonとは何ですか？
                    - role: assistant
                      content: Pythonは高級プログラミング言語です...
                    - role: user
                      content: その利点は何ですか？
              system_prompt:
                summary: システムプロンプトの使用
                value:
                  model: MiniMax-M2.5
                  messages:
                    - role: system
                      content: あなたはプロのPythonプログラミングアシスタントです。簡潔に質問に答えてください。
                    - role: user
                      content: ファイルの読み方は？
      responses:
        '200':
          description: チャット補完成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChatCompletionResponse'
        '400':
          description: 無効なリクエストパラメータ
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 400
                  message: Invalid request parameters
                  type: invalid_request_error
        '401':
          description: 未認証、無効または期限切れのトークン
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 401
                  message: Invalid or expired token
                  type: authentication_error
        '402':
          description: クォータ不足、チャージが必要
          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: アクセス拒否
          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: リソースが見つかりません
          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: リクエストレート制限超過
          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: 内部サーバーエラー
          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: アップストリームサービスエラー
          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: サービス一時的に利用不可
          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: チャットモデル名
          enum:
            - MiniMax-M2.5
          example: MiniMax-M2.5
        messages:
          type: array
          description: 会話メッセージリスト、マルチターン対話をサポート
          items:
            $ref: '#/components/schemas/Message'
          minItems: 1
        max_tokens:
          type: integer
          description: |-
            生成コンテンツの最大トークン数、上限は2048

            **注意**:
            - 上限を超えるコンテンツは切り捨てられます
            - `length`の理由で生成が中断された場合、この値を増やしてみてください
          minimum: 1
          maximum: 2048
          example: 2048
        stream:
          type: boolean
          description: |-
            ストリーミングモードでレスポンスを返すかどうか

            - `true`: ストリーミングレスポンス、リアルタイムでチャンクごとにコンテンツを返す
            - `false`: 完全なレスポンスを待ってから返す
          example: false
        temperature:
          type: number
          description: |-
            サンプリング温度、出力のランダム性を制御

            **注意**:
            - 低い値（例: 0.1）: より確定的で集中した出力
            - 高い値（例: 0.9）: よりランダムで創造的な出力
            - 範囲: (0, 1]、0を含まない
          exclusiveMinimum: 0
          maximum: 1
          example: 0.7
        top_p:
          type: number
          description: |-
            Nucleus Samplingパラメータ

            **注意**:
            - 累積確率からのトークンサンプリングを制御
            - 例: 0.9は累積確率90%に達するトークンから選択することを意味します
            - 範囲: (0, 1]、0を含まない

            **推奨**: temperatureとtop_pを同時に調整しないでください
          exclusiveMinimum: 0
          maximum: 1
          example: 0.9
        enable_search:
          type: boolean
          description: |-
            ウェブ検索を有効にするかどうか

            - `true`: ウェブ検索を有効にし、モデルは必要に応じてインターネットで最新情報を検索します
            - `false`: ウェブ検索を無効にする
          example: true
        search_options:
          type: object
          description: 'ウェブ検索オプション、`enable_search: true` が必要'
          properties:
            search_strategy:
              type: string
              description: |-
                検索戦略

                - `turbo`: 高速検索、より速いスピード
                - `max`: 深層検索、より包括的な結果
              enum:
                - turbo
                - max
              example: max
    ChatCompletionResponse:
      type: object
      properties:
        id:
          type: string
          description: チャット補完の一意識別子
          example: cmpl-04ea926191a14749b7f2c7a48a68abc6
        model:
          type: string
          description: 実際に使用されたモデル名
          example: MiniMax-M2.5
        object:
          type: string
          enum:
            - chat.completion
          description: レスポンスタイプ
          example: chat.completion
        created:
          type: integer
          description: 作成タイムスタンプ
          example: 1698999496
        choices:
          type: array
          description: チャット補完の選択肢リスト
          items:
            $ref: '#/components/schemas/Choice'
        usage:
          $ref: '#/components/schemas/Usage'
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: integer
              description: HTTPステータスエラーコード
            message:
              type: string
              description: エラーの説明
            type:
              type: string
              description: エラータイプ
            param:
              type: string
              description: 関連パラメータ名
            fallback_suggestion:
              type: string
              description: エラー時の提案
    Message:
      type: object
      required:
        - role
        - content
      properties:
        role:
          type: string
          description: |-
            メッセージの役割

            - `user`: ユーザーメッセージ
            - `assistant`: AIアシスタントメッセージ（マルチターン対話用）
            - `system`: システムプロンプト（AIの役割と動作を定義）
          enum:
            - user
            - assistant
            - system
          example: user
        content:
          type: string
          description: メッセージ内容
          example: 自己紹介してください
    Choice:
      type: object
      properties:
        index:
          type: integer
          description: 選択肢のインデックス
          example: 0
        message:
          $ref: '#/components/schemas/AssistantMessage'
        finish_reason:
          type: string
          description: |-
            完了理由

            - `stop`: 正常終了
            - `length`: 最大トークン制限に到達
            - `content_filter`: コンテンツがフィルタリングされた
          enum:
            - stop
            - length
            - content_filter
          example: stop
    Usage:
      type: object
      description: トークン使用統計
      properties:
        prompt_tokens:
          type: integer
          description: 入力のトークン数
          example: 8
        completion_tokens:
          type: integer
          description: 出力のトークン数
          example: 292
        total_tokens:
          type: integer
          description: 合計トークン数
          example: 300
    AssistantMessage:
      type: object
      properties:
        role:
          type: string
          description: メッセージ送信者の役割
          enum:
            - assistant
          example: assistant
        content:
          type: string
          description: AIレスポンスメッセージの内容
          example: こんにちは！何かお手伝いできることはありますか？
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: |-
        ##すべてのAPIにBearer Token認証が必要です##

        **APIキーの取得：**

        [APIキー管理ページ](https://evolink.ai/dashboard/keys)にアクセスしてAPIキーを取得してください

        **リクエストヘッダーに追加：**
        ```
        Authorization: Bearer YOUR_API_KEY
        ```

````