{ "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" } } }, "required": true }, "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeleteFileResp" } } } }, "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" } } } } } } } }, "components": { "schemas": { "Error": { "type": "object", "required": ["error", "message"], "properties": { "error": { "type": "integer", "format": "int32", "description": "Error code" }, "message": { "type": "string", "description": "Error message" } } }, "T2aV2Req": { "type": "object", "required": ["model", "text"], "properties": { "model": { "type": "string", "description": "Model ID for text-to-audio conversion", "enum": [ "speech-2.5-hd-preview", "speech-2.5-turbo-preview", "speech-02-hd", "speech-02-turbo", "speech-01-hd", "speech-01-turbo" ] }, "text": { "type": "string", "description": "Text content to convert to audio" }, "voice_setting": { "$ref": "#/components/schemas/T2AVoiceSetting" }, "audio_setting": { "$ref": "#/components/schemas/T2AAudioSetting" }, "pronunciation_dict": { "$ref": "#/components/schemas/PronunciationDict" }, "timber_weights": { "type": "array", "description": "Timbre weights (legacy field)", "items": { "$ref": "#/components/schemas/TimbreWeights" } }, "speed_rate": { "type": "integer", "format": "int64", "description": "Speed rate for audio generation" }, "stream": { "type": "boolean", "description": "Whether to enable streaming output" }, "language_boost": { "type": "string", "description": "Language boost setting" }, "subtitle_enable": { "type": "boolean", "description": "Whether to enable subtitle generation" }, "output_format": { "type": "string", "description": "Output audio format" }, "voice_modify": { "$ref": "#/components/schemas/VoiceModify" }, "stream_options": { "$ref": "#/components/schemas/T2AStreamOption" }, "subtitle_type": { "type": "string", "description": "Subtitle type" }, "aigc_watermark": { "type": "boolean", "description": "Whether to add AIGC watermark" }, "with_propagator_meta": { "type": "boolean", "description": "Whether to add propagator metadata" }, "timbre_weights": { "type": "array", "description": "Timbre weights (takes priority over timber_weights)", "items": { "$ref": "#/components/schemas/TimbreWeights" } } } }, "T2aV2Resp": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/StreamData" }, "extra_info": { "$ref": "#/components/schemas/T2AExtraInfo" }, "trace_id": { "type": "string", "description": "Trace ID for request tracking" } } }, "T2AVoiceSetting": { "type": "object", "required": ["voice_id"], "properties": { "speed": { "type": "number", "format": "double", "description": "Speech speed" }, "vol": { "type": "number", "format": "double", "description": "Volume level" }, "pitch": { "type": "integer", "format": "int64", "description": "Pitch level" }, "voice_id": { "type": "string", "description": "Voice ID" }, "emotion": { "type": "string", "description": "Emotion setting" }, "latex_read": { "type": "boolean", "description": "Whether to read LaTeX" }, "add_silence": { "type": "number", "format": "double", "description": "Add silence between sentences" }, "english_normalization": { "type": "boolean", "description": "Whether to normalize English text" }, "text_normalization": { "type": "boolean", "description": "Whether to normalize text" } } }, "T2AAudioSetting": { "type": "object", "properties": { "sample_rate": { "type": "integer", "format": "int64", "description": "Sample rate" }, "bitrate": { "type": "integer", "format": "int64", "description": "Bitrate" }, "format": { "type": "string", "description": "Audio format" }, "channel": { "type": "integer", "format": "int64", "description": "Number of audio channels" }, "force_cbr": { "type": "boolean", "description": "Force CBR (only effective for MP3 format)" } } }, "PronunciationDict": { "type": "object", "properties": { "tone": { "type": "array", "description": "Tone replacement list", "items": { "type": "string" } }, "phonetic": { "type": "array", "description": "Phonetic correction list", "items": { "type": "string" } } } }, "TimbreWeights": { "type": "object", "properties": { "weight": { "type": "number", "format": "double", "description": "Weight value" }, "voice_id": { "type": "string", "description": "Voice ID" } } }, "VoiceModify": { "type": "object", "properties": { "modify_type": { "type": "string", "description": "Voice modification type" }, "modify_value": { "type": "number", "format": "double", "description": "Modification value" } } }, "T2AStreamOption": { "type": "object", "properties": { "include_usage": { "type": "boolean", "description": "Whether to include usage information" } } }, "StreamData": { "type": "object", "properties": { "audio": { "type": "string", "description": "Generated audio segment in base64 encoding" }, "status": { "type": "integer", "format": "int64", "description": "Current audio stream status (1: generating, 2: completed)" }, "ced": { "type": "string", "description": "Generation progress in bytes" }, "subtitle_file": { "type": "string", "description": "Subtitle file" }, "subtitle": { "$ref": "#/components/schemas/T2ASubtitle" } } }, "T2AExtraInfo": { "type": "object", "properties": { "usage": { "$ref": "#/components/schemas/T2AUsage" } } }, "T2AUsage": { "type": "object", "properties": { "total_characters": { "type": "integer", "format": "int64", "description": "Total characters processed" }, "total_tokens": { "type": "integer", "format": "int64", "description": "Total tokens used" } } }, "T2ASubtitle": { "type": "object", "properties": { "text": { "type": "string", "description": "Subtitle text" }, "start_time": { "type": "number", "format": "double", "description": "Start time in seconds" }, "end_time": { "type": "number", "format": "double", "description": "End time in seconds" } } }, "T2AAsyncV2Req": { "type": "object", "required": ["model", "voice_setting"], "properties": { "model": { "type": "string", "description": "Model ID for text-to-audio conversion", "enum": [ "speech-2.5-hd-preview", "speech-2.5-turbo-preview", "speech-02-hd", "speech-02-turbo", "speech-01-hd", "speech-01-turbo" ] }, "text": { "type": "string", "description": "Text content to convert to audio" }, "text_file_id": { "type": "integer", "format": "int64", "description": "Text file ID for file-based input" }, "voice_setting": { "$ref": "#/components/schemas/T2AAsyncV2VoiceSetting" }, "audio_setting": { "$ref": "#/components/schemas/T2AAsyncV2AudioSetting" }, "pronunciation_dict": { "$ref": "#/components/schemas/T2AAsyncV2PronunciationDict" }, "language_boost": { "type": "string", "description": "Language boost setting" }, "callback_url": { "type": "string", "description": "Callback URL for task completion notification" }, "voice_modify": { "$ref": "#/components/schemas/VoiceModify" }, "aigc_watermark": { "type": "boolean", "description": "Whether to add AIGC watermark" } } }, "T2AAsyncV2Resp": { "type": "object", "properties": { "task_id": { "type": "integer", "format": "int64", "description": "Task ID for tracking the async operation" }, "task_token": { "type": "string", "description": "Task token for authentication" }, "file_id": { "type": "integer", "format": "int64", "description": "Expected file ID for downloading the result" }, "usage_characters": { "type": "integer", "format": "int64", "description": "Estimated character consumption" } } }, "T2AAsyncV2VoiceSetting": { "type": "object", "required": ["voice_id"], "properties": { "voice_id": { "type": "string", "description": "Voice ID" }, "speed": { "type": "number", "format": "double", "description": "Speech speed (default: 1.0)" }, "vol": { "type": "number", "format": "double", "description": "Volume level (default: 1.0)" }, "pitch": { "type": "integer", "format": "int64", "description": "Pitch level (default: 0)" }, "emotion": { "type": "string", "description": "Emotion setting" }, "english_normalization": { "type": "boolean", "description": "Whether to normalize English text (legacy field)" }, "add_silence": { "type": "number", "format": "double", "description": "Add silence between sentences" }, "text_normalization": { "type": "boolean", "description": "Whether to normalize text" } } }, "T2AAsyncV2AudioSetting": { "type": "object", "properties": { "audio_sample_rate": { "type": "integer", "format": "int64", "description": "Audio sample rate" }, "bitrate": { "type": "integer", "format": "int64", "description": "Bitrate" }, "format": { "type": "string", "description": "Generated audio file format" }, "channel": { "$ref": "#/components/schemas/Channel" }, "force_cbr": { "type": "boolean", "description": "Force CBR encoding" } } }, "T2AAsyncV2PronunciationDict": { "type": "object", "properties": { "tone": { "type": "array", "description": "Tone specification list for specific phrases", "items": { "type": "string" } } } }, "Channel": { "type": "string", "enum": ["Mono", "Binaural"], "description": "Audio channel configuration" }, "T2AAsyncV2QueryReq": { "type": "object", "required": ["task_id", "group_id"], "properties": { "task_id": { "type": "integer", "format": "int64", "description": "Task ID to query" }, "group_id": { "type": "string", "description": "Group ID" } } }, "T2AAsyncV2QueryResp": { "type": "object", "properties": { "status": { "type": "string", "description": "Task status", "enum": ["success", "failed", "expired", "processing"] }, "task_id": { "type": "integer", "format": "int64", "description": "Task ID" }, "file_id": { "type": "integer", "format": "int64", "description": "File ID for downloading the result" } } }, "UploadFileResp": { "type": "object", "properties": { "file": { "$ref": "#/components/schemas/FileObject" } } }, "FileObject": { "type": "object", "properties": { "id": { "type": "string", "description": "File ID" }, "object": { "type": "string", "description": "Object type", "enum": ["file"] }, "bytes": { "type": "integer", "format": "int64", "description": "File size in bytes" }, "created_at": { "type": "integer", "format": "int64", "description": "Unix timestamp of file creation" }, "filename": { "type": "string", "description": "Original filename" }, "purpose": { "type": "string", "description": "Purpose of the file", "enum": ["fine-tune", "assistants", "batch", "vision"] }, "status": { "type": "string", "description": "File processing status", "enum": ["uploaded", "processing", "processed", "error"] } } }, "VoiceCloneReq": { "type": "object", "required": ["voice_id", "file_id", "output_format", "need_noise_reduction", "text", "model", "text_validation", "accuracy", "need_volume_normalization"], "properties": { "voice_id": { "type": "string", "description": "User-provided voice ID" }, "file_id": { "type": "integer", "format": "int64", "description": "Audio file ID uploaded by user" }, "output_format": { "type": "string", "description": "Output audio format" }, "need_noise_reduction": { "type": "boolean", "description": "Whether noise reduction is needed" }, "text": { "type": "string", "description": "Text for generating demo audio" }, "model": { "type": "string", "description": "Model for generating demo audio" }, "text_validation": { "type": "string", "description": "Text validation setting" }, "accuracy": { "type": "number", "format": "double", "description": "Accuracy requirement" }, "need_volume_normalization": { "type": "boolean", "description": "Whether volume normalization is needed" }, "language_boost": { "type": "string", "description": "Language boost for demo audio" }, "clone_prompt": { "$ref": "#/components/schemas/ClonePrompt" }, "aigc_watermark": { "type": "boolean", "description": "Whether to add AIGC watermark" } } }, "VoiceCloneResp": { "type": "object", "properties": { "input_sensitive": { "type": "boolean", "description": "Whether input contains sensitive content" }, "input_sensitive_type": { "$ref": "#/components/schemas/SensitiveType" }, "demo_audio": { "type": "string", "description": "Demo audio URL" }, "trace_id": { "type": "string", "description": "Trace ID for request tracking" } } }, "ClonePrompt": { "type": "object", "required": ["prompt_audio", "prompt_text"], "properties": { "prompt_audio": { "type": "integer", "format": "int64", "description": "Prompt audio ID" }, "prompt_text": { "type": "string", "description": "Prompt text" } } }, "SensitiveType": { "type": "string", "enum": ["Politics", "Porn", "Ad", "Illegal", "Abuse", "Terror", "Other"], "description": "Sensitive content type" }, "T2VReq": { "type": "object", "required": ["prompt", "preview_text"], "properties": { "prompt": { "type": "string", "description": "Text prompt for voice design" }, "preview_text": { "type": "string", "description": "Preview text for voice generation" }, "voice_id": { "type": "string", "description": "Voice ID (optional)" }, "aigc_watermark": { "type": "boolean", "description": "Whether to add AIGC watermark" } } }, "T2VResp": { "type": "object", "properties": { "trial_audio": { "type": "string", "description": "Trial audio URL" }, "voice_id": { "type": "string", "description": "Generated voice ID" } } }, "GetVoiceReq": { "type": "object", "required": ["voice_type"], "properties": { "voice_type": { "type": "string", "description": "Type of voice to retrieve", "enum": ["system_voice", "voice_cloning", "voice_generation", "music_generation", "voice_slots"] } } }, "GetVoiceResp": { "type": "object", "properties": { "system_voice": { "type": "array", "items": { "$ref": "#/components/schemas/VoiceInfo" }, "description": "System voices" }, "voice_cloning": { "type": "array", "items": { "$ref": "#/components/schemas/VoiceInfo" }, "description": "Voice cloning voices" }, "voice_generation": { "type": "array", "items": { "$ref": "#/components/schemas/VoiceInfo" }, "description": "Voice generation voices" }, "music_generation": { "type": "array", "items": { "$ref": "#/components/schemas/VoiceInfo" }, "description": "Music generation voices" }, "voice_slots": { "type": "array", "items": { "$ref": "#/components/schemas/VoiceInfo" }, "description": "Voice slots" } } }, "VoiceInfo": { "type": "object", "properties": { "voice_id": { "type": "string", "description": "Voice ID" }, "name": { "type": "string", "description": "Voice name" }, "description": { "type": "string", "description": "Voice description" }, "gender": { "type": "string", "description": "Voice gender" }, "language": { "type": "string", "description": "Voice language" }, "age": { "type": "string", "description": "Voice age" }, "style": { "type": "string", "description": "Voice style" }, "created_at": { "type": "integer", "format": "int64", "description": "Creation timestamp" }, "updated_at": { "type": "integer", "format": "int64", "description": "Last update timestamp" } } }, "DeleteVoiceReq": { "type": "object", "required": ["voice_id"], "properties": { "voice_id": { "type": "string", "description": "Voice ID to delete" }, "voice_type": { "type": "string", "description": "Type of voice to delete", "enum": ["system_voice", "voice_cloning", "voice_generation", "music_generation", "voice_slots"] } } }, "DeleteVoiceResp": { "type": "object", "properties": { "voice_id": { "type": "string", "description": "Deleted voice ID" }, "description": { "type": "array", "items": { "type": "string" }, "description": "Deletion description" }, "created_time": { "type": "string", "description": "Voice creation time" } } }, "VideoGenerationReq": { "type": "object", "required": ["model"], "properties": { "prompt": { "type": "string", "description": "Text prompt for video generation" }, "model": { "type": "string", "description": "Model to use for video generation", "enum": [ "MiniMax-Hailuo-02", "T2V-01-Director", "T2V-01" ] }, "prompt_optimizer": { "type": "boolean", "description": "Whether to optimize the prompt" }, "seed": { "type": "integer", "format": "int64", "description": "Random seed for generation" }, "callback_url": { "type": "string", "description": "Callback URL for completion notification" }, "first_frame_image": { "type": "string", "description": "First frame image URL" }, "watermark": { "type": "string", "description": "Watermark settings" }, "subject_reference": { "type": "array", "items": { "$ref": "#/components/schemas/SubjectReference" }, "description": "Subject reference images" }, "duration": { "type": "integer", "format": "int64", "description": "Video duration in seconds" }, "resolution": { "type": "string", "description": "Video resolution" }, "aigc_watermark": { "type": "boolean", "description": "Whether to add AIGC watermark" }, "fast_pretreatment": { "type": "boolean", "description": "Whether to use fast pretreatment" }, "ignore_pretreatment_error": { "type": "boolean", "description": "Whether to ignore pretreatment errors" }, "user_translate": { "type": "boolean", "description": "Whether to use user translation" }, "last_frame_image": { "type": "string", "description": "Last frame image URL" }, "priority": { "type": "integer", "format": "int64", "description": "Task priority" } } }, "VideoGenerationResp": { "type": "object", "properties": { "task_id": { "type": "string", "description": "Task ID for tracking video generation" } } }, "SubjectReference": { "type": "object", "required": ["type", "image"], "properties": { "type": { "type": "string", "description": "Reference type" }, "image": { "type": "array", "items": { "type": "string" }, "description": "Reference image URLs" } } }, "RetrieveFileResp": { "type": "object", "properties": { "file": { "$ref": "#/components/schemas/FileObject" } } }, "QueryVideoTemplateGenerationTaskResp": { "type": "object", "properties": { "task_id": { "type": "string", "description": "Task ID" }, "status": { "$ref": "#/components/schemas/VideoProcessStatus" }, "video_url": { "type": "string", "description": "Generated video URL" } } }, "VideoProcessStatus": { "type": "string", "enum": ["Preparing", "Queueing", "Processing", "Success", "Fail"], "description": "Video processing status" }, "ImageGenerationReq": { "type": "object", "required": ["prompt", "model"], "properties": { "prompt": { "type": "string", "description": "Text prompt for image generation" }, "model": { "type": "string", "description": "Model to use for image generation" }, "prompt_optimizer": { "type": "boolean", "description": "Whether to optimize the prompt" }, "seed": { "type": "integer", "format": "int64", "description": "Random seed for generation" }, "aspect_ratio": { "type": "string", "description": "Aspect ratio of the generated image" }, "response_format": { "$ref": "#/components/schemas/ImageDataFormat" }, "n": { "type": "integer", "format": "int64", "description": "Number of images to generate" }, "metadata": { "type": "object", "additionalProperties": { "type": "string" }, "description": "Additional metadata" }, "subject_reference": { "type": "array", "items": { "$ref": "#/components/schemas/ImageSubjectReference" }, "description": "Subject reference images" }, "style": { "$ref": "#/components/schemas/ImageStyle" }, "width": { "type": "integer", "format": "int64", "description": "Image width" }, "height": { "type": "integer", "format": "int64", "description": "Image height" }, "aigc_watermark": { "type": "boolean", "description": "Whether to add AIGC watermark" } } }, "ImageGenerationResp": { "type": "object", "properties": { "id": { "type": "string", "description": "Trace ID" }, "data": { "$ref": "#/components/schemas/ImageObject" }, "metadata": { "type": "object", "additionalProperties": { "type": "string" }, "description": "Additional metadata" } } }, "ImageObject": { "type": "object", "properties": { "image_urls": { "type": "array", "items": { "type": "string" }, "description": "Generated image URLs" }, "image_base64": { "type": "array", "items": { "type": "string" }, "description": "Generated images in base64 format" } } }, "ImageSubjectReference": { "type": "object", "required": ["type", "image_file"], "properties": { "type": { "$ref": "#/components/schemas/ReferType" }, "image_file": { "type": "string", "description": "Reference image file" } } }, "ImageStyle": { "type": "object", "required": ["type"], "properties": { "type": { "$ref": "#/components/schemas/ImageStyleType" }, "weight": { "type": "number", "format": "double", "description": "Style weight" } } }, "ReferType": { "type": "string", "description": "Reference type" }, "ImageStyleType": { "type": "string", "enum": ["漫画", "元气", "中世纪", "水彩"], "description": "Image style type" }, "ImageDataFormat": { "type": "string", "enum": ["url", "base64"], "description": "Image data format" }, "GenerateMusicReq": { "type": "object", "required": ["lyrics", "model"], "properties": { "refer_voice": { "type": "string", "description": "Reference music voice_id" }, "refer_instrumental": { "type": "string", "description": "Reference instrumental file_id" }, "lyrics": { "type": "string", "description": "Music lyrics" }, "model": { "type": "string", "description": "Model to use for music generation" }, "stream": { "type": "boolean", "description": "Whether to use streaming" }, "audio_setting": { "$ref": "#/components/schemas/AudioSetting" }, "refer_vocal": { "type": "string", "description": "Reference vocal voice_id" }, "prompt": { "type": "string", "description": "Music creation inspiration description" }, "reference_music_id": { "type": "string", "description": "Reference music ID" }, "seed": { "type": "integer", "format": "int64", "description": "Random seed for generation" }, "output_format": { "type": "string", "description": "Output format" }, "aigc_watermark": { "type": "boolean", "description": "Whether to add AIGC watermark" } } }, "GenerateMusicResp": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/MusicData" }, "trace_id": { "type": "string", "description": "Request unique identifier" }, "extra_info": { "$ref": "#/components/schemas/MusicExtraInfo" }, "analysis_info": { "$ref": "#/components/schemas/MusicAnalysisInfo" } } }, "MusicData": { "type": "object", "properties": { "audio": { "type": "string", "description": "Generated music data in hex encoding" }, "status": { "type": "integer", "format": "int64", "description": "Synthesis status: 1-synthesizing, 2-completed" } } }, "MusicExtraInfo": { "type": "object", "properties": { "audio_length": { "type": "integer", "format": "int64", "description": "Audio duration in milliseconds" }, "audio_size": { "type": "integer", "format": "int64", "description": "Audio size in bytes" }, "audio_bitrate": { "type": "integer", "format": "int64", "description": "Bitrate" }, "audio_sample_rate": { "type": "integer", "format": "int64", "description": "Sample rate" }, "music_duration": { "type": "integer", "format": "int32", "description": "Music duration" }, "create_at": { "type": "integer", "format": "int32", "description": "Creation timestamp" }, "finish_at": { "type": "integer", "format": "int32", "description": "Completion timestamp" }, "music_sample_rate": { "type": "integer", "format": "int32", "description": "Music sample rate" }, "music_channel": { "type": "integer", "format": "int32", "description": "Music channel" }, "bitrate": { "type": "integer", "format": "int32", "description": "Bitrate" }, "music_size": { "type": "integer", "format": "int32", "description": "Music size" } } }, "MusicAnalysisInfo": { "type": "object", "properties": { "song_information_analysis": { "$ref": "#/components/schemas/SongInformationAnalysis" }, "vocal_information_analysis": { "$ref": "#/components/schemas/VocalInformationAnalysis" }, "arrangement_features_analysis": { "$ref": "#/components/schemas/ArrangementFeaturesAnalysis" } } }, "SongInformationAnalysis": { "type": "object", "description": "Song information analysis" }, "VocalInformationAnalysis": { "type": "object", "description": "Vocal information analysis" }, "ArrangementFeaturesAnalysis": { "type": "object", "description": "Arrangement features analysis" }, "ListFileResp": { "type": "object", "properties": { "files": { "type": "array", "items": { "$ref": "#/components/schemas/FileObject" }, "description": "List of files" } } }, "DeleteFileReq": { "type": "object", "required": ["file_id"], "properties": { "file_id": { "type": "integer", "format": "int64", "description": "File ID to delete" } } }, "DeleteFileResp": { "type": "object", "properties": { "file_id": { "type": "integer", "format": "int64", "description": "Deleted file ID" } } }, "ChatCompletionReq": { "type": "object", "required": ["model", "messages"], "properties": { "model": { "type": "string", "description": "Model ID for text generation", "enum": [ "MiniMax-M1", "MiniMax-Text-01" ] }, "messages": { "type": "array", "description": "List of messages in the conversation", "items": { "$ref": "#/components/schemas/Message" } }, "temperature": { "type": "number", "format": "double", "description": "Sampling temperature (0.0 to 1.0)", "minimum": 0.0, "maximum": 1.0, "default": 0.7 }, "max_tokens": { "type": "integer", "description": "Maximum number of tokens to generate", "minimum": 1, "maximum": 4096 }, "stream": { "type": "boolean", "description": "Whether to stream the response", "default": false }, "top_p": { "type": "number", "format": "double", "description": "Nucleus sampling parameter", "minimum": 0.0, "maximum": 1.0, "default": 0.9 } } }, "ChatCompletionResp": { "type": "object", "properties": { "id": { "type": "string", "description": "Unique identifier for the completion" }, "object": { "type": "string", "description": "Object type", "enum": ["chat.completion"] }, "created": { "type": "integer", "format": "int64", "description": "Unix timestamp of creation" }, "model": { "type": "string", "description": "Model used for completion" }, "choices": { "type": "array", "description": "List of completion choices", "items": { "$ref": "#/components/schemas/Choice" } }, "usage": { "$ref": "#/components/schemas/Usage" } } }, "Message": { "type": "object", "required": ["role", "content"], "properties": { "role": { "type": "string", "enum": ["system", "user", "assistant"], "description": "Role of the message sender" }, "content": { "type": "string", "description": "Content of the message" } } }, "Choice": { "type": "object", "properties": { "index": { "type": "integer", "description": "Index of the choice" }, "message": { "$ref": "#/components/schemas/Message" }, "finish_reason": { "type": "string", "enum": ["stop", "length", "content_filter"], "description": "Reason for completion" } } }, "Usage": { "type": "object", "properties": { "prompt_tokens": { "type": "integer", "description": "Number of tokens in the prompt" }, "completion_tokens": { "type": "integer", "description": "Number of tokens in the completion" }, "total_tokens": { "type": "integer", "description": "Total number of tokens used" } } } }, "securitySchemes": { "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT" } } } }