Article 25/05/2022

How much does the API cost?

The price per million characters is 5$.

Is there a free plan?

When you create the API key on the account page you receive 1$. So you can translate 200 000 characters for free.

Where can I get the authorization key?

Before using the API you need to create the account and then generate the API key at the bottom of the page. You must use this authorization key to authorize requests.

Do I have a request limit per month?

You don’t have any limit per month. You only have a character limit. You can use the API till you have money on your balance.

How can I translate HTML?

You need to add the parameter “translateMode” with the value “html” to the translate method.

How can I make a particular word non-translatable?

You just need to add one of the tags: "t", "notranslate", "shade". Here is an example from a text with the non-translatable world of Lingvanex:

<p>Do you use <notranslate>Lingvanex</notranslate> translator?</p>
<p> Hello <t> World </t> </p>
Thank you <shade>🙏</shade> Everything is fine now.

If you use "translateMode": "html"

<p class="notranslate">Sample</p>
<p translate="no">Sample</p>

How does Translator count characters?

Translator counts every code point defined in Unicode as a character except html tags If you use "translateMode": "html" and non-translatable tags if you don't use "translateMode": "html". Each translation counts as a separate translation, even if the request was made in a single API call translating to multiple languages. The length of the response doesn't matter and the number of requests, words, bytes, or sentences isn't relevant to character count.

Translator counts the following input:

  • Text passed to Translator in the body of a request.
  • An individual letter.
  • Punctuation.
  • A space, tab, markup, or any white-space character.
  • A repeated translation, even if you've previously translated the same text. Every character submitted to the translate function is counted even when the content is unchanged or the source and target language are the same.

For HTML translation html tags aren't counted. For example, when you translate <h1>Hello</h1> translator counts only 5 characters, not 14.

Non-translatable tags aren't counted when you don't use "translateMode": "html". For example, when you translate <notranslate>Hello</notranslate> translator counts only 5 characters, not 32.

Where can I see my monthly usage?

You can track your spending in your Lingvanex account.

  1. Log in to the Lingvanex website.
  2. Go to the Cloud API tab.
  3. At the bottom, under your API key, you will see the amount you spent in the translation service.

What translation limits does API have (chars in requests, requests per second, etc.)?

We recommend not to send more than 10 parallel requests per second. We don’t have concrete limits for maximum characters per request right now. But probably, we will add a limit for 20 000 characters per request soon for optimal performance and response time. So if you want to translate a text that has more than 20 000 characters it’s better to divide it into several requests and send them sequentially.