POST
curl --location --request POST 'https://revapi.reverieinc.com/' \
--header 'Content-Type: application/json' \
--header 'REV-API-KEY: <YOUR API KEY>' \
--header 'REV-APP-ID: <YOUR APP-ID>' \
--header 'src_lang: en' \
--header 'tgt_lang: hi' \
--header 'domain: generic' \
--header 'REV-APPNAME: localization' \
--header 'REV-APPVERSION: 3.0' \
--data '{
   "data": [
       "Reverie Language Technologies was established in 2009.",
       "The company head office is located in Bengaluru."
   ],
  "nmtMask": true,
   "nmtMaskTerms": {
       "Reverie Language Technologies":"Reverie Language Technologies"
   },
   "enableNmt": true,
   "enableLookup": true
}'

{
   "responseList": [
       {
           "inString": "Reverie Language Technologies was established in 2009.",
           "outString": "Reverie Language Technologies की स्थापना 2009 में की गई थी।",
           "apiStatus": 3
       },
       {
           "inString": "The company head office is located in Bengaluru.",
           "outString": "कंपनी का मुख्यालय बेंगलुरु में स्थित है।",
           "apiStatus": 3
       }
   ],
   "tokenConsumed": 102
}

curl --location --request POST 'https://revapi.reverieinc.com/' \
--header 'Content-Type: application/json' \
--header 'REV-API-KEY: <YOUR API KEY>' \
--header 'REV-APP-ID: <YOUR APP-ID>' \
--header 'src_lang: en' \
--header 'tgt_lang: hi' \
--header 'domain: generic' \
--header 'REV-APPNAME: localization' \
--header 'REV-APPVERSION: 3.0' \
--data '{
   "data": [
       "Reverie Language Technologies was established in 2009.",
       "The company head office is located in Bengaluru."
   ],
  "nmtMask": true,
   "nmtMaskTerms": {
       "Reverie Language Technologies":"Reverie Language Technologies"
   },
   "enableNmt": true,
   "enableLookup": true
}'

Headers

Content-Type
string
required

The format of the data to be posted: “application/json”

REV-API-KEY
string
required

A unique key/token provided by Reverie to identify the user using the Translation API.

REV-APP-ID
string
required

The unique account ID to identify the user and the default account settings.

REV-APPNAME
string
required

The parameter to identify the API : “localization”

REV-APPVERSION
string
required

The version refers to the specific iteration of the API that is being called. : “2.0/3.0” Note: The default version is “2.0”.

src_lang
string
required

The language of the input text Codes: hi, en, as, bn, gu, kn, kok, ml, mr, mai, or, pa, ta, te, ne, ur

tgt_lang
string
required

Language to which you want to localize the input text Codes: hi, en, as, bn, gu, kn, kok, ml, mr, mai, or, pa, ta, te, ne, ur

domain
string
required

Domain for APPVERSION 2.0: 0, 1, 2, 3, 4, 5, 6, 7, 8 Domain for APPVERSION 3.0: generic, government, travel, ecommerce, infotainment, bfsi, food, education, medical

Body

data
string[]
required

List of input text for Translation.

enableNmt
boolean

Specify whether the content Translation process should use NMT technology or not.

  • For Example, When the enableNmt value is true, the system will initially refer to the Lookup database to localize content. If the content is not available in the database, then the NMT is used for translation.
  • Note - By default, the enableNmt= true
enableTransliteration
boolean

Specify whether the content Translation process should use transliteration technology or not.

  • For Example, When the enableTransliteration value is true, the system will initially refer to the Lookup database to localize content. If the content is not available in the database, then nmt is used for translation. If nmt fails, transliteration is called.
  • Note - By default, the enableTransliteration= true
enableLookup
boolean

The parameter will specify whether the application should refer to the Lookup DB or not.

  • For Example, when the enableLookup is true, the system will initially refer to the Database to fetch contents.
  • Note - By default, the enableLookup= true
nmtMask
boolean

The feature to screen the non-dictionary words used in a sentence. In other words, the mask will indicate the words that should not be translated into the target language.

  • Note - By default, the enableLookup= true
  • Note - To set the nmtMask = true, it is mandatory the src_lang = en (English).
nmtMaskTerms
array[]

Determines the words that are to be masked.

  • Note - On defining values in the nmtMaskTerms, then automatically the nmtMask is set to true.
  • Example - Masking a term:
    nmtMaskTerms: ["Reverie Language Technologies"]
    Here, the API will mask the term Reverie Language Technologies, if found in the source content, and will transliterate the word.
filterProfane
boolean

Specify whether you want to filter out profane content from the input.

  • Note - By default, the filterProfane= true
{
   "responseList": [
       {
           "inString": "Reverie Language Technologies was established in 2009.",
           "outString": "Reverie Language Technologies की स्थापना 2009 में की गई थी।",
           "apiStatus": 3
       },
       {
           "inString": "The company head office is located in Bengaluru.",
           "outString": "कंपनी का मुख्यालय बेंगलुरु में स्थित है।",
           "apiStatus": 3
       }
   ],
   "tokenConsumed": 102
}

Response

responseList
Object
required

An array of translation responses

tokenConsumed
integer
required

The payload length served by NMT. Note: If LookUp DB serves the payload and the content is moderated, then tokenConsumed = 0.

Example: 102