How to Clone a Voice Using MiniMax's T2A-01-HD API

MiniMaxi API's fast voice cloning feature provides an efficient and straightforward way to replicate voices for various applications. By following a simple process, users can upload an audio file, clone the voice, and utilize it for speech synthesis.

Emmanuel Mumba

Emmanuel Mumba

14 June 2025

How to Clone a Voice Using MiniMax's T2A-01-HD API

MiniMax proudly introduces T2A-01-HD, a groundbreaking advancement in Text-to-Audio (T2A) technology and voice cloning capabilities. This revolutionary model sets new industry standards by offering unparalleled versatility in voice synthesis, emotional depth, and multilingual support. Whether you need voice cloning for business applications, creative projects, or multilingual communication, T2A-01-HD delivers high-fidelity, natural-sounding results.

Key Features of T2A-01-HD

Multi-Voice: Advanced Voice Synthesis and Cloning

T2A-01-HD can generate a high-quality synthetic voice from just 10 seconds of audio input. It captures voice characteristics, speech patterns, and emotional nuances, making it ideal for applications ranging from automated customer service to AI-generated narration.

Key capabilities include:

Multi-Emotion: AI-Powered Emotional Intelligence

Unlike traditional TTS models, T2A-01-HD can identify and replicate emotional nuances in speech. Users can let the system detect emotions automatically or specify them for more expressive output, ensuring a truly human-like experience.

Multi-Language: Authentic Voice Cloning Across 17+ Languages

T2A-01-HD supports voice cloning in multiple languages, including:

With superior fidelity compared to previous models, T2A-01-HD enables seamless communication across languages while preserving natural accents.

How to Clone a Voice with MiniMax's API

MiniMax provides a simple yet powerful API to enable quick voice cloning. Below is a step-by-step guide on how to use the T2A-01-HD API for voice cloning.

Quick Voice Cloning

To create a cloned voice, you first need to upload an audio file. This file should be in MP3, M4A, or WAV format, with a duration of 10 seconds to 5 minutes and a size under 20MB.

Operation Flow

  1. Upload an Audio File: Use the file upload interface to submit your audio file and retrieve a file_id.
  2. Clone the Voice: Call the Voice Clone API with the file_id and assign a custom voice_id.
  3. Use the Cloned Voice: Utilize the voice_id within the T2A v2 API to generate speech synthesis output.

Uploading an Audio File

To begin, upload an audio file using the File Upload API. This step is essential for obtaining a file_id, which is required for cloning the voice.

Endpoint:
https://api.minimaxi.chat/v1/files/upload

Required Parameters:

API Request Example (Python):

import json
import requests

group_id = 'your_group_id'  # Replace with your group ID
api_key = 'your_api_key'  # Replace with your API key

# Upload audio file
url = f'https://api.minimaxi.chat/v1/files/upload?GroupId={group_id}'
headers = {'Authorization': f'Bearer {api_key}'}
data = {'purpose': 'voice_clone'}
files = {'file': open('audio.mp3', 'rb')}

response = requests.post(url, headers=headers, data=data, files=files)
file_id = response.json().get("file").get("file_id")
print("File ID:", file_id)

Clone the Voice

Once the file is uploaded, use the file_id to create a cloned voice with a custom voice_id.

Endpoint:
https://api.minimaxi.chat/v1/voice_clone

Required Parameters:

Optional Parameters:

API Request Example:

url = f"https://api.minimaxi.chat/v1/voice_clone?GroupId={group_id}"
payload = json.dumps({
  "file_id": file_id,
  "voice_id": "CustomVoice123"
})
headers = {
  'Authorization': f'Bearer {api_key}',
  'Content-Type': 'application/json'
}

response = requests.post(url, headers=headers, data=payload)
print("Voice Clone Response:", response.text)

Response Example

${file_id}    
{"input_sensitive":false,"input_sensitive_type":0,"base_resp":{"status_code":0,"status_msg":"success"}}    

Use the Cloned Voice

The cloned voice can be used within MiniMax’s T2A v2 API for speech synthesis. To retain the voice permanently, use it at least once within 7 days; otherwise, it will be automatically deleted.

Voice Cloning API Response Parameters

After sending the request, the API will return a response indicating the success or failure of the cloning process. A successful response looks like this:

Request example

curl --location 'https://api.minimaxi.chat/v1/voice_clone?GroupId=${group_id}' \
--header 'authority: api.minimaxi.chat' \
--header 'authorization: Bearer ${api_key}' \
--header 'content-type: application/json' \
--data '{
    "file_id":your file id,
    "voice_id":"your voice id"
}'

Response example

{
    "input_sensitive": false,
    "input_sensitive_type": 0,
    "base_resp": {
        "status_code": 0,
        "status_msg": "success"
    }
}
Using Apidog for Fast Voice Cloning

Using Apidog for Fast Voice Cloning

Apidog simplifies the testing and visualization of the requests and responses involved in the voice cloning process. Below is a guide on how you can use Apidog in conjunction with the MiniMaxi API.

1. Uploading an Audio File in Apidog

To start the voice cloning process, the first step is uploading an audio file. Apidog provides an easy interface to fill in the parameters without actually running the request.

Apidog Example:

Once you fill in the parameters, Apidog will show a mock response with the file_id, which is required for the next step.

2. Cloning the Voice with Apidog

After uploading the audio file and getting the file_id, you can now proceed to clone the voice.

Apidog Example:


3. Sample API Response in Apidog

Once the request parameters are filled in, Apidog will display the expected response. Here’s an example of what a successful response might look like:

{
    "input_sensitive": false,
    "input_sensitive_type": 0,
    "base_resp": {
        "status_code": 0,
        "status_msg": "success"
    }
}

4. Benefits of Using Apidog

By using Apidog, you can visualize the request and response structure quickly without needing to execute the actual API calls, making it a convenient tool for testing the MiniMaxi voice cloning features.


Error Codes

If an error occurs during the request, the response will include a base_resp.status_code and base_resp.status_msg for troubleshooting.

Error Code Meaning
1000 Unknown error
1001 Timeout
1002 Trigger RPM restriction
1004 Authentication failure
1039 Trigger TPM restriction
1042 Illegal characters exceeded maximum (more than 10% of input)
2013 Invalid input format

Experience the Future of Voice Technology

MiniMax's T2A-01-HD is a game-changer in AI-driven voice synthesis, offering an unparalleled combination of accuracy, emotional depth, and multilingual support. Whether you need voice cloning for entertainment, accessibility, or business applications, T2A-01-HD delivers unmatched performance.

Try it Now for Free

Developer Quickstart

Learn how to make your first API request using the Group ID and API key. When calling the API, you will need both the GroupID and the API key.GroupID is the unique identifier for your account, linked to your account's privileges. It is associated with your top-ups, billing, and throughput usage.API key is essential for securely accessing the API. Make sure to store it in a secure location, such as an encrypted text file on your computer, to prevent unauthorized access.Follow these steps to obtain them:

1. Get the GroupID:

2. Generate an API Key:

With T2A-01-HD, the future of AI-powered voice synthesis is here. Start creating lifelike voices today!

button

Explore more

Google Just Dropped Gemini CLI— Free Gemini 2.5 Pro Access + 1000 Daily Requests

Google Just Dropped Gemini CLI— Free Gemini 2.5 Pro Access + 1000 Daily Requests

Google's free Gemini CLI, the open-source AI agent, rivals its competitors with free access to 1000 requests/day and Gemini 2.5 pro. Explore this complete Gemini CLI setup guide with MCP server integration.

26 June 2025

How to Use MCP Servers in LM Studio

How to Use MCP Servers in LM Studio

The world of local Large Language Models (LLMs) represents a frontier of privacy, control, and customization. For years, developers and enthusiasts have run powerful models on their own hardware, free from the constraints and costs of cloud-based services.However, this freedom often came with a significant limitation: isolation. Local models could reason, but they could not act. With the release of version 0.3.17, LM Studio shatters this barrier by introducing support for the Model Context Proto

26 June 2025

Gemini CLI: Google's Open Source Claude Code Alternative

Gemini CLI: Google's Open Source Claude Code Alternative

For decades, the command-line interface (CLI) has been the developer's sanctuary—a space of pure efficiency, control, and power. It's where code is born, systems are managed, and real work gets done. While graphical interfaces have evolved, the terminal has remained a constant, a testament to its enduring utility. Now, this venerable tool is getting its most significant upgrade in a generation. Google has introduced Gemini CLI, a powerful, open-source AI agent that brings the formidable capabili

25 June 2025

Practice API Design-first in Apidog

Discover an easier way to build and use APIs