> For clean Markdown of any page, append `.md` to the page URL.
> For a complete documentation index, see https://docs.sarvam.ai/llms.txt.
> For full documentation content in one file, see https://docs.sarvam.ai/llms-full.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.sarvam.ai/_mcp/server.

# Delete

DELETE https://api.sarvam.ai/text-to-speech/pronunciation-dictionary

Delete a pronunciation dictionary by its ID. Once deleted, the dictionary can no longer be referenced in text-to-speech requests.

Reference: https://docs.sarvam.ai/api-reference/pronunciation-dictionary/delete

## Authentication

- `api-subscription-key` header (required)

## Request

### Query parameters

- `dict_id` (string, required) — ID of the dictionary to delete

## Response

### 200

Successful Response

- `success` (boolean, required) — Whether the deletion was successful.
- `message` (string, required) — Human-readable status message (e.g. "Dictionary 'p_5cb7faa6' deleted successfully").

## Examples

**Response**

```json
{
  "success": true,
  "message": "Dictionary 'p_5cb7faa6' deleted successfully"
}
```

**SDK Code**

```typescript pronunciationDictionary_delete_example
import { SarvamAIClient } from "sarvamai";

async function main() {
    const client = new SarvamAIClient({
        apiSubscriptionKey: "YOUR_API_KEY_HERE",
    });
    await client.pronunciationDictionary.delete({
        dict_id: "dict_id",
    });
}
main();

```

```python pronunciationDictionary_delete_example
from sarvamai import SarvamAI

client = SarvamAI(
    api_subscription_key="YOUR_API_KEY_HERE",
)

client.pronunciation_dictionary.delete(
    dict_id="dict_id",
)

```

```go pronunciationDictionary_delete_example
package main

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

func main() {

	url := "https://api.sarvam.ai/text-to-speech/pronunciation-dictionary?dict_id=dict_id"

	req, _ := http.NewRequest("DELETE", url, nil)

	req.Header.Add("api-subscription-key", "<apiSubscriptionKey>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby pronunciationDictionary_delete_example
require 'uri'
require 'net/http'

url = URI("https://api.sarvam.ai/text-to-speech/pronunciation-dictionary?dict_id=dict_id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)
request["api-subscription-key"] = '<apiSubscriptionKey>'

response = http.request(request)
puts response.read_body
```

```java pronunciationDictionary_delete_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.delete("https://api.sarvam.ai/text-to-speech/pronunciation-dictionary?dict_id=dict_id")
  .header("api-subscription-key", "<apiSubscriptionKey>")
  .asString();
```

```php pronunciationDictionary_delete_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('DELETE', 'https://api.sarvam.ai/text-to-speech/pronunciation-dictionary?dict_id=dict_id', [
  'headers' => [
    'api-subscription-key' => '<apiSubscriptionKey>',
  ],
]);

echo $response->getBody();
```

```csharp pronunciationDictionary_delete_example
using RestSharp;

var client = new RestClient("https://api.sarvam.ai/text-to-speech/pronunciation-dictionary?dict_id=dict_id");
var request = new RestRequest(Method.DELETE);
request.AddHeader("api-subscription-key", "<apiSubscriptionKey>");
IRestResponse response = client.Execute(request);
```

```swift pronunciationDictionary_delete_example
import Foundation

let headers = ["api-subscription-key": "<apiSubscriptionKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.sarvam.ai/text-to-speech/pronunciation-dictionary?dict_id=dict_id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "DELETE"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```