POST
/
transliterate
curl --request POST \
  --url https://api.sarvam.ai/transliterate \
  --header 'Content-Type: application/json' \
  --data '{
  "input": "<string>",
  "source_language_code": "en-IN",
  "target_language_code": "en-IN",
  "numerals_format": "international",
  "spoken_form_numerals_language": "native",
  "spoken_form": false
}'
{
  "request_id": "<string>",
  "transliterated_text": "<string>"
}

Headers

api-subscription-key
string
default:

Your unique subscription key for authenticating requests to the Sarvam AI Speech-to-Text API. Here are the steps to get your api key

Body

application/json
input
string
required

The text you want to transliterate.

Maximum length: 1000
source_language_code
enum<string>
required

The language code of the input text. This specifies the source language for transliteration.

Note: The source language should either be an Indic language or English. As we supports both Indic-to-English and English-to-Indic transliteration.

Available options:
en-IN,
hi-IN,
bn-IN,
gu-IN,
kn-IN,
ml-IN,
mr-IN,
od-IN,
pa-IN,
ta-IN,
te-IN
target_language_code
enum<string>
required

The language code of the transliteration text. This specifies the target language for transliteration.

Note:The target language should either be an Indic language or English. As we supports both Indic-to-English and English-to-Indic transliteration.

Available options:
en-IN,
hi-IN,
bn-IN,
gu-IN,
kn-IN,
ml-IN,
mr-IN,
od-IN,
pa-IN,
ta-IN,
te-IN
numerals_format
enum<string>

numerals_format is an optional parameter with two options:

  • international (default): Uses regular numerals (0-9).
  • native: Uses language-specific native numerals.

Example:

  • If international format is selected, we use regular numerals (0-9). For example: मेरा phone number है: 9840950950.
  • If native format is selected, we use language-specific native numerals, like: मेरा phone number है: ९८४०९५०९५०.
Available options:
international,
native
spoken_form_numerals_language
enum<string>

spoken_form_numerals_language is an optional parameter with two options and only works when spoken_form is true:

  • english : Numbers in the text will be spoken in English.
  • native(default): Numbers in the text will be spoken in the native language.

Examples:

  • Input: "मेरे पास ₹200 है"
    • If english format is selected: "मेरे पास टू हन्डर्ड रूपीस है"
    • If native format is selected: "मेरे पास दो सौ रुपये है"
Available options:
english,
native
spoken_form
boolean
default:
false
  • Default: False
  • Converts text into a natural spoken form when True.
  • Note: No effect if output language is en-IN.

Example:

  • Input: मुझे कल 9:30am को appointment है
    • Output: मुझे कल सुबह साढ़े नौ बजे को अपॉइंटमेंट है

Response

200
application/json
Successful Response
request_id
string | null
required
transliterated_text
string
required

Transliterated text result in the requested target language.