MiniMax voice cloning HTTP API
Clone a MiniMax voice and generate demo audio.
This interface creates MiniMax voices.
First obtain an API key and configure the environment variable. Examples read DASHSCOPE_API_KEY.
Service endpoint
HTTP Request URL: POST https://dashscope.aliyuncs.com/api/v1/services/aigc/multimodal-generation/generation
Base URL (base_url): https://dashscope.aliyuncs.com/api/v1.
NoteThird-party models (MiniMax) currently only support invocation via the dashscope.aliyuncs.com domain and do not yet support dedicated domains.
Request headers
| Header | Type | Required | Description |
|---|---|---|---|
| Authorization | string | Yes | Bearer <your_api_key> |
| Content-Type | string | Yes | application/json; charset=utf-8 |
Create a voice
NoteA voice cloning request generates a demo audio clip. The demo audio is billed additionally at the synchronous TTS unit price of the selected model.
Request Bodymodel Supported models:
input Properties action text The text to synthesize as demo audio for the cloned voice. Maximum: 1,000 characters. NoteThe demo audio is billed at the standard TTS rate per character. For pricing details, see MiniMax model pricing.
audio_url The URL of the audio file to clone. The audio must meet the following requirements:
clone_prompt A sample audio clip for voice cloning. Providing this parameter improves voice similarity and stability during synthesis. If you use this parameter, prepare a short sample audio clip. Properties prompt_audio The URL of the sample audio file. The audio must meet the following requirements:
prompt_text The transcript of the sample audio. The text must match the audio content exactly and end with a punctuation mark. voice_id The ID of the cloned voice (for example, "MiniMax001"). The ID must follow these naming rules:
NoteThe voice ID must be globally unique across all voices in your account. Include a timestamp or other unique identifier in the ID to avoid conflicts. language_boost Default value: null. Whether to enhance recognition accuracy for a specific language or dialect. Set to Available options
need_noise_reduction Default: false. Whether to enable noise reduction for the audio used for cloning. need_volume_normalization Default: false. Whether to enable volume normalization. aigc_watermark Default: false. Whether to add an audio rhythm marker to the end of the synthesized demo audio. | Request examplesMiniMax/speech-2.8-turbo |
Response bodyrequest_id The unique identifier of this request. output Properties input_sensitive Whether the input audio triggered content moderation. input_sensitive_type The type of content moderation violation detected in the input audio:
demo_audio URL of the demo audio. base_resp Properties status_code Status code:
status_msg A description of the status. usage Character usage for this request. Properties characters The number of characters in the input text. | Response examplesMiniMax/speech-2.8-turbo |
Use and manage the voice
Use the request’s voice_id for speech synthesis. To query available voice IDs or delete a voice, see Voice management.
Errors
See Error codes.