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

30 January 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

How to Get 500 More Cursor Premium Requests with Interactive Feedback MCP Server

How to Get 500 More Cursor Premium Requests with Interactive Feedback MCP Server

If you're a Cursor Premium user, you've probably felt the frustration of hitting the 500 fast request limit faster than expected. One moment you're in a productive coding flow, and the next, you're staring at the dreaded "You've hit your limit of 500 fast requests" message. What if I told you there's a way to effectively double your request efficiency and make those 500 requests feel like 1000? 💡Want a great API Testing tool that generates beautiful API Documentation? Want an integrated, All-

5 June 2025

Is ChatGPT Pro Worth $200 Per Month?

Is ChatGPT Pro Worth $200 Per Month?

If you've been using ChatGPT regularly and find yourself repeatedly hitting usage limits or wishing for more advanced capabilities, you may have encountered mentions of ChatGPT Pro—OpenAI's premium subscription tier priced at 200 per month. This significant price jump from the more widely known ChatGPT Plus (20/month) raises an important question: Is ChatGPT Pro actually worth ten times the cost of Plus? The answer depends largely on your specific use cases, professional needs, and how you valu

5 June 2025

10 Fintech APIs and Solutions for Developers in 2025

10 Fintech APIs and Solutions for Developers in 2025

The financial technology landscape is undergoing a rapid transformation as innovative APIs (Application Programming Interfaces) revolutionize how we build banking services, payment systems, investment platforms, and other financial applications. For developers working in this space, selecting the right fintech API is critical—it can make the difference between a seamless user experience and a frustrating one, between robust security and potential vulnerabilities. As fintech applications become

5 June 2025

Practice API Design-first in Apidog

Discover an easier way to build and use APIs