Main menu

Accessing the DeepL Free and Pro APIs from Loco

You will need a DeepL API subscription in order to access v2 of their API. Be sure to subscribe to the correct plan.

https://www.deepl.com/pro#developer

Configure a bot to use DeepL

  1. Navigate to the Bots tab wherever you see the :robot icon: in the Loco dashboard.
  2. Click "New bot", choose DeepL, and enter your DeepL API key into the only text field.
  3. Save the bot and it's ready to run. See also how to run a translation bot.

Steps for generating a DeepL API key

  1. Get a DeepL account and subscribe to any API plan.
  2. Go to your DeepL account settings and copy the Authentication Key to your clipboard.

API versions and DeepL plans

Loco supports v2 of the DeepL API only. You must be subscribed to DeepL API Free or DeepL API Pro to use this version of the API. We recommend you start with their free plan, and upgrade to a paid plan if your usage requires it.

Other DeepL plans use the v1 API. Loco has no support for the older API. It is not publicly documented and DeepL require special permission to integrate with it.

If you have any questions about DeepL plans and how they relate to API access, please ask DeepL support.

Supported languages

See the DeepL documentation for the languages currently supported by the v2 API. Loco tries to map your project locales to these values. For example fr-CA will be sent as just FR, and zh-Hant as just ZH.

You may find that regional variations are not supported, or don't behave quite as expected. For this reason, you may want to consider using a glossary to account for differences.

Tone / formality

Loco supports formality variance via your project locale settings (not via the DeepL bot settings). Whatever you configure in your project locale will be used for DeepL translation via their API, as follows:

  • Setting formal / polite will send formality=prefer_more
  • Setting informal / plain will send formality=prefer_less

Note that DeepL only supports formality for a subset of languages. The above parameters fail silently if unsupported for the target locale.

Glossary support

You can use DeepL glossaries by nominating a Loco project as the source of language pairs. This is for Loco Pro accounts only.

To configure DeepL to use a glossary from Loco: create a new bot, or open its settings from the :cog icon:. Then select a Loco project from the dropdown list. If you don't see this option, either you have a free account, or there are no projects available.

Any Loco project can be set as a glossary, but only language pairs supported by DeepL can be used in translation, and only within the size restrictions; e.g. 1024 bytes maximum per term. Please read DeepL's documentation.

Every time you run your DeepL bot, Loco will sync the required language pairs to a DeepL glossary. It will adopt a name like "Loco 1234 en-de". The corresponding DeepL glossary_id will change every time your project updates, so using these IDs outside Loco is not recommended.

If you have existing DeepL glossaries, you can import them into Loco as tab-separated, or comma-separated files. See Importing glossary pairs. Likewise you can export your Loco glossary projects to suitable dictionary files and use them elsewhere. See Exporting glossary pairs.

Context support

The DeepL API supports a context parameter, but this cannot be used in batch mode. Due to this limitation, Loco will only send additional context to DeepL when performing single translations.

For example: when using the suggest feature (to translate a single source text from the editor) Loco will send both the context and notes properties of your asset to DeepL. This may produce a better translation than when processing multiple texts at once.

Last updated by