Voice Design
curl --request POST \
--url https://api.minimax.io/v1/voice_design \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: <content-type>' \
--data @- <<EOF
{
"prompt": "Excited and enthusiastic male product reviewer (e.g., tech vlogger), fast-paced, high energy, and persuasive.",
"preview_text": "What is UP, everyone! Today we're unboxing the brand new Gadget X-Pro, and let me tell you, this thing is absolutely insane! The features are next level, you guys are gonna love this!"
}
EOFimport requests
url = "https://api.minimax.io/v1/voice_design"
payload = {
"prompt": "Excited and enthusiastic male product reviewer (e.g., tech vlogger), fast-paced, high energy, and persuasive.",
"preview_text": "What is UP, everyone! Today we're unboxing the brand new Gadget X-Pro, and let me tell you, this thing is absolutely insane! The features are next level, you guys are gonna love this!"
}
headers = {
"Content-Type": "<content-type>",
"Authorization": "Bearer <token>"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': '<content-type>', Authorization: 'Bearer <token>'},
body: JSON.stringify({
prompt: 'Excited and enthusiastic male product reviewer (e.g., tech vlogger), fast-paced, high energy, and persuasive.',
preview_text: 'What is UP, everyone! Today we\'re unboxing the brand new Gadget X-Pro, and let me tell you, this thing is absolutely insane! The features are next level, you guys are gonna love this!'
})
};
fetch('https://api.minimax.io/v1/voice_design', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.minimax.io/v1/voice_design",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'prompt' => 'Excited and enthusiastic male product reviewer (e.g., tech vlogger), fast-paced, high energy, and persuasive.',
'preview_text' => 'What is UP, everyone! Today we\'re unboxing the brand new Gadget X-Pro, and let me tell you, this thing is absolutely insane! The features are next level, you guys are gonna love this!'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: <content-type>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.minimax.io/v1/voice_design"
payload := strings.NewReader("{\n \"prompt\": \"Excited and enthusiastic male product reviewer (e.g., tech vlogger), fast-paced, high energy, and persuasive.\",\n \"preview_text\": \"What is UP, everyone! Today we're unboxing the brand new Gadget X-Pro, and let me tell you, this thing is absolutely insane! The features are next level, you guys are gonna love this!\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "<content-type>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.minimax.io/v1/voice_design")
.header("Content-Type", "<content-type>")
.header("Authorization", "Bearer <token>")
.body("{\n \"prompt\": \"Excited and enthusiastic male product reviewer (e.g., tech vlogger), fast-paced, high energy, and persuasive.\",\n \"preview_text\": \"What is UP, everyone! Today we're unboxing the brand new Gadget X-Pro, and let me tell you, this thing is absolutely insane! The features are next level, you guys are gonna love this!\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.minimax.io/v1/voice_design")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = '<content-type>'
request["Authorization"] = 'Bearer <token>'
request.body = "{\n \"prompt\": \"Excited and enthusiastic male product reviewer (e.g., tech vlogger), fast-paced, high energy, and persuasive.\",\n \"preview_text\": \"What is UP, everyone! Today we're unboxing the brand new Gadget X-Pro, and let me tell you, this thing is absolutely insane! The features are next level, you guys are gonna love this!\"\n}"
response = http.request(request)
puts response.read_body{
"trial_audio": "hex-encoded audio",
"voice_id": "ttv-voice-2025060717322425-xxxxxxxx",
"base_resp": {
"status_code": 0,
"status_msg": "success"
}
}Voice Design
Voice Design
Use this API to design custom voices by inputting text.
POST
/
v1
/
voice_design
Voice Design
curl --request POST \
--url https://api.minimax.io/v1/voice_design \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: <content-type>' \
--data @- <<EOF
{
"prompt": "Excited and enthusiastic male product reviewer (e.g., tech vlogger), fast-paced, high energy, and persuasive.",
"preview_text": "What is UP, everyone! Today we're unboxing the brand new Gadget X-Pro, and let me tell you, this thing is absolutely insane! The features are next level, you guys are gonna love this!"
}
EOFimport requests
url = "https://api.minimax.io/v1/voice_design"
payload = {
"prompt": "Excited and enthusiastic male product reviewer (e.g., tech vlogger), fast-paced, high energy, and persuasive.",
"preview_text": "What is UP, everyone! Today we're unboxing the brand new Gadget X-Pro, and let me tell you, this thing is absolutely insane! The features are next level, you guys are gonna love this!"
}
headers = {
"Content-Type": "<content-type>",
"Authorization": "Bearer <token>"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': '<content-type>', Authorization: 'Bearer <token>'},
body: JSON.stringify({
prompt: 'Excited and enthusiastic male product reviewer (e.g., tech vlogger), fast-paced, high energy, and persuasive.',
preview_text: 'What is UP, everyone! Today we\'re unboxing the brand new Gadget X-Pro, and let me tell you, this thing is absolutely insane! The features are next level, you guys are gonna love this!'
})
};
fetch('https://api.minimax.io/v1/voice_design', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.minimax.io/v1/voice_design",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'prompt' => 'Excited and enthusiastic male product reviewer (e.g., tech vlogger), fast-paced, high energy, and persuasive.',
'preview_text' => 'What is UP, everyone! Today we\'re unboxing the brand new Gadget X-Pro, and let me tell you, this thing is absolutely insane! The features are next level, you guys are gonna love this!'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: <content-type>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.minimax.io/v1/voice_design"
payload := strings.NewReader("{\n \"prompt\": \"Excited and enthusiastic male product reviewer (e.g., tech vlogger), fast-paced, high energy, and persuasive.\",\n \"preview_text\": \"What is UP, everyone! Today we're unboxing the brand new Gadget X-Pro, and let me tell you, this thing is absolutely insane! The features are next level, you guys are gonna love this!\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "<content-type>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.minimax.io/v1/voice_design")
.header("Content-Type", "<content-type>")
.header("Authorization", "Bearer <token>")
.body("{\n \"prompt\": \"Excited and enthusiastic male product reviewer (e.g., tech vlogger), fast-paced, high energy, and persuasive.\",\n \"preview_text\": \"What is UP, everyone! Today we're unboxing the brand new Gadget X-Pro, and let me tell you, this thing is absolutely insane! The features are next level, you guys are gonna love this!\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.minimax.io/v1/voice_design")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = '<content-type>'
request["Authorization"] = 'Bearer <token>'
request.body = "{\n \"prompt\": \"Excited and enthusiastic male product reviewer (e.g., tech vlogger), fast-paced, high energy, and persuasive.\",\n \"preview_text\": \"What is UP, everyone! Today we're unboxing the brand new Gadget X-Pro, and let me tell you, this thing is absolutely insane! The features are next level, you guys are gonna love this!\"\n}"
response = http.request(request)
puts response.read_body{
"trial_audio": "hex-encoded audio",
"voice_id": "ttv-voice-2025060717322425-xxxxxxxx",
"base_resp": {
"status_code": 0,
"status_msg": "success"
}
}Authorizations
HTTP: Bearer Auth
- Security Scheme Type: http
- HTTP Authorization Scheme:
Bearer API_key, can be found in Account Management>API Keys.
Headers
The media type of the request body. Must be set to application/json to ensure the data is sent in JSON format.
Available options:
application/json Body
application/json
Voice design request parameters
Voice description.
The text used for generating a preview audio sample.
Note: Generating preview audio incurs a fee of $30 per 1M characters.
Maximum string length:
500Custom voice ID for the generated voice. If not provided, a unique voice_id will be automatically created and returned.
⌘I