Skip to main content
POST
/
v1
/
delete_voice
Delete Voice
curl --request POST \
  --url https://api.minimax.io/v1/delete_voice \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: <content-type>' \
  --data '
{
  "voice_type": "voice_cloning",
  "voice_id": "yanshang11123"
}
'
import requests

url = "https://api.minimax.io/v1/delete_voice"

payload = {
    "voice_type": "voice_cloning",
    "voice_id": "yanshang11123"
}
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({voice_type: 'voice_cloning', voice_id: 'yanshang11123'})
};

fetch('https://api.minimax.io/v1/delete_voice', 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/delete_voice",
  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([
    'voice_type' => 'voice_cloning',
    'voice_id' => 'yanshang11123'
  ]),
  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/delete_voice"

	payload := strings.NewReader("{\n  \"voice_type\": \"voice_cloning\",\n  \"voice_id\": \"yanshang11123\"\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/delete_voice")
  .header("Content-Type", "<content-type>")
  .header("Authorization", "Bearer <token>")
  .body("{\n  \"voice_type\": \"voice_cloning\",\n  \"voice_id\": \"yanshang11123\"\n}")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://api.minimax.io/v1/delete_voice")

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  \"voice_type\": \"voice_cloning\",\n  \"voice_id\": \"yanshang11123\"\n}"

response = http.request(request)
puts response.read_body
{
  "voice_id": "yanshang11123",
  "created_time": "1728962464",
  "base_resp": {
    "status_code": 0,
    "status_msg": "success"
  }
}
This API is used to delete a specified voice_id. Deletions apply only to voice_id values generated through Voice Clone API and Voice Design API. ⚠️ Note: Once deleted, the voice_id cannot be reused.

Authorizations

Authorization
string
header
required

HTTP: Bearer Auth

Headers

Content-Type
enum<string>
default:application/json
required

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

Delete voice request parameters

voice_type
enum<string>
required

Accepted values:

  • voice_cloning: Cloned voice
  • voice_generation: Voice generated from text prompt

Only these two categories are supported for deletion.

Available options:
voice_cloning,
voice_generation
voice_id
string
required

The voice_id of the voice to be deleted.

Response

200 - application/json

Successful response

voice_id
string

The voice_id of the deleted voice.

created_time
string

The time when the voice generation request was submitted, not the first activation time. Format: yyyy-mm-dd.

base_resp
object