mbi/django-rosetta

DeepL Pro support

nullcode opened this issue · 3 comments

Pro API is not supported, the free API is hardcoded and using a Pro API key won't work since its posting it to the wrong API endpoint.

See the simulator where you can choose which API you are using (DeepL API Free or DeepL API Pro).
https://www.deepl.com/docs-api/simulator/

As a solution a new settings variable could be introduced to either choose which version you are using (free, pro) or to configure the API endpoint url.

mbi commented

Is there a way to automatically detect whether a key is for the free or pro service?

Yes, as per DeepL docs:

DeepL API Free authentication keys can be identified easily by the suffix ":fx" (e.g., 279a2e9d-83b3-c416-7e2d-f721593e42a0:fx)

https://www.deepl.com/docs-api/api-access/

The Pro keys don't have the suffix.

mbi commented

Thanks for the heads-up.