We have a hidden synchronous translation endpoint that we only share the documentation for after we ensure that the client is aware of its limitations. The synchronous translation endpoint is recommended for integration where there is absolute certainty that the input source is always no longer than 1,000 characters, or 200 words. This limitation is in place to minimize the chance that a timeout happens (usually 60 secs) because the application is still waiting for a response from Language Weaver.
Because Language Weaver is a multi-tenant SaaS and there are certain user features that can impact the speed of translation, these factors lead to variable observed translation speed from translation request to translation request.
If you can assure through your workflow integration that the input for the synchronous translation request will be no longer than 1,000 characters, then we can provide the offline REST API documentation that includes the hidden sync translation endpoint. Please discuss this with your technical account manager.
One of the things we recommend to our customers who need to handle more than 1,000 chars occasionally is to build in a logic that checks the input and route it through different endpoints based on the char count.
An example pseudo code:
inputLength = countChar(input)
if (inputLength <= 1000), then
syncTranslate(input)
else
asyncTranslate(input)
wait (inputLength/300) #assuming a speed of 300 characters/sec. Feel free to reduce this wait time