Skip to content

Commit eb174fe

Browse files
feat: add model_type and model_type_used fields
1 parent 1895887 commit eb174fe

File tree

3 files changed

+65
-0
lines changed

3 files changed

+65
-0
lines changed

openapi.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,9 @@
9292
"formality": {
9393
"$ref": "#/components/schemas/Formality"
9494
},
95+
"model_type": {
96+
"$ref": "#/components/schemas/ModelType"
97+
},
9598
"glossary_id": {
9699
"allOf": [
97100
{
@@ -199,6 +202,9 @@
199202
"formality": {
200203
"$ref": "#/components/schemas/Formality"
201204
},
205+
"model_type": {
206+
"$ref": "#/components/schemas/ModelType"
207+
},
202208
"glossary_id": {
203209
"allOf": [
204210
{
@@ -262,6 +268,11 @@
262268
"billed_characters": {
263269
"description": "Number of characters counted by DeepL for billing purposes. Only present if the show_billed_characters parameter is set to true.",
264270
"type": "integer"
271+
},
272+
"model_type_used": {
273+
"description": "Indicates the translation model used. Only present if model_type parameter is included in the request.",
274+
"type": "string",
275+
"example": "quality_optimized"
265276
}
266277
}
267278
}
@@ -1748,6 +1759,15 @@
17481759
],
17491760
"default": "default"
17501761
},
1762+
"ModelType": {
1763+
"type": "string",
1764+
"description": "Specifies which DeepL model should be used for translation.\n\nPossible values are:\n* `latency_optimized` (default) - uses lower latency \u201cclassic\u201d translation models, which support all language pairs; \n default value \n* `quality_optimized` - uses higher latency, improved quality \u201cnext-gen\u201d translation models, which support only a\n subset of language pairs; if a language pair that is not supported by next-gen models is included in the\n request, it will fail. Consider using prefer_quality_optimized instead. \n* `prefer_quality_optimized` - prioritizes use of higher latency, improved quality \u201cnext-gen\u201d translation models,\n which support only a subset of DeepL languages; if a request includes a language pair not supported by \n next-gen models, the request will fall back to latency_optimized classic models.",
1765+
"enum": [
1766+
"quality_optimized",
1767+
"prefer_quality_optimized",
1768+
"latency_optimized"
1769+
]
1770+
},
17511771
"GlossaryId": {
17521772
"type": "string",
17531773
"description": "A unique ID assigned to a glossary.",

openapi.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,8 @@ paths:
146146
$ref: '#/components/schemas/PreserveFormattingOption'
147147
formality:
148148
$ref: '#/components/schemas/Formality'
149+
model_type:
150+
$ref: '#/components/schemas/ModelType'
149151
glossary_id:
150152
allOf:
151153
- $ref: '#/components/schemas/GlossaryId'
@@ -222,6 +224,8 @@ paths:
222224
$ref: '#/components/schemas/PreserveFormattingOptionStr'
223225
formality:
224226
$ref: '#/components/schemas/Formality'
227+
model_type:
228+
$ref: '#/components/schemas/ModelType'
225229
glossary_id:
226230
allOf:
227231
- $ref: '#/components/schemas/GlossaryId'
@@ -270,6 +274,11 @@ paths:
270274
description: Number of characters counted by DeepL for billing purposes.
271275
Only present if the show_billed_characters parameter is set to true.
272276
type: integer
277+
model_type_used:
278+
description: Indicates the translation model used. Only present if model_type parameter
279+
is included in the request.
280+
type: string
281+
example: quality_optimized
273282
examples:
274283
Basic:
275284
value:
@@ -1386,6 +1395,25 @@ components:
13861395
- prefer_more
13871396
- prefer_less
13881397
default: default
1398+
ModelType:
1399+
type: string
1400+
description: |-
1401+
Specifies which DeepL model should be used for translation.
1402+
1403+
Possible values are:
1404+
* `latency_optimized` (default) - uses lower latency “classic” translation models, which support all language pairs;
1405+
default value
1406+
* `quality_optimized` - uses higher latency, improved quality “next-gen” translation models, which support only a
1407+
subset of language pairs; if a language pair that is not supported by next-gen models is included in the
1408+
request, it will fail. Consider using prefer_quality_optimized instead.
1409+
* `prefer_quality_optimized` - prioritizes use of higher latency, improved quality “next-gen” translation models,
1410+
which support only a subset of DeepL languages; if a request includes a language pair not supported by
1411+
next-gen models, the request will fall back to latency_optimized classic models.
1412+
1413+
enum:
1414+
- quality_optimized
1415+
- prefer_quality_optimized
1416+
- latency_optimized
13891417
GlossaryId:
13901418
type: string
13911419
description: A unique ID assigned to a glossary.

openapi_gitbook.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,8 @@ paths:
103103
$ref: '#/components/schemas/PreserveFormattingOption'
104104
formality:
105105
$ref: '#/components/schemas/Formality'
106+
model_type:
107+
$ref: '#/components/schemas/ModelType'
106108
glossary_id:
107109
description: |-
108110
Specify the glossary to use for the translation. **Important:** This requires the `source_lang`
@@ -160,6 +162,8 @@ paths:
160162
$ref: '#/components/schemas/PreserveFormattingOptionStr'
161163
formality:
162164
$ref: '#/components/schemas/Formality'
165+
model_type:
166+
$ref: '#/components/schemas/ModelType'
163167
glossary_id:
164168
description: |-
165169
Specify the glossary to use for the translation. **Important:** This requires the `source_lang`
@@ -223,6 +227,12 @@ paths:
223227
Only present if the show_billed_characters parameter is set to true.
224228
type: integer
225229
example: 42
230+
model_type_used:
231+
description: Indicates the translation model used. Only present if model_type parameter
232+
is included in the request.
233+
type: string
234+
example: quality_optimized
235+
226236
400:
227237
$ref: '#/components/responses/BadRequest'
228238
403:
@@ -1244,6 +1254,13 @@ components:
12441254
- prefer_less
12451255
default: default
12461256
example: prefer_more
1257+
ModelType:
1258+
type: string
1259+
description: Specifies which DeepL model should be used for translation.
1260+
enum:
1261+
- quality_optimized
1262+
- prefer_quality_optimized
1263+
- latency_optimized
12471264
GlossaryId:
12481265
type: string
12491266
description: A unique ID assigned to a glossary.

0 commit comments

Comments
 (0)