After hours of messing around with the DeepL API and HTTP, I finally managed to get a JSON response object for translation, but it contains only one translation in the JSON.
However, when I use the DeepL desktop application, and I enter a sentence that results in multiple alternative translations, if I then use the same sentence as an API call (REST) in my application, it only returns one translation.
I could have sworn that in my hours of playing around, I saw multiple translation JSON objects, but that doesn't seem to be the case anymore.
Is there an additional parameter you have to pass for alternatives?
Note - I am using the DeepL Free API version.
Thanks.
The DeepL API does not currently offer translation alternatives, this feature is only available in the web translator and desktop apps.
The response JSON contains a translations array with one translation object per input. If you provide multiple input texts, the response will contain multiple translation objects; maybe this is what you remember. You can find documentation about the response here: https://www.deepl.com/docs-api/translating-text/response/
The free and paid API versions accept the same input parameters and provide the same responses. However the endpoint is different (api.deepl.com and api-free.deepl.com), and there are differences in usage limits and data security, see https://www.deepl.com/pro#developer
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With