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
13 changes: 13 additions & 0 deletions api-reference/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -1154,6 +1154,14 @@
"translation_memory_threshold": 75
}
},
"CustomInstructions": {
"summary": "Using Custom Instructions",
"value": {
"target_lang": "DE",
"file": "@document.docx",
"custom_instructions": "[\"Use a friendly, diplomatic tone\", \"Keep sentences short\"]"
}
},
"QualityEvaluation": {
"summary": "Requesting a quality evaluation report (beta)",
"value": {
Expand Down Expand Up @@ -1223,6 +1231,11 @@
"translation_memory_threshold": {
"$ref": "#/components/schemas/TranslationMemoryThreshold"
},
"custom_instructions": {
"description": "Specify a list of instructions to customize the translation behavior, as a JSON array of strings, for example `[\"Use a friendly, diplomatic tone\"]`. Up to 10 custom instructions can be specified, each with a maximum of 300 characters.\n\nRejected with `400` before the upload is accepted if the value is not a JSON array of strings or exceeds these limits.",
"type": "string",
"example": "[\"Use a friendly, diplomatic tone\"]"
},
"enable_watermark": {
"description": "When `true`, adds a \"Translated by DeepL\" watermark to the translated document.\n\nOnly supported for `docx` and `pdf` output. For all other output formats the parameter is ignored and the document is returned without a watermark.",
"type": "boolean",
Expand Down
13 changes: 13 additions & 0 deletions api-reference/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -927,6 +927,12 @@ paths:
file: '@document.docx'
translation_memory_id: '[yourTranslationMemoryId]'
translation_memory_threshold: 75
CustomInstructions:
summary: Using Custom Instructions
value:
target_lang: DE
file: '@document.docx'
custom_instructions: '["Use a friendly, diplomatic tone", "Keep sentences short"]'
QualityEvaluation:
summary: Requesting a quality evaluation report (beta)
value:
Expand Down Expand Up @@ -1028,6 +1034,13 @@ paths:
$ref: '#/components/schemas/TranslationMemoryId'
translation_memory_threshold:
$ref: '#/components/schemas/TranslationMemoryThreshold'
custom_instructions:
description: |-
Specify a list of instructions to customize the translation behavior, as a JSON array of strings, for example `["Use a friendly, diplomatic tone"]`. Up to 10 custom instructions can be specified, each with a maximum of 300 characters.

Rejected with `400` before the upload is accepted if the value is not a JSON array of strings or exceeds these limits.
type: string
example: '["Use a friendly, diplomatic tone"]'
enable_watermark:
description: |-
When `true`, adds a "Translated by DeepL" watermark to the translated document.
Expand Down
1 change: 1 addition & 0 deletions docs/customize/custom-instructions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ When using custom instructions, keep these constraints in mind:
## Related documentation

- [Text translation API reference](/api-reference/translate/request-translation)
- [Document translation API reference](/api-reference/document/upload-and-translate-a-document)
- [Working with context](/docs/learning-how-tos/examples-and-guides/how-to-use-context-parameter)
- [Style rules API](/docs/customize/using-style-rules)
- [Multilingual glossaries](/docs/customize/managing-glossaries)
Loading