Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions api-reference/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -1050,6 +1050,25 @@
"file": "@document.docx",
"glossary_id": "[yourGlossaryId]"
}
},
"StyleRule": {
"summary": "Using a Style Rule List",
"value": {
"source_lang": "EN",
"target_lang": "DE",
"file": "@document.docx",
"style_id": "[yourStyleId]"
}
},
"TranslationMemory": {
"summary": "Using a Translation Memory",
"value": {
"source_lang": "EN",
"target_lang": "DE",
"file": "@document.docx",
"translation_memory_id": "[yourTranslationMemoryId]",
"translation_memory_threshold": 75
}
}
},
"schema": {
Expand Down Expand Up @@ -1084,6 +1103,17 @@
"glossary_id": {
"$ref": "#/components/schemas/GlossaryId"
},
"style_id": {
"description": "Specify the [style rule list](/api-reference/style-rules) to use for the translation.\n\n**Important:** The target language has to match the language of the style rule list.",
"type": "string",
"example": "7ff9bfd6-cd85-4190-8503-d6215a321519"
},
"translation_memory_id": {
"$ref": "#/components/schemas/TranslationMemoryId"
},
"translation_memory_threshold": {
"$ref": "#/components/schemas/TranslationMemoryThreshold"
},
"enable_beta_languages": {
"description": "This parameter is maintained for backward compatibility and has no effect.",
"type": "boolean",
Expand Down
26 changes: 26 additions & 0 deletions api-reference/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -787,6 +787,21 @@ paths:
target_lang: DE
file: '@document.docx'
glossary_id: '[yourGlossaryId]'
StyleRule:
summary: Using a Style Rule List
value:
source_lang: EN
target_lang: DE
file: '@document.docx'
style_id: '[yourStyleId]'
TranslationMemory:
summary: Using a Translation Memory
value:
source_lang: EN
target_lang: DE
file: '@document.docx'
translation_memory_id: '[yourTranslationMemoryId]'
translation_memory_threshold: 75
schema:
type: object
required:
Expand Down Expand Up @@ -823,6 +838,17 @@ paths:
$ref: '#/components/schemas/Formality'
glossary_id:
$ref: '#/components/schemas/GlossaryId'
style_id:
description: |-
Specify the [style rule list](/api-reference/style-rules) to use for the translation.

**Important:** The target language has to match the language of the style rule list.
type: string
example: 7ff9bfd6-cd85-4190-8503-d6215a321519
translation_memory_id:
$ref: '#/components/schemas/TranslationMemoryId'
translation_memory_threshold:
$ref: '#/components/schemas/TranslationMemoryThreshold'
enable_beta_languages:
description: |-
This parameter is maintained for backward compatibility and has no effect.
Expand Down
5 changes: 5 additions & 0 deletions docs/resources/roadmap-and-release-notes.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ rss: true
- The Ruby client library [`deepl-rb`](https://github.com/DeepLcom/deepl-rb) v3.8.0 now accepts an `additional_headers` argument on `translate` calls, so you can send `X-DeepL-Reporting-Tag` for usage reporting.
- See [Sending Custom Reporting Tags with Client Libraries](/docs/learning-how-tos/cookbook/sending-custom-reporting-tags-from-client-libraries) for the updated Ruby snippet.

## May 26 - Style Rules and Translation Memories for Document Translation
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The date needs to be updated again

- [`POST /v2/document`](/api-reference/document/upload-and-translate-a-document) now accepts `style_id`, `translation_memory_id`, and `translation_memory_threshold`, bringing document translation in line with the parameters already available on text translation.
- `style_id` applies a configured [style rule list](/api-reference/style-rules) to the document translation.
- `translation_memory_id` and `translation_memory_threshold` work as on text translation: pass a translation memory ID to apply stored translations, and set a threshold (0-100) to control how closely source text must match a stored segment. See the [translation memories guide](/docs/learning-how-tos/examples-and-guides/how-to-use-translation-memories).

## May 26 - API Usage Logger Cookbook
- Added a new cookbook, [API Usage Logger](/docs/learning-how-tos/cookbook/api-usage-logger), showing how to capture per-request DeepL API usage data (billed characters, language pairs, reporting tags, API keys, errors) and explore it through a local Streamlit dashboard.
- Source code on GitHub: [`DeepLcom/deepl-api-usage-logger`](https://github.com/DeepLcom/deepl-api-usage-logger).
Expand Down
Loading