MiniMax Platform API

Multimodal generative AI API covering text chat (native + OpenAI-compatible + Anthropic- compatible), image generation, video generation (Hailuo), speech synthesis, voice cloning, voice design, music generation, and file management. International base URL https://api.minimax.io; China base URL https://api.minimaxi.com.

OpenAPI Specification

minimax-ai-openapi.json Raw ↑
{
  "openapi": "3.1.0",
  "info": {
    "title": "MiniMax API",
    "description": "MiniMax text generation API with support for chat completion and streaming output",
    "license": {
      "name": "MIT"
    },
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://api.minimax.io"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "paths": {
    "/v1/text/chatcompletion_v2": {
      "post": {
        "summary": "Text Generation V2",
        "description": "Generate text using MiniMax models with support for single-turn and multi-turn conversations",
        "operationId": "chatCompletionV2",
        "tags": ["Text Generation"],
        "requestBody": {
          "description": "Chat completion request parameters",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChatCompletionReq"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatCompletionResp"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/t2a_v2": {
      "post": {
        "summary": "Text to Audio V2",
        "description": "Convert text to audio using MiniMax T2A V2 API with support for streaming and non-streaming output",
        "operationId": "t2aV2",
        "tags": ["Text to Audio"],
        "requestBody": {
          "description": "T2A V2 request parameters",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/T2aV2Req"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/T2aV2Resp"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/t2a_async_v2": {
      "post": {
        "summary": "Text to Audio Async V2",
        "description": "Convert text to audio asynchronously using MiniMax T2A Async V2 API with support for long text processing",
        "operationId": "t2aAsyncV2",
        "tags": ["Text to Audio"],
        "requestBody": {
          "description": "T2A Async V2 request parameters",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/T2AAsyncV2Req"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/T2AAsyncV2Resp"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/query/t2a_async_query_v2": {
      "post": {
        "summary": "Query T2A Async V2 Task Status",
        "description": "Query the status of an asynchronous text-to-audio task",
        "operationId": "t2aAsyncV2Query",
        "tags": ["Text to Audio"],
        "requestBody": {
          "description": "Query request parameters",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/T2AAsyncV2QueryReq"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/T2AAsyncV2QueryResp"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/files/upload": {
      "post": {
        "summary": "Upload File",
        "description": "Upload a file to the platform for processing",
        "operationId": "uploadFile",
        "tags": ["Files"],
        "parameters": [
          {
            "name": "GroupId",
            "in": "query",
            "required": true,
            "description": "Group ID",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "File upload request",
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": ["purpose", "file"],
                "properties": {
                  "purpose": {
                    "type": "string",
                    "description": "Purpose of the file upload",
                    "enum": ["fine-tune", "assistants", "batch", "vision"]
                  },
                  "file": {
                    "type": "string",
                    "format": "binary",
                    "description": "File to upload"
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UploadFileResp"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/voice_clone": {
      "post": {
        "summary": "Voice Clone",
        "description": "Create a voice clone from an audio file",
        "operationId": "voiceClone",
        "tags": ["Voice"],
        "requestBody": {
          "description": "Voice clone request parameters",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VoiceCloneReq"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VoiceCloneResp"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/voice_design": {
      "post": {
        "summary": "Voice Design",
        "description": "Generate voice design based on text prompt",
        "operationId": "voiceDesign",
        "tags": ["Voice"],
        "requestBody": {
          "description": "Voice design request parameters",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/T2VReq"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/T2VResp"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/get_voice": {
      "post": {
        "summary": "Get Voice",
        "description": "Get available voices by type",
        "operationId": "getVoice",
        "tags": ["Voice"],
        "requestBody": {
          "description": "Get voice request parameters",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GetVoiceReq"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetVoiceResp"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/delete_voice": {
      "post": {
        "summary": "Delete Voice",
        "description": "Delete a voice by ID and type",
        "operationId": "deleteVoice",
        "tags": ["Voice"],
        "requestBody": {
          "description": "Delete voice request parameters",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeleteVoiceReq"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteVoiceResp"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/video_generation": {
      "post": {
        "summary": "Video Generation",
        "description": "Generate video from text prompt",
        "operationId": "videoGeneration",
        "tags": ["Video"],
        "requestBody": {
          "description": "Video generation request parameters",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VideoGenerationReq"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VideoGenerationResp"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/files/retrieve": {
      "get": {
        "summary": "Retrieve File",
        "description": "Retrieve file information by ID",
        "operationId": "retrieveFile",
        "tags": ["Files"],
        "parameters": [
          {
            "name": "GroupId",
            "in": "query",
            "required": true,
            "description": "Group ID",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "file_id",
            "in": "query",
            "required": true,
            "description": "File ID to retrieve",
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RetrieveFileResp"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "File not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/video_template_generation": {
      "post": {
        "summary": "Video Template Generation",
        "description": "Generate video using template",
        "operationId": "videoTemplateGeneration",
        "tags": ["Video"],
        "requestBody": {
          "description": "Video template generation request parameters",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VideoTemplateGenerationReq"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VideoTemplateGenerationResp"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/query/video_template_generation": {
      "get": {
        "summary": "Query Video Template Generation Task",
        "description": "Query the status of a video template generation task",
        "operationId": "queryVideoTemplateGenerationTask",
        "tags": ["Video"],
        "parameters": [
          {
            "name": "task_id",
            "in": "query",
            "required": true,
            "description": "Task ID to query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QueryVideoTemplateGenerationTaskResp"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Task not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/image_generation": {
      "post": {
        "summary": "Image Generation",
        "description": "Generate images from text prompt",
        "operationId": "imageGeneration",
        "tags": ["Image"],
        "requestBody": {
          "description": "Image generation request parameters",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ImageGenerationReq"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImageGenerationResp"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/music_generation": {
      "post": {
        "summary": "Music Generation",
        "description": "Generate music from text prompt",
        "operationId": "generateMusic",
        "tags": ["Music"],
        "requestBody": {
          "description": "Music generation request parameters",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GenerateMusicReq"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenerateMusicResp"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/files/list": {
      "get": {
        "summary": "List Files",
        "description": "List files with optional filtering and pagination",
        "operationId": "listFiles",
        "tags": ["Files"],
        "parameters": [
          {
            "name": "GroupId",
            "in": "query",
            "required": true,
            "description": "Group ID",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "purpose",
            "in": "query",
            "required": false,
            "description": "Filter by file purpose",
            "schema": {
              "type": "string",
              "enum": ["fine-tune", "assistants", "batch", "vision"]
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number for pagination",
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "size",
            "in": "query",
            "required": false,
            "description": "Number of files per page",
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "after_file_id",
            "in": "query",
            "required": false,
            "description": "File ID to start listing after",
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListFileResp"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/files/retrieve_content": {
      "get": {
        "summary": "Retrieve File Content",
        "description": "Retrieve file content by ID",
        "operationId": "retrieveFileContent",
        "tags": ["Files"],
        "parameters": [
          {
            "name": "GroupId",
            "in": "query",
            "required": true,
            "description": "Group ID",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "file_id",
            "in": "query",
            "required": true,
            "description": "File ID to retrieve content",
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "File not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/files/delete": {
      "post": {
        "summary": "Delete File",
        "description": "Delete a file by ID",
        "operationId": "deleteFile",
        "tags": ["Files"],
        "parameters": [
          {
            "name": "GroupId",
            "in": "query",
            "required": true,
            "description": "Group ID",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Delete file request parameters",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeleteFileReq"
              }
            }

# --- truncated at 32 KB (73 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/minimax-ai/refs/heads/main/openapi/minimax-ai-openapi.json