# Reference
## 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: "input",
    source_language_code: "auto",
    target_language_code: "bn-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: "input"
});

```
</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: "input",
    source_language_code: "auto",
    target_language_code: "bn-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/getting-started/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/getting-started/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: "text",
    target_language_code: "bn-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: "x"
});

```
</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: "dict_id"
});

```
</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: "assistant"
        }],
    model: "sarvam-105b"
});

```
</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
</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({
    ptu_id: 1,
    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
</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>

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
- `or-IN`: Odia
- `pa-IN`: Punjabi
- `ta-IN`: Tamil
- `te-IN`: Telugu
- `ur-IN`: Urdu
- `as-IN`: Assamese
- `bodo-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>

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>

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 `422` with `max_page_limit_exceeded` if exceeded)
- User must have sufficient credits

**Processing:**
Job runs asynchronously. Poll the status endpoint or use webhook callback for completion notification.
</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>

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>

Returns presigned URLs for downloading output files.

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

