创建异步图片翻译,图片翻译包含文字识别、文本翻译、文字回填等能力。
接口说明
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
alimt:CreateImageTranslateTask |
create |
*全部资源
|
无 | 无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| UrlList |
string |
是 |
图片翻译链接,多张图片通过英文逗号分隔,图片数量不能超过 20 张 |
http://xxx,http://yyy |
| SourceLanguage |
string |
是 |
图片原始语种 |
zh |
| TargetLanguage |
string |
是 |
图片翻译目标语种 |
en |
| Extra |
string |
否 |
|
{"have_ocr":"false","without_text":"false","have_psd":"true","ignore_entity":"false"} |
| ClientToken |
string |
否 |
提供幂等能力,3 分钟内,相同的值只会生效一次 |
1 |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
|||
| Code |
integer |
状态码,200 表示正常 |
200 |
| Message |
string |
错误的时候,返回的错误信息 |
ok |
| RequestId |
string |
请求的唯一串 |
A41F6E25-8520-4AF0-90EF-AF7E32840108 |
| Data |
object |
返回的数据内容 |
|
| TaskId |
string |
异步图片翻译返回的任务 ID,后面根据这个 ID 获取翻译结果 |
A41F6E25-8520-4AF0-90EF-111111 |
示例
正常返回示例
JSON格式
{
"Code": 200,
"Message": "ok",
"RequestId": "A41F6E25-8520-4AF0-90EF-AF7E32840108",
"Data": {
"TaskId": "A41F6E25-8520-4AF0-90EF-111111"
}
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 110 | System.AccountNotActivated | The account has not activated the service. | |
| 111 | System.SubServiceFailed | Sub-account service failed. | |
| 101 | System.RequestTimeOut | The request has timed out. | |
| 112 | System.TranslateServiceCallFailed | Failed to call the translation service. | |
| 102 | System.Error | A system error occurred. | |
| 113 | System.AccountNotActivatedOrInArrears | The service is not activated or the account has an outstanding balance. | |
| 103 | System.UrlDecodingError | An error occurred while decoding the URL. Verify that the specified URL is encoded. | |
| 104 | System.ParameterError | Some required parameters are missing. | |
| 105 | System.LanguageNotSupported | The specified language pair is not supported. | |
| 106 | System.LanguageDetectError | An error occurred while detecting the language. | |
| 107 | System.TranslateError | An error occurred while translating. | |
| 108 | System.StringTooLong | The maximum length of the specified string is exceeded. |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。