image-translate
POST
/302/image/translateTranslate the text in the image into the corresponding language and generate new text
List of supported languages for image translation:https://302ai-en.apifox.cn/doc-5213777
Price:0.02PTC/call
请求参数
Translation Options--Source Language
please view:List of supported languages for image translation
Examples as follows:
auto: Automatically detect source language
en: Only translate English in the image
zh: Only translate Chinese in the image (including traditional Chinese)
both: Translate both Chinese and English in the image
th: Only translate Thai in the image
Translation Options — Target Language: Leave this field empty if only erasure is needed without translation.
please view:List of supported languages for image translation
Examples as follows:
en: Translate to English
zh-hant: Translate to Traditional Chinese
Enable image synthesis
是否开启翻译
- 0:否
- 1:是
传否表示不进行翻译,仅擦除。
Enable product text protection. The default is 0 (disabled), and 1 enables protection. When enabled, text on products will be protected and not erased or translated.
A single image URL to be processed. If only local image files are available, you can upload the image as base64 using the following method to obtain the URL. GhostCut: Upload local image or video to get URL - API documentation.
Multiple image URLs to be processed, choose either this or ‘downloadInfo’
Callback URL
{
"srcLang": "zh",
"tgtLang": "en",
"synthesisOn": 1,
"translateOn": 1,
"commodityFilterOn": 0,
"downloadInfo": "{\"url\":\"https://resource-wangsu.helplook.net/docker_production/vf0ph9/article/CjfQe9/665460a03d980.jpg\"}",
"callback": ""
}
示例代码
Responses
任务id
{
"body": 1,
"code": 1000,
"count": 0,
"msg": "success",
"trace": "ae081fb0d27c46fc951892ed7fe4be4a"
}