Delete cloned voice

December 27, 2024

Table of contents

  1. Delete cloned voice
    1. Request Headers
    2. Request Body
    3. Responses
    4. Examples
    5. Try It

Please configure at least one www.hailuo.ai account for this endpoint, see Setup MiniMax for details.

This endpoint deletes a voice cloned via POST audio/clone-voice.

This endpoint will return a response 200 if you’re trying to delete a cloned voice that does not exist or has already been deleted. It is safe to say it always succeeds.

https://api.useapi.net/v1/minimax/accounts/account

Request Headers
Authorization: Bearer {API token}
Content-Type: application/json
# Alternatively you can use multipart/form-data
# Content-Type: multipart/form-data
Request Body
{
    "account": "Optional MiniMax account",
    "voice_id": "1234567890",
}
Responses
  • 200 OK

  • 400 Bad Request

    {
      "error": "<Error message>",
      "code": 400
    }
    
  • 401 Unauthorized

    {
      "error": 
        "Unauthorized",
        "Wrong username/password combination.",
        "This account has been suspended."
      "code": 401
    }
    
Examples
  • curl -H "Accept: application/json" \
         -H "Content-Type: application/json" \
         -H "Authorization: Bearer …" \
         -X POST https://api.useapi.net/v1/minimax/audio/delete-voice \
         -d '{"account": "…", "voice_id": "…"}'
    
  • const account = "MiniMax account";      
    const voice_id = "voice id";      
    const apiUrl = `https://api.useapi.net/v1/minimax/audio/delete-voice`; 
    const api_token = "API token";
    const data = { 
      method: 'POST',
      headers: {
        'Authorization': `Bearer ${api_token}`,
        'Content-Type': 'application/json' }
    };
    data.body = JSON.stringify({ 
    });
    const response = await fetch(apiUrl, data);
    const result = await response.json();
    console.log("response", {response, result});
    
  • import requests
    account = "MiniMax account"
    voice_id = "voice id"
    apiUrl = f"https://api.useapi.net/v1/minimax/audio/delete-voice" 
    api_token = "API token"
    maxJobs = 1
    headers = {
        "Content-Type": "application/json", 
        "Authorization" : f"Bearer {api_token}"
    }
    body = {
        "account": f"{account}",
        "voice_id": f"{voice_id}"
    }
    response = requests.post(apiUrl, headers=headers, json=body)
    print(response, response.json())
    
Try It