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}'
Copy
{ "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}
Endpoints
Translation API
Translation is a REST API that quickly translates English content into Indic languages, supporting single or multiple sentences.
POST
/
Copy
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}'
Copy
{ "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}
Copy
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}'
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.
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
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).
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.
Specify whether you want to filter out profane content from the input.
Note - By default, the filterProfane= true
Copy
{ "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}
Status of API Moderated / Partial / Unmoderated (Aggregate of all segments). Refer to API Messages for available apiStatus and its description.Example: 3