文档

CreateImageTranslateTask - 创建异步图片翻译调用指南

更新时间:

创建异步图片翻译,图片翻译包含文字识别、文本翻译、文字回填等能力。

接口说明

注意 该接口已计划下线,不建议继续调用。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

授权信息

当前API暂无授权信息透出。

请求参数

名称类型必填描述示例值
UrlListstring

图片翻译链接,多张图片通过英文逗号分隔,图片数量不能超过 20 张

http://xxx,http://yyy
SourceLanguagestring

图片原始语种

zh
TargetLanguagestring

图片翻译目标语种

en
Extrastring
  • 以下 JSON 内容格式,不关注的都可以不用传递,都是可选参数
  • 样例 JSON 格式内容:
{
  "have_ocr": "false",
  "without_text": "false",
  "have_psd": "true",
  "ignore_entity": "false"
}
  • have_ocr,控制是否返回 OCR 结果,true:需要,false:不需要
  • without_text,控制是否需要擦除图片中的文字,true:需要,false:不需要
  • have_psd,控制是否返回图片编辑器数据,渲染编辑器,true:需要,false:不需要
  • ignore_entity,是否忽略实体识别,true:忽略,false:不忽略
{"have_ocr":"false","without_text":"false","have_psd":"true","ignore_entity":"false"}
ClientTokenstring

提供幂等能力,3 分钟内,相同的值只会生效一次

1

返回参数

名称类型描述示例值
object
Codeinteger

状态码,200 表示正常

200
Messagestring

错误的时候,返回的错误信息

ok
RequestIdstring

请求的唯一串

A41F6E25-8520-4AF0-90EF-AF7E32840108
Dataobject

返回的数据内容

TaskIdstring

异步图片翻译返回的任务 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错误码错误信息描述
101System.RequestTimeOutThe request has timed out.请求超时
102System.ErrorA system error occurred.系统错误
103System.UrlDecodingErrorAn error occurred while decoding the URL. Verify that the specified URL is encoded.URL编码错误
104System.ParameterErrorSome required parameters are missing.参数错误
105System.LanguageNotSupportedThe specified language pair is not supported.该语向不支持
106System.LanguageDetectErrorAn error occurred while detecting the language.语种识别错误
107System.TranslateErrorAn error occurred while translating.翻译错误
108System.StringTooLongThe maximum length of the specified string is exceeded.字符过长
110System.AccountNotActivatedThe account has not activated the service.账号没有开通服务
111System.SubServiceFailedSub-account service failed.子账号服务失败
112System.TranslateServiceCallFailedFailed to call the translation service.翻译服务调用失败
113System.AccountNotActivatedOrInArrearsThe service is not activated or the account has an outstanding balance.账号服务没有开通或者欠费

访问错误中心查看更多错误码。

变更历史

变更时间变更内容概要操作
暂无变更历史
  • 本页导读 (0)
文档反馈