Skip to main content
In 2025, we completely overhauled the tag-handling algorithm that backs translation of XML and HTML in the DeepL API. The new tag handling v2 represents a major step forward for customers who need best-in-class XML and HTML tag handling. To enable it and benefit from all the improvements, set the ‘tag_handling_version’ parameter to ‘v2’. Our updates ensure the best possible translation quality across all use cases. As a result of these major updates, tag handling is expected to give different results when v2 is used. Before switching to v2, thoroughly test your system and verify any differences in output. Additionally, v2 enforces strict parsing of XML. If invalid XML is submitted, the API will return an error.
Please note that after 1 December 2025, new customers will default to v2. Existing customers will continue to default to v1 for the time being.
As of now, tag handling v2 is only compatible with the quality-optimized model type. When you set tag_handling_version to v2, the model_type is implicitly set to quality_optimized.Requests that specify both model_type=latency_optimized and tag_handling_version=v2 will return an error.