{"openapi":"3.1.0","info":{"title":"APIs","version":"1.0.0"},"paths":{"/speech-to-text":{"post":{"operationId":"transcribe","summary":"Speech to Text","description":"## Speech to Text API\n\nThis API transcribes speech to text in multiple Indian languages and English. Supports transcription for interactive applications.\n\n### Available Options:\n- **REST API** (Current Endpoint): For quick responses under 30 seconds with immediate results\n- **Batch API**: For longer audio files, [Follow This Documentation](https://docs.sarvam.ai/api-reference-docs/api-guides-tutorials/speech-to-text/batch-api)\n  - Supports diarization (speaker identification)\n\n### Note:\n- Pricing differs for REST and Batch APIs\n- Diarization is only available in Batch API with separate pricing\n- Please refer to [here](https://docs.sarvam.ai/api-reference-docs/pricing) for detailed pricing information","tags":["speechToText"],"parameters":[{"name":"api-subscription-key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sarvam_Model_API_SpeechToTextResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sarvam_Model_API_ErrorMessage"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sarvam_Model_API_ErrorMessage"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sarvam_Model_API_ErrorMessage"}}}},"429":{"description":"Quota Exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sarvam_Model_API_ErrorMessage"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sarvam_Model_API_ErrorMessage"}}}},"503":{"description":"Service Overloaded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sarvam_Model_API_ErrorMessage"}}}}},"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary","description":"The audio file to transcribe. Supported formats include WAV, MP3, AAC, AIFF, OGG, OPUS, FLAC, MP4/M4A, AMR, WMA, WebM, and PCM formats. The API automatically detects most codec formats, but for PCM files (pcm_s16le, pcm_l16, pcm_raw), you must specify the input_audio_codec parameter. PCM files are supported only at 16kHz sample rate.\nThe API works best with audio files sampled at 16kHz. If the audio contains multiple channels, they will be merged into a single channel."},"model":{"$ref":"#/components/schemas/Sarvam_Model_API_SpeechToTextModel","description":"Specifies the model to use for speech-to-text conversion.\n\n- **saaras:v3** (default, recommended): State-of-the-art model with flexible output formats. Supports multiple modes via the `mode` parameter: transcribe, translate, verbatim, translit, codemix.\n\n- **saaras:v4** (latest): Flexible output formats across all modes (transcribe, translate, verbatim, translit, codemix), supporting Global + Indian English and 22 Indic languages."},"mode":{"oneOf":[{"$ref":"#/components/schemas/Sarvam_Model_API_Mode"},{"type":"null"}],"default":"transcribe","description":"Mode of operation. **Only applicable when using saaras:v3 model.**\n\nExample audio: 'मेरा फोन नंबर है 9840950950'\n\n- **transcribe** (default): Standard transcription in the original language with proper formatting and number normalization.\n  - Output: `मेरा फोन नंबर है 9840950950`\n\n- **translate**: Translates speech from any supported Indic language to English.\n  - Output: `My phone number is 9840950950`\n\n- **verbatim**: Exact word-for-word transcription without normalization, preserving filler words and spoken numbers as-is.\n  - Output: `मेरा फोन नंबर है नौ आठ चार zero नौ पांच zero नौ पांच zero`\n\n- **translit**: Romanization - Transliterates speech to Latin/Roman script only.\n  - Output: `mera phone number hai 9840950950`\n\n- **codemix**: Code-mixed text with English words in English and Indic words in native script.\n  - Output: `मेरा phone number है 9840950950`"},"language_code":{"$ref":"#/components/schemas/Sarvam_Model_API_SpeechToTextLanguage","description":"Specifies the language of the input audio in BCP-47 format.\n\n**Available Options:**\n- `unknown`: Use when the language is not known; the API will auto-detect.\n- `hi-IN`: Hindi\n- `bn-IN`: Bengali\n- `kn-IN`: Kannada\n- `ml-IN`: Malayalam\n- `mr-IN`: Marathi\n- `od-IN`: Odia\n- `pa-IN`: Punjabi\n- `ta-IN`: Tamil\n- `te-IN`: Telugu\n- `en-IN`: English\n- `gu-IN`: Gujarati\n- `as-IN`: Assamese\n- `ur-IN`: Urdu\n- `ne-IN`: Nepali\n- `kok-IN`: Konkani\n- `ks-IN`: Kashmiri\n- `sd-IN`: Sindhi\n- `sa-IN`: Sanskrit\n- `sat-IN`: Santali\n- `mni-IN`: Manipuri\n- `brx-IN`: Bodo\n- `mai-IN`: Maithili\n- `doi-IN`: Dogri"},"with_timestamps":{"type":"boolean","default":false,"description":"Enables chunk-level timestamps in the response. If set to `true`, the response includes a `timestamps` object with `words`, `start_time_seconds`, and `end_time_seconds` (each entry covers a sentence or phrase, not an individual word).\n\n**Note:** Word-level timestamps are not supported. Speaker diarization is not supported on the REST API; use the Batch API for diarized, chunk-level timestamps."},"input_audio_codec":{"$ref":"#/components/schemas/Sarvam_Model_API_InputAudioCodec","description":"Input Audio codec/format of the input file. PCM files are supported only at 16kHz sample rate."}},"required":["file"]}}}}}},"/speech-to-text/job/v1":{"post":{"operationId":"initialise","summary":"Initiate Speech to Text Bulk Job V1","description":"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.","tags":["speechToTextJob"],"parameters":[{"name":"api-subscription-key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkJobInitResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"429":{"description":"Quota Exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"503":{"description":"Service Overloaded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkJobInitRequestV1_SpeechToTextJobParameters_"}}}}}},"/speech-to-text/job/v1/upload-files":{"post":{"operationId":"get_upload_links","summary":"Upload Files for Speech to Text Bulk Job V1","description":"Generate presigned upload URLs for audio files that will be processed in a speech to text bulk job","tags":["speechToTextJob"],"parameters":[{"name":"api-subscription-key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilesUploadResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"429":{"description":"Quota Exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"503":{"description":"Service Overloaded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilesRequest"}}}}}},"/speech-to-text/job/v1/{job_id}/start":{"post":{"operationId":"start","summary":"Start Speech to Text Bulk Job V1","description":"Start processing a speech to text bulk job after all audio files have been uploaded","tags":["speechToTextJob"],"parameters":[{"name":"job_id","in":"path","description":"The unique identifier of the job","required":true,"schema":{"type":"string"}},{"name":"ptu_id","in":"query","required":false,"schema":{"type":["integer","null"]}},{"name":"api-subscription-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"api-subscription-key","in":"header","description":"Your unique subscription key for authenticating requests to the Sarvam AI Speech-to-Text API.\n[Here are the steps to get your api key](https://docs.sarvam.ai/api-reference-docs/authentication#obtaining-your-api-subscription-key)","required":false,"schema":{"type":"string","default":""}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobStatusResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"429":{"description":"Quota Exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"503":{"description":"Service Overloaded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}}}}},"/speech-to-text/job/v1/{job_id}/status":{"get":{"operationId":"get_status","summary":"Get Speech to Text Bulk Job V1 Status","description":"Retrieve the current status and details of a speech to text bulk job, including progress and file-level information.\n\n**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.","tags":["speechToTextJob"],"parameters":[{"name":"job_id","in":"path","description":"The unique identifier of the job","required":true,"schema":{"type":"string"}},{"name":"api-subscription-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"api-subscription-key","in":"header","description":"Your unique subscription key for authenticating requests to the Sarvam AI Speech-to-Text API.\n[Here are the steps to get your api key](https://docs.sarvam.ai/api-reference-docs/authentication#obtaining-your-api-subscription-key)","required":false,"schema":{"type":"string","default":""}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobStatusResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"429":{"description":"Quota Exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"503":{"description":"Service Overloaded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}}}}},"/speech-to-text/job/v1/download-files":{"post":{"operationId":"get_download_links","summary":"Download Files for Speech to Text Bulk Job V1","description":"Generate presigned download URLs for the transcription output files of a completed speech to text bulk job.\n\n**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`.\n\n**Method:** POST only (GET returns 405).","tags":["speechToTextJob"],"parameters":[{"name":"api-subscription-key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilesDownloadResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"429":{"description":"Quota Exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"503":{"description":"Service Overloaded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilesRequest"}}}}}},"/text-to-speech":{"post":{"operationId":"convert","summary":"Text to Speech","description":"Convert text into spoken audio. The output is a base64-encoded audio string that must be decoded before use.\n\n**Available Models:**\n- **bulbul:v3**: Latest model with improved quality, 30+ voices, and temperature control\n- **bulbul:v2**: Legacy model with pitch and loudness controls\n\n**Important Notes for bulbul:v3:**\n- Pitch and loudness parameters are NOT supported\n- Pace range: 0.5 to 2.0\n- Preprocessing is automatically enabled\n- Default sample rate is 24000 Hz\n- Supports sample rates: 8000, 16000, 22050, 24000 Hz (REST API also supports 32000, 44100, 48000 Hz)","tags":["textToSpeech"],"parameters":[{"name":"api-subscription-key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sarvam_Model_API_TextToSpeechResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sarvam_Model_API_ErrorMessage"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sarvam_Model_API_ErrorMessage"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sarvam_Model_API_ErrorMessage"}}}},"429":{"description":"Quota Exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sarvam_Model_API_ErrorMessage"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sarvam_Model_API_ErrorMessage"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sarvam_Model_API_TextToSpeechRequest"}}}}}},"/text-to-speech/stream":{"post":{"operationId":"convertStream","summary":"Text-to-Speech Stream Audio","description":"Converts the input text into a streamed spoken audio response.\n\nThis 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.\n\nSupports the `dict_id` parameter to apply a [pronunciation dictionary](https://docs.sarvam.ai/api-reference-docs/pronunciation-dictionary/create) during synthesis.","tags":["textToSpeech"],"parameters":[{"name":"api-subscription-key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success. Returns a streamed audio response in the requested format (e.g., `audio/mpeg` for MP3, `audio/wav` for WAV).","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sarvam_Model_API_ErrorMessage"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sarvam_Model_API_ErrorMessage"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sarvam_Model_API_ErrorMessage"}}}},"429":{"description":"Quota Exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sarvam_Model_API_ErrorMessage"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sarvam_Model_API_ErrorMessage"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sarvam_Model_API_TextToSpeechStreamRequest"}}}}}},"/text-to-speech/pronunciation-dictionary":{"post":{"operationId":"create","summary":"Create Pronunciation Dictionary","description":"Upload a `.json` file to create a new pronunciation dictionary. Only supported by **bulbul:v3**.\n\nThe 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.\n\nThe returned `dictionary_id` can be passed as `dict_id` in text-to-speech requests (REST, HTTP Stream, and WebSocket).\n\n**Limits:** Max 10 dictionaries per user, 100 words per dictionary, 1 MB file size.","tags":["pronunciationDictionary"],"parameters":[{"name":"api-subscription-key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sarvam_Model_API_PronunciationDictionaryResponse"}}}},"400":{"description":"Bad Request — Invalid JSON, missing required fields, or bad schema.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sarvam_Model_API_ErrorMessage"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sarvam_Model_API_ErrorMessage"}}}},"413":{"description":"Payload Too Large — File size exceeds the 1 MB limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sarvam_Model_API_ErrorMessage"}}}},"422":{"description":"Unprocessable Entity — Word limit exceeded (>100 words per dictionary) or dictionary limit exceeded (>10 dictionaries per user).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sarvam_Model_API_ErrorMessage"}}}},"429":{"description":"Quota Exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sarvam_Model_API_ErrorMessage"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sarvam_Model_API_ErrorMessage"}}}}},"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"}},"required":["file"]}}}}},"get":{"operationId":"list","summary":"List Pronunciation Dictionaries","description":"Retrieve a list of all pronunciation dictionary IDs associated with the authenticated user.","tags":["pronunciationDictionary"],"parameters":[{"name":"api-subscription-key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sarvam_Model_API_PronunciationDictionaryGetResponse"}}}},"400":{"description":"Bad Request — Invalid JSON, missing required fields, or bad schema.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sarvam_Model_API_ErrorMessage"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sarvam_Model_API_ErrorMessage"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sarvam_Model_API_ErrorMessage"}}}},"429":{"description":"Quota Exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sarvam_Model_API_ErrorMessage"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sarvam_Model_API_ErrorMessage"}}}}}},"put":{"operationId":"update","summary":"Update Pronunciation Dictionary","description":"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.\n\n**Limits:** Max 100 words per dictionary, 1 MB file size.\n\nThe response includes the `dictionary_id` and the updated pronunciation mappings for verification.","tags":["pronunciationDictionary"],"parameters":[{"name":"dict_id","in":"query","description":"ID of the dictionary to update","required":true,"schema":{"type":"string"}},{"name":"api-subscription-key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sarvam_Model_API_PronunciationDictionaryUpdateResponse"}}}},"400":{"description":"Bad Request — Invalid JSON, missing required fields, or bad schema.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sarvam_Model_API_ErrorMessage"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sarvam_Model_API_ErrorMessage"}}}},"404":{"description":"Not Found — Dictionary not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sarvam_Model_API_ErrorMessage"}}}},"413":{"description":"Payload Too Large — File size exceeds the 1 MB limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sarvam_Model_API_ErrorMessage"}}}},"422":{"description":"Unprocessable Entity — Word limit exceeded (>100 words per dictionary).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sarvam_Model_API_ErrorMessage"}}}},"429":{"description":"Quota Exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sarvam_Model_API_ErrorMessage"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sarvam_Model_API_ErrorMessage"}}}}},"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"}},"required":["file"]}}}}},"delete":{"operationId":"delete","summary":"Delete Pronunciation Dictionary","description":"Delete a pronunciation dictionary by its ID. Once deleted, the dictionary can no longer be referenced in text-to-speech requests.","tags":["pronunciationDictionary"],"parameters":[{"name":"dict_id","in":"query","description":"ID of the dictionary to delete","required":true,"schema":{"type":"string"}},{"name":"api-subscription-key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sarvam_Model_API_PronunciationDictionaryDeleteResponse"}}}},"400":{"description":"Bad Request — Invalid JSON, missing required fields, or bad schema.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sarvam_Model_API_ErrorMessage"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sarvam_Model_API_ErrorMessage"}}}},"404":{"description":"Not Found — Dictionary not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sarvam_Model_API_ErrorMessage"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sarvam_Model_API_ErrorMessage"}}}},"429":{"description":"Quota Exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sarvam_Model_API_ErrorMessage"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sarvam_Model_API_ErrorMessage"}}}}}}},"/text-to-speech/pronunciation-dictionary/{dict_id}":{"get":{"operationId":"get","summary":"Get Pronunciation Dictionary","description":"Retrieve the full pronunciation mappings for a specific dictionary by its ID.\n\nReturns the pronunciation data organized by language code, where each language contains word-to-pronunciation pairs.","tags":["pronunciationDictionary"],"parameters":[{"name":"dict_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"api-subscription-key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sarvam_Model_API_PronunciationDictionaryData"}}}},"400":{"description":"Bad Request — Invalid JSON, missing required fields, or bad schema.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sarvam_Model_API_ErrorMessage"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sarvam_Model_API_ErrorMessage"}}}},"404":{"description":"Not Found — Dictionary not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sarvam_Model_API_ErrorMessage"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sarvam_Model_API_ErrorMessage"}}}},"429":{"description":"Quota Exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sarvam_Model_API_ErrorMessage"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sarvam_Model_API_ErrorMessage"}}}}}}},"/translate":{"post":{"operationId":"translate","summary":"Translate Text","description":"**Translation** converts text from one language to another while preserving its meaning.\nFor Example: **'मैं ऑफिस जा रहा हूँ'** translates to **'I am going to the office'** in English, where the script and language change, but the original meaning remains the same.\n\nAvailable languages:\n- **`bn-IN`**: Bengali\n- **`en-IN`**: English\n- **`gu-IN`**: Gujarati\n- **`hi-IN`**: Hindi\n- **`kn-IN`**: Kannada\n- **`ml-IN`**: Malayalam\n- **`mr-IN`**: Marathi\n- **`od-IN`**: Odia\n- **`pa-IN`**: Punjabi\n- **`ta-IN`**: Tamil\n- **`te-IN`**: Telugu\n\n### Newly added languages:\n- **`as-IN`**: Assamese\n- **`brx-IN`**: Bodo\n- **`doi-IN`**: Dogri\n- **`kok-IN`**: Konkani\n- **`ks-IN`**: Kashmiri\n- **`mai-IN`**: Maithili\n- **`mni-IN`**: Manipuri (Meiteilon)\n- **`ne-IN`**: Nepali\n- **`sa-IN`**: Sanskrit\n- **`sat-IN`**: Santali\n- **`sd-IN`**: Sindhi\n- **`ur-IN`**: Urdu\n\nFor 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).","tags":["text"],"parameters":[{"name":"api-subscription-key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sarvam_Model_API_TranslationResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sarvam_Model_API_ErrorMessage"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sarvam_Model_API_ErrorMessage"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sarvam_Model_API_ErrorMessage"}}}},"429":{"description":"Quota Exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sarvam_Model_API_ErrorMessage"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sarvam_Model_API_ErrorMessage"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sarvam_Model_API_TranslationRequest"}}}}}},"/transliterate":{"post":{"operationId":"transliterate","summary":"Transliterate Text","description":"**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.\n\nTransliteration 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.\n\n**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.\n### Examples of **Transliteration**:\n- **'Good morning'** becomes **'गुड मॉर्निंग'** in Hindi, where the pronunciation is preserved but the meaning is not translated.\n- **'सुप्रभात'** becomes **'suprabhat'** in English.\n\nAvailable languages:\n- **`en-IN`**: English\n- **`hi-IN`**: Hindi\n- **`bn-IN`**: Bengali\n- **`gu-IN`**: Gujarati\n- **`kn-IN`**: Kannada\n- **`ml-IN`**: Malayalam\n- **`mr-IN`**: Marathi\n- **`od-IN`**: Odia\n- **`pa-IN`**: Punjabi\n- **`ta-IN`**: Tamil\n- **`te-IN`**: Telugu\n\nFor 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).","tags":["text"],"parameters":[{"name":"api-subscription-key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sarvam_Model_API_TransliterationResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sarvam_Model_API_ErrorMessage"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sarvam_Model_API_ErrorMessage"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sarvam_Model_API_ErrorMessage"}}}},"429":{"description":"Quota Exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sarvam_Model_API_ErrorMessage"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sarvam_Model_API_ErrorMessage"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sarvam_Model_API_TransliterationRequest"}}}}}},"/text-lid":{"post":{"operationId":"identifyLanguage","summary":"Language Identification","description":"Identifies the language (e.g., en-IN, hi-IN) and script (e.g., Latin, Devanagari) of the input text, supporting multiple languages.","tags":["text"],"parameters":[{"name":"api-subscription-key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sarvam_Model_API_LanguageIdentificationResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sarvam_Model_API_ErrorMessage"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sarvam_Model_API_ErrorMessage"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sarvam_Model_API_ErrorMessage"}}}},"429":{"description":"Quota Exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sarvam_Model_API_ErrorMessage"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sarvam_Model_API_ErrorMessage"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sarvam_Model_API_LanguageIdentificationRequest"}}}}}},"/v1/chat/completions":{"post":{"operationId":"completions","summary":"Chat Completions","tags":["chat"],"parameters":[{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}},{"name":"api-subscription-key","in":"header","description":"API subscription key in sk_xxx format.\n        [Steps to get your key](https://docs.sarvam.ai/api-reference-docs/authentication)","required":false,"schema":{"type":["string","null"]}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateChatCompletionResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"429":{"description":"Quota Exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateChatCompletionRequest"}}}}}},"/jobs":{"post":{"operationId":"create","summary":"Create Dubbing Job","description":"## Creative Agents - Dubbing\n\nCreate 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.\n\n**Base URL:** `https://api.sarvam.ai/dubbing`.\n**Auth:** send your key in the `api-subscription-key` header, not `Authorization: Bearer`.\n\nThis 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:\n1. `PUT` the raw media bytes to `upload_url` with headers `Content-Type: <mime>` (e.g. `video/mp4`) and `x-ms-blob-type: BlockBlob`.\n2. `POST /jobs/{job_id}/start` to begin the pipeline.\n\nA single job dubs into every language in `target_langs`, so you don't need a separate job per language.","tags":["dubbing"],"parameters":[{"name":"api-subscription-key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sarvam_Creative_API_CreateDubbingJobResponse"}}}},"401":{"description":"Unauthorized. Send a valid `api-subscription-key`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sarvam_Model_API_ErrorMessage"}}}},"422":{"description":"Unprocessable Entity. The body is invalid; check enum values and required fields.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sarvam_Model_API_ErrorMessage"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sarvam_Model_API_ErrorMessage"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sarvam_Creative_API_CreateDubbingJobRequest"}}}}}},"/jobs/{job_id}/start":{"post":{"operationId":"start","summary":"Start Dubbing Job","description":"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`.\n\nKeep `editor_flow` set to `false` (the default) when creating the job so exports auto-produce once the pipeline finishes.","tags":["dubbing"],"parameters":[{"name":"job_id","in":"path","description":"The `job_id` returned by `POST /jobs`.","required":true,"schema":{"type":"string"}},{"name":"api-subscription-key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sarvam_Creative_API_DubbingStartResponse"}}}},"401":{"description":"Unauthorized. Send a valid `api-subscription-key`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sarvam_Model_API_ErrorMessage"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sarvam_Model_API_ErrorMessage"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sarvam_Model_API_ErrorMessage"}}}}}}},"/jobs/{job_id}/live-status":{"get":{"operationId":"get_live_status","summary":"Get Dubbing Live Status","description":"Poll the pipeline progress of a dubbing job. `data.status` moves from `queued` to `in_progress`, then to `completed` or `failed`.\n\n> **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`.","tags":["dubbing"],"parameters":[{"name":"job_id","in":"path","description":"The `job_id` returned by `POST /jobs`.","required":true,"schema":{"type":"string"}},{"name":"api-subscription-key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sarvam_Creative_API_DubbingLiveStatusResponse"}}}},"401":{"description":"Unauthorized. Send a valid `api-subscription-key`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sarvam_Model_API_ErrorMessage"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sarvam_Model_API_ErrorMessage"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sarvam_Model_API_ErrorMessage"}}}}}}},"/jobs/{job_id}/export-status":{"get":{"operationId":"get_export_status","summary":"Get Dubbing Export Status","description":"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`.\n\n**This is the source of truth for downloads.** Before downloading, confirm an entry's `status == \"completed\"` and use its `download_url`.\n\n> Signed download URLs are time-limited (~24h). Re-fetch this endpoint for a fresh URL rather than caching long-term.","tags":["dubbing"],"parameters":[{"name":"job_id","in":"path","description":"The `job_id` returned by `POST /jobs`.","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","description":"Number of recent export entries to return (1–100).","required":false,"schema":{"type":"integer","default":5}},{"name":"api-subscription-key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sarvam_Creative_API_DubbingExportStatusResponse"}}}},"401":{"description":"Unauthorized. Send a valid `api-subscription-key`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sarvam_Model_API_ErrorMessage"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sarvam_Model_API_ErrorMessage"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sarvam_Model_API_ErrorMessage"}}}}}}},"/doc-ai/v1/job/upload":{"post":{"operationId":"create_upload_url","summary":"Create Document AI Upload URL","description":"Creates a direct-upload handle for a file to be processed later.\n\n**Flow:**\n1. Call this endpoint with the MIME type you will upload (e.g. `application/pdf`).\n2. Upload the file using the returned `method`, `url` and `headers` before `expires_at`.\n3. Pass the returned `upload_id` through the `upload_ids` field on a later digitise or extract job request.\n\nWhen `content_type` is set, the upload's `Content-Type` header must match it.","tags":["docAi"],"parameters":[{"name":"api-subscription-key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocAIPresignUploadResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocAIErrorModel"}}}},"402":{"description":"Billing or entitlement error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocAIErrorModel"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocAIErrorModel"}}}},"429":{"description":"Rate or admission limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocAIErrorModel"}}}},"503":{"description":"Billing unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocAIErrorModel"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocAIPresignUploadRequest"}}}}}},"/doc-ai/v1/job/digitise":{"post":{"operationId":"digitise","summary":"Create Document AI Digitise Job","description":"Creates and starts a digitise job from files or pre-uploaded handles. Digitise converts documents into structured HTML or Markdown while preserving layout.\n\n**Input:** Exactly one of `file` and `upload_ids` must be provided. Use `POST /doc-ai/v1/job/upload` to obtain upload IDs.\n\n**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.\n\nDigitise JSON results include blocks with text, tag and bounding box.","tags":["docAi"],"parameters":[{"name":"api-subscription-key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocAIStartJobResponse"}}}},"400":{"description":"Invalid request or schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocAIErrorModel"}}}},"402":{"description":"Billing or entitlement error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocAIErrorModel"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocAIErrorModel"}}}},"413":{"description":"File too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocAIErrorModel"}}}},"429":{"description":"Rate or admission limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocAIErrorModel"}}}},"503":{"description":"Billing unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocAIErrorModel"}}}}},"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"array","items":{"type":"string","format":"binary"},"description":"Document file(s) to digitise. Repeatable multipart part. Exactly one of `file` and `upload_ids` must be provided."},"upload_ids":{"type":"string","description":"Comma-separated upload IDs returned by `POST /doc-ai/v1/job/upload`. Exactly one of `file` and `upload_ids` must be provided."},"language":{"type":"string","default":"en-IN","description":"Language code of the document (BCP-47), e.g. `en-IN`, `hi-IN`."},"output_format":{"$ref":"#/components/schemas/DocAiV1JobDigitisePostRequestBodyContentMultipartFormDataSchemaOutputFormat","default":"html","description":"Output format of the digitised document."},"content_type":{"$ref":"#/components/schemas/DocAiV1JobDigitisePostRequestBodyContentMultipartFormDataSchemaContentType","default":"printed","description":"Nature of the document content."},"auto_orient":{"type":"string","default":"true","description":"Automatically correct page orientation before processing. Boolean sent as text: `true` or `false`."},"model":{"type":"string","default":"sarvam-vision-v1","description":"Model to use for digitisation."}}}}}}}},"/doc-ai/v1/job/extract":{"post":{"operationId":"extract","summary":"Create Document AI Extract Job","description":"Creates and starts an extract job from files or pre-uploaded handles. Extract pulls structured fields out of documents according to a schema.\n\n**Input:** Exactly one of `file` and `upload_ids` must be provided.\n\n**Schema:** exactly one of `schema` (inline JSON schema) and `config_id` (saved extraction configuration) is required.\n\n**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.\n\nExtract results include `result`, plus `annotations` mirroring the result shape where every leaf has `confidence` and `sources`.","tags":["docAi"],"parameters":[{"name":"api-subscription-key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocAIStartJobResponse"}}}},"400":{"description":"Invalid request or schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocAIErrorModel"}}}},"402":{"description":"Billing or entitlement error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocAIErrorModel"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocAIErrorModel"}}}},"413":{"description":"File too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocAIErrorModel"}}}},"429":{"description":"Rate or admission limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocAIErrorModel"}}}},"503":{"description":"Billing unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocAIErrorModel"}}}}},"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"array","items":{"type":"string","format":"binary"},"description":"Document file(s) to extract from. Repeatable multipart part. Exactly one of `file` and `upload_ids` must be provided."},"upload_ids":{"type":"string","description":"Comma-separated upload IDs returned by `POST /doc-ai/v1/job/upload`. Exactly one of `file` and `upload_ids` must be provided."},"schema":{"type":"string","description":"Inline extraction schema as a JSON string. The root must be `type: \"object\"` with non-empty `properties`; every field needs a `type` and a non-empty `description`. Supported types: `string`, `number`, `integer`, `boolean`, `object`, `array` (objects need `properties`, arrays need `items`); optional `enum`; maximum nesting depth 4. Exactly one of `schema` and `config_id` is required."},"config_id":{"type":"string","description":"Saved extraction configuration ID. Exactly one of `schema` and `config_id` is required."},"language":{"type":"string","default":"en-IN","description":"Language code of the document (BCP-47), e.g. `en-IN`, `hi-IN`."},"output_format":{"$ref":"#/components/schemas/DocAiV1JobExtractPostRequestBodyContentMultipartFormDataSchemaOutputFormat","default":"json","description":"Output format of the extraction results."},"classification":{"type":"string","default":"false","description":"Enable document classification. Boolean sent as text: `true` or `false`."},"auto_orient":{"type":"string","default":"true","description":"Automatically correct page orientation before processing. Boolean sent as text: `true` or `false`."},"model":{"type":"string","default":"sarvam-vision-v1","description":"Model to use for extraction."}}}}}}}},"/doc-ai/v1/job/{job_id}/status":{"get":{"operationId":"get_status","summary":"Get Document AI Job Status","description":"Returns a job's status and page-level usage.\n\n**Terminal statuses:** `completed`, `partially_completed`, `failed`, `rejected`. Results and download URLs are only available after the job reaches a terminal status.","tags":["docAi"],"parameters":[{"name":"job_id","in":"path","description":"The unique identifier of the job","required":true,"schema":{"type":"string"}},{"name":"api-subscription-key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocAIJobStatusResponse"}}}},"404":{"description":"Job not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocAIErrorModel"}}}}}}},"/doc-ai/v1/job/{job_id}/results":{"get":{"operationId":"get_results","summary":"Get Document AI Job Results","description":"Returns terminal job results. Results are never available while a job is running; requesting them before a terminal status returns `409`.\n\n**Digitise results** include `job_id`, `type`, `status`, `usage` and `documents`.\n\n**Extract results** include `job_id`, `type`, `status`, `usage`, `result`, `annotations` and `version`. `annotations` mirrors the result shape; every leaf has `confidence` and `sources`.","tags":["docAi"],"parameters":[{"name":"job_id","in":"path","description":"The unique identifier of the job","required":true,"schema":{"type":"string"}},{"name":"format","in":"query","description":"Output format of the results, e.g. `json`.","required":false,"schema":{"type":"string"}},{"name":"api-subscription-key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/docAI_get_results_Response_200"}}}},"404":{"description":"Job not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocAIErrorModel"}}}},"409":{"description":"Results requested before the job reached a terminal status","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocAIErrorModel"}}}}}}},"/doc-ai/v1/job/{job_id}/download-url":{"get":{"operationId":"get_download_url","summary":"Get Document AI Download URL","description":"Creates a download URL for a completed job's output. Download the output using the returned `method`, `url` and `headers` before `expires_at`.\n\nRequesting a download URL before the job reaches a terminal status returns `409`.","tags":["docAi"],"parameters":[{"name":"job_id","in":"path","description":"The unique identifier of the job","required":true,"schema":{"type":"string"}},{"name":"api-subscription-key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocAIDownloadURLResponse"}}}},"404":{"description":"Job not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocAIErrorModel"}}}},"409":{"description":"Download requested before the job reached a terminal status","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocAIErrorModel"}}}}}}},"/speech-to-text-translate":{"post":{"operationId":"translate","summary":"Speech To Text Translate","description":"## Speech to Text Translation API\n\nThis API automatically detects the input language, transcribes the speech, and translates the text to English.\n\n### Available Options:\n- **REST API** (Current Endpoint): For quick responses under 30 seconds with immediate results\n- **Batch API**: For longer audio files [Follow this documentation](https://docs.sarvam.ai/api-reference-docs/api-guides-tutorials/speech-to-text/batch-api)\n  - Supports diarization (speaker identification)\n\n### Note:\n- Pricing differs for REST and Batch APIs\n- Diarization is only available in Batch API with separate pricing\n- Please refer to [here](https://docs.sarvam.ai/api-reference-docs/pricing) for detailed pricing information","tags":["speechToText"],"parameters":[{"name":"api-subscription-key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sarvam_Model_API_SpeechToTextTranslateResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sarvam_Model_API_ErrorMessage"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sarvam_Model_API_ErrorMessage"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sarvam_Model_API_ErrorMessage"}}}},"429":{"description":"Quota Exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sarvam_Model_API_ErrorMessage"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sarvam_Model_API_ErrorMessage"}}}},"503":{"description":"Service Overloaded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sarvam_Model_API_ErrorMessage"}}}}},"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary","description":"The audio file to transcribe. Supported formats include WAV, MP3, AAC, AIFF, OGG, OPUS, FLAC, MP4/M4A, AMR, WMA, WebM, and PCM formats. The API automatically detects most codec formats, but for PCM files (pcm_s16le, pcm_l16, pcm_raw), you must specify the input_audio_codec parameter. PCM files are supported only at 16kHz sample rate.\nWorks best at 16kHz. Multiple channels will be merged."},"prompt":{"type":["string","null"],"description":"Conversation context can be passed as a prompt to boost model accuracy. However, the current system is at an experimentation stage and doesn't match the prompt performance of large language models."},"model":{"$ref":"#/components/schemas/Sarvam_Model_API_SpeechToTextTranslateModel","description":"Model to be used for speech to text translation.\n\n- **saaras:v2.5** (default): Translation model that translates audio from any spoken Indic language to English.\n  - Example: Hindi audio → English text output\n\nFor the latest model (saaras:v3), use the `/speech-to-text` endpoint with `mode=\"translate\"`."},"input_audio_codec":{"$ref":"#/components/schemas/Sarvam_Model_API_InputAudioCodec","description":"Audio codec/format of the input file. Our API automatically detects all codec formats, but for PCM files specifically (pcm_s16le, pcm_l16, pcm_raw), you must pass this parameter. PCM files are supported only at 16kHz sample rate."}},"required":["file"]}}}}}},"/speech-to-text-translate/job/v1":{"post":{"operationId":"initialise","summary":"Initiate Speech to Text Translate Bulk Job V1","description":"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.","tags":["speechToTextTranslateJob"],"parameters":[{"name":"ptu_id","in":"query","required":false,"schema":{"type":["integer","null"]}},{"name":"api-subscription-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"api-subscription-key","in":"header","description":"Your unique subscription key for authenticating requests to the Sarvam AI Speech-to-Text API.\n[Here are the steps to get your api key](https://docs.sarvam.ai/api-reference-docs/authentication#obtaining-your-api-subscription-key)","required":false,"schema":{"type":"string","default":""}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkJobInitResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"429":{"description":"Quota Exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"503":{"description":"Service Overloaded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkJobInitRequestV1_SpeechToTextTranslateJobParameters_"}}}}}},"/speech-to-text-translate/job/v1/upload-files":{"post":{"operationId":"get_upload_links","summary":"Upload Files for Speech to Text Translate Bulk Job V1","description":"Generate presigned upload URLs for audio files that will be processed in a speech to text translate bulk job","tags":["speechToTextTranslateJob"],"parameters":[{"name":"ptu_id","in":"query","required":false,"schema":{"type":["integer","null"]}},{"name":"api-subscription-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"api-subscription-key","in":"header","description":"Your unique subscription key for authenticating requests to the Sarvam AI Speech-to-Text API.\n[Here are the steps to get your api key](https://docs.sarvam.ai/api-reference-docs/authentication#obtaining-your-api-subscription-key)","required":false,"schema":{"type":"string","default":""}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilesUploadResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"429":{"description":"Quota Exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"503":{"description":"Service Overloaded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilesRequest"}}}}}},"/speech-to-text-translate/job/v1/{job_id}/start":{"post":{"operationId":"start","summary":"Start Speech to Text Translate Bulk Job V1","description":"Start processing a speech to text translate bulk job after all audio files have been uploaded","tags":["speechToTextTranslateJob"],"parameters":[{"name":"job_id","in":"path","description":"The unique identifier of the job","required":true,"schema":{"type":"string"}},{"name":"ptu_id","in":"query","required":false,"schema":{"type":["integer","null"]}},{"name":"api-subscription-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"api-subscription-key","in":"header","description":"Your unique subscription key for authenticating requests to the Sarvam AI Speech-to-Text API.\n[Here are the steps to get your api key](https://docs.sarvam.ai/api-reference-docs/authentication#obtaining-your-api-subscription-key)","required":false,"schema":{"type":"string","default":""}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobStatusResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"429":{"description":"Quota Exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"503":{"description":"Service Overloaded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}}}}},"/speech-to-text-translate/job/v1/{job_id}/status":{"get":{"operationId":"get_status","summary":"Get Speech to Text Translate Bulk Job V1 Status","description":"Retrieve the current status and details of a speech to text translate bulk job, including progress and file-level information.\n\n**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.","tags":["speechToTextTranslateJob"],"parameters":[{"name":"job_id","in":"path","description":"The unique identifier of the job","required":true,"schema":{"type":"string"}},{"name":"api-subscription-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"api-subscription-key","in":"header","description":"Your unique subscription key for authenticating requests to the Sarvam AI Speech-to-Text API.\n[Here are the steps to get your api key](https://docs.sarvam.ai/api-reference-docs/authentication#obtaining-your-api-subscription-key)","required":false,"schema":{"type":"string","default":""}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobStatusResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"429":{"description":"Quota Exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"503":{"description":"Service Overloaded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}}}}},"/speech-to-text-translate/job/v1/download-files":{"post":{"operationId":"get_download_links","summary":"Download Files for Speech to Text Translate Bulk Job V1","description":"Generate presigned download URLs for the translated transcription output files of a completed speech to text translate bulk job.\n\n**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.\n\n**Method:** POST only (GET returns 405).","tags":["speechToTextTranslateJob"],"parameters":[{"name":"ptu_id","in":"query","required":false,"schema":{"type":["integer","null"]}},{"name":"api-subscription-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"api-subscription-key","in":"header","description":"Your unique subscription key for authenticating requests to the Sarvam AI Speech-to-Text API.\n[Here are the steps to get your api key](https://docs.sarvam.ai/api-reference-docs/authentication#obtaining-your-api-subscription-key)","required":false,"schema":{"type":"string","default":""}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilesDownloadResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"429":{"description":"Quota Exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"503":{"description":"Service Overloaded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilesRequest"}}}}}},"/doc-digitization/job/v1":{"post":{"operationId":"initialise","summary":"Create Document Intelligence Job (Legacy)","description":"**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`.\n\nCreates a new Document Intelligence job.\n\n**Supported Languages (BCP-47 format):**\n- `hi-IN`: Hindi (default)\n- `en-IN`: English\n- `bn-IN`: Bengali\n- `gu-IN`: Gujarati\n- `kn-IN`: Kannada\n- `ml-IN`: Malayalam\n- `mr-IN`: Marathi\n- `od-IN`: Odia\n- `pa-IN`: Punjabi\n- `ta-IN`: Tamil\n- `te-IN`: Telugu\n- `ur-IN`: Urdu\n- `as-IN`: Assamese\n- `brx-IN`: Bodo\n- `doi-IN`: Dogri\n- `ks-IN`: Kashmiri\n- `kok-IN`: Konkani\n- `mai-IN`: Maithili\n- `mni-IN`: Manipuri\n- `ne-IN`: Nepali\n- `sa-IN`: Sanskrit\n- `sat-IN`: Santali\n- `sd-IN`: Sindhi\n\n**Output Formats (delivered as ZIP file):**\n- `html`: Structured HTML files with layout preservation\n- `md`: Markdown files (default)\n- `json`: Structured JSON files for programmatic processing","tags":["documentIntelligence"],"parameters":[{"name":"api-subscription-key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocDigitizationCreateJobResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocDigitizationErrorMessage"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocDigitizationErrorMessage"}}}},"429":{"description":"Quota Exceeded / Rate Limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocDigitizationErrorMessage"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocDigitizationErrorMessage"}}}},"503":{"description":"Service Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocDigitizationErrorMessage"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocDigitizationCreateJobRequest"}}}}}},"/doc-digitization/job/v1/upload-files":{"post":{"operationId":"get_upload_links","summary":"Get Document Intelligence Upload URLs (Legacy)","description":"**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`.\n\nReturns presigned URLs for uploading input files.\n\n**File Constraints:**\n- Exactly one file required (PDF or ZIP)\n- PDF files: `.pdf` extension\n- ZIP files: `.zip` extension","tags":["documentIntelligence"],"parameters":[{"name":"api-subscription-key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocDigitizationUploadFilesResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocDigitizationErrorMessage"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocDigitizationErrorMessage"}}}},"429":{"description":"Quota Exceeded / Rate Limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocDigitizationErrorMessage"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocDigitizationErrorMessage"}}}},"503":{"description":"Service Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocDigitizationErrorMessage"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocDigitizationUploadFilesRequest"}}}}}},"/doc-digitization/job/v1/{job_id}/start":{"post":{"operationId":"start","summary":"Start Document Intelligence Job (Legacy)","description":"**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`.\n\nValidates the uploaded file and starts processing.\n\n**Validation Checks:**\n- File must be uploaded before starting\n- File size must not exceed 200 MB\n- PDF must be parseable by the PDF parser\n- ZIP must contain only JPEG/PNG images\n- ZIP must be flat (no nested folders beyond one level)\n- ZIP must contain at least one valid image\n- Page/image count must not exceed 10 (returns `400` with `invalid_request_error` if exceeded)\n- User must have sufficient credits\n\n**Processing:**\nJob runs asynchronously. Poll the status endpoint for completion.","tags":["documentIntelligence"],"parameters":[{"name":"job_id","in":"path","description":"The unique identifier of the job","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"api-subscription-key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocDigitizationJobStatusResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocDigitizationErrorMessage"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocDigitizationErrorMessage"}}}},"429":{"description":"Quota Exceeded / Rate Limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocDigitizationErrorMessage"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocDigitizationErrorMessage"}}}},"503":{"description":"Service Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocDigitizationErrorMessage"}}}}}}},"/doc-digitization/job/v1/{job_id}/status":{"get":{"operationId":"get_status","summary":"Get Document Intelligence Job Status (Legacy)","description":"**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`.\n\nReturns the current status of a job with page-level metrics.\n\n**Job States:**\n- `Accepted`: Job created, awaiting file upload\n- `Pending`: File uploaded, waiting to start\n- `Running`: Processing in progress\n- `Completed`: All pages processed successfully\n- `PartiallyCompleted`: Some pages succeeded, some failed\n- `Failed`: All pages failed or job-level error\n\n**Page Metrics:**\nResponse includes detailed progress: total pages, pages processed, succeeded, failed, and per-page errors.","tags":["documentIntelligence"],"parameters":[{"name":"job_id","in":"path","description":"The unique identifier of the job","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"api-subscription-key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocDigitizationJobStatusResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocDigitizationErrorMessage"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocDigitizationErrorMessage"}}}},"429":{"description":"Quota Exceeded / Rate Limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocDigitizationErrorMessage"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocDigitizationErrorMessage"}}}},"503":{"description":"Service Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocDigitizationErrorMessage"}}}}}}},"/doc-digitization/job/v1/{job_id}/download-files":{"post":{"operationId":"get_download_links","summary":"Get Document Intelligence Download URLs (Legacy)","description":"**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`.\n\nReturns presigned URLs for downloading output files.\n\n**Method:** POST only. A GET request to this path returns 405 Method Not Allowed.\n\n**Prerequisites:**\n- Job must be in `Completed` or `PartiallyCompleted` state\n- Failed jobs have no output available","tags":["documentIntelligence"],"parameters":[{"name":"job_id","in":"path","description":"The unique identifier of the job","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"api-subscription-key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocDigitizationDownloadFilesResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocDigitizationErrorMessage"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocDigitizationErrorMessage"}}}},"429":{"description":"Quota Exceeded / Rate Limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocDigitizationErrorMessage"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocDigitizationErrorMessage"}}}},"503":{"description":"Service Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocDigitizationErrorMessage"}}}}}}}},"servers":[{"url":"https://api.sarvam.ai","description":"Production"},{"url":"https://api.sarvam.ai/dubbing","description":"Creative"}],"components":{"schemas":{"Sarvam_Model_API_SpeechToTextModel":{"type":"string","enum":["saaras:v3","saaras:v4"],"description":"Model to be used for speech to text.\n\n- **saaras:v3** (default, recommended): State-of-the-art model with flexible output formats. Supports multiple modes via the `mode` parameter: transcribe, translate, verbatim, translit, codemix.\n\n- **saaras:v4** (latest): Flexible output formats across all modes (transcribe, translate, verbatim, translit, codemix), supporting Global + Indian English and 22 Indic languages.","title":"Sarvam_Model_API_SpeechToTextModel"},"Sarvam_Model_API_Mode":{"type":"string","enum":["transcribe","translate","verbatim","translit","codemix"],"description":"Mode of operation for saaras:v3 model.\n\nExample audio: 'मेरा फोन नंबर है 9840950950'\n\n- **transcribe** (default): Standard transcription in the original language with proper formatting and number normalization.\n  - Output: `मेरा फोन नंबर है 9840950950`\n\n- **translate**: Translates speech from any supported Indic language to English.\n  - Output: `My phone number is 9840950950`\n\n- **verbatim**: Exact word-for-word transcription without normalization, preserving filler words and spoken numbers as-is.\n  - Output: `मेरा फोन नंबर है नौ आठ चार zero नौ पांच zero नौ पांच zero`\n\n- **translit**: Romanization - Transliterates speech to Latin/Roman script only.\n  - Output: `mera phone number hai 9840950950`\n\n- **codemix**: Code-mixed text with English words in English and Indic words in native script.\n  - Output: `मेरा phone number है 9840950950`","title":"Sarvam_Model_API_Mode"},"Sarvam_Model_API_SpeechToTextLanguage":{"type":"string","enum":["unknown","hi-IN","bn-IN","kn-IN","ml-IN","mr-IN","od-IN","pa-IN","ta-IN","te-IN","en-IN","gu-IN","as-IN","ur-IN","ne-IN","kok-IN","ks-IN","sd-IN","sa-IN","sat-IN","mni-IN","brx-IN","mai-IN","doi-IN"],"description":"Languages supported for Speech-to-Text (23 languages: 22 Indian languages plus English).","title":"Sarvam_Model_API_SpeechToTextLanguage"},"Sarvam_Model_API_InputAudioCodec":{"type":"string","enum":["wav","x-wav","wave","mp3","mpeg","mpeg3","x-mp3","x-mpeg-3","aac","x-aac","aiff","x-aiff","ogg","opus","flac","x-flac","mp4","x-m4a","amr","x-ms-wma","webm","pcm_s16le","pcm_l16","pcm_raw"],"description":"Audio codec/format of the input file. Our API automatically detects all codec formats, but for PCM files specifically (pcm_s16le, pcm_l16, pcm_raw), you must pass this parameter. PCM files are supported only at 16kHz sample rate.","title":"Sarvam_Model_API_InputAudioCodec"},"Sarvam_Model_API_TimestampsModel":{"type":"object","properties":{"words":{"type":"array","items":{"type":"string"},"description":"List of transcript chunks (sentence or phrase segments). Not individual words."},"start_time_seconds":{"type":"array","items":{"type":"number","format":"double"},"description":"List of start times for each chunk in seconds."},"end_time_seconds":{"type":"array","items":{"type":"number","format":"double"},"description":"List of end times for each chunk in seconds."}},"required":["words","start_time_seconds","end_time_seconds"],"title":"Sarvam_Model_API_TimestampsModel"},"Sarvam_Model_API_SpeechToTextResponse":{"type":"object","properties":{"request_id":{"type":["string","null"]},"transcript":{"type":"string","description":"The transcribed text from the provided audio file."},"timestamps":{"oneOf":[{"$ref":"#/components/schemas/Sarvam_Model_API_TimestampsModel"},{"type":"null"}],"description":"Chunk-level timestamps for the transcribed text (sentence/phrase segments, not individual words). Present only when `with_timestamps` is `true`; omitted otherwise."},"language_code":{"type":["string","null"],"description":"This will return the BCP-47 code of language spoken in the input. If multiple languages are detected, this will return language code of most predominant spoken language. If no language is detected, this will be null"},"language_probability":{"type":["number","null"],"format":"double","description":"Float value (0.0 to 1.0) indicating confidence in the detected language. Present when `language_code` is omitted or set to `unknown`; omitted (or null) when a specific language code is provided."}},"required":["request_id","transcript","language_code"],"title":"Sarvam_Model_API_SpeechToTextResponse"},"Sarvam_Model_API_ErrorCode":{"type":"string","enum":["invalid_request_error","internal_server_error","unprocessable_entity_error","insufficient_quota_error","invalid_api_key_error","authentication_error","not_found_error","rate_limit_exceeded_error"],"title":"Sarvam_Model_API_ErrorCode"},"Sarvam_Model_API_ErrorDetails":{"type":"object","properties":{"request_id":{"type":["string","null"]},"message":{"type":"string","description":"Message describing the error"},"code":{"$ref":"#/components/schemas/Sarvam_Model_API_ErrorCode","description":"Error code for the specific error that has occurred. Refer to the error code documentation for more details."}},"required":["request_id","message","code"],"title":"Sarvam_Model_API_ErrorDetails"},"Sarvam_Model_API_ErrorMessage":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/Sarvam_Model_API_ErrorDetails","description":"Error details"}},"required":["error"],"title":"Sarvam_Model_API_ErrorMessage"},"Sarvam_Model_API_SpeechToTextBatchModel":{"type":"string","enum":["saaras:v3","saaras:v4"],"description":"Model to be used for speech to text.\n\n- **saaras:v3** (default, recommended): State-of-the-art model with flexible output formats. Supports multiple modes via the `mode` parameter: transcribe, translate, verbatim, translit, codemix.\n\n- **saaras:v4** (latest): Flexible output formats across all modes (transcribe, translate, verbatim, translit, codemix), supporting Global + Indian English and 22 Indic languages.","title":"Sarvam_Model_API_SpeechToTextBatchModel"},"SpeechToTextJobParameters":{"type":"object","properties":{"language_code":{"oneOf":[{"$ref":"#/components/schemas/Sarvam_Model_API_SpeechToTextLanguage"},{"type":"null"}],"default":"unknown","description":"Specifies the language of the input audio in BCP-47 format.\n\n**Available Options:**\n- `unknown` (default): Use when the language is not known; the API will auto-detect.\n- `hi-IN`: Hindi\n- `bn-IN`: Bengali\n- `kn-IN`: Kannada\n- `ml-IN`: Malayalam\n- `mr-IN`: Marathi\n- `od-IN`: Odia\n- `pa-IN`: Punjabi\n- `ta-IN`: Tamil\n- `te-IN`: Telugu\n- `en-IN`: English\n- `gu-IN`: Gujarati\n\n**Additional Options (saaras:v3 only):**\n- `as-IN`: Assamese\n- `ur-IN`: Urdu\n- `ne-IN`: Nepali\n- `kok-IN`: Konkani\n- `ks-IN`: Kashmiri\n- `sd-IN`: Sindhi\n- `sa-IN`: Sanskrit\n- `sat-IN`: Santali\n- `mni-IN`: Manipuri\n- `brx-IN`: Bodo\n- `mai-IN`: Maithili\n- `doi-IN`: Dogri"},"model":{"$ref":"#/components/schemas/Sarvam_Model_API_SpeechToTextBatchModel","description":"Model to be used for speech to text.\n\n- **saaras:v3** (default, recommended): State-of-the-art model with flexible output formats. Supports multiple modes via the `mode` parameter: transcribe, translate, verbatim, translit, codemix.\n\n- **saaras:v4** (latest): Flexible output formats across all modes (transcribe, translate, verbatim, translit, codemix), supporting Global + Indian English and 22 Indic languages."},"mode":{"oneOf":[{"$ref":"#/components/schemas/Sarvam_Model_API_Mode"},{"type":"null"}],"default":"transcribe","description":"Mode of operation. **Only applicable when using saaras:v3 or saaras:v4 models.**\n\nExample audio: 'मेरा फोन नंबर है 9840950950'\n\n- **transcribe** (default): Standard transcription in the original language with proper formatting and number normalization.\n  - Output: `मेरा फोन नंबर है 9840950950`\n\n- **translate**: Translates speech from any supported Indic language to English.\n  - Output: `My phone number is 9840950950`\n\n- **verbatim**: Exact word-for-word transcription without normalization, preserving filler words and spoken numbers as-is.\n  - Output: `मेरा फोन नंबर है नौ आठ चार zero नौ पांच zero नौ पांच zero`\n\n- **translit**: Romanization - Transliterates speech to Latin/Roman script only.\n  - Output: `mera phone number hai 9840950950`\n\n- **codemix**: Code-mixed text with English words in English and Indic words in native script.\n  - Output: `मेरा phone number है 9840950950`"},"with_timestamps":{"type":"boolean","default":false,"description":"Whether to include timestamps in the response"},"with_diarization":{"type":"boolean","default":false,"description":"Enables speaker diarization, which identifies and separates different speakers in the audio. In beta mode."},"num_speakers":{"type":["integer","null"],"description":"Number of speakers to be detected in the audio. This is used when with_diarization is true."},"input_audio_codec":{"$ref":"#/components/schemas/Sarvam_Model_API_InputAudioCodec","description":"Audio codec/format of uploaded files. The API automatically detects most formats; for PCM files (pcm_s16le, pcm_l16, pcm_raw), you must specify this parameter. PCM files are supported only at 16kHz sample rate."}},"title":"SpeechToTextJobParameters"},"BulkJobCallback":{"type":"object","properties":{"url":{"type":"string","description":"Webhook url to call upon job completion"},"auth_token":{"type":"string","default":"","description":"Authorization token required for the callback Url"}},"required":["url"],"title":"BulkJobCallback"},"BulkJobInitRequestV1_SpeechToTextJobParameters_":{"type":"object","properties":{"job_parameters":{"$ref":"#/components/schemas/SpeechToTextJobParameters","description":"Job Parameters for the bulk job"},"callback":{"oneOf":[{"$ref":"#/components/schemas/BulkJobCallback"},{"type":"null"}],"description":"Parameters for callback URL"}},"required":["job_parameters"],"title":"BulkJobInitRequestV1_SpeechToTextJobParameters_"},"StorageContainerType":{"type":"string","enum":["Azure","Local","Google","Azure_V1"],"title":"StorageContainerType"},"BaseJobParameters":{"type":"object","properties":{},"title":"BaseJobParameters"},"JobState":{"type":"string","enum":["Accepted","Pending","Running","Completed","Failed"],"title":"JobState"},"BulkJobInitResponse":{"type":"object","properties":{"job_id":{"type":"string","description":"Job UUID."},"storage_container_type":{"$ref":"#/components/schemas/StorageContainerType","description":"Storage Container Type"},"job_parameters":{"$ref":"#/components/schemas/BaseJobParameters"},"job_state":{"$ref":"#/components/schemas/JobState"}},"required":["job_id","storage_container_type","job_parameters","job_state"],"title":"BulkJobInitResponse"},"ErrorCode":{"type":"string","enum":["invalid_request_error","internal_server_error","unprocessable_entity_error","insufficient_quota_error","invalid_api_key_error","authentication_error","rate_limit_exceeded_error","not_found_error"],"title":"ErrorCode"},"ErrorDetails":{"type":"object","properties":{"message":{"type":"string","description":"Message describing the error"},"code":{"$ref":"#/components/schemas/ErrorCode","description":"Error code for the specific error that has occurred. Refer to the error code documentation for more details."},"request_id":{"type":"string","default":"","description":"Unique identifier for the request. Format: date_UUID4"}},"required":["message","code"],"title":"ErrorDetails"},"ErrorMessage":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/ErrorDetails","description":"Error details"}},"required":["error"],"title":"ErrorMessage"},"FilesRequest":{"type":"object","properties":{"job_id":{"type":"string","description":"UUID of the bulk job returned from job initiation."},"files":{"type":"array","items":{"type":"string"},"description":"Required. Output filenames to download (e.g. \"0.json\"). Get these from the job status response: job_details[].outputs[].file_name after the job completes."}},"required":["job_id","files"],"description":"Request body for bulk job upload/download URL generation. Both job_id and files are required for download.","title":"FilesRequest"},"FileSignedURLDetails":{"type":"object","properties":{"file_url":{"type":"string"},"file_metadata":{"type":["object","null"],"additionalProperties":{"description":"Any type"}}},"required":["file_url"],"title":"FileSignedURLDetails"},"FilesUploadResponse":{"type":"object","properties":{"job_id":{"type":"string"},"job_state":{"$ref":"#/components/schemas/JobState"},"upload_urls":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/FileSignedURLDetails"}},"storage_container_type":{"$ref":"#/components/schemas/StorageContainerType"}},"required":["job_id","job_state","upload_urls","storage_container_type"],"title":"FilesUploadResponse"},"TaskFileDetails":{"type":"object","properties":{"file_name":{"type":"string"},"file_id":{"type":"string"}},"required":["file_name","file_id"],"title":"TaskFileDetails"},"TaskState":{"type":"string","enum":["Success","API Error","Internal Server Error"],"title":"TaskState"},"TaskDetail":{"type":"object","properties":{"inputs":{"type":"array","items":{"$ref":"#/components/schemas/TaskFileDetails"}},"outputs":{"type":"array","items":{"$ref":"#/components/schemas/TaskFileDetails"}},"state":{"$ref":"#/components/schemas/TaskState"},"error_message":{"type":["string","null"]},"exception_name":{"type":["string","null"]}},"title":"TaskDetail"},"JobStatusResponse":{"type":"object","properties":{"job_state":{"$ref":"#/components/schemas/JobState","description":"Job State"},"created_at":{"type":"string","description":"Created At"},"updated_at":{"type":"string","description":"Updated At"},"job_id":{"type":"string","description":"Job Id"},"total_files":{"type":"integer","default":0,"description":"Total Files"},"successful_files_count":{"type":"integer","default":0,"description":"Success Count"},"failed_files_count":{"type":"integer","default":0,"description":"Failed Count"},"storage_container_type":{"$ref":"#/components/schemas/StorageContainerType","description":"Storage Container Type"},"error_message":{"type":"string","default":"","description":"Error Message"},"job_details":{"type":"array","items":{"$ref":"#/components/schemas/TaskDetail"},"description":"Job details at file level."}},"required":["job_state","created_at","updated_at","job_id","storage_container_type"],"title":"JobStatusResponse"},"FilesDownloadResponse":{"type":"object","properties":{"job_id":{"type":"string"},"job_state":{"$ref":"#/components/schemas/JobState"},"download_urls":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/FileSignedURLDetails"}},"storage_container_type":{"$ref":"#/components/schemas/StorageContainerType"}},"required":["job_id","job_state","download_urls","storage_container_type"],"title":"FilesDownloadResponse"},"SarvamModelApiTextToSpeechRequestText":{"oneOf":[{"type":"string"}],"description":"The text(s) to be converted into speech.\n\n**Features:**\n- Supports code-mixed text (English and Indic languages)\n\n**Model-specific limits:**\n- **bulbul:v3:** Max 2500 characters\n- **bulbul:v2:** Max 1500 characters\n\n**Important Note:**\n- For numbers larger than 4 digits, use commas (e.g., '10,000' instead of '10000')\n- This ensures proper pronunciation as a whole number","title":"SarvamModelApiTextToSpeechRequestText"},"Sarvam_Model_API_TextToSpeechLanguage":{"type":"string","enum":["bn-IN","en-IN","gu-IN","hi-IN","kn-IN","ml-IN","mr-IN","od-IN","pa-IN","ta-IN","te-IN"],"title":"Sarvam_Model_API_TextToSpeechLanguage"},"Sarvam_Model_API_TextToSpeechSpeaker":{"type":"string","enum":["anushka","abhilash","manisha","vidya","arya","karun","hitesh","aditya","ritu","priya","neha","rahul","pooja","rohan","simran","kavya","amit","dev","ishita","shreya","ratan","varun","manan","sumit","roopa","kabir","aayan","shubh","ashutosh","advait","anand","tanya","tarun","sunny","mani","gokul","vijay","shruti","suhani","mohit","kavitha","rehan","soham","rupali"],"title":"Sarvam_Model_API_TextToSpeechSpeaker"},"Sarvam_Model_API_SpeechSampleRate":{"type":"string","enum":["8000","16000","22050","24000","32000","44100","48000"],"title":"Sarvam_Model_API_SpeechSampleRate"},"Sarvam_Model_API_TextToSpeechModel":{"type":"string","enum":["bulbul:v2","bulbul:v3"],"title":"Sarvam_Model_API_TextToSpeechModel"},"TextToSpeechOutputAudioCodec":{"type":"string","enum":["mp3","linear16","mulaw","alaw","opus","flac","aac","wav"],"description":"Audio codec options for the non-streaming /text-to-speech endpoint","title":"TextToSpeechOutputAudioCodec"},"Sarvam_Model_API_TextToSpeechRequest":{"type":"object","properties":{"text":{"$ref":"#/components/schemas/SarvamModelApiTextToSpeechRequestText","description":"The text(s) to be converted into speech.\n\n**Features:**\n- Supports code-mixed text (English and Indic languages)\n\n**Model-specific limits:**\n- **bulbul:v3:** Max 2500 characters\n- **bulbul:v2:** Max 1500 characters\n\n**Important Note:**\n- For numbers larger than 4 digits, use commas (e.g., '10,000' instead of '10000')\n- This ensures proper pronunciation as a whole number"},"language_code":{"$ref":"#/components/schemas/Sarvam_Model_API_TextToSpeechLanguage","description":"The language code in BCP-47 format."},"speaker":{"oneOf":[{"$ref":"#/components/schemas/Sarvam_Model_API_TextToSpeechSpeaker"},{"type":"null"}],"default":"shubh","description":"The speaker voice to be used for the output audio.\n\n**Default:** shubh (for bulbul:v3), anushka (for bulbul:v2)\n\n**Model Compatibility (Speakers compatible with respective model):**\n- **bulbul:v3:**\n  - shubh (default), aditya, ritu, priya, neha, rahul, pooja, rohan, simran, kavya, amit, dev, ishita, shreya, ratan, varun, manan, sumit, roopa, kabir, aayan, ashutosh, advait, anand, tanya, tarun, sunny, mani, gokul, vijay, shruti, suhani, mohit, kavitha, rehan, soham, rupali\n- **bulbul:v2:**\n  - Female: anushka, manisha, vidya, arya\n  - Male: abhilash, karun, hitesh\n\n**Note:** Speaker selection must match the chosen model version.\n\n**Important:** Speaker names are case-sensitive and must be lowercase (e.g., `ritu` not `Ritu`)."},"pitch":{"type":["number","null"],"format":"double","description":"Controls the pitch of the audio. Lower values result in a deeper voice, while higher values make it sharper. The suitable range is between -0.75 and 0.75. Default is 0.0.\n\n**Note:** This parameter is only supported for bulbul:v2. It is NOT supported for bulbul:v3."},"pace":{"type":["number","null"],"format":"double","default":1,"description":"Controls the speed of the audio. Lower values result in slower speech, while higher values make it faster. Default is 1.0.\n\n**Model-specific ranges:**\n- **bulbul:v3:** 0.5 to 2.0\n- **bulbul:v2:** 0.3 to 3.0"},"loudness":{"type":["number","null"],"format":"double","description":"Controls the loudness of the audio. Lower values result in quieter audio, while higher values make it louder. The suitable range is between 0.3 and 3.0. Default is 1.0.\n\n**Note:** This parameter is only supported for bulbul:v2. It is NOT supported for bulbul:v3."},"speech_sample_rate":{"oneOf":[{"$ref":"#/components/schemas/Sarvam_Model_API_SpeechSampleRate"},{"type":"null"}],"default":22050,"description":"Specifies the sample rate of the output audio. Supported values are 8000, 16000, 22050, 24000, 32000, 44100, 48000 Hz.\n\n**Note:** Higher sample rates (32000, 44100, 48000 Hz) are only available with bulbul:v3 via the REST API, not in streaming mode.\n\n**Default:** 24000 Hz"},"enable_preprocessing":{"type":"boolean","default":false,"description":"Controls whether normalization of English words and numeric entities (e.g., numbers, dates) is performed. Set to true for better handling of mixed-language text.\n\n**Model-specific behavior:**\n- **bulbul:v3:** Not Supported\n- **bulbul:v2:** Default is false"},"model":{"$ref":"#/components/schemas/Sarvam_Model_API_TextToSpeechModel","description":"Specifies the model to use for text-to-speech conversion.\n\n**Available models:**\n- **bulbul:v3:** Latest model with improved quality, 30+ voices, pace, and temperature control\n- **bulbul:v2:** Legacy model with pitch, loudness, and pace controls"},"output_audio_codec":{"oneOf":[{"$ref":"#/components/schemas/TextToSpeechOutputAudioCodec"},{"type":"null"}],"default":"wav","description":"Specifies the audio codec for the output audio file. Different codecs offer various compression and quality characteristics."},"temperature":{"type":["number","null"],"format":"double","default":0.6,"description":"Temperature controls how much randomness and expressiveness the TTS model uses while generating speech.\n\nLower values produce more stable and consistent output, while higher values sound more expressive but may introduce artifacts or errors. The suitable range is between 0.01 and 2.0. Default is 0.6.\n\n**Note:** This parameter is only supported for bulbul:v3. It has no effect on bulbul:v2."},"dict_id":{"type":["string","null"],"description":"The ID of a pronunciation dictionary to apply during synthesis. When provided, matching words in the input text will be replaced with their custom pronunciations before generating speech.\n\nCreate and manage dictionaries via the [Pronunciation Dictionary API](https://docs.sarvam.ai/api-reference-docs/pronunciation-dictionary/create). Only supported by **bulbul:v3**."},"enable_cached_responses":{"type":"boolean","default":false,"description":"Enable caching for the request. When enabled, identical requests will return cached audio instead of regenerating. Default is false.\n\n**Note:** Currently in beta and only available for bulbul:v1 and bulbul:v2 models."}},"required":["text","language_code"],"title":"Sarvam_Model_API_TextToSpeechRequest"},"Sarvam_Model_API_TextToSpeechResponse":{"type":"object","properties":{"request_id":{"type":["string","null"]},"audios":{"type":"array","items":{"type":"string"},"description":" The output audio files in WAV format, encoded as base64 strings. Each string corresponds to one of the input texts."}},"required":["request_id","audios"],"title":"Sarvam_Model_API_TextToSpeechResponse"},"Sarvam_Model_API_SpeechStreamCodec":{"type":"string","enum":["mp3","linear16","mulaw","alaw","opus","flac","aac","wav"],"title":"Sarvam_Model_API_SpeechStreamCodec"},"Sarvam_Model_API_SpeechStreamBitrate":{"type":"string","enum":["32k","64k","96k","128k","192k"],"title":"Sarvam_Model_API_SpeechStreamBitrate"},"Sarvam_Model_API_TextToSpeechStreamRequest":{"type":"object","properties":{"text":{"type":"string","description":"The text to be converted into streamed speech.\n\n**Features:**\n- Max 3500 characters\n- Supports code-mixed text (English and Indic languages)\n\n**Important Note:**\n- For numbers larger than 4 digits, use commas (e.g., '10,000' instead of '10000')\n- This ensures proper pronunciation as a whole number"},"language_code":{"$ref":"#/components/schemas/Sarvam_Model_API_TextToSpeechLanguage","description":"The language code in BCP-47 format."},"speaker":{"oneOf":[{"$ref":"#/components/schemas/Sarvam_Model_API_TextToSpeechSpeaker"},{"type":"null"}],"description":"The speaker voice to be used for the output audio.\n\n**Default:** shubh (for bulbul:v3), anushka (for bulbul:v2)\n\n**Note:** Speaker selection must match the chosen model version.\n\n**Important:** Speaker names are case-sensitive and must be lowercase (e.g., `ritu` not `Ritu`)."},"pitch":{"type":["number","null"],"format":"double","description":"Controls the pitch of the audio. Range: -0.75 to 0.75. Default is 0.0.\n\n**Note:** Only supported for bulbul:v2."},"pace":{"type":["number","null"],"format":"double","default":1,"description":"Controls the speed of the audio. Default is 1.0.\n\n**Model-specific ranges:**\n- **bulbul:v3:** 0.5 to 2.0\n- **bulbul:v2:** 0.3 to 3.0"},"loudness":{"type":["number","null"],"format":"double","description":"Controls the loudness of the audio. Range: 0.3 to 3.0. Default is 1.0.\n\n**Note:** Only supported for bulbul:v2."},"speech_sample_rate":{"oneOf":[{"$ref":"#/components/schemas/Sarvam_Model_API_SpeechSampleRate"},{"type":"null"}],"default":22050,"description":"Specifies the sample rate of the output audio. Default is 22050 Hz.\n\n**Note:** OPUS codec only supports 8000, 12000, 16000, 24000, 48000 Hz."},"enable_preprocessing":{"type":"boolean","default":false,"description":"Controls whether normalization of English words and numeric entities is performed. Default is false."},"model":{"$ref":"#/components/schemas/Sarvam_Model_API_TextToSpeechModel","description":"Specifies the model to use for text-to-speech conversion. Default is bulbul:v2."},"temperature":{"type":["number","null"],"format":"double","default":0.6,"description":"Controls the randomness of the output. Range: 0.01 to 1.0. Default is 0.6.\n\n**Note:** Only supported for bulbul:v3."},"enable_cached_responses":{"type":"boolean","default":false,"description":"Enable caching for the request. Default is false. Currently in beta."},"dict_id":{"type":["string","null"],"description":"The ID of a pronunciation dictionary to apply during synthesis. When provided, matching words in the input text will be replaced with their custom pronunciations before generating speech.\n\nCreate and manage dictionaries via the [Pronunciation Dictionary API](https://docs.sarvam.ai/api-reference-docs/pronunciation-dictionary/create). Only supported by **bulbul:v3**."},"output_audio_codec":{"$ref":"#/components/schemas/Sarvam_Model_API_SpeechStreamCodec","description":"Specifies the codec for the streamed output audio (e.g., 'mp3')."},"output_audio_bitrate":{"$ref":"#/components/schemas/Sarvam_Model_API_SpeechStreamBitrate","description":"Bitrate for the streamed output audio. Default is '128k'."}},"required":["text"],"title":"Sarvam_Model_API_TextToSpeechStreamRequest"},"Sarvam_Model_API_PronunciationDictionaryResponse":{"type":"object","properties":{"dictionary_id":{"type":"string","description":"Unique identifier for the created dictionary (e.g. `p_5cb7faa6`). Use this as the `dict_id` parameter in text-to-speech requests."}},"required":["dictionary_id"],"description":"Response returned after successfully creating a pronunciation dictionary.","title":"Sarvam_Model_API_PronunciationDictionaryResponse"},"Sarvam_Model_API_PronunciationDictionaryGetResponse":{"type":"object","properties":{"dictionary_count":{"type":"integer","description":"Total number of pronunciation dictionaries owned by the user."},"dictionaries":{"type":"array","items":{"type":"string"},"description":"List of dictionary IDs."}},"required":["dictionary_count","dictionaries"],"description":"Response containing all pronunciation dictionary IDs for the authenticated user.","title":"Sarvam_Model_API_PronunciationDictionaryGetResponse"},"Sarvam_Model_API_PronunciationDictionaryData":{"type":"object","properties":{"pronunciations":{"type":"object","additionalProperties":{"type":"object","additionalProperties":{"type":"string"}},"description":"Pronunciation mappings organized by language code (e.g. `hi-IN`, `en-IN`). Each language maps words to their custom pronunciations."}},"required":["pronunciations"],"description":"The full pronunciation data for a dictionary.","title":"Sarvam_Model_API_PronunciationDictionaryData"},"Sarvam_Model_API_PronunciationDictionaryUpdateResponse":{"type":"object","properties":{"dictionary_id":{"type":"string","description":"Unique identifier of the updated dictionary."},"updated_pronunciations":{"type":"object","additionalProperties":{"type":"object","additionalProperties":{"type":"string"}},"description":"The new pronunciation data after the update, organized as `{language_code: {word: pronunciation}}`."}},"required":["dictionary_id","updated_pronunciations"],"description":"Response returned after successfully updating a pronunciation dictionary. Includes the full updated pronunciation data for verification.","title":"Sarvam_Model_API_PronunciationDictionaryUpdateResponse"},"Sarvam_Model_API_PronunciationDictionaryDeleteResponse":{"type":"object","properties":{"success":{"type":"boolean","description":"Whether the deletion was successful."},"message":{"type":"string","description":"Human-readable status message (e.g. \"Dictionary 'p_5cb7faa6' deleted successfully\")."}},"required":["success","message"],"description":"Response returned after deleting a pronunciation dictionary.","title":"Sarvam_Model_API_PronunciationDictionaryDeleteResponse"},"Sarvam_Model_API_TranslateSourceLanguage":{"type":"string","enum":["auto","bn-IN","en-IN","gu-IN","hi-IN","kn-IN","ml-IN","mr-IN","od-IN","pa-IN","ta-IN","te-IN","as-IN","brx-IN","doi-IN","kok-IN","ks-IN","mai-IN","mni-IN","ne-IN","sa-IN","sat-IN","sd-IN","ur-IN"],"title":"Sarvam_Model_API_TranslateSourceLanguage"},"Sarvam_Model_API_TranslateTargetLanguage":{"type":"string","enum":["bn-IN","en-IN","gu-IN","hi-IN","kn-IN","ml-IN","mr-IN","od-IN","pa-IN","ta-IN","te-IN","as-IN","brx-IN","doi-IN","kok-IN","ks-IN","mai-IN","mni-IN","ne-IN","sa-IN","sat-IN","sd-IN","ur-IN"],"title":"Sarvam_Model_API_TranslateTargetLanguage"},"Sarvam_Model_API_TranslateSpeakerGender":{"type":"string","enum":["Male","Female"],"title":"Sarvam_Model_API_TranslateSpeakerGender"},"Sarvam_Model_API_TranslateMode":{"type":"string","enum":["formal","modern-colloquial","classic-colloquial","code-mixed"],"title":"Sarvam_Model_API_TranslateMode"},"Sarvam_Model_API_TranslateModel":{"type":"string","enum":["mayura:v1","sarvam-translate:v1"],"title":"Sarvam_Model_API_TranslateModel"},"Sarvam_Model_API_TransliterateMode":{"type":"string","enum":["roman","fully-native","spoken-form-in-native"],"title":"Sarvam_Model_API_TransliterateMode"},"Sarvam_Model_API_NumeralsFormat":{"type":"string","enum":["international","native"],"title":"Sarvam_Model_API_NumeralsFormat"},"Sarvam_Model_API_TranslationRequest":{"type":"object","properties":{"input":{"type":"string","description":"The text you want to translate is the input text that will be processed by the translation model. The maximum is 1000 characters for Mayura:v1 and 2000 characters for Sarvam-Translate:v1."},"source_language_code":{"$ref":"#/components/schemas/Sarvam_Model_API_TranslateSourceLanguage","description":"Source language code for translation input.\n\n**mayura:v1 Languages:** Bengali, English, Gujarati, Hindi, Kannada, Malayalam, Marathi, Odia, Punjabi, Tamil, Telugu\n\n**sarvam-translate:v1 Languages:** All mayura:v1 languages and Assamese, Bodo, Dogri, Konkani, Kashmiri, Maithili, Manipuri, Nepali, Sanskrit, Santali, Sindhi, Urdu\n\n**Note:** mayura:v1 supports automatic language detection using 'auto' as the source language code.\n\n"},"target_language_code":{"$ref":"#/components/schemas/Sarvam_Model_API_TranslateTargetLanguage","description":"The language code of the translated text. This specifies the target language for translation.\n\n**mayura:v1 Languages:** Bengali, English, Gujarati, Hindi, Kannada, Malayalam, Marathi, Odia, Punjabi, Tamil, Telugu\n\n**sarvam-translate:v1 Languages:** All mayura:v1 and Assamese, Bodo, Dogri, Konkani, Kashmiri, Maithili, Manipuri, Nepali, Sanskrit, Santali, Sindhi, Urdu\n\n"},"speaker_gender":{"$ref":"#/components/schemas/Sarvam_Model_API_TranslateSpeakerGender","description":"Please specify the gender of the speaker for better translations."},"mode":{"$ref":"#/components/schemas/Sarvam_Model_API_TranslateMode","description":"Specifies the tone or style of the translation.\n\n**Model Support:**\n- **mayura:v1**: Supports formal, classic-colloquial, modern-colloquial, and code-mixed modes\n- **sarvam-translate:v1**: Only formal mode is supported\n\n**Default:** formal"},"model":{"$ref":"#/components/schemas/Sarvam_Model_API_TranslateModel","description":"Specifies the translation model to use.\n- mayura:v1: Supports 12 languages with all modes, output scripts, and automatic language detection.\n- sarvam-translate:v1: Supports all 22 scheduled languages of India, formal mode only."},"output_script":{"oneOf":[{"$ref":"#/components/schemas/Sarvam_Model_API_TransliterateMode"},{"type":"null"}],"description":"**output_script**: This is an optional parameter which controls the transliteration style applied to the output text.\n\n**Transliteration**: Converting text from one script to another while preserving pronunciation.\n\nFor mayura:v1 - We support transliteration with four options:\n- **`null`**(default): No transliteration applied.\n- **`roman`**: Transliteration in Romanized script.\n- **`fully-native`**: Transliteration in the native script with formal style.\n- **`spoken-form-in-native`**: Transliteration in the native script with spoken style.\n\nFor sarvam-translate:v1 - Transliteration is not supported.\n### Example:\nEnglish: Your EMI of Rs. 3000 is pending.\nDefault modern translation: आपका Rs. 3000 का EMI pending है (when `null` is passed).\n\nWith postprocessing enabled:\n- **roman output**: aapka Rs. 3000 ka EMI pending hai."},"numerals_format":{"$ref":"#/components/schemas/Sarvam_Model_API_NumeralsFormat","description":"`numerals_format` is an optional parameter with two options (supported for both mayura:v1 and sarvam-translate:v1):\n\n- **`international`** (default): Uses regular numerals (0-9).\n- **`native`**: Uses language-specific native numerals.\n\n### Example:\n- If `international` format is selected, we use regular numerals (0-9). For example: `मेरा phone number है: 9840950950`.\n- If `native` format is selected, we use language-specific native numerals, like: `मेरा phone number है: ९८४०९५०९५०`."}},"required":["input","source_language_code","target_language_code"],"title":"Sarvam_Model_API_TranslationRequest"},"Sarvam_Model_API_TranslationResponse":{"type":"object","properties":{"request_id":{"type":["string","null"]},"translated_text":{"type":"string","description":"Translated text result in the requested target language."},"source_language_code":{"type":"string","description":"Detected or provided source language of the input text."}},"required":["request_id","translated_text","source_language_code"],"title":"Sarvam_Model_API_TranslationResponse"},"Sarvam_Model_API_TransliterateSourceLanguage":{"type":"string","enum":["auto","bn-IN","en-IN","gu-IN","hi-IN","kn-IN","ml-IN","mr-IN","od-IN","pa-IN","ta-IN","te-IN"],"title":"Sarvam_Model_API_TransliterateSourceLanguage"},"Sarvam_Model_API_TranslatiterateTargetLanguage":{"type":"string","enum":["bn-IN","en-IN","gu-IN","hi-IN","kn-IN","ml-IN","mr-IN","od-IN","pa-IN","ta-IN","te-IN"],"title":"Sarvam_Model_API_TranslatiterateTargetLanguage"},"Sarvam_Model_API_SpokenFormNumeralsFormat":{"type":"string","enum":["english","native"],"title":"Sarvam_Model_API_SpokenFormNumeralsFormat"},"Sarvam_Model_API_TransliterationRequest":{"type":"object","properties":{"input":{"type":"string","description":"The text you want to transliterate."},"source_language_code":{"$ref":"#/components/schemas/Sarvam_Model_API_TransliterateSourceLanguage","description":"The language code of the input text. This specifies the source language for transliteration.\n\n\n\n Note:  The source language should either be an Indic language or English. As we supports both Indic-to-English and English-to-Indic transliteration.\n\n"},"target_language_code":{"$ref":"#/components/schemas/Sarvam_Model_API_TranslatiterateTargetLanguage","description":"The language code of the transliteration text. This specifies the target language for transliteration.\n\n\n\n Note:The target language should either be an Indic language or English. As we supports both Indic-to-English and English-to-Indic transliteration.\n\n"},"numerals_format":{"$ref":"#/components/schemas/Sarvam_Model_API_NumeralsFormat","description":"`numerals_format` is an optional parameter with two options:\n\n- **`international`** (default): Uses regular numerals (0-9).\n- **`native`**: Uses language-specific native numerals.\n\n### Example:\n- If `international` format is selected, we use regular numerals (0-9). For example: `मेरा phone number है: 9840950950`.\n- If `native` format is selected, we use language-specific native numerals, like: `मेरा phone number है: ९८४०९५०९५०`."},"spoken_form_numerals_language":{"$ref":"#/components/schemas/Sarvam_Model_API_SpokenFormNumeralsFormat","description":"`spoken_form_numerals_language` is an optional parameter with two options and only works when spoken_form is true:\n\n- **`english`** : Numbers in the text will be spoken in English.\n- **`native(default)`**: Numbers in the text will be spoken in the native language.\n\n### Examples:\n- **Input:** \"मेरे पास ₹200 है\"\n  - If `english` format is selected: \"मेरे पास टू हन्डर्ड रूपीस है\"\n  - If `native` format is selected: \"मेरे पास दो सौ रुपये है\"\n\n"},"spoken_form":{"type":"boolean","default":false,"description":"  - Default: `False`\n  - Converts text into a natural spoken form when `True`.\n  - **Note:** No effect if output language is `en-IN`.\n\n### Example:\n- **Input:** `मुझे कल 9:30am को appointment है`\n  - **Output:** `मुझे कल सुबह साढ़े नौ बजे को अपॉइंटमेंट है`\n"}},"required":["input","source_language_code","target_language_code"],"title":"Sarvam_Model_API_TransliterationRequest"},"Sarvam_Model_API_TransliterationResponse":{"type":"object","properties":{"request_id":{"type":["string","null"]},"transliterated_text":{"type":"string","description":"Transliterated text result in the requested target language."},"source_language_code":{"type":"string","description":"Detected or provided source language of the input text."}},"required":["request_id","transliterated_text","source_language_code"],"title":"Sarvam_Model_API_TransliterationResponse"},"Sarvam_Model_API_LanguageIdentificationRequest":{"type":"object","properties":{"input":{"type":"string","description":"The text input for language and script identification. Max Input Limit is 1000 characters"}},"required":["input"],"title":"Sarvam_Model_API_LanguageIdentificationRequest"},"Sarvam_Model_API_LanguageIdentificationResponse":{"type":"object","properties":{"request_id":{"type":["string","null"]},"language_code":{"type":["string","null"],"description":"The detected language code of the input text.\n\nAvailable languages:\n- **`en-IN`**: English\n- **`hi-IN`**: Hindi\n- **`bn-IN`**: Bengali\n- **`gu-IN`**: Gujarati\n- **`kn-IN`**: Kannada\n- **`ml-IN`**: Malayalam\n- **`mr-IN`**: Marathi\n- **`od-IN`**: Odia\n- **`pa-IN`**: Punjabi\n- **`ta-IN`**: Tamil\n- **`te-IN`**: Telugu"},"script_code":{"type":["string","null"],"description":"The detected script code of the input text.\n\nAvailable scripts:\n- **`Latn`**: Latin (Romanized script)\n- **`Deva`**: Devanagari (Hindi, Marathi)\n- **`Beng`**: Bengali\n- **`Gujr`**: Gujarati\n- **`Knda`**: Kannada\n- **`Mlym`**: Malayalam\n- **`Orya`**: Odia\n- **`Guru`**: Gurmukhi\n- **`Taml`**: Tamil\n- **`Telu`**: Telugu"}},"required":["request_id"],"title":"Sarvam_Model_API_LanguageIdentificationResponse"},"FunctionCall":{"type":"object","properties":{"name":{"type":"string","description":"The name of the function to call."},"arguments":{"type":"string","description":"The arguments to call the function with, as a JSON string."}},"required":["name","arguments"],"title":"FunctionCall"},"ChatCompletionMessageToolCall":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the tool call."},"type":{"type":"string","enum":["function"],"description":"The type of the tool call, currently only `function`."},"function":{"$ref":"#/components/schemas/FunctionCall"}},"required":["id","type","function"],"title":"ChatCompletionMessageToolCall"},"ChatCompletionRequestMessage":{"oneOf":[{"type":"object","properties":{"role":{"type":"string","enum":["assistant"],"description":"Discriminator value: assistant"},"content":{"type":["string","null"],"description":"The contents of the assistant message\n"},"tool_calls":{"type":["array","null"],"items":{"$ref":"#/components/schemas/ChatCompletionMessageToolCall"},"description":"The tool calls generated by the model."}},"required":["role"],"description":"ChatCompletionRequestAssistantMessage variant"},{"type":"object","properties":{"role":{"type":"string","enum":["system"],"description":"The role of the messages author, in this case `system`."},"content":{"type":"string","description":"The contents of the system message."}},"required":["role","content"],"description":"ChatCompletionRequestSystemMessage variant"},{"type":"object","properties":{"role":{"type":"string","enum":["tool"],"description":"The role of the messages author, in this case `tool`."},"content":{"type":"string","description":"The contents of the tool message."},"tool_call_id":{"type":"string","description":"Tool call that this message is responding to."}},"required":["role","content","tool_call_id"],"description":"ChatCompletionRequestToolMessage variant"},{"type":"object","properties":{"role":{"type":"string","enum":["user"],"description":"The role of the messages author, in this case `user`."},"content":{"type":"string","description":"The contents of the user message.\n"}},"required":["role","content"],"description":"ChatCompletionRequestUserMessage variant"}],"discriminator":{"propertyName":"role"},"title":"ChatCompletionRequestMessage"},"SarvamModelIds":{"type":"string","enum":["sarvam-105b"],"description":"Supported chat completion model IDs: `sarvam-105b`.","title":"SarvamModelIds"},"ReasoningEffort":{"type":"string","enum":["low","medium","high"],"title":"ReasoningEffort"},"StopConfiguration":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"Up to 4 sequences where the API will stop generating further tokens. The\nreturned text will not contain the stop sequence.\n","title":"StopConfiguration"},"FunctionDefinition":{"type":"object","properties":{"name":{"type":"string","description":"The name of the function to be called."},"description":{"type":["string","null"],"description":"A description of what the function does."},"parameters":{"type":["object","null"],"additionalProperties":{"description":"Any type"},"description":"The parameters the function accepts, described as a JSON Schema object."}},"required":["name"],"title":"FunctionDefinition"},"ChatCompletionTool":{"type":"object","properties":{"type":{"type":"string","enum":["function"],"description":"The type of the tool. Currently, only `function` is supported."},"function":{"$ref":"#/components/schemas/FunctionDefinition"}},"required":["type","function"],"title":"ChatCompletionTool"},"ToolChoiceOption0":{"type":"string","enum":["none","auto","required"],"title":"ToolChoiceOption0"},"ChatCompletionNamedToolChoiceFunction":{"type":"object","properties":{"name":{"type":"string","description":"The name of the function to call."}},"required":["name"],"title":"ChatCompletionNamedToolChoiceFunction"},"ChatCompletionNamedToolChoice":{"type":"object","properties":{"type":{"type":"string","enum":["function"],"description":"The type of the tool. Currently, only `function` is supported."},"function":{"$ref":"#/components/schemas/ChatCompletionNamedToolChoiceFunction"}},"required":["type","function"],"title":"ChatCompletionNamedToolChoice"},"ToolChoiceOption":{"oneOf":[{"$ref":"#/components/schemas/ToolChoiceOption0"},{"$ref":"#/components/schemas/ChatCompletionNamedToolChoice"}],"title":"ToolChoiceOption"},"JsonSchemaDefinitionSchema":{"type":"object","properties":{},"description":"The schema for the response format, described as a JSON Schema object.","title":"JsonSchemaDefinitionSchema"},"JsonSchemaDefinition":{"type":"object","properties":{"name":{"type":"string","description":"The name of the response format. Must contain only alphanumeric characters, underscores and dashes."},"description":{"type":["string","null"],"description":"A description of what the response format is for, used by the model to determine how to respond in the format."},"schema":{"oneOf":[{"$ref":"#/components/schemas/JsonSchemaDefinitionSchema"},{"type":"null"}],"description":"The schema for the response format, described as a JSON Schema object."},"strict":{"type":["boolean","null"],"default":false,"description":"Whether to enable strict schema adherence when generating the output."}},"required":["name"],"title":"JsonSchemaDefinition"},"ResponseFormat":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"],"description":"The type of response format being defined. Always `text`."}},"required":["type"],"description":"ResponseFormatText variant"},{"type":"object","properties":{"type":{"type":"string","enum":["json_object"],"description":"The type of response format being defined. Always `json_object`."}},"required":["type"],"description":"ResponseFormatJsonObject variant"},{"type":"object","properties":{"type":{"type":"string","enum":["json_schema"],"description":"The type of response format being defined. Always `json_schema`."},"json_schema":{"$ref":"#/components/schemas/JsonSchemaDefinition","description":"Structured Outputs configuration options, including a JSON Schema."}},"required":["type","json_schema"],"description":"ResponseFormatJsonSchema variant"}],"discriminator":{"propertyName":"type"},"title":"ResponseFormat"},"CreateChatCompletionRequest":{"type":"object","properties":{"messages":{"type":"array","items":{"$ref":"#/components/schemas/ChatCompletionRequestMessage"},"description":"A list of messages comprising the conversation so far."},"model":{"$ref":"#/components/schemas/SarvamModelIds","description":"Chat model ID. Use `sarvam-105b` (128K context)."},"temperature":{"type":["number","null"],"format":"double","default":0.2,"description":"What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.\nWe generally recommend altering this or `top_p` but not both.\n"},"top_p":{"type":["number","null"],"format":"double","default":1,"description":"An alternative to sampling with temperature, called nucleus sampling,\nwhere the model considers the results of the tokens with top_p probability\nmass. So 0.1 means only the tokens comprising the top 10% probability mass\nare considered.\n\nWe generally recommend altering this or `temperature` but not both.\n"},"reasoning_effort":{"oneOf":[{"$ref":"#/components/schemas/ReasoningEffort"},{"type":"null"}],"default":"medium","description":"The effort to use for reasoning. Can be disabled by explicitly setting to None. Default is 'medium'."},"max_tokens":{"type":["integer","null"],"default":2048,"description":"The maximum number of tokens that can be generated in the chat completion."},"stream":{"type":["boolean","null"],"default":false,"description":"If set to true, the model response data will be streamed to the client\nas it is generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format)."},"stop":{"oneOf":[{"$ref":"#/components/schemas/StopConfiguration"},{"type":"null"}]},"n":{"type":["integer","null"],"default":1,"description":"How many chat completion choices to generate for each input message. Note that you will be charged based on the number of generated tokens across all of the choices. Keep `n` as `1` to minimize costs."},"seed":{"type":["integer","null"],"description":"This feature is in Beta.\nIf specified, our system will make a best effort to sample deterministically, such that repeated requests with the same `seed` and parameters should return the same result.\nDeterminism is not guaranteed, and you should refer to the `system_fingerprint` response parameter to monitor changes in the backend.\n"},"frequency_penalty":{"type":["number","null"],"format":"double","default":0,"description":"Number between -2.0 and 2.0. Positive values penalize new tokens based on\ntheir existing frequency in the text so far, decreasing the model's\nlikelihood to repeat the same line verbatim.\n"},"presence_penalty":{"type":["number","null"],"format":"double","default":0,"description":"Number between -2.0 and 2.0. Positive values penalize new tokens based on\nwhether they appear in the text so far, increasing the model's likelihood\nto talk about new topics.\n"},"wiki_grounding":{"type":["boolean","null"],"default":false,"description":"If set to true, the model response will be wiki grounded."},"tools":{"type":["array","null"],"items":{"$ref":"#/components/schemas/ChatCompletionTool"},"description":"A list of tools the model may call. Currently, only functions are supported as a tool."},"tool_choice":{"oneOf":[{"$ref":"#/components/schemas/ToolChoiceOption"},{"type":"null"}],"description":"Controls which (if any) tool is called by the model."},"response_format":{"oneOf":[{"$ref":"#/components/schemas/ResponseFormat"},{"type":"null"}],"description":"An object specifying the format that the model must output. Setting `{ \"type\": \"json_schema\", \"json_schema\": {...} }` enables Structured Outputs which guarantees the model generates output matching the supplied JSON Schema. Setting `{ \"type\": \"json_object\" }` enables the older JSON mode, which guarantees valid JSON but not a specific schema."}},"required":["messages","model"],"title":"CreateChatCompletionRequest"},"FinishReason":{"type":"string","enum":["stop","length","tool_calls","content_filter","function_call"],"title":"FinishReason"},"Role":{"type":"string","enum":["assistant"],"title":"Role"},"ChatCompletionResponseMessage":{"type":"object","properties":{"content":{"type":["string","null"],"description":"The contents of the message."},"refusal":{"type":["string","null"]},"reasoning_content":{"type":["string","null"],"description":"The contents of the reasoning message."},"role":{"$ref":"#/components/schemas/Role","description":"The role of the author of this message."},"tool_calls":{"type":["array","null"],"items":{"$ref":"#/components/schemas/ChatCompletionMessageToolCall"},"description":"The tool calls generated by the model."}},"required":["content","role"],"title":"ChatCompletionResponseMessage"},"Choice":{"type":"object","properties":{"finish_reason":{"$ref":"#/components/schemas/FinishReason","description":"The reason the model stopped generating tokens. This will be `stop` if the model hit a natural stop point or a provided stop sequence,\n`length` if the maximum number of tokens specified in the request was reached,\n`content_filter` if content was omitted due to a flag from our content filters,\n`tool_calls` if the model called a tool, or `function_call` (deprecated) if the model called a function.\n"},"index":{"type":"integer","description":"The index of the choice in the list of choices."},"logprobs":{"type":["object","null"],"additionalProperties":{"description":"Any type"}},"message":{"$ref":"#/components/schemas/ChatCompletionResponseMessage"}},"required":["finish_reason","index","message"],"title":"Choice"},"CompletionUsage":{"type":"object","properties":{"completion_tokens":{"type":"integer","description":"Number of tokens in the generated completion."},"prompt_tokens":{"type":"integer","description":"Number of tokens in the prompt."},"total_tokens":{"type":"integer","description":"Total number of tokens used in the request (prompt + completion)."},"completion_tokens_details":{"type":["object","null"],"additionalProperties":{"description":"Any type"}},"prompt_tokens_details":{"type":["object","null"],"additionalProperties":{"description":"Any type"}}},"required":["completion_tokens","prompt_tokens","total_tokens"],"title":"CompletionUsage"},"CreateChatCompletionResponse":{"type":"object","properties":{"id":{"type":"string","description":"A unique identifier for the chat completion."},"choices":{"type":"array","items":{"$ref":"#/components/schemas/Choice"},"description":"A list of chat completion choices. Can be more than one if `n` is greater than 1."},"created":{"type":"integer","description":"The Unix timestamp (in seconds) of when the chat completion was created."},"model":{"type":"string","description":"The model used for the chat completion."},"object":{"type":"string","enum":["chat.completion"],"description":"The object type, which is always `chat.completion`."},"service_tier":{"type":["string","null"]},"system_fingerprint":{"type":["string","null"]},"usage":{"oneOf":[{"$ref":"#/components/schemas/CompletionUsage"},{"type":"null"}]}},"required":["id","choices","created","model","object"],"title":"CreateChatCompletionResponse"},"Sarvam_Creative_API_DubbingLanguage":{"type":"string","enum":["en-IN","hi-IN","bn-IN","gu-IN","kn-IN","ml-IN","mr-IN","or-IN","pa-IN","ta-IN","te-IN","as-IN"],"description":"Supported BCP-47 language code for dubbing. Note: Odia is `or-IN` for the dubbing service.","title":"Sarvam_Creative_API_DubbingLanguage"},"Sarvam_Creative_API_DubbingExportOption":{"type":"string","enum":["video","audio","srt"],"description":"Format auto-produced per target language at job-creation time.","title":"Sarvam_Creative_API_DubbingExportOption"},"Sarvam_Creative_API_DubbingPacePreset":{"type":"string","enum":["slow","moderate","normal","fast"],"description":"Speech pace preset used when `voice_cloning` is false. Defaults to `normal`.","title":"Sarvam_Creative_API_DubbingPacePreset"},"Sarvam_Creative_API_DubbingRegister":{"type":"string","enum":["formal","common-indic","classic-colloquial","modern-colloquial","academic","auto"],"description":"Translation-style / tone register. Matches content tone, not topic. Defaults to auto-detection by genre when omitted.","title":"Sarvam_Creative_API_DubbingRegister"},"Sarvam_Creative_API_CreateDubbingJobRequest":{"type":"object","properties":{"src_lang":{"$ref":"#/components/schemas/Sarvam_Creative_API_DubbingLanguage","description":"Source language of the input media (BCP-47)."},"target_langs":{"type":"array","items":{"$ref":"#/components/schemas/Sarvam_Creative_API_DubbingLanguage"},"description":"One or more target languages to dub into. A single job dubs into all of them."},"export_options":{"type":"array","items":{"$ref":"#/components/schemas/Sarvam_Creative_API_DubbingExportOption"},"default":["video"],"description":"Which formats to auto-produce per target language."},"voice_cloning":{"type":"boolean","default":true,"description":"Clone the original speaker's voice. Set `false` to use a preset `voice_id` instead."},"voice_id":{"type":["string","null"],"description":"Preset (prebuilt) voice to use when `voice_cloning` is `false`. Single speaker only."},"pace_preset":{"oneOf":[{"$ref":"#/components/schemas/Sarvam_Creative_API_DubbingPacePreset"},{"type":"null"}],"description":"Speech pace preset, used when `voice_cloning` is false."},"num_speakers":{"type":["integer","null"],"default":1,"description":"Number of speakers in the source audio."},"disable_watermark":{"type":"boolean","default":false,"description":"Set `true` for a watermark-free export."},"register":{"oneOf":[{"$ref":"#/components/schemas/Sarvam_Creative_API_DubbingRegister"},{"type":"null"}],"description":"Translation-style / tone register."},"editor_flow":{"type":"boolean","default":false,"description":"Keep `false` for API integrations so exports fire automatically once TTS finishes. When `true`, auto-export is suppressed: the pipeline completes but `export-status` stays empty."},"job_name":{"type":["string","null"],"description":"Human-readable label to identify the job later. Recommended (e.g. the source file's name)."}},"required":["src_lang","target_langs"],"title":"Sarvam_Creative_API_CreateDubbingJobRequest"},"Sarvam_Creative_API_CreateDubbingJobData":{"type":"object","properties":{"job_id":{"type":"string","description":"Unique identifier for the created dubbing job."},"upload_url":{"type":["string","null"],"description":"Short-lived signed URL. `PUT` the raw media bytes here with headers `Content-Type: <mime>` and `x-ms-blob-type: BlockBlob` before starting the job."},"srt_upload_url":{"type":["string","null"],"description":"Signed URL to upload a source SRT file, when applicable."},"expires_in_hours":{"type":["integer","null"],"description":"How long the signed upload URL(s) remain valid, in hours."},"processing_started":{"type":"boolean","default":false,"description":"Whether processing has already begun for this job."},"voice_cloning":{"type":"boolean","default":true},"voice_id":{"type":["string","null"]},"pace_preset":{"type":["string","null"]},"model_tier":{"type":["string","null"],"description":"Echo of the requested quality tier (`plus`/`lite`), or null when the service default was used."}},"title":"Sarvam_Creative_API_CreateDubbingJobData"},"Sarvam_Creative_API_CreateDubbingJobResponse":{"type":"object","properties":{"status":{"type":"string","description":"Response status, e.g. `success`."},"message":{"type":"string"},"data":{"$ref":"#/components/schemas/Sarvam_Creative_API_CreateDubbingJobData"}},"title":"Sarvam_Creative_API_CreateDubbingJobResponse"},"Sarvam_Creative_API_DubbingStartData":{"type":"object","properties":{"job_id":{"type":"string"},"status":{"type":"string","description":"Job status after starting, e.g. `processing`."},"task_id":{"type":["string","null"],"description":"Identifier of the submitted pipeline task."}},"title":"Sarvam_Creative_API_DubbingStartData"},"Sarvam_Creative_API_DubbingStartResponse":{"type":"object","properties":{"status":{"type":"string","description":"Response status, e.g. `success`."},"message":{"type":"string","description":"Human-readable confirmation that the dubbing pipeline has started."},"data":{"$ref":"#/components/schemas/Sarvam_Creative_API_DubbingStartData"}},"title":"Sarvam_Creative_API_DubbingStartResponse"},"Sarvam_Creative_API_DubbingJobStatus":{"type":"string","enum":["queued","in_progress","completed","failed","partial_failure","deleted"],"title":"Sarvam_Creative_API_DubbingJobStatus"},"Sarvam_Creative_API_DubbingLiveStatusExportInfo":{"type":"object","properties":{"target_language":{"type":"string","description":"Target language (BCP-47)."},"status":{"type":"string","description":"Export status, e.g. `completed`, `in_progress`, `failed`."},"dubbed_video_url":{"type":["string","null"],"description":"Signed URL for the dubbed video."},"original_video_url":{"type":["string","null"],"description":"Signed URL for the original video."},"duration":{"type":["number","null"],"format":"double","description":"Video duration in seconds."},"file_size":{"type":["integer","null"],"description":"File size in bytes."}},"title":"Sarvam_Creative_API_DubbingLiveStatusExportInfo"},"Sarvam_Creative_API_DubbingLiveStatusData":{"type":"object","properties":{"job_id":{"type":"string"},"job_name":{"type":["string","null"]},"status":{"$ref":"#/components/schemas/Sarvam_Creative_API_DubbingJobStatus"},"current_step":{"type":["string","null"],"description":"Current pipeline step key."},"current_step_label":{"type":["string","null"],"description":"Human-readable label of the current pipeline step."},"progress":{"type":"integer","default":0,"description":"Overall progress percentage (0–100)."},"export":{"oneOf":[{"$ref":"#/components/schemas/Sarvam_Creative_API_DubbingLiveStatusExportInfo"},{"type":"null"}],"description":"Export status when the job has a single target language."},"exports":{"type":["array","null"],"items":{"$ref":"#/components/schemas/Sarvam_Creative_API_DubbingLiveStatusExportInfo"},"description":"Export status per language when the job has multiple target languages."},"error_message":{"type":["string","null"],"description":"Populated when `status` is `failed`."}},"title":"Sarvam_Creative_API_DubbingLiveStatusData"},"Sarvam_Creative_API_DubbingLiveStatusResponse":{"type":"object","properties":{"status":{"type":"string","description":"Response status, e.g. `success`."},"message":{"type":"string"},"data":{"$ref":"#/components/schemas/Sarvam_Creative_API_DubbingLiveStatusData"}},"title":"Sarvam_Creative_API_DubbingLiveStatusResponse"},"Sarvam_Creative_API_DubbingExportType":{"type":"string","enum":["video","audio","mp3","srt"],"description":"Export format. `audio` is uncompressed `.wav`; `mp3` is the same track re-encoded.","title":"Sarvam_Creative_API_DubbingExportType"},"Sarvam_Creative_API_DubbingExportItemStatus":{"type":"string","enum":["in_progress","completed","failed"],"title":"Sarvam_Creative_API_DubbingExportItemStatus"},"Sarvam_Creative_API_DubbingExportItem":{"type":"object","properties":{"id":{"type":"string","description":"Export record ID."},"export_type":{"$ref":"#/components/schemas/Sarvam_Creative_API_DubbingExportType"},"target_language":{"type":"string","description":"The target language (BCP-47) of this export."},"status":{"$ref":"#/components/schemas/Sarvam_Creative_API_DubbingExportItemStatus"},"created_at":{"type":["string","null"],"format":"date-time","description":"When the export was triggered."},"completed_at":{"type":["string","null"],"format":"date-time","description":"When the export finished (if completed)."},"is_stale":{"type":"boolean","default":false,"description":"True if translate chunks for this language were modified after the export completed, so the output no longer reflects the latest edits."},"download_url":{"type":["string","null"],"description":"Signed, time-limited (~24h) download URL. Present once `status` is `completed`."}},"title":"Sarvam_Creative_API_DubbingExportItem"},"Sarvam_Creative_API_DubbingExportStatusData":{"type":"object","properties":{"exports":{"type":"array","items":{"$ref":"#/components/schemas/Sarvam_Creative_API_DubbingExportItem"},"description":"One entry per (target_language, export_type)."}},"title":"Sarvam_Creative_API_DubbingExportStatusData"},"Sarvam_Creative_API_DubbingExportStatusResponse":{"type":"object","properties":{"status":{"type":"string","description":"Response status, e.g. `success`."},"message":{"type":"string"},"data":{"$ref":"#/components/schemas/Sarvam_Creative_API_DubbingExportStatusData"}},"title":"Sarvam_Creative_API_DubbingExportStatusResponse"},"DocAIPresignUploadRequest":{"type":"object","properties":{"content_type":{"type":"string","description":"MIME type the client will PUT; when set, the upload's Content-Type header must match."}},"title":"DocAIPresignUploadRequest"},"DocAIPresignUploadResponse":{"type":"object","properties":{"upload_id":{"type":"string","description":"Handle for the uploaded file. Pass it through `upload_ids` on a later digitise or extract job request."},"method":{"type":"string","description":"HTTP method to use for the upload (e.g. `PUT`)."},"url":{"type":"string","description":"Presigned URL to upload the file to."},"headers":{"type":"object","additionalProperties":{"type":"string"},"description":"Headers that must be sent with the upload request."},"expires_at":{"type":"string","description":"Timestamp after which the upload URL is no longer valid."}},"required":["upload_id","method","url","expires_at"],"title":"DocAIPresignUploadResponse"},"DocAIErrorDetail":{"type":"object","properties":{"location":{"type":"string","description":"Where the error occurred, e.g. 'body.items[3].tags' or 'path.thing-id'."},"message":{"type":"string","description":"Error message text."},"value":{"description":"The value at the given location."}},"title":"DocAIErrorDetail"},"DocAIErrorModel":{"type":"object","properties":{"type":{"type":"string","format":"uri","default":"about:blank","description":"A URI reference to human-readable documentation for the error."},"title":{"type":"string","description":"A short, human-readable summary of the problem type."},"status":{"type":"integer","description":"HTTP status code."},"detail":{"type":"string","description":"A human-readable explanation specific to this occurrence of the problem."},"instance":{"type":"string","format":"uri","description":"A URI reference that identifies the specific occurrence of the problem."},"errors":{"type":["array","null"],"items":{"$ref":"#/components/schemas/DocAIErrorDetail"},"description":"Optional list of individual error details."}},"title":"DocAIErrorModel"},"DocAiV1JobDigitisePostRequestBodyContentMultipartFormDataSchemaOutputFormat":{"type":"string","enum":["html","md"],"default":"html","description":"Output format of the digitised document.","title":"DocAiV1JobDigitisePostRequestBodyContentMultipartFormDataSchemaOutputFormat"},"DocAiV1JobDigitisePostRequestBodyContentMultipartFormDataSchemaContentType":{"type":"string","enum":["printed","handwritten","mixed"],"default":"printed","description":"Nature of the document content.","title":"DocAiV1JobDigitisePostRequestBodyContentMultipartFormDataSchemaContentType"},"DocAIStartJobResponse":{"type":"object","properties":{"job_id":{"type":"string","description":"The unique identifier of the job."},"status":{"type":"string","description":"Current status of the job."},"run_id":{"type":"string","description":"The unique identifier of the job run."}},"required":["job_id","status","run_id"],"title":"DocAIStartJobResponse"},"DocAiV1JobExtractPostRequestBodyContentMultipartFormDataSchemaOutputFormat":{"type":"string","enum":["json","csv","xlsx"],"default":"json","description":"Output format of the extraction results.","title":"DocAiV1JobExtractPostRequestBodyContentMultipartFormDataSchemaOutputFormat"},"DocAIUsage":{"type":"object","properties":{"pages_total":{"type":"integer","description":"Total pages in the job."},"pages_processed":{"type":"integer","description":"Pages processed so far."},"pages_succeeded":{"type":"integer","description":"Pages processed successfully."},"pages_failed":{"type":"integer","description":"Pages that failed processing."}},"title":"DocAIUsage"},"DocAIJobStatusResponse":{"type":"object","properties":{"job_id":{"type":"string","description":"The unique identifier of the job."},"status":{"type":"string","description":"Current status of the job. Terminal statuses: `completed`, `partially_completed`, `failed`, `rejected`."},"pipeline":{"type":"string","description":"Job pipeline: `digitise` or `extract`."},"usage":{"$ref":"#/components/schemas/DocAIUsage"},"created_at":{"type":"string","description":"Job creation timestamp."},"updated_at":{"type":"string","description":"Timestamp of the last job update."}},"required":["job_id","status","pipeline","usage","created_at","updated_at"],"title":"DocAIJobStatusResponse"},"DocAiV1JobJobIdResultsGetResponsesContentApplicationJsonSchemaDiscriminatorMappingExtractResult":{"type":"object","properties":{},"description":"Structured field values, shaped by the schema or `config_id` used to create the job.","title":"DocAiV1JobJobIdResultsGetResponsesContentApplicationJsonSchemaDiscriminatorMappingExtractResult"},"DocAiV1JobJobIdResultsGetResponsesContentApplicationJsonSchemaDiscriminatorMappingExtractAnnotations":{"type":"object","properties":{},"description":"Mirrors `result`, with each leaf replaced by its `confidence` and `sources`.","title":"DocAiV1JobJobIdResultsGetResponsesContentApplicationJsonSchemaDiscriminatorMappingExtractAnnotations"},"DocAiV1JobJobIdResultsGetResponsesContentApplicationJsonSchemaDiscriminatorMappingDigitiseDocumentsItemsPagesItems":{"type":"object","properties":{"page_number":{"type":"integer"},"content":{"type":"string","description":"Page content in the requested output_format (HTML or Markdown)."}},"title":"DocAiV1JobJobIdResultsGetResponsesContentApplicationJsonSchemaDiscriminatorMappingDigitiseDocumentsItemsPagesItems"},"DocAiV1JobJobIdResultsGetResponsesContentApplicationJsonSchemaDiscriminatorMappingDigitiseDocumentsItems":{"type":"object","properties":{"file_name":{"type":"string"},"pages":{"type":"array","items":{"$ref":"#/components/schemas/DocAiV1JobJobIdResultsGetResponsesContentApplicationJsonSchemaDiscriminatorMappingDigitiseDocumentsItemsPagesItems"}}},"title":"DocAiV1JobJobIdResultsGetResponsesContentApplicationJsonSchemaDiscriminatorMappingDigitiseDocumentsItems"},"docAI_get_results_Response_200":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["extract"],"description":"Discriminator value: extract"},"job_id":{"type":"string","description":"The unique identifier of the job."},"status":{"type":"string","description":"Terminal status of the job: `completed`, `partially_completed`, `failed`, or `rejected`."},"usage":{"$ref":"#/components/schemas/DocAIUsage"},"result":{"$ref":"#/components/schemas/DocAiV1JobJobIdResultsGetResponsesContentApplicationJsonSchemaDiscriminatorMappingExtractResult","description":"Structured field values, shaped by the schema or `config_id` used to create the job."},"annotations":{"$ref":"#/components/schemas/DocAiV1JobJobIdResultsGetResponsesContentApplicationJsonSchemaDiscriminatorMappingExtractAnnotations","description":"Mirrors `result`, with each leaf replaced by its `confidence` and `sources`."},"version":{"type":"integer","description":"Version of the schema or config used."}},"required":["type","job_id","status","usage","result","annotations","version"],"description":"Job results for the `extract` pipeline."},{"type":"object","properties":{"type":{"type":"string","enum":["digitise"],"description":"Discriminator value: digitise"},"job_id":{"type":"string","description":"The unique identifier of the job."},"status":{"type":"string","description":"Terminal status of the job: `completed`, `partially_completed`, `failed`, or `rejected`."},"usage":{"$ref":"#/components/schemas/DocAIUsage"},"documents":{"type":"array","items":{"$ref":"#/components/schemas/DocAiV1JobJobIdResultsGetResponsesContentApplicationJsonSchemaDiscriminatorMappingDigitiseDocumentsItems"},"description":"One entry per input document, each holding per-page content."}},"required":["type","job_id","status","usage","documents"],"description":"Job results for the `digitise` pipeline."}],"discriminator":{"propertyName":"type"},"title":"docAI_get_results_Response_200"},"DocAIDownloadURLResponse":{"type":"object","properties":{"method":{"type":"string","description":"HTTP method to use for the download (e.g. `GET`)."},"url":{"type":"string","description":"Presigned URL to download the job output from."},"headers":{"type":"object","additionalProperties":{"type":"string"},"description":"Headers that must be sent with the download request."},"expires_at":{"type":"string","description":"Timestamp after which the download URL is no longer valid."}},"required":["method","url","expires_at"],"title":"DocAIDownloadURLResponse"},"Sarvam_Model_API_SpeechToTextTranslateModel":{"type":"string","enum":["saaras:v2.5"],"description":"Model to be used for speech to text translation.\n\n- **saaras:v2.5** (default): Translation model that translates audio from any spoken Indic language to English.\n  - Example: Hindi audio → English text output\n\nFor the latest model (saaras:v3), use the `/speech-to-text` endpoint with `mode=\"translate\"`.","title":"Sarvam_Model_API_SpeechToTextTranslateModel"},"Sarvam_Model_API_SpeechToTextTranslateLanguage":{"type":"string","enum":["hi-IN","bn-IN","kn-IN","ml-IN","mr-IN","od-IN","pa-IN","ta-IN","te-IN","gu-IN","en-IN","as-IN","ur-IN","ne-IN","kok-IN","ks-IN","sd-IN","sa-IN","sat-IN","mni-IN","brx-IN","mai-IN","doi-IN"],"description":"Languages supported for Speech-to-Text-Translate (detected source language).\n\n**saaras:v2.5 supports (11 languages):** hi-IN, bn-IN, kn-IN, ml-IN, mr-IN, od-IN, pa-IN, ta-IN, te-IN, gu-IN, en-IN\n\nFor additional languages (as-IN, ur-IN, ne-IN, kok-IN, ks-IN, sd-IN, sa-IN, sat-IN, mni-IN, brx-IN, mai-IN, doi-IN), use saaras:v3 via the `/speech-to-text` endpoint with `mode=\"translate\"`.","title":"Sarvam_Model_API_SpeechToTextTranslateLanguage"},"Sarvam_Model_API_DiarizedEntry":{"type":"object","properties":{"transcript":{"type":"string","description":"transcript of the segment of that audio"},"start_time_seconds":{"type":"number","format":"double","description":"Start time of the word in seconds."},"end_time_seconds":{"type":"number","format":"double","description":"End time of the word in seconds."},"speaker_id":{"type":"string","description":"Speaker ID for the word."}},"required":["transcript","start_time_seconds","end_time_seconds","speaker_id"],"title":"Sarvam_Model_API_DiarizedEntry"},"Sarvam_Model_API_DiarizedTranscript":{"type":"object","properties":{"entries":{"type":"array","items":{"$ref":"#/components/schemas/Sarvam_Model_API_DiarizedEntry"},"description":"List of diarized transcript entries."}},"required":["entries"],"title":"Sarvam_Model_API_DiarizedTranscript"},"Sarvam_Model_API_SpeechToTextTranslateResponse":{"type":"object","properties":{"request_id":{"type":["string","null"]},"transcript":{"type":"string","description":"Transcript of the provided speech"},"language_code":{"oneOf":[{"$ref":"#/components/schemas/Sarvam_Model_API_SpeechToTextTranslateLanguage"},{"type":"null"}],"description":"This will return the BCP-47 code of language spoken in the input. If multiple languages are detected, this will return language code of most predominant spoken language. If no language is detected, this will be null"},"diarized_transcript":{"oneOf":[{"$ref":"#/components/schemas/Sarvam_Model_API_DiarizedTranscript"},{"type":"null"}],"description":"Diarized transcript of the provided speech. Always `null` on the REST API — diarization is only available via the Batch API."},"language_probability":{"type":["number","null"],"format":"double","description":"Float value (0.0 to 1.0) indicating the probability of the detected language being correct. Higher values indicate higher confidence.\n\n**When it returns a value:**\n- When `language_code` is not provided in the request\n- When `language_code` is set to `unknown`\n\n**When it returns null:**\n- When a specific `language_code` is provided (language detection is skipped)\n\nThe parameter is always present in the response."}},"required":["request_id","transcript","language_code"],"title":"Sarvam_Model_API_SpeechToTextTranslateResponse"},"SpeechToTextTranslateJobParameters":{"type":"object","properties":{"prompt":{"type":["string","null"],"description":"Prompt to assist the transcription"},"model":{"$ref":"#/components/schemas/Sarvam_Model_API_SpeechToTextTranslateModel","description":"Model to be used for speech to text translation.\n\n- **saaras:v2.5** (default): Translation model that translates audio from any spoken Indic language to English.\n  - Example: Hindi audio → English text output\n\nFor the latest model (saaras:v3), use the `/speech-to-text` endpoint with `mode=\"translate\"`."},"with_diarization":{"type":"boolean","default":false,"description":"Enables speaker diarization, which identifies and separates different speakers in the audio.\n When set to true, the API will provide speaker-specific segments in the response.\n Note: This parameter is currently in Beta mode."},"num_speakers":{"type":["integer","null"],"description":"Number of speakers to be detected in the audio. This is used when with_diarization is set to true."},"input_audio_codec":{"$ref":"#/components/schemas/Sarvam_Model_API_InputAudioCodec","description":"Audio codec/format of uploaded files. The API automatically detects most formats; for PCM files (pcm_s16le, pcm_l16, pcm_raw), you must specify this parameter. PCM files are supported only at 16kHz sample rate."}},"title":"SpeechToTextTranslateJobParameters"},"BulkJobInitRequestV1_SpeechToTextTranslateJobParameters_":{"type":"object","properties":{"job_parameters":{"$ref":"#/components/schemas/SpeechToTextTranslateJobParameters","description":"Job Parameters for the bulk job"},"callback":{"oneOf":[{"$ref":"#/components/schemas/BulkJobCallback"},{"type":"null"}],"description":"Parameters for callback URL"}},"required":["job_parameters"],"title":"BulkJobInitRequestV1_SpeechToTextTranslateJobParameters_"},"DocDigitizationSupportedLanguage":{"type":"string","enum":["hi-IN","en-IN","bn-IN","gu-IN","kn-IN","ml-IN","mr-IN","od-IN","pa-IN","ta-IN","te-IN","ur-IN","as-IN","brx-IN","doi-IN","ks-IN","kok-IN","mai-IN","mni-IN","ne-IN","sa-IN","sat-IN","sd-IN"],"description":"BCP-47 language code specifying the primary language of the document. Supports 23 languages: 22 Indian languages (Hindi, Bengali, Tamil, Telugu, Marathi, Gujarati, Kannada, Malayalam, Odia, Punjabi, Assamese, Urdu, Sanskrit, Nepali, Konkani, Maithili, Sindhi, Kashmiri, Dogri, Manipuri, Bodo, Santali) and English language.","title":"DocDigitizationSupportedLanguage"},"DocDigitizationOutputFormat":{"type":"string","enum":["html","md","json"],"description":" Output format for extracted document content, delivered as a ZIP file. 'html' returns structured HTML files, 'md' returns human-readable Markdown files, 'json' returns structured JSON files for programmatic processing.","title":"DocDigitizationOutputFormat"},"DocDigitizationJobParameters":{"type":"object","properties":{"language":{"$ref":"#/components/schemas/DocDigitizationSupportedLanguage","description":"Primary language of the document in BCP-47 format (e.g. en-IN, hi-IN). Use this field name — not language_code (which other Sarvam APIs use). Sending language_code is ignored and defaults to hi-IN."},"output_format":{"$ref":"#/components/schemas/DocDigitizationOutputFormat","description":"Output format for the extracted content (delivered as a ZIP file). Accepted values: md, html, json. Use md for Markdown — not markdown (returns 400)."}},"description":"Configuration parameters for Document Intelligence job. Specify the document language and desired output format.","title":"DocDigitizationJobParameters"},"DocDigitizationCreateJobRequest":{"type":"object","properties":{"job_parameters":{"$ref":"#/components/schemas/DocDigitizationJobParameters","description":"Configuration parameters for the Document Intelligence job including language and output format. Defaults to Hindi (hi-IN) and Markdown output if omitted."}},"description":"Request body for creating a new document intelligence job","title":"DocDigitizationCreateJobRequest"},"DocDigitizationJobState":{"type":"string","enum":["Accepted","Pending","Running","Completed","PartiallyCompleted","Failed"],"description":"Current state of the document intelligence job","title":"DocDigitizationJobState"},"DocDigitizationCreateJobResponse":{"type":"object","properties":{"job_id":{"type":"string","format":"uuid","description":"Unique job identifier (UUID)"},"storage_container_type":{"$ref":"#/components/schemas/StorageContainerType","description":"Storage Container Type"},"job_parameters":{"$ref":"#/components/schemas/DocDigitizationJobParameters","description":"  Job configuration parameters"},"job_state":{"$ref":"#/components/schemas/DocDigitizationJobState"}},"required":["job_id","storage_container_type","job_parameters","job_state"],"title":"DocDigitizationCreateJobResponse"},"DocDigitizationErrorCode":{"type":"string","enum":["invalid_request_error","internal_server_error","insufficient_quota_error","invalid_api_key_error","rate_limit_exceeded_error","high_load_error"],"title":"DocDigitizationErrorCode"},"DocDigitizationErrorDetails":{"type":"object","properties":{"message":{"type":"string","description":"Message describing the error"},"code":{"$ref":"#/components/schemas/DocDigitizationErrorCode","description":"Error code for the specific error that has occurred."},"request_id":{"type":"string","default":"","description":"Unique identifier for the request. Format: date_UUID4"}},"required":["message","code"],"title":"DocDigitizationErrorDetails"},"DocDigitizationErrorMessage":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/DocDigitizationErrorDetails","description":"Error details"}},"required":["error"],"title":"DocDigitizationErrorMessage"},"DocDigitizationUploadFilesRequest":{"type":"object","properties":{"job_id":{"type":"string","description":"Job identifier returned from Create Job"},"files":{"type":"array","items":{"type":"string"},"description":"List of filenames to upload (exactly 1 file: PDF or ZIP)"}},"required":["job_id","files"],"description":"Request to get upload URLs for job files","title":"DocDigitizationUploadFilesRequest"},"DocDigitizationUploadFilesResponse":{"type":"object","properties":{"job_id":{"type":"string","format":"uuid","description":"Job identifier"},"job_state":{"$ref":"#/components/schemas/DocDigitizationJobState","description":"Current job state"},"upload_urls":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/FileSignedURLDetails"},"description":"Map of filename to presigned upload URL details"},"storage_container_type":{"$ref":"#/components/schemas/StorageContainerType","description":"Storage backend type"}},"required":["job_id","job_state","upload_urls","storage_container_type"],"description":"Response with presigned upload URLs","title":"DocDigitizationUploadFilesResponse"},"DocDigitizationJobDetailState":{"type":"string","enum":["Pending","Running","Success","PartialSuccess","Failed"],"description":"Processing state for individual file","title":"DocDigitizationJobDetailState"},"DocDigitizationPageError":{"type":"object","properties":{"page_number":{"type":"integer","description":"Page number that failed"},"error_code":{"type":"string","description":"Standardized error code"},"error_message":{"type":"string","description":"Human-readable error description"}},"required":["page_number","error_code","error_message"],"description":"Error details for a specific page.","title":"DocDigitizationPageError"},"DocDigitizationJobDetail":{"type":"object","properties":{"inputs":{"type":"array","items":{"$ref":"#/components/schemas/TaskFileDetails"},"description":"Input file(s) for this task"},"outputs":{"type":"array","items":{"$ref":"#/components/schemas/TaskFileDetails"},"description":"Output file(s) produced"},"state":{"$ref":"#/components/schemas/DocDigitizationJobDetailState","description":"Processing state for this file"},"total_pages":{"type":"integer","default":0,"description":"Total pages/images in the input file"},"pages_processed":{"type":"integer","default":0,"description":"Number of pages processed so far"},"pages_succeeded":{"type":"integer","default":0,"description":"Number of pages successfully processed"},"pages_failed":{"type":"integer","default":0,"description":"Number of pages that failed processing"},"error_message":{"type":"string","default":"","description":"Error message if processing failed"},"error_code":{"type":["string","null"],"description":"Standardized error code if failed"},"page_errors":{"type":"array","items":{"$ref":"#/components/schemas/DocDigitizationPageError"},"description":"Detailed errors for each failed page"}},"required":["inputs","outputs","state"],"description":"Processing details for a single input file with page-level metrics.","title":"DocDigitizationJobDetail"},"DocDigitizationJobStatusResponse":{"type":"object","properties":{"job_id":{"type":"string","format":"uuid","description":"Job identifier (UUID)"},"job_state":{"$ref":"#/components/schemas/DocDigitizationJobState","description":"Current job state"},"created_at":{"type":"string","format":"date-time","description":"Job creation timestamp (ISO 8601)"},"updated_at":{"type":"string","format":"date-time","description":"Last update timestamp (ISO 8601)"},"storage_container_type":{"$ref":"#/components/schemas/StorageContainerType","description":"Storage backend type"},"total_files":{"type":"integer","default":0,"description":"Total input files (always 1)"},"successful_files_count":{"type":"integer","default":0,"description":"Files that completed successfully"},"failed_files_count":{"type":"integer","default":0,"description":"Files that failed"},"error_message":{"type":"string","default":"","description":"Job-level error message"},"job_details":{"type":"array","items":{"$ref":"#/components/schemas/DocDigitizationJobDetail"},"description":"Per-file processing details with page metrics"}},"required":["job_id","job_state","created_at","updated_at","storage_container_type"],"description":"Response model for job status endpoint.","title":"DocDigitizationJobStatusResponse"},"DocDigitizationDownloadFilesResponse":{"type":"object","properties":{"job_id":{"type":"string","format":"uuid","description":"Job identifier (UUID)"},"job_state":{"$ref":"#/components/schemas/DocDigitizationJobState","description":"Current job state"},"storage_container_type":{"$ref":"#/components/schemas/StorageContainerType","description":"Storage backend type"},"download_urls":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/FileSignedURLDetails"},"description":"Map of filename to presigned download URL details"},"error_code":{"type":["string","null"]},"error_message":{"type":["string","null"]}},"required":["job_id","job_state","storage_container_type","download_urls"],"description":"Response for download-files endpoint.","title":"DocDigitizationDownloadFilesResponse"}},"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"api-subscription-key"},"HTTPBearer":{"type":"http","scheme":"bearer"}}}}