> This page is for API Reference.

> Sarvam Voice Agents (Samvaad) is a voice AI agent platform for Indian languages: build, test and deploy AI calling agents on your own phone numbers, from ₹3 a minute. Start here: https://docs.sarvam.ai/voice-agents/why-voice-agents.
> 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 a section index, append `/llms.txt` to any section URL (for example https://docs.sarvam.ai/voice-agents/llms.txt).
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.sarvam.ai/_mcp/server.

# Delete Job

DELETE https://api.sarvam.ai/v2/dictate/jobs/{job_id}

Deletes the result and inputs of a `Completed` or `Failed` job. Deleting the same job again also returns `204` until the job would have expired.

A job that is not finished returns `409`: DELETE does not stop a running job, and no other route does.

Reference: https://docs.sarvam.ai/api-reference/dictate/delete-job

## Authentication

- `api-subscription-key` header (required) — API Key authentication via header
- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Path parameters

- `job_id` (string, required) — The `job_id` returned when the job was created.

## Response

### 204

The job is deleted.

## Errors

### 403 Forbidden Error

Missing or wrong API key (`invalid_api_key_error`). The gateway answers before Dictate does, with the same error shape.

- `error` (V2ErrorObject, required)

### 404 Not Found Error

Job not found (`not_found_error`): the ID does not exist, belongs to another organisation, was deleted or has expired.

- `error` (V2ErrorObject, required)

### 405 Method Not Allowed Error

Wrong HTTP method for this path (`invalid_request_error`). This path takes `GET` and `DELETE`.

- `error` (V2ErrorObject, required)

### 409 Conflict Error

The job is not finished (`conflict_error`). Wait until it is `Completed` or `Failed`.

- `error` (V2ErrorObject, required)

### 429 Too Many Requests Error

Your key is over its rate limit (`rate_limit_exceeded_error`). The gateway answers before Dictate does, with the usual error shape. Retry after the number of seconds in the `Retry-After` header. Job reads count toward the limit.

- `error` (V2ErrorObject, required)

### 500 Internal Server Error

Unexpected problem (`internal_server_error`). Retry once, and report it with the `x-request-id` header if it repeats.

- `any`

### 503 Service Unavailable Error

Has the header `Retry-After: 1`. - `service_overloaded`: Dictate is at a capacity limit. Retry after `Retry-After`, with backoff. - `model_overloaded`: speech recognition is overloaded or not available. Retry with backoff. - `service_unavailable`: the route is not available. Do not retry.

- `any`

## Types

### V2ErrorObject

- `message` (string, optional)
- `code` (string, optional) — Machine-readable code, e.g. `invalid_request_error`, `not_found_error`.
- `request_id` (string, optional)
- `param` (string, optional, nullable) — Present when a field was named.
- `spend_limits` (map from string to any, optional, nullable) — Present only on a 429 from an exhausted seat budget.

## Examples

**SDK Code**

```python
from sarvamai import SarvamAI

client = SarvamAI(api_subscription_key="YOUR_SARVAM_API_KEY")

client.dictate.jobs.delete(job_id="f30e5f77-5c5c-47ab-9ea2-31088c340851")  # 204: result and inputs are gone

```

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

const client = new SarvamAIClient({ apiSubscriptionKey: process.env.SARVAM_API_KEY });

await client.dictate.jobs.delete("f30e5f77-5c5c-47ab-9ea2-31088c340851"); // 204: result and inputs are gone

```

```go
package main

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

func main() {

	url := "https://api.sarvam.ai/v2/dictate/jobs/f30e5f77-5c5c-47ab-9ea2-31088c340851"

	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
require 'uri'
require 'net/http'

url = URI("https://api.sarvam.ai/v2/dictate/jobs/f30e5f77-5c5c-47ab-9ea2-31088c340851")

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
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.delete("https://api.sarvam.ai/v2/dictate/jobs/f30e5f77-5c5c-47ab-9ea2-31088c340851")
  .header("api-subscription-key", "<apiSubscriptionKey>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('DELETE', 'https://api.sarvam.ai/v2/dictate/jobs/f30e5f77-5c5c-47ab-9ea2-31088c340851', [
  'headers' => [
    'api-subscription-key' => '<apiSubscriptionKey>',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.sarvam.ai/v2/dictate/jobs/f30e5f77-5c5c-47ab-9ea2-31088c340851");
var request = new RestRequest(Method.DELETE);
request.AddHeader("api-subscription-key", "<apiSubscriptionKey>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.sarvam.ai/v2/dictate/jobs/f30e5f77-5c5c-47ab-9ea2-31088c340851")! 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()
```