翻译
通过 DeepL 进行文本翻译。
请求
http
POST /v1/translatejson
{
"text": ["Bonjour le monde", "Comment allez-vous ?"],
"target_lang": "EN",
"source_lang": null,
"model": null,
"routing_strategy": "auto"
}text 始终为一个列表(一次调用可翻译一个或多个字符串)。source_lang 为可选参数——省略时,DeepL 会自动检测源语言。
响应
json
{
"translations": ["Hello world", "How are you?"],
"detected_source_language": "FR",
"model": "deepl-v2",
"provider": "deepl"
}供应商
DeepL。