> 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.

# Create Job

POST https://api.sarvam.ai/v2/dictate/jobs
Content-Type: multipart/form-data

Starts a job for a recording up to 1 hour long, and returns a `job_id` at once.

1. **Create** the job here, with a `file` or an `audio_url` that Dictate downloads.
2. **Read the result** with `GET /v2/dictate/jobs/{job_id}`, or pass a `callback` to be told when the job is finished.
3. **Delete** the job with `DELETE /v2/dictate/jobs/{job_id}` when you have the result. Results are kept for 7 days.

For a full example that turns a recording into meeting minutes, see [Dictate best practices](/api/api-guides-tutorials/dictate/best-practices).

**Good to know**

* Use the path exactly as written. A trailing slash, such as `/v2/dictate/`, is answered with `307` to an `http://` address, and a client that follows it sends your request and key without encryption.
* Send `multipart/form-data` with a `Content-Length` header. Chunked uploads are not accepted.
* `202` means the job is saved, not finished. A rule broken in the text of `audio_url` or `callback.url` returns `400` at once. A DNS or download problem appears later as a `Failed` job.
* Dictate measures the audio when it processes the job, so a file over 1 hour is accepted with `202` and then fails with `audio_too_long`.
* The job keeps the model snapshot it was accepted with.
* Character limits count characters, not bytes. Each form part other than `file` can be at most 1 MiB.
* There is no route to list jobs or to stop a job, so keep the `job_id` from this response.
* Each POST makes a new job, and it is billed. There is no idempotency key, so do not send a POST again to retry a poll.
* Every response has an `x-request-id` header. Send it to support if you report a problem.

Reference: https://docs.sarvam.ai/api-reference/dictate/create-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

### Body (multipart/form-data)

This endpoint expects a multipart form containing an optional file.

- `file` (file, optional) — Audio up to 1 hour long, in any common audio or video format. Dictate takes the first audio track. Dictate itself accepts files up to 1,000,000,000 bytes, but the gateway in front of it refuses an upload of about 100 MB or more with `413` (the body can be empty), and a slow connection can be cut off with no status. For a large file, use `audio_url`. Set a client timeout on the upload: a stalled upload through the gateway gets no answer.
- `audio_url` (string, optional) — An `https` URL that Dictate downloads, on port 443 or 8443, with no user name or password, that does not point to a private, loopback or internal address. It can redirect up to 3 times. The host must let Dictate download the file: some public hosts refuse its downloader with `403`, and the job then fails as `fetch_failed`. A URL that is not `https`, that uses `localhost`, or that is a private or loopback IP address such as `https://10.0.0.5/...`, is refused at create with `400`. Any other host name is checked when the job runs: a name that resolves to a private address, or that does not resolve, gives `202`, and the job then ends `Failed` with `invalid_audio_url`.
- `language_code` (enum, optional)
- `mode` (enum, optional)
- `style` (DictateStyle, optional)
- `vocabulary` (list of DictateVocabularyEntry, optional)
- `context` (DictateContext, optional)
- `output_rules` (string, optional)
- `model` (string, optional)
- `callback` (DictateCallback, optional)

## Response

### 202

The job is saved.

- `job_id` (string, required)
- `job_state` (enum, required) — - `Accepted`: saved and in the queue. - `Pending`: back in the queue after a temporary internal problem. - `Running`: a worker is processing it. - `Completed`: `result` is ready. - `Failed`: `error` tells why.
  - Allowed values: `Accepted`, `Pending`, `Running`, `Completed`, `Failed`

## Errors

### 400 Bad Request Error

Invalid request. - `invalid_request_error`: a field, limit, URL, JSON or form error; an unknown or repeated field (including `style.prefix` and `style.suffix`); a `style`, `vocabulary`, `context`, `model` or `language_code` part sent as an empty string; `null`; an unknown `model`; a `sounds_like` that is listed for two vocabulary entries; or sending both `file` and `audio_url` (or neither). Correct the request; do not send it again unchanged. A request whose headers are too large gets a `400` from the load balancer instead: the body is an HTML page, not JSON, so check the content type before you parse it. Audio that cannot be read is not refused here. The job returns `202`, then ends `Failed` with `invalid_audio` when it runs. Only `POST /v2/dictate` refuses it up front, with a `400`.

- `error` (V2ErrorObject, required)

### 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)

### 405 Method Not Allowed Error

Wrong HTTP method for this path (`invalid_request_error`). This path takes `POST`. To read a job, use `GET /v2/dictate/jobs/{job_id}`.

- `error` (V2ErrorObject, required)

### 408 Request Timeout Error

The upload stopped for 30 s, or took longer than 30 min (`invalid_request_error`). Retry on a faster connection, or use `audio_url`. Through the gateway, a stalled upload can get no answer, and the connection can stay open.

- `any`

### 411 Length Required Error

No `Content-Length` header (`invalid_request_error`). Chunked uploads are not accepted, also not through the gateway.

- `any`

### 413 Content Too Large Error

The gateway refused an upload of about 100 MB or more. The body can be empty. Use `audio_url` for a large file.

- `any`

### 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

### Upload a file, with a name and a JSON output

**Request**

```json
{
  "file": "<file: <file1>>",
  "language_code": "en-IN",
  "output_rules": "Return JSON: {\"invoice_number\": string | null (the invoice number said), \"team\": string | null (the team named)}.",
  "vocabulary": [
    {
      "word": "Zentrix Support",
      "description": "the help desk team"
    }
  ]
}
```

**Response**

```json
{
  "job_id": "f30e5f77-5c5c-47ab-9ea2-31088c340851",
  "job_state": "Accepted"
}
```

**SDK Code**

```python Upload a file, with a name and a JSON output
from sarvamai import SarvamAI

client = SarvamAI(api_subscription_key="YOUR_SARVAM_API_KEY")

with open("standup.wav", "rb") as f:
    job = client.dictate.jobs.create(
        file=f,
        language_code="en-IN",
        vocabulary=[{"word": "Zentrix Support", "description": "the help desk team"}],
        output_rules=(
            'Return JSON: {"invoice_number": string | null (the invoice number said), '
            '"team": string | null (the team named)}.'
        ),
    )

print(job.job_id, job.job_state)  # keep job_id: you read the result with it

```

```typescript Upload a file, with a name and a JSON output
import fs from "fs";
import { SarvamAIClient } from "sarvamai";

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

const job = await client.dictate.jobs.create({
  file: fs.createReadStream("standup.wav"),
  language_code: "en-IN",
  vocabulary: [{ word: "Zentrix Support", description: "the help desk team" }],
  output_rules:
    'Return JSON: {"invoice_number": string | null (the invoice number said), ' +
    '"team": string | null (the team named)}.',
});

console.log(job.job_id, job.job_state); // keep job_id: you read the result with it

```

```go Upload a file, with a name and a JSON output
package main

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

func main() {

	url := "https://api.sarvam.ai/v2/dictate/jobs"

	payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"audio_url\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"callback\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"context\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"<file1>\"\r\nContent-Type: application/octet-stream\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"language_code\"\r\n\r\nen-IN\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"mode\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"model\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"output_rules\"\r\n\r\nReturn JSON: {\"invoice_number\": string | null (the invoice number said), \"team\": string | null (the team named)}.\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"style\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"vocabulary\"\r\n\r\n[\n  {\n    \"word\": \"Zentrix Support\",\n    \"description\": \"the help desk team\"\n  }\n]\r\n-----011000010111000001101001--\r\n")

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

	req.Header.Add("api-subscription-key", "<apiSubscriptionKey>")
	req.Header.Add("Content-Type", "multipart/form-data; boundary=---011000010111000001101001")

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

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

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

}
```

```ruby Upload a file, with a name and a JSON output
require 'uri'
require 'net/http'

url = URI("https://api.sarvam.ai/v2/dictate/jobs")

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

request = Net::HTTP::Post.new(url)
request["api-subscription-key"] = '<apiSubscriptionKey>'
request["Content-Type"] = 'multipart/form-data; boundary=---011000010111000001101001'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"audio_url\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"callback\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"context\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"<file1>\"\r\nContent-Type: application/octet-stream\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"language_code\"\r\n\r\nen-IN\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"mode\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"model\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"output_rules\"\r\n\r\nReturn JSON: {\"invoice_number\": string | null (the invoice number said), \"team\": string | null (the team named)}.\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"style\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"vocabulary\"\r\n\r\n[\n  {\n    \"word\": \"Zentrix Support\",\n    \"description\": \"the help desk team\"\n  }\n]\r\n-----011000010111000001101001--\r\n"

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

```java Upload a file, with a name and a JSON output
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.sarvam.ai/v2/dictate/jobs")
  .header("api-subscription-key", "<apiSubscriptionKey>")
  .header("Content-Type", "multipart/form-data; boundary=---011000010111000001101001")
  .body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"audio_url\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"callback\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"context\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"<file1>\"\r\nContent-Type: application/octet-stream\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"language_code\"\r\n\r\nen-IN\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"mode\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"model\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"output_rules\"\r\n\r\nReturn JSON: {\"invoice_number\": string | null (the invoice number said), \"team\": string | null (the team named)}.\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"style\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"vocabulary\"\r\n\r\n[\n  {\n    \"word\": \"Zentrix Support\",\n    \"description\": \"the help desk team\"\n  }\n]\r\n-----011000010111000001101001--\r\n")
  .asString();
```

```php Upload a file, with a name and a JSON output
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.sarvam.ai/v2/dictate/jobs', [
  'multipart' => [
    [
        'name' => 'file',
        'filename' => '<file1>',
        'contents' => null
    ],
    [
        'name' => 'language_code',
        'contents' => 'en-IN'
    ],
    [
        'name' => 'output_rules',
        'contents' => 'Return JSON: {"invoice_number": string | null (the invoice number said), "team": string | null (the team named)}.'
    ],
    [
        'name' => 'vocabulary',
        'contents' => '[
  {
    "word": "Zentrix Support",
    "description": "the help desk team"
  }
]'
    ]
  ]
  'headers' => [
    'api-subscription-key' => '<apiSubscriptionKey>',
  ],
]);

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

```csharp Upload a file, with a name and a JSON output
using RestSharp;

var client = new RestClient("https://api.sarvam.ai/v2/dictate/jobs");
var request = new RestRequest(Method.POST);
request.AddHeader("api-subscription-key", "<apiSubscriptionKey>");
request.AddParameter("multipart/form-data; boundary=---011000010111000001101001", "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"audio_url\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"callback\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"context\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"<file1>\"\r\nContent-Type: application/octet-stream\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"language_code\"\r\n\r\nen-IN\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"mode\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"model\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"output_rules\"\r\n\r\nReturn JSON: {\"invoice_number\": string | null (the invoice number said), \"team\": string | null (the team named)}.\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"style\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"vocabulary\"\r\n\r\n[\n  {\n    \"word\": \"Zentrix Support\",\n    \"description\": \"the help desk team\"\n  }\n]\r\n-----011000010111000001101001--\r\n", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Upload a file, with a name and a JSON output
import Foundation

let headers = [
  "api-subscription-key": "<apiSubscriptionKey>",
  "Content-Type": "multipart/form-data; boundary=---011000010111000001101001"
]
let parameters = [
  [
    "name": "audio_url",
    "value": 
  ],
  [
    "name": "callback",
    "value": 
  ],
  [
    "name": "context",
    "value": 
  ],
  [
    "name": "file",
    "fileName": "<file1>"
  ],
  [
    "name": "language_code",
    "value": "en-IN"
  ],
  [
    "name": "mode",
    "value": 
  ],
  [
    "name": "model",
    "value": 
  ],
  [
    "name": "output_rules",
    "value": "Return JSON: {\"invoice_number\": string | null (the invoice number said), \"team\": string | null (the team named)}."
  ],
  [
    "name": "style",
    "value": 
  ],
  [
    "name": "vocabulary",
    "value": "[
  {
    \"word\": \"Zentrix Support\",
    \"description\": \"the help desk team\"
  }
]"
  ]
]

let boundary = "---011000010111000001101001"

var body = ""
var error: NSError? = nil
for param in parameters {
  let paramName = param["name"]!
  body += "--\(boundary)\r\n"
  body += "Content-Disposition:form-data; name=\"\(paramName)\""
  if let filename = param["fileName"] {
    let contentType = param["content-type"]!
    let fileContent = String(contentsOfFile: filename, encoding: String.Encoding.utf8)
    if (error != nil) {
      print(error as Any)
    }
    body += "; filename=\"\(filename)\"\r\n"
    body += "Content-Type: \(contentType)\r\n\r\n"
    body += fileContent
  } else if let paramValue = param["value"] {
    body += "\r\n\r\n\(paramValue)"
  }
}

let request = NSMutableURLRequest(url: NSURL(string: "https://api.sarvam.ai/v2/dictate/jobs")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
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()
```

### Download from a URL, and get a callback

**Request**

```json
{
  "audio_url": "https://files.example.com/meetings/standup-0311.m4a",
  "callback": {
    "url": "https://hooks.example.com/dictate",
    "auth_token": "a-long-random-secret"
  },
  "file": "<file: <file1>>",
  "language_code": "en-IN"
}
```

**Response**

```json
{
  "job_id": "5b1f0c6e-2f3a-4c1e-9b7d-0c2a9f1e4d55",
  "job_state": "Accepted"
}
```

**SDK Code**

```python Download from a URL, and get a callback
from sarvamai import SarvamAI

client = SarvamAI(api_subscription_key="YOUR_SARVAM_API_KEY")

job = client.dictate.jobs.create(
    audio_url="https://files.example.com/meetings/standup-0311.m4a",
    language_code="en-IN",
    callback={"url": "https://hooks.example.com/dictate", "auth_token": "a-long-random-secret"},
)

print(job.job_id, job.job_state)

```

```typescript Download from a URL, and get a callback
import { SarvamAIClient } from "sarvamai";

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

const job = await client.dictate.jobs.create({
  audio_url: "https://files.example.com/meetings/standup-0311.m4a",
  language_code: "en-IN",
  callback: { url: "https://hooks.example.com/dictate", auth_token: "a-long-random-secret" },
});

console.log(job.job_id, job.job_state);

```

```go Download from a URL, and get a callback
package main

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

func main() {

	url := "https://api.sarvam.ai/v2/dictate/jobs"

	payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"audio_url\"\r\n\r\nhttps://files.example.com/meetings/standup-0311.m4a\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"callback\"\r\n\r\n{\n  \"url\": \"https://hooks.example.com/dictate\",\n  \"auth_token\": \"a-long-random-secret\"\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"context\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"<file1>\"\r\nContent-Type: application/octet-stream\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"language_code\"\r\n\r\nen-IN\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"mode\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"model\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"output_rules\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"style\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"vocabulary\"\r\n\r\n\r\n-----011000010111000001101001--\r\n")

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

	req.Header.Add("api-subscription-key", "<apiSubscriptionKey>")
	req.Header.Add("Content-Type", "multipart/form-data; boundary=---011000010111000001101001")

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

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

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

}
```

```ruby Download from a URL, and get a callback
require 'uri'
require 'net/http'

url = URI("https://api.sarvam.ai/v2/dictate/jobs")

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

request = Net::HTTP::Post.new(url)
request["api-subscription-key"] = '<apiSubscriptionKey>'
request["Content-Type"] = 'multipart/form-data; boundary=---011000010111000001101001'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"audio_url\"\r\n\r\nhttps://files.example.com/meetings/standup-0311.m4a\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"callback\"\r\n\r\n{\n  \"url\": \"https://hooks.example.com/dictate\",\n  \"auth_token\": \"a-long-random-secret\"\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"context\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"<file1>\"\r\nContent-Type: application/octet-stream\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"language_code\"\r\n\r\nen-IN\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"mode\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"model\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"output_rules\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"style\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"vocabulary\"\r\n\r\n\r\n-----011000010111000001101001--\r\n"

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

```java Download from a URL, and get a callback
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.sarvam.ai/v2/dictate/jobs")
  .header("api-subscription-key", "<apiSubscriptionKey>")
  .header("Content-Type", "multipart/form-data; boundary=---011000010111000001101001")
  .body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"audio_url\"\r\n\r\nhttps://files.example.com/meetings/standup-0311.m4a\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"callback\"\r\n\r\n{\n  \"url\": \"https://hooks.example.com/dictate\",\n  \"auth_token\": \"a-long-random-secret\"\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"context\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"<file1>\"\r\nContent-Type: application/octet-stream\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"language_code\"\r\n\r\nen-IN\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"mode\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"model\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"output_rules\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"style\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"vocabulary\"\r\n\r\n\r\n-----011000010111000001101001--\r\n")
  .asString();
```

```php Download from a URL, and get a callback
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.sarvam.ai/v2/dictate/jobs', [
  'multipart' => [
    [
        'name' => 'audio_url',
        'contents' => 'https://files.example.com/meetings/standup-0311.m4a'
    ],
    [
        'name' => 'callback',
        'contents' => '{
  "url": "https://hooks.example.com/dictate",
  "auth_token": "a-long-random-secret"
}'
    ],
    [
        'name' => 'file',
        'filename' => '<file1>',
        'contents' => null
    ],
    [
        'name' => 'language_code',
        'contents' => 'en-IN'
    ]
  ]
  'headers' => [
    'api-subscription-key' => '<apiSubscriptionKey>',
  ],
]);

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

```csharp Download from a URL, and get a callback
using RestSharp;

var client = new RestClient("https://api.sarvam.ai/v2/dictate/jobs");
var request = new RestRequest(Method.POST);
request.AddHeader("api-subscription-key", "<apiSubscriptionKey>");
request.AddParameter("multipart/form-data; boundary=---011000010111000001101001", "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"audio_url\"\r\n\r\nhttps://files.example.com/meetings/standup-0311.m4a\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"callback\"\r\n\r\n{\n  \"url\": \"https://hooks.example.com/dictate\",\n  \"auth_token\": \"a-long-random-secret\"\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"context\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"<file1>\"\r\nContent-Type: application/octet-stream\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"language_code\"\r\n\r\nen-IN\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"mode\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"model\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"output_rules\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"style\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"vocabulary\"\r\n\r\n\r\n-----011000010111000001101001--\r\n", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Download from a URL, and get a callback
import Foundation

let headers = [
  "api-subscription-key": "<apiSubscriptionKey>",
  "Content-Type": "multipart/form-data; boundary=---011000010111000001101001"
]
let parameters = [
  [
    "name": "audio_url",
    "value": "https://files.example.com/meetings/standup-0311.m4a"
  ],
  [
    "name": "callback",
    "value": "{
  \"url\": \"https://hooks.example.com/dictate\",
  \"auth_token\": \"a-long-random-secret\"
}"
  ],
  [
    "name": "context",
    "value": 
  ],
  [
    "name": "file",
    "fileName": "<file1>"
  ],
  [
    "name": "language_code",
    "value": "en-IN"
  ],
  [
    "name": "mode",
    "value": 
  ],
  [
    "name": "model",
    "value": 
  ],
  [
    "name": "output_rules",
    "value": 
  ],
  [
    "name": "style",
    "value": 
  ],
  [
    "name": "vocabulary",
    "value": 
  ]
]

let boundary = "---011000010111000001101001"

var body = ""
var error: NSError? = nil
for param in parameters {
  let paramName = param["name"]!
  body += "--\(boundary)\r\n"
  body += "Content-Disposition:form-data; name=\"\(paramName)\""
  if let filename = param["fileName"] {
    let contentType = param["content-type"]!
    let fileContent = String(contentsOfFile: filename, encoding: String.Encoding.utf8)
    if (error != nil) {
      print(error as Any)
    }
    body += "; filename=\"\(filename)\"\r\n"
    body += "Content-Type: \(contentType)\r\n\r\n"
    body += fileContent
  } else if let paramValue = param["value"] {
    body += "\r\n\r\n\(paramValue)"
  }
}

let request = NSMutableURLRequest(url: NSURL(string: "https://api.sarvam.ai/v2/dictate/jobs")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
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()
```