Skip to main content
You can use the DeepL API to translate between variants of the same language (for example, pt-PT to pt-BR or en-US to en-GB) using several methods:
Both glossaries and style rules are unique to each of DeepL’s global data centers and are not shared between them. Clients using the api-us.deepl.com endpoint will not be able to access glossaries or style rules created in the UI at this time.
  • Custom instructions: Add instructions like “translate to British English” to your /translate request. You can specify up to 10 custom instructions, each with a maximum of 300 characters.

Example: Converting American English to British English

request
curl -X POST 'https://api.deepl.com/v2/translate' \
--header 'Content-Type: application/json' \
--header 'Authorization: DeepL-Auth-Key [yourAuthKey]' \
--data '{
  "text": ["I went to the pharmacy to get some acetaminophen."],
  "target_lang": "en-GB",
  "model_type": "quality_optimized",
  "custom_instructions": ["translate to British English", "only replace words that would be different"]
}'
Example response
{
  "translations": [
    {
      "detected_source_language": "EN",
      "text": "I went to the chemist to get some paracetamol.",
      "model_type_used": "quality_optimized"
    }
  ]
}
The custom instructions convert American English terms (“pharmacy”, “acetaminophen”) to British English equivalents (“chemist”, “paracetamol”) while preserving sentence structure.