> 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-docs/pronunciation-dictionary/delete

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: ''
  version: 1.0.0
paths:
  /text-to-speech/pronunciation-dictionary:
    delete:
      operationId: delete
      summary: Delete Pronunciation Dictionary
      description: >-
        Delete a pronunciation dictionary by its ID. Once deleted, the
        dictionary can no longer be referenced in text-to-speech requests.
      tags:
        - subpackage_pronunciationDictionary
      parameters:
        - name: dict_id
          in: query
          description: ID of the dictionary to delete
          required: true
          schema:
            type: string
        - name: api-subscription-key
          in: header
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/Sarvam_Model_API_PronunciationDictionaryDeleteResponse
        '400':
          description: Bad Request — Invalid JSON, missing required fields, or bad schema.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Sarvam_Model_API_ErrorMessage'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Sarvam_Model_API_ErrorMessage'
        '404':
          description: Not Found — Dictionary not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Sarvam_Model_API_ErrorMessage'
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Sarvam_Model_API_ErrorMessage'
        '429':
          description: Quota Exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Sarvam_Model_API_ErrorMessage'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Sarvam_Model_API_ErrorMessage'
servers:
  - url: https://api.sarvam.ai
components:
  schemas:
    Sarvam_Model_API_PronunciationDictionaryDeleteResponse:
      type: object
      properties:
        success:
          type: boolean
          description: Whether the deletion was successful.
        message:
          type: string
          description: >-
            Human-readable status message (e.g. "Dictionary 'p_5cb7faa6' deleted
            successfully").
      required:
        - success
        - message
      description: Response returned after deleting a pronunciation dictionary.
      title: Sarvam_Model_API_PronunciationDictionaryDeleteResponse
    Sarvam_Model_API_ErrorCode:
      type: string
      enum:
        - invalid_request_error
        - internal_server_error
        - unprocessable_entity_error
        - insufficient_quota_error
        - invalid_api_key_error
        - authentication_error
        - not_found_error
        - rate_limit_exceeded_error
      title: Sarvam_Model_API_ErrorCode
    Sarvam_Model_API_ErrorDetails:
      type: object
      properties:
        request_id:
          type:
            - string
            - 'null'
        message:
          type: string
          description: Message describing the error
        code:
          $ref: '#/components/schemas/Sarvam_Model_API_ErrorCode'
          description: >-
            Error code for the specific error that has occured. Refer to the
            error code documentation for more details.
      required:
        - request_id
        - message
        - code
      title: Sarvam_Model_API_ErrorDetails
    Sarvam_Model_API_ErrorMessage:
      type: object
      properties:
        error:
          $ref: '#/components/schemas/Sarvam_Model_API_ErrorDetails'
          description: Error details
      required:
        - error
      title: Sarvam_Model_API_ErrorMessage
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: api-subscription-key

```

## SDK Code Examples

```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_9f8b7c6a",
    });
}
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_9f8b7c6a",
)

```

```go pronunciationDictionary_delete_example
package main

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

func main() {

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

	payload := strings.NewReader("{}")

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

	req.Header.Add("api-subscription-key", "<apiSubscriptionKey>")
	req.Header.Add("Content-Type", "application/json")

	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_9f8b7c6a")

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

request = Net::HTTP::Delete.new(url)
request["api-subscription-key"] = '<apiSubscriptionKey>'
request["Content-Type"] = 'application/json'
request.body = "{}"

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_9f8b7c6a")
  .header("api-subscription-key", "<apiSubscriptionKey>")
  .header("Content-Type", "application/json")
  .body("{}")
  .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_9f8b7c6a', [
  'body' => '{}',
  'headers' => [
    'Content-Type' => 'application/json',
    '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_9f8b7c6a");
var request = new RestRequest(Method.DELETE);
request.AddHeader("api-subscription-key", "<apiSubscriptionKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift pronunciationDictionary_delete_example
import Foundation

let headers = [
  "api-subscription-key": "<apiSubscriptionKey>",
  "Content-Type": "application/json"
]
let parameters = [] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

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

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()
```