# Reference
## Dubbing
<details><summary><code>client.dubbing.<a href="/src/api/resources/dubbing/client/Client.ts">create</a>({ ...params }) -> SarvamAI.CreateDubbingJobResponse</code></summary>
<dl>
<dd>

#### 📝 Description

<dl>
<dd>

<dl>
<dd>

## Creative Agents - Dubbing

Create a dubbing job that translates a source video or audio file into one or more Indian languages, with optional voice cloning, watermark control, and translation-style (register) control.

**Base URL:** `https://api.sarvam.ai/dubbing`.
**Auth:** send your key in the `api-subscription-key` header, not `Authorization: Bearer`.

This call only creates the job. It does not accept the media file. The response returns `data.job_id` and a short-lived signed `data.upload_url`. After that:
1. `PUT` the raw media bytes to `upload_url` with headers `Content-Type: <mime>` (e.g. `video/mp4`) and `x-ms-blob-type: BlockBlob`.
2. `POST /jobs/{job_id}/start` to begin the pipeline.

A single job dubs into every language in `target_langs`, so you don't need a separate job per language.
</dd>
</dl>
</dd>
</dl>

#### 🔌 Usage

<dl>
<dd>

<dl>
<dd>

```typescript
await client.dubbing.create({
    src_lang: "en-IN",
    target_langs: ["hi-IN", "ta-IN", "te-IN"],
    export_options: ["video", "audio", "srt"],
    voice_cloning: true,
    num_speakers: 1,
    disable_watermark: true,
    register: "modern-colloquial",
    job_name: "segment1"
});

```
</dd>
</dl>
</dd>
</dl>

#### ⚙️ Parameters

<dl>
<dd>

<dl>
<dd>

**request:** `SarvamAI.CreateDubbingJobRequest` 
    
</dd>
</dl>

<dl>
<dd>

**requestOptions:** `DubbingClient.RequestOptions` 
    
</dd>
</dl>
</dd>
</dl>


</dd>
</dl>
</details>

<details><summary><code>client.dubbing.<a href="/src/api/resources/dubbing/client/Client.ts">start</a>(job_id) -> SarvamAI.DubbingStartResponse</code></summary>
<dl>
<dd>

#### 📝 Description

<dl>
<dd>

<dl>
<dd>

Start a dubbing job once the media file has been uploaded to the signed `upload_url` returned by `POST /jobs`. The job status then moves from `queued` to `in_progress`, and finally to `completed` or `failed`.

Keep `editor_flow` set to `false` (the default) when creating the job so exports auto-produce once the pipeline finishes.
</dd>
</dl>
</dd>
</dl>

#### 🔌 Usage

<dl>
<dd>

<dl>
<dd>

```typescript
await client.dubbing.start("dub_5cb7faa6");

```
</dd>
</dl>
</dd>
</dl>

#### ⚙️ Parameters

<dl>
<dd>

<dl>
<dd>

**job_id:** `string` — The `job_id` returned by `POST /jobs`.
    
</dd>
</dl>

<dl>
<dd>

**requestOptions:** `DubbingClient.RequestOptions` 
    
</dd>
</dl>
</dd>
</dl>


</dd>
</dl>
</details>

<details><summary><code>client.dubbing.<a href="/src/api/resources/dubbing/client/Client.ts">getLiveStatus</a>(job_id) -> SarvamAI.DubbingLiveStatusResponse</code></summary>
<dl>
<dd>

#### 📝 Description

<dl>
<dd>

<dl>
<dd>

Poll the pipeline progress of a dubbing job. `data.status` moves from `queued` to `in_progress`, then to `completed` or `failed`.

> **Note:** `live-status` is a progress signal only. The source of truth for downloadable outputs is `GET /jobs/{job_id}/export-status`. Each `(target_language, export_type)` export completes independently and carries its own `status` and `download_url`.
</dd>
</dl>
</dd>
</dl>

#### 🔌 Usage

<dl>
<dd>

<dl>
<dd>

```typescript
await client.dubbing.getLiveStatus("dub_5cb7faa6");

```
</dd>
</dl>
</dd>
</dl>

#### ⚙️ Parameters

<dl>
<dd>

<dl>
<dd>

**job_id:** `string` — The `job_id` returned by `POST /jobs`.
    
</dd>
</dl>

<dl>
<dd>

**requestOptions:** `DubbingClient.RequestOptions` 
    
</dd>
</dl>
</dd>
</dl>


</dd>
</dl>
</details>

<details><summary><code>client.dubbing.<a href="/src/api/resources/dubbing/client/Client.ts">getExportStatus</a>(job_id, { ...params }) -> SarvamAI.DubbingExportStatusResponse</code></summary>
<dl>
<dd>

#### 📝 Description

<dl>
<dd>

<dl>
<dd>

Retrieve the per-output export status for a dubbing job. Returns `data.exports[]`, one entry per `(target_language, export_type)` combination, each with its own `status` and signed `download_url`.

**This is the source of truth for downloads.** Before downloading, confirm an entry's `status == "completed"` and use its `download_url`.

> Signed download URLs are time-limited (~24h). Re-fetch this endpoint for a fresh URL rather than caching long-term.
</dd>
</dl>
</dd>
</dl>

#### 🔌 Usage

<dl>
<dd>

<dl>
<dd>

```typescript
await client.dubbing.getExportStatus("dub_5cb7faa6", {
    limit: 5
});

```
</dd>
</dl>
</dd>
</dl>

#### ⚙️ Parameters

<dl>
<dd>

<dl>
<dd>

**job_id:** `string` — The `job_id` returned by `POST /jobs`.
    
</dd>
</dl>

<dl>
<dd>

**request:** `SarvamAI.DubbingGetExportStatusRequest` 
    
</dd>
</dl>

<dl>
<dd>

**requestOptions:** `DubbingClient.RequestOptions` 
    
</dd>
</dl>
</dd>
</dl>


</dd>
</dl>
</details>

## Text
<details><summary><code>client.text.<a href="/src/api/resources/text/client/Client.ts">translate</a>({ ...params }) -> SarvamAI.TranslationResponse</code></summary>
<dl>
<dd>

#### 📝 Description

<dl>
<dd>

<dl>
<dd>

**Translation** converts text from one language to another while preserving its meaning.
For Example: **'मैं ऑफिस जा रहा हूँ'** translates to **'I am going to the office'** in English, where the script and language change, but the original meaning remains the same.

Available languages:
- **`bn-IN`**: Bengali
- **`en-IN`**: English
- **`gu-IN`**: Gujarati
- **`hi-IN`**: Hindi
- **`kn-IN`**: Kannada
- **`ml-IN`**: Malayalam
- **`mr-IN`**: Marathi
- **`od-IN`**: Odia
- **`pa-IN`**: Punjabi
- **`ta-IN`**: Tamil
- **`te-IN`**: Telugu

### Newly added languages:
- **`as-IN`**: Assamese
- **`brx-IN`**: Bodo
- **`doi-IN`**: Dogri
- **`kok-IN`**: Konkani
- **`ks-IN`**: Kashmiri
- **`mai-IN`**: Maithili
- **`mni-IN`**: Manipuri (Meiteilon)
- **`ne-IN`**: Nepali
- **`sa-IN`**: Sanskrit
- **`sat-IN`**: Santali
- **`sd-IN`**: Sindhi
- **`ur-IN`**: Urdu

For hands-on practice, you can explore the notebook tutorial on [Translate API Tutorial](https://github.com/sarvamai/sarvam-ai-cookbook/blob/main/notebooks/translate/Translate_API_Tutorial.ipynb).
</dd>
</dl>
</dd>
</dl>

#### 🔌 Usage

<dl>
<dd>

<dl>
<dd>

```typescript
await client.text.translate({
    input: "Hello, how are you?",
    source_language_code: "en-IN",
    target_language_code: "hi-IN"
});

```
</dd>
</dl>
</dd>
</dl>

#### ⚙️ Parameters

<dl>
<dd>

<dl>
<dd>

**request:** `SarvamAI.TranslationRequest` 
    
</dd>
</dl>

<dl>
<dd>

**requestOptions:** `TextClient.RequestOptions` 
    
</dd>
</dl>
</dd>
</dl>


</dd>
</dl>
</details>

<details><summary><code>client.text.<a href="/src/api/resources/text/client/Client.ts">identifyLanguage</a>({ ...params }) -> SarvamAI.LanguageIdentificationResponse</code></summary>
<dl>
<dd>

#### 📝 Description

<dl>
<dd>

<dl>
<dd>

Identifies the language (e.g., en-IN, hi-IN) and script (e.g., Latin, Devanagari) of the input text, supporting multiple languages.
</dd>
</dl>
</dd>
</dl>

#### 🔌 Usage

<dl>
<dd>

<dl>
<dd>

```typescript
await client.text.identifyLanguage({
    input: "\u0928\u092E\u0938\u094D\u0924\u0947 \u0906\u092A \u0915\u0948\u0938\u0947 \u0939\u0948\u0902"
});

```
</dd>
</dl>
</dd>
</dl>

#### ⚙️ Parameters

<dl>
<dd>

<dl>
<dd>

**request:** `SarvamAI.LanguageIdentificationRequest` 
    
</dd>
</dl>

<dl>
<dd>

**requestOptions:** `TextClient.RequestOptions` 
    
</dd>
</dl>
</dd>
</dl>


</dd>
</dl>
</details>

<details><summary><code>client.text.<a href="/src/api/resources/text/client/Client.ts">transliterate</a>({ ...params }) -> SarvamAI.TransliterationResponse</code></summary>
<dl>
<dd>

#### 📝 Description

<dl>
<dd>

<dl>
<dd>

**Transliteration** converts text from one script to another while preserving the original pronunciation. For example, **'नमस्ते'** becomes **'namaste'** in English, and **'how are you'** can be written as **'हाउ आर यू'** in Devanagari. This process ensures that the sound of the original text remains intact, even when written in a different script.

Transliteration is useful when you want to represent words phonetically across different writing systems, such as converting **'मैं ऑफिस जा रहा हूँ'** to **'main office ja raha hun'** in English letters.

**Translation**, on the other hand, converts text from one language to another while preserving the meaning rather than pronunciation. For example, **'मैं ऑफिस जा रहा हूँ'** translates to **'I am going to the office'** in English, changing both the script and the language while conveying the intended message.
### Examples of **Transliteration**:
- **'Good morning'** becomes **'गुड मॉर्निंग'** in Hindi, where the pronunciation is preserved but the meaning is not translated.
- **'सुप्रभात'** becomes **'suprabhat'** in English.

Available languages:
- **`en-IN`**: English
- **`hi-IN`**: Hindi
- **`bn-IN`**: Bengali
- **`gu-IN`**: Gujarati
- **`kn-IN`**: Kannada
- **`ml-IN`**: Malayalam
- **`mr-IN`**: Marathi
- **`od-IN`**: Odia
- **`pa-IN`**: Punjabi
- **`ta-IN`**: Tamil
- **`te-IN`**: Telugu

For hands-on practice, you can explore the notebook tutorial on [Transliterate API Tutorial](https://github.com/sarvamai/sarvam-ai-cookbook/blob/main/notebooks/transliterate/Transliterate_API_Tutorial.ipynb).
</dd>
</dl>
</dd>
</dl>

#### 🔌 Usage

<dl>
<dd>

<dl>
<dd>

```typescript
await client.text.transliterate({
    input: "namaste",
    source_language_code: "en-IN",
    target_language_code: "hi-IN"
});

```
</dd>
</dl>
</dd>
</dl>

#### ⚙️ Parameters

<dl>
<dd>

<dl>
<dd>

**request:** `SarvamAI.TransliterationRequest` 
    
</dd>
</dl>

<dl>
<dd>

**requestOptions:** `TextClient.RequestOptions` 
    
</dd>
</dl>
</dd>
</dl>


</dd>
</dl>
</details>

## SpeechToText
<details><summary><code>client.speechToText.<a href="/src/api/resources/speechToText/client/Client.ts">transcribe</a>({ ...params }) -> SarvamAI.SpeechToTextResponse</code></summary>
<dl>
<dd>

#### 📝 Description

<dl>
<dd>

<dl>
<dd>

## Speech to Text API

This API transcribes speech to text in multiple Indian languages and English. Supports transcription for interactive applications.

### Available Options:
- **REST API** (Current Endpoint): For quick responses under 30 seconds with immediate results
- **Batch API**: For longer audio files, [Follow This Documentation](https://docs.sarvam.ai/api-reference-docs/api-guides-tutorials/speech-to-text/batch-api)
  - Supports diarization (speaker identification)

### Note:
- Pricing differs for REST and Batch APIs
- Diarization is only available in Batch API with separate pricing
- Please refer to [here](https://docs.sarvam.ai/api-reference-docs/pricing) for detailed pricing information
</dd>
</dl>
</dd>
</dl>

#### 🔌 Usage

<dl>
<dd>

<dl>
<dd>

```typescript
await client.speechToText.transcribe({
    file: fs.createReadStream("/path/to/your/file")
});

```
</dd>
</dl>
</dd>
</dl>

#### ⚙️ Parameters

<dl>
<dd>

<dl>
<dd>

**request:** `SarvamAI.SpeechToTextTranscriptionRequest` 
    
</dd>
</dl>

<dl>
<dd>

**requestOptions:** `SpeechToTextClient.RequestOptions` 
    
</dd>
</dl>
</dd>
</dl>


</dd>
</dl>
</details>

<details><summary><code>client.speechToText.<a href="/src/api/resources/speechToText/client/Client.ts">translate</a>({ ...params }) -> SarvamAI.SpeechToTextTranslateResponse</code></summary>
<dl>
<dd>

#### 📝 Description

<dl>
<dd>

<dl>
<dd>

## Speech to Text Translation API

This API automatically detects the input language, transcribes the speech, and translates the text to English.

### Available Options:
- **REST API** (Current Endpoint): For quick responses under 30 seconds with immediate results
- **Batch API**: For longer audio files [Follow this documentation](https://docs.sarvam.ai/api-reference-docs/api-guides-tutorials/speech-to-text/batch-api)
  - Supports diarization (speaker identification)

### Note:
- Pricing differs for REST and Batch APIs
- Diarization is only available in Batch API with separate pricing
- Please refer to [here](https://docs.sarvam.ai/api-reference-docs/pricing) for detailed pricing information
</dd>
</dl>
</dd>
</dl>

#### 🔌 Usage

<dl>
<dd>

<dl>
<dd>

```typescript
await client.speechToText.translate({
    file: fs.createReadStream("/path/to/your/file")
});

```
</dd>
</dl>
</dd>
</dl>

#### ⚙️ Parameters

<dl>
<dd>

<dl>
<dd>

**request:** `SarvamAI.SpeechToTextTranslationRequest` 
    
</dd>
</dl>

<dl>
<dd>

**requestOptions:** `SpeechToTextClient.RequestOptions` 
    
</dd>
</dl>
</dd>
</dl>


</dd>
</dl>
</details>

## TextToSpeech
<details><summary><code>client.textToSpeech.<a href="/src/api/resources/textToSpeech/client/Client.ts">convert</a>({ ...params }) -> SarvamAI.TextToSpeechResponse</code></summary>
<dl>
<dd>

#### 📝 Description

<dl>
<dd>

<dl>
<dd>

Convert text into spoken audio. The output is a base64-encoded audio string that must be decoded before use.

**Available Models:**
- **bulbul:v3**: Latest model with improved quality, 30+ voices, and temperature control
- **bulbul:v2**: Legacy model with pitch and loudness controls

**Important Notes for bulbul:v3:**
- Pitch and loudness parameters are NOT supported
- Pace range: 0.5 to 2.0
- Preprocessing is automatically enabled
- Default sample rate is 24000 Hz
- Supports sample rates: 8000, 16000, 22050, 24000 Hz (REST API also supports 32000, 44100, 48000 Hz)
</dd>
</dl>
</dd>
</dl>

#### 🔌 Usage

<dl>
<dd>

<dl>
<dd>

```typescript
await client.textToSpeech.convert({
    text: "Welcome to Sarvam AI!",
    language_code: "hi-IN"
});

```
</dd>
</dl>
</dd>
</dl>

#### ⚙️ Parameters

<dl>
<dd>

<dl>
<dd>

**request:** `SarvamAI.TextToSpeechRequest` 
    
</dd>
</dl>

<dl>
<dd>

**requestOptions:** `TextToSpeechClient.RequestOptions` 
    
</dd>
</dl>
</dd>
</dl>


</dd>
</dl>
</details>

<details><summary><code>client.textToSpeech.<a href="/src/api/resources/textToSpeech/client/Client.ts">convertStream</a>({ ...params }) -> core.BinaryResponse</code></summary>
<dl>
<dd>

#### 📝 Description

<dl>
<dd>

<dl>
<dd>

Converts the input text into a streamed spoken audio response.

This endpoint supports streaming audio using the specified output codec (e.g., `audio/mpeg` for MP3). The response is returned as a binary audio stream, which can be played or saved directly by the client.

Supports the `dict_id` parameter to apply a [pronunciation dictionary](https://docs.sarvam.ai/api-reference-docs/pronunciation-dictionary/create) during synthesis.
</dd>
</dl>
</dd>
</dl>

#### 🔌 Usage

<dl>
<dd>

<dl>
<dd>

```typescript
await client.textToSpeech.convertStream({
    text: "Welcome to Sarvam AI!"
});

```
</dd>
</dl>
</dd>
</dl>

#### ⚙️ Parameters

<dl>
<dd>

<dl>
<dd>

**request:** `SarvamAI.TextToSpeechStreamRequest` 
    
</dd>
</dl>

<dl>
<dd>

**requestOptions:** `TextToSpeechClient.RequestOptions` 
    
</dd>
</dl>
</dd>
</dl>


</dd>
</dl>
</details>

## PronunciationDictionary
<details><summary><code>client.pronunciationDictionary.<a href="/src/api/resources/pronunciationDictionary/client/Client.ts">list</a>() -> SarvamAI.PronunciationDictionaryGetResponse</code></summary>
<dl>
<dd>

#### 📝 Description

<dl>
<dd>

<dl>
<dd>

Retrieve a list of all pronunciation dictionary IDs associated with the authenticated user.
</dd>
</dl>
</dd>
</dl>

#### 🔌 Usage

<dl>
<dd>

<dl>
<dd>

```typescript
await client.pronunciationDictionary.list();

```
</dd>
</dl>
</dd>
</dl>

#### ⚙️ Parameters

<dl>
<dd>

<dl>
<dd>

**requestOptions:** `PronunciationDictionaryClient.RequestOptions` 
    
</dd>
</dl>
</dd>
</dl>


</dd>
</dl>
</details>

<details><summary><code>client.pronunciationDictionary.<a href="/src/api/resources/pronunciationDictionary/client/Client.ts">create</a>({ ...params }) -> SarvamAI.PronunciationDictionaryResponse</code></summary>
<dl>
<dd>

#### 📝 Description

<dl>
<dd>

<dl>
<dd>

Upload a `.json` file to create a new pronunciation dictionary. Only supported by **bulbul:v3**.

The file should contain a JSON object with a `pronunciations` key mapping language codes to word-pronunciation pairs. See the [Pronunciation Dictionary guide](/api-reference-docs/api-guides-tutorials/text-to-speech/pronunciation-dictionary) for format details and examples.

The returned `dictionary_id` can be passed as `dict_id` in text-to-speech requests (REST, HTTP Stream, and WebSocket).

**Limits:** Max 10 dictionaries per user, 100 words per dictionary, 1 MB file size.
</dd>
</dl>
</dd>
</dl>

#### 🔌 Usage

<dl>
<dd>

<dl>
<dd>

```typescript
await client.pronunciationDictionary.create({
    file: fs.createReadStream("/path/to/your/file")
});

```
</dd>
</dl>
</dd>
</dl>

#### ⚙️ Parameters

<dl>
<dd>

<dl>
<dd>

**request:** `SarvamAI.CreatePronunciationDictionaryRequest` 
    
</dd>
</dl>

<dl>
<dd>

**requestOptions:** `PronunciationDictionaryClient.RequestOptions` 
    
</dd>
</dl>
</dd>
</dl>


</dd>
</dl>
</details>

<details><summary><code>client.pronunciationDictionary.<a href="/src/api/resources/pronunciationDictionary/client/Client.ts">update</a>({ ...params }) -> SarvamAI.PronunciationDictionaryUpdateResponse</code></summary>
<dl>
<dd>

#### 📝 Description

<dl>
<dd>

<dl>
<dd>

Update an existing pronunciation dictionary by uploading a JSON file. You can add new words, change existing pronunciations, or both — entries not included in the uploaded file remain unchanged.

**Limits:** Max 100 words per dictionary, 1 MB file size.

The response includes the `dictionary_id` and the updated pronunciation mappings for verification.
</dd>
</dl>
</dd>
</dl>

#### 🔌 Usage

<dl>
<dd>

<dl>
<dd>

```typescript
await client.pronunciationDictionary.update({
    file: fs.createReadStream("/path/to/your/file"),
    dict_id: "p_5cb7faa6"
});

```
</dd>
</dl>
</dd>
</dl>

#### ⚙️ Parameters

<dl>
<dd>

<dl>
<dd>

**request:** `SarvamAI.UpdatePronunciationDictionaryRequest` 
    
</dd>
</dl>

<dl>
<dd>

**requestOptions:** `PronunciationDictionaryClient.RequestOptions` 
    
</dd>
</dl>
</dd>
</dl>


</dd>
</dl>
</details>

<details><summary><code>client.pronunciationDictionary.<a href="/src/api/resources/pronunciationDictionary/client/Client.ts">delete</a>({ ...params }) -> SarvamAI.PronunciationDictionaryDeleteResponse</code></summary>
<dl>
<dd>

#### 📝 Description

<dl>
<dd>

<dl>
<dd>

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

#### 🔌 Usage

<dl>
<dd>

<dl>
<dd>

```typescript
await client.pronunciationDictionary.delete({
    dict_id: "dict_id"
});

```
</dd>
</dl>
</dd>
</dl>

#### ⚙️ Parameters

<dl>
<dd>

<dl>
<dd>

**request:** `SarvamAI.PronunciationDictionaryDeleteRequest` 
    
</dd>
</dl>

<dl>
<dd>

**requestOptions:** `PronunciationDictionaryClient.RequestOptions` 
    
</dd>
</dl>
</dd>
</dl>


</dd>
</dl>
</details>

<details><summary><code>client.pronunciationDictionary.<a href="/src/api/resources/pronunciationDictionary/client/Client.ts">get</a>(dict_id) -> SarvamAI.PronunciationDictionaryData</code></summary>
<dl>
<dd>

#### 📝 Description

<dl>
<dd>

<dl>
<dd>

Retrieve the full pronunciation mappings for a specific dictionary by its ID.

Returns the pronunciation data organized by language code, where each language contains word-to-pronunciation pairs.
</dd>
</dl>
</dd>
</dl>

#### 🔌 Usage

<dl>
<dd>

<dl>
<dd>

```typescript
await client.pronunciationDictionary.get("dict_id");

```
</dd>
</dl>
</dd>
</dl>

#### ⚙️ Parameters

<dl>
<dd>

<dl>
<dd>

**dict_id:** `string` 
    
</dd>
</dl>

<dl>
<dd>

**requestOptions:** `PronunciationDictionaryClient.RequestOptions` 
    
</dd>
</dl>
</dd>
</dl>


</dd>
</dl>
</details>

## Chat
<details><summary><code>client.chat.<a href="/src/api/resources/chat/client/Client.ts">completions</a>({ ...params }) -> SarvamAI.CreateChatCompletionResponse</code></summary>
<dl>
<dd>

#### 🔌 Usage

<dl>
<dd>

<dl>
<dd>

```typescript
await client.chat.completions({
    messages: [{
            role: "user",
            content: "content"
        }]
});

```
</dd>
</dl>
</dd>
</dl>

#### ⚙️ Parameters

<dl>
<dd>

<dl>
<dd>

**request:** `SarvamAI.ChatCompletionsRequest` 
    
</dd>
</dl>

<dl>
<dd>

**requestOptions:** `ChatClient.RequestOptions` 
    
</dd>
</dl>
</dd>
</dl>


</dd>
</dl>
</details>

## SpeechToTextJob
<details><summary><code>client.speechToTextJob.<a href="/src/api/resources/speechToTextJob/client/Client.ts">initialise</a>({ ...params }) -> SarvamAI.BulkJobInitResponse</code></summary>
<dl>
<dd>

#### 📝 Description

<dl>
<dd>

<dl>
<dd>

Create a new speech to text bulk job and receive a job UUID and storage folder details for processing multiple audio files. Set `job_parameters.input_audio_codec` when uploads are raw PCM (`pcm_s16le`, `pcm_l16`, or `pcm_raw`); the API auto-detects other formats. PCM must be 16 kHz.
</dd>
</dl>
</dd>
</dl>

#### 🔌 Usage

<dl>
<dd>

<dl>
<dd>

```typescript
await client.speechToTextJob.initialise({
    job_parameters: {}
});

```
</dd>
</dl>
</dd>
</dl>

#### ⚙️ Parameters

<dl>
<dd>

<dl>
<dd>

**request:** `SarvamAI.SpeechToTextJobRequest` 
    
</dd>
</dl>

<dl>
<dd>

**requestOptions:** `SpeechToTextJobClient.RequestOptions` 
    
</dd>
</dl>
</dd>
</dl>


</dd>
</dl>
</details>

<details><summary><code>client.speechToTextJob.<a href="/src/api/resources/speechToTextJob/client/Client.ts">getStatus</a>(job_id) -> SarvamAI.JobStatusResponse</code></summary>
<dl>
<dd>

#### 📝 Description

<dl>
<dd>

<dl>
<dd>

Retrieve the current status and details of a speech to text bulk job, including progress and file-level information.

**Rate Limiting Best Practice:** To prevent rate limit errors and ensure optimal server performance, we recommend implementing a minimum 5-millisecond delay between consecutive status polling requests. This helps maintain system stability while still providing timely status updates.
</dd>
</dl>
</dd>
</dl>

#### 🔌 Usage

<dl>
<dd>

<dl>
<dd>

```typescript
await client.speechToTextJob.getStatus("job_id");

```
</dd>
</dl>
</dd>
</dl>

#### ⚙️ Parameters

<dl>
<dd>

<dl>
<dd>

**job_id:** `string` — The unique identifier of the job
    
</dd>
</dl>

<dl>
<dd>

**requestOptions:** `SpeechToTextJobClient.RequestOptions` 
    
</dd>
</dl>
</dd>
</dl>


</dd>
</dl>
</details>

<details><summary><code>client.speechToTextJob.<a href="/src/api/resources/speechToTextJob/client/Client.ts">start</a>(job_id, { ...params }) -> SarvamAI.JobStatusResponse</code></summary>
<dl>
<dd>

#### 📝 Description

<dl>
<dd>

<dl>
<dd>

Start processing a speech to text bulk job after all audio files have been uploaded
</dd>
</dl>
</dd>
</dl>

#### 🔌 Usage

<dl>
<dd>

<dl>
<dd>

```typescript
await client.speechToTextJob.start("job_id", {
    ptu_id: 1
});

```
</dd>
</dl>
</dd>
</dl>

#### ⚙️ Parameters

<dl>
<dd>

<dl>
<dd>

**job_id:** `string` — The unique identifier of the job
    
</dd>
</dl>

<dl>
<dd>

**request:** `SarvamAI.SpeechToTextJobStartRequest` 
    
</dd>
</dl>

<dl>
<dd>

**requestOptions:** `SpeechToTextJobClient.RequestOptions` 
    
</dd>
</dl>
</dd>
</dl>


</dd>
</dl>
</details>

<details><summary><code>client.speechToTextJob.<a href="/src/api/resources/speechToTextJob/client/Client.ts">getUploadLinks</a>({ ...params }) -> SarvamAI.FilesUploadResponse</code></summary>
<dl>
<dd>

#### 📝 Description

<dl>
<dd>

<dl>
<dd>

Generate presigned upload URLs for audio files that will be processed in a speech to text bulk job
</dd>
</dl>
</dd>
</dl>

#### 🔌 Usage

<dl>
<dd>

<dl>
<dd>

```typescript
await client.speechToTextJob.getUploadLinks({
    job_id: "job_id",
    files: ["files"]
});

```
</dd>
</dl>
</dd>
</dl>

#### ⚙️ Parameters

<dl>
<dd>

<dl>
<dd>

**request:** `SarvamAI.FilesRequest` 
    
</dd>
</dl>

<dl>
<dd>

**requestOptions:** `SpeechToTextJobClient.RequestOptions` 
    
</dd>
</dl>
</dd>
</dl>


</dd>
</dl>
</details>

<details><summary><code>client.speechToTextJob.<a href="/src/api/resources/speechToTextJob/client/Client.ts">getDownloadLinks</a>({ ...params }) -> SarvamAI.FilesDownloadResponse</code></summary>
<dl>
<dd>

#### 📝 Description

<dl>
<dd>

<dl>
<dd>

Generate presigned download URLs for the transcription output files of a completed speech to text bulk job.

**Required body fields:** `job_id` and `files` (array of output filenames such as `"0.json"`). Obtain filenames from the job status response (`job_details[].outputs[].file_name`) after the job reaches `Completed` or `PartiallyCompleted`.

**Method:** POST only (GET returns 405).
</dd>
</dl>
</dd>
</dl>

#### 🔌 Usage

<dl>
<dd>

<dl>
<dd>

```typescript
await client.speechToTextJob.getDownloadLinks({
    job_id: "job_id",
    files: ["files"]
});

```
</dd>
</dl>
</dd>
</dl>

#### ⚙️ Parameters

<dl>
<dd>

<dl>
<dd>

**request:** `SarvamAI.FilesRequest` 
    
</dd>
</dl>

<dl>
<dd>

**requestOptions:** `SpeechToTextJobClient.RequestOptions` 
    
</dd>
</dl>
</dd>
</dl>


</dd>
</dl>
</details>

## SpeechToTextTranslateJob
<details><summary><code>client.speechToTextTranslateJob.<a href="/src/api/resources/speechToTextTranslateJob/client/Client.ts">initialise</a>({ ...params }) -> SarvamAI.BulkJobInitResponse</code></summary>
<dl>
<dd>

#### 📝 Description

<dl>
<dd>

<dl>
<dd>

Create a new speech to text translate bulk job and receive a job UUID and storage folder details for processing multiple audio files with translation. Set `job_parameters.input_audio_codec` when uploads are raw PCM (`pcm_s16le`, `pcm_l16`, or `pcm_raw`); the API auto-detects other formats. PCM must be 16 kHz.
</dd>
</dl>
</dd>
</dl>

#### 🔌 Usage

<dl>
<dd>

<dl>
<dd>

```typescript
await client.speechToTextTranslateJob.initialise({
    job_parameters: {}
});

```
</dd>
</dl>
</dd>
</dl>

#### ⚙️ Parameters

<dl>
<dd>

<dl>
<dd>

**request:** `SarvamAI.SpeechToTextTranslateJobRequest` 
    
</dd>
</dl>

<dl>
<dd>

**requestOptions:** `SpeechToTextTranslateJobClient.RequestOptions` 
    
</dd>
</dl>
</dd>
</dl>


</dd>
</dl>
</details>

<details><summary><code>client.speechToTextTranslateJob.<a href="/src/api/resources/speechToTextTranslateJob/client/Client.ts">getStatus</a>(job_id) -> SarvamAI.JobStatusResponse</code></summary>
<dl>
<dd>

#### 📝 Description

<dl>
<dd>

<dl>
<dd>

Retrieve the current status and details of a speech to text translate bulk job, including progress and file-level information.

**Rate Limiting Best Practice:** To prevent rate limit errors and ensure optimal server performance, we recommend implementing a minimum 5-millisecond delay between consecutive status polling requests. This helps maintain system stability while still providing timely status updates.
</dd>
</dl>
</dd>
</dl>

#### 🔌 Usage

<dl>
<dd>

<dl>
<dd>

```typescript
await client.speechToTextTranslateJob.getStatus("job_id");

```
</dd>
</dl>
</dd>
</dl>

#### ⚙️ Parameters

<dl>
<dd>

<dl>
<dd>

**job_id:** `string` — The unique identifier of the job
    
</dd>
</dl>

<dl>
<dd>

**requestOptions:** `SpeechToTextTranslateJobClient.RequestOptions` 
    
</dd>
</dl>
</dd>
</dl>


</dd>
</dl>
</details>

<details><summary><code>client.speechToTextTranslateJob.<a href="/src/api/resources/speechToTextTranslateJob/client/Client.ts">start</a>(job_id, { ...params }) -> SarvamAI.JobStatusResponse</code></summary>
<dl>
<dd>

#### 📝 Description

<dl>
<dd>

<dl>
<dd>

Start processing a speech to text translate bulk job after all audio files have been uploaded
</dd>
</dl>
</dd>
</dl>

#### 🔌 Usage

<dl>
<dd>

<dl>
<dd>

```typescript
await client.speechToTextTranslateJob.start("job_id", {
    ptu_id: 1
});

```
</dd>
</dl>
</dd>
</dl>

#### ⚙️ Parameters

<dl>
<dd>

<dl>
<dd>

**job_id:** `string` — The unique identifier of the job
    
</dd>
</dl>

<dl>
<dd>

**request:** `SarvamAI.SpeechToTextTranslateJobStartRequest` 
    
</dd>
</dl>

<dl>
<dd>

**requestOptions:** `SpeechToTextTranslateJobClient.RequestOptions` 
    
</dd>
</dl>
</dd>
</dl>


</dd>
</dl>
</details>

<details><summary><code>client.speechToTextTranslateJob.<a href="/src/api/resources/speechToTextTranslateJob/client/Client.ts">getUploadLinks</a>({ ...params }) -> SarvamAI.FilesUploadResponse</code></summary>
<dl>
<dd>

#### 📝 Description

<dl>
<dd>

<dl>
<dd>

Generate presigned upload URLs for audio files that will be processed in a speech to text translate bulk job
</dd>
</dl>
</dd>
</dl>

#### 🔌 Usage

<dl>
<dd>

<dl>
<dd>

```typescript
await client.speechToTextTranslateJob.getUploadLinks({
    ptu_id: 1,
    body: {
        job_id: "job_id",
        files: ["files"]
    }
});

```
</dd>
</dl>
</dd>
</dl>

#### ⚙️ Parameters

<dl>
<dd>

<dl>
<dd>

**request:** `SarvamAI.SpeechToTextTranslateJobGetUploadLinksRequest` 
    
</dd>
</dl>

<dl>
<dd>

**requestOptions:** `SpeechToTextTranslateJobClient.RequestOptions` 
    
</dd>
</dl>
</dd>
</dl>


</dd>
</dl>
</details>

<details><summary><code>client.speechToTextTranslateJob.<a href="/src/api/resources/speechToTextTranslateJob/client/Client.ts">getDownloadLinks</a>({ ...params }) -> SarvamAI.FilesDownloadResponse</code></summary>
<dl>
<dd>

#### 📝 Description

<dl>
<dd>

<dl>
<dd>

Generate presigned download URLs for the translated transcription output files of a completed speech to text translate bulk job.

**Required body fields:** `job_id` and `files` (array of output filenames such as `"0.json"`). Obtain filenames from the job status response after the job completes.

**Method:** POST only (GET returns 405).
</dd>
</dl>
</dd>
</dl>

#### 🔌 Usage

<dl>
<dd>

<dl>
<dd>

```typescript
await client.speechToTextTranslateJob.getDownloadLinks({
    ptu_id: 1,
    body: {
        job_id: "job_id",
        files: ["files"]
    }
});

```
</dd>
</dl>
</dd>
</dl>

#### ⚙️ Parameters

<dl>
<dd>

<dl>
<dd>

**request:** `SarvamAI.SpeechToTextTranslateJobGetDownloadLinksRequest` 
    
</dd>
</dl>

<dl>
<dd>

**requestOptions:** `SpeechToTextTranslateJobClient.RequestOptions` 
    
</dd>
</dl>
</dd>
</dl>


</dd>
</dl>
</details>

## DocumentIntelligence
<details><summary><code>client.documentIntelligence.<a href="/src/api/resources/documentIntelligence/client/Client.ts">initialise</a>({ ...params }) -> SarvamAI.DocDigitizationCreateJobResponse</code></summary>
<dl>
<dd>

#### 📝 Description

<dl>
<dd>

<dl>
<dd>

**Legacy API.** The `/doc-digitization/job/v1` endpoints remain available for existing integrations. For new integrations, use the Document Intelligence API under `/doc-ai/v1`.

Creates a new Document Intelligence job.

**Supported Languages (BCP-47 format):**
- `hi-IN`: Hindi (default)
- `en-IN`: English
- `bn-IN`: Bengali
- `gu-IN`: Gujarati
- `kn-IN`: Kannada
- `ml-IN`: Malayalam
- `mr-IN`: Marathi
- `od-IN`: Odia
- `pa-IN`: Punjabi
- `ta-IN`: Tamil
- `te-IN`: Telugu
- `ur-IN`: Urdu
- `as-IN`: Assamese
- `brx-IN`: Bodo
- `doi-IN`: Dogri
- `ks-IN`: Kashmiri
- `kok-IN`: Konkani
- `mai-IN`: Maithili
- `mni-IN`: Manipuri
- `ne-IN`: Nepali
- `sa-IN`: Sanskrit
- `sat-IN`: Santali
- `sd-IN`: Sindhi

**Output Formats (delivered as ZIP file):**
- `html`: Structured HTML files with layout preservation
- `md`: Markdown files (default)
- `json`: Structured JSON files for programmatic processing
</dd>
</dl>
</dd>
</dl>

#### 🔌 Usage

<dl>
<dd>

<dl>
<dd>

```typescript
await client.documentIntelligence.initialise();

```
</dd>
</dl>
</dd>
</dl>

#### ⚙️ Parameters

<dl>
<dd>

<dl>
<dd>

**request:** `SarvamAI.DocumentIntelligenceJobRequest` 
    
</dd>
</dl>

<dl>
<dd>

**requestOptions:** `DocumentIntelligenceClient.RequestOptions` 
    
</dd>
</dl>
</dd>
</dl>


</dd>
</dl>
</details>

<details><summary><code>client.documentIntelligence.<a href="/src/api/resources/documentIntelligence/client/Client.ts">getUploadLinks</a>({ ...params }) -> SarvamAI.DocDigitizationUploadFilesResponse</code></summary>
<dl>
<dd>

#### 📝 Description

<dl>
<dd>

<dl>
<dd>

**Legacy API.** The `/doc-digitization/job/v1` endpoints remain available for existing integrations. For new integrations, use the Document Intelligence API under `/doc-ai/v1`.

Returns presigned URLs for uploading input files.

**File Constraints:**
- Exactly one file required (PDF or ZIP)
- PDF files: `.pdf` extension
- ZIP files: `.zip` extension
</dd>
</dl>
</dd>
</dl>

#### 🔌 Usage

<dl>
<dd>

<dl>
<dd>

```typescript
await client.documentIntelligence.getUploadLinks({
    job_id: "job_id",
    files: ["files"]
});

```
</dd>
</dl>
</dd>
</dl>

#### ⚙️ Parameters

<dl>
<dd>

<dl>
<dd>

**request:** `SarvamAI.DocDigitizationUploadFilesRequest` 
    
</dd>
</dl>

<dl>
<dd>

**requestOptions:** `DocumentIntelligenceClient.RequestOptions` 
    
</dd>
</dl>
</dd>
</dl>


</dd>
</dl>
</details>

<details><summary><code>client.documentIntelligence.<a href="/src/api/resources/documentIntelligence/client/Client.ts">start</a>(job_id) -> SarvamAI.DocDigitizationJobStatusResponse</code></summary>
<dl>
<dd>

#### 📝 Description

<dl>
<dd>

<dl>
<dd>

**Legacy API.** The `/doc-digitization/job/v1` endpoints remain available for existing integrations. For new integrations, use the Document Intelligence API under `/doc-ai/v1`.

Validates the uploaded file and starts processing.

**Validation Checks:**
- File must be uploaded before starting
- File size must not exceed 200 MB
- PDF must be parseable by the PDF parser
- ZIP must contain only JPEG/PNG images
- ZIP must be flat (no nested folders beyond one level)
- ZIP must contain at least one valid image
- Page/image count must not exceed 10 (returns `400` with `invalid_request_error` if exceeded)
- User must have sufficient credits

**Processing:**
Job runs asynchronously. Poll the status endpoint for completion.
</dd>
</dl>
</dd>
</dl>

#### 🔌 Usage

<dl>
<dd>

<dl>
<dd>

```typescript
await client.documentIntelligence.start("job_id");

```
</dd>
</dl>
</dd>
</dl>

#### ⚙️ Parameters

<dl>
<dd>

<dl>
<dd>

**job_id:** `string` — The unique identifier of the job
    
</dd>
</dl>

<dl>
<dd>

**requestOptions:** `DocumentIntelligenceClient.RequestOptions` 
    
</dd>
</dl>
</dd>
</dl>


</dd>
</dl>
</details>

<details><summary><code>client.documentIntelligence.<a href="/src/api/resources/documentIntelligence/client/Client.ts">getStatus</a>(job_id) -> SarvamAI.DocDigitizationJobStatusResponse</code></summary>
<dl>
<dd>

#### 📝 Description

<dl>
<dd>

<dl>
<dd>

**Legacy API.** The `/doc-digitization/job/v1` endpoints remain available for existing integrations. For new integrations, use the Document Intelligence API under `/doc-ai/v1`.

Returns the current status of a job with page-level metrics.

**Job States:**
- `Accepted`: Job created, awaiting file upload
- `Pending`: File uploaded, waiting to start
- `Running`: Processing in progress
- `Completed`: All pages processed successfully
- `PartiallyCompleted`: Some pages succeeded, some failed
- `Failed`: All pages failed or job-level error

**Page Metrics:**
Response includes detailed progress: total pages, pages processed, succeeded, failed, and per-page errors.
</dd>
</dl>
</dd>
</dl>

#### 🔌 Usage

<dl>
<dd>

<dl>
<dd>

```typescript
await client.documentIntelligence.getStatus("job_id");

```
</dd>
</dl>
</dd>
</dl>

#### ⚙️ Parameters

<dl>
<dd>

<dl>
<dd>

**job_id:** `string` — The unique identifier of the job
    
</dd>
</dl>

<dl>
<dd>

**requestOptions:** `DocumentIntelligenceClient.RequestOptions` 
    
</dd>
</dl>
</dd>
</dl>


</dd>
</dl>
</details>

<details><summary><code>client.documentIntelligence.<a href="/src/api/resources/documentIntelligence/client/Client.ts">getDownloadLinks</a>(job_id) -> SarvamAI.DocDigitizationDownloadFilesResponse</code></summary>
<dl>
<dd>

#### 📝 Description

<dl>
<dd>

<dl>
<dd>

**Legacy API.** The `/doc-digitization/job/v1` endpoints remain available for existing integrations. For new integrations, use the Document Intelligence API under `/doc-ai/v1`.

Returns presigned URLs for downloading output files.

**Method:** POST only. A GET request to this path returns 405 Method Not Allowed.

**Prerequisites:**
- Job must be in `Completed` or `PartiallyCompleted` state
- Failed jobs have no output available
</dd>
</dl>
</dd>
</dl>

#### 🔌 Usage

<dl>
<dd>

<dl>
<dd>

```typescript
await client.documentIntelligence.getDownloadLinks("job_id");

```
</dd>
</dl>
</dd>
</dl>

#### ⚙️ Parameters

<dl>
<dd>

<dl>
<dd>

**job_id:** `string` — The unique identifier of the job
    
</dd>
</dl>

<dl>
<dd>

**requestOptions:** `DocumentIntelligenceClient.RequestOptions` 
    
</dd>
</dl>
</dd>
</dl>


</dd>
</dl>
</details>

## DocAi
<details><summary><code>client.docAi.<a href="/src/api/resources/docAi/client/Client.ts">createUploadUrl</a>({ ...params }) -> SarvamAI.DocAiPresignUploadResponse</code></summary>
<dl>
<dd>

#### 📝 Description

<dl>
<dd>

<dl>
<dd>

Creates a direct-upload handle for a file to be processed later.

**Flow:**
1. Call this endpoint with the MIME type you will upload (e.g. `application/pdf`).
2. Upload the file using the returned `method`, `url` and `headers` before `expires_at`.
3. Pass the returned `upload_id` through the `upload_ids` field on a later digitise or extract job request.

When `content_type` is set, the upload's `Content-Type` header must match it.
</dd>
</dl>
</dd>
</dl>

#### 🔌 Usage

<dl>
<dd>

<dl>
<dd>

```typescript
await client.docAi.createUploadUrl();

```
</dd>
</dl>
</dd>
</dl>

#### ⚙️ Parameters

<dl>
<dd>

<dl>
<dd>

**request:** `SarvamAI.DocAiPresignUploadRequest` 
    
</dd>
</dl>

<dl>
<dd>

**requestOptions:** `DocAiClient.RequestOptions` 
    
</dd>
</dl>
</dd>
</dl>


</dd>
</dl>
</details>

<details><summary><code>client.docAi.<a href="/src/api/resources/docAi/client/Client.ts">digitise</a>({ ...params }) -> SarvamAI.DocAiStartJobResponse</code></summary>
<dl>
<dd>

#### 📝 Description

<dl>
<dd>

<dl>
<dd>

Creates and starts a digitise job from files or pre-uploaded handles. Digitise converts documents into structured HTML or Markdown while preserving layout.

**Input:** Exactly one of `file` and `upload_ids` must be provided. Use `POST /doc-ai/v1/job/upload` to obtain upload IDs.

**Processing:** the job runs asynchronously. Poll `GET /doc-ai/v1/job/{job_id}/status` until a terminal status (`completed`, `partially_completed`, `failed`, `rejected`), then fetch output via the results or download-url endpoints.

Digitise JSON results include blocks with text, tag and bounding box.
</dd>
</dl>
</dd>
</dl>

#### 🔌 Usage

<dl>
<dd>

<dl>
<dd>

```typescript
await client.docAi.digitise({});

```
</dd>
</dl>
</dd>
</dl>

#### ⚙️ Parameters

<dl>
<dd>

<dl>
<dd>

**request:** `SarvamAI.DocAiDigitiseRequest` 
    
</dd>
</dl>

<dl>
<dd>

**requestOptions:** `DocAiClient.RequestOptions` 
    
</dd>
</dl>
</dd>
</dl>


</dd>
</dl>
</details>

<details><summary><code>client.docAi.<a href="/src/api/resources/docAi/client/Client.ts">extract</a>({ ...params }) -> SarvamAI.DocAiStartJobResponse</code></summary>
<dl>
<dd>

#### 📝 Description

<dl>
<dd>

<dl>
<dd>

Creates and starts an extract job from files or pre-uploaded handles. Extract pulls structured fields out of documents according to a schema.

**Input:** Exactly one of `file` and `upload_ids` must be provided.

**Schema:** exactly one of `schema` (inline JSON schema) and `config_id` (saved extraction configuration) is required.

**Processing:** the job runs asynchronously. Poll `GET /doc-ai/v1/job/{job_id}/status` until a terminal status (`completed`, `partially_completed`, `failed`, `rejected`), then fetch output via the results or download-url endpoints.

Extract results include `result`, plus `annotations` mirroring the result shape where every leaf has `confidence` and `sources`.
</dd>
</dl>
</dd>
</dl>

#### 🔌 Usage

<dl>
<dd>

<dl>
<dd>

```typescript
await client.docAi.extract({});

```
</dd>
</dl>
</dd>
</dl>

#### ⚙️ Parameters

<dl>
<dd>

<dl>
<dd>

**request:** `SarvamAI.DocAiExtractRequest` 
    
</dd>
</dl>

<dl>
<dd>

**requestOptions:** `DocAiClient.RequestOptions` 
    
</dd>
</dl>
</dd>
</dl>


</dd>
</dl>
</details>

<details><summary><code>client.docAi.<a href="/src/api/resources/docAi/client/Client.ts">getStatus</a>(job_id) -> SarvamAI.DocAiJobStatusResponse</code></summary>
<dl>
<dd>

#### 📝 Description

<dl>
<dd>

<dl>
<dd>

Returns a job's status and page-level usage.

**Terminal statuses:** `completed`, `partially_completed`, `failed`, `rejected`. Results and download URLs are only available after the job reaches a terminal status.
</dd>
</dl>
</dd>
</dl>

#### 🔌 Usage

<dl>
<dd>

<dl>
<dd>

```typescript
await client.docAi.getStatus("job_id");

```
</dd>
</dl>
</dd>
</dl>

#### ⚙️ Parameters

<dl>
<dd>

<dl>
<dd>

**job_id:** `string` — The unique identifier of the job
    
</dd>
</dl>

<dl>
<dd>

**requestOptions:** `DocAiClient.RequestOptions` 
    
</dd>
</dl>
</dd>
</dl>


</dd>
</dl>
</details>

<details><summary><code>client.docAi.<a href="/src/api/resources/docAi/client/Client.ts">getResults</a>(job_id, { ...params }) -> SarvamAI.DocAiGetResultsResponse</code></summary>
<dl>
<dd>

#### 📝 Description

<dl>
<dd>

<dl>
<dd>

Returns terminal job results. Results are never available while a job is running; requesting them before a terminal status returns `409`.

**Digitise results** include `job_id`, `type`, `status`, `usage` and `documents`.

**Extract results** include `job_id`, `type`, `status`, `usage`, `result`, `annotations` and `version`. `annotations` mirrors the result shape; every leaf has `confidence` and `sources`.
</dd>
</dl>
</dd>
</dl>

#### 🔌 Usage

<dl>
<dd>

<dl>
<dd>

```typescript
await client.docAi.getResults("20260707_6eb74174-e2c3-490d-afe5-d2e7e9e2b6c7", {
    format: "json"
});

```
</dd>
</dl>
</dd>
</dl>

#### ⚙️ Parameters

<dl>
<dd>

<dl>
<dd>

**job_id:** `string` — The unique identifier of the job
    
</dd>
</dl>

<dl>
<dd>

**request:** `SarvamAI.DocAiGetResultsRequest` 
    
</dd>
</dl>

<dl>
<dd>

**requestOptions:** `DocAiClient.RequestOptions` 
    
</dd>
</dl>
</dd>
</dl>


</dd>
</dl>
</details>

<details><summary><code>client.docAi.<a href="/src/api/resources/docAi/client/Client.ts">getDownloadUrl</a>(job_id) -> SarvamAI.DocAiDownloadUrlResponse</code></summary>
<dl>
<dd>

#### 📝 Description

<dl>
<dd>

<dl>
<dd>

Creates a download URL for a completed job's output. Download the output using the returned `method`, `url` and `headers` before `expires_at`.

Requesting a download URL before the job reaches a terminal status returns `409`.
</dd>
</dl>
</dd>
</dl>

#### 🔌 Usage

<dl>
<dd>

<dl>
<dd>

```typescript
await client.docAi.getDownloadUrl("job_id");

```
</dd>
</dl>
</dd>
</dl>

#### ⚙️ Parameters

<dl>
<dd>

<dl>
<dd>

**job_id:** `string` — The unique identifier of the job
    
</dd>
</dl>

<dl>
<dd>

**requestOptions:** `DocAiClient.RequestOptions` 
    
</dd>
</dl>
</dd>
</dl>


</dd>
</dl>
</details>

