Skip to content
Merged
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
9 changes: 9 additions & 0 deletions api-reference/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -984,6 +984,15 @@
"description": "Indicates the translation model used. Only present if model_type parameter is included in the request.",
"type": "string",
"example": "quality_optimized"
},
"tag_handling_version": {
"description": "The version of the tag handling algorithm used for the translation. Only present when the `tag_handling` parameter (`xml` or `html`) is set. If you don't specify `tag_handling_version`, this shows the default that was applied.",
"type": "string",
"enum": [
"v2",
"v1"
],
"example": "v2"
}
}
}
Expand Down
10 changes: 10 additions & 0 deletions api-reference/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -745,6 +745,16 @@ paths:
is included in the request.
type: string
example: quality_optimized
tag_handling_version:
description: The version of the tag handling algorithm used for the translation.
Only present when the `tag_handling` parameter (`xml` or `html`) is set.
If you don't specify `tag_handling_version`, this shows the default
that was applied.
type: string
enum:
- v2
- v1
example: v2

400:
$ref: '#/components/responses/BadRequest'
Expand Down
1 change: 1 addition & 0 deletions api-reference/translate.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,7 @@ Note that we do not include examples for our client libraries in every single se
<li><code>v2</code>: Use the improved v2 algorithm.</li>
<li><code>v1</code>: Use the previous v1 algorithm.</li>
</ul>
When `tag_handling` is set, the response includes a `tag_handling_version` field showing which version was applied, including the default when you don't specify one.
</ParamField>
<ParamField body="outline_detection" type="boolean">
The automatic detection of the XML structure won't yield best results in all XML files. You can disable this automatic mechanism altogether by setting the <code>outline_detection</code> parameter to <code>false</code> and selecting the tags that should be considered structure tags. This will split sentences using the <code>splitting_tags</code> parameter.
Expand Down
Loading