# Delete cloned voice

> DELETE https://api.nabrah.ai/api/ext/tts/voices/{voice_id}

Group: Text to speech. Page: https://www.nabrah.ai/en/docs/api-reference/text-to-speech/delete-cloned-voice

Delete a voice clone by its ID. The voice must belong to the project associated with your API key. Only PRIVATE cloned voices can be deleted — public platform voices (`is_public: true`) cannot be removed through this endpoint and the request will be rejected. The response confirms the outcome with a `success` flag and a `message`.

## Restrictions

- **Private voices only**: You can only delete voices your project owns (`is_public: false`). Attempting to delete a public platform voice is not permitted.
- **Response**: Returns a `success` flag and a `message` describing the result. Fields: `success`, `message`.

## Authorization

- `X-API-Key` (string, header, required): your workspace API key.

## Path parameters

- `voice_id` (string, required): The ID of the private voice clone to delete. Must be a private voice owned by your project. Find candidate IDs via GET /api/ext/tts/voices where `is_public` is `false`.

## Response

### 200 Successful Response

Content type: `application/json`

```json
{
  "success": false,
  "message": "string"
}
```

### 422 Validation Error

Content type: `application/json`

```json
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}
```

## Request examples

### cURL

```bash
curl --request DELETE \
  --url 'https://api.nabrah.ai/api/ext/tts/voices/<voice_id>' \
  --header 'X-API-Key: <your-api-key>'
```

### Python

```python
import requests

url = "https://api.nabrah.ai/api/ext/tts/voices/<voice_id>"
headers = {"X-API-Key": "<your-api-key>"}

response = requests.delete(url, headers=headers)
response.raise_for_status()
print(response.json())
```

### JavaScript

```javascript
const response = await fetch("https://api.nabrah.ai/api/ext/tts/voices/<voice_id>", {
  method: "DELETE",
  headers: { "X-API-Key": "<your-api-key>" },
});

const data = await response.json();
console.log(data);
```

### Go

```go
package main

import (
	"fmt"
	"io"
	"net/http"
)

func main() {
	req, _ := http.NewRequest("DELETE", "https://api.nabrah.ai/api/ext/tts/voices/<voice_id>", nil)
	req.Header.Set("X-API-Key", "<your-api-key>")

	res, err := http.DefaultClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer res.Body.Close()

	out, _ := io.ReadAll(res.Body)
	fmt.Println(string(out))
}
```
