获取图片异步批量翻译的结果。

请确保在使用该接口前,已充分了解图片翻译产品的收费方式和价格

图片异步批量翻译的结果,翻译完毕后,会保存 1 小时,过期后会被清理,请及时获取结果。

调试

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

请求参数

名称 类型 是否必选 示例值 描述
Action String GetTranslateImageBatchResult

系统规定参数。取值:GetTranslateImageBatchResult

TaskId String EEA28E6D-4828-5031-BD8C-8FF1B3216842

调用图片异步批量翻译接口获得的任务 ID

返回数据

名称 类型 示例值 描述
Code Integer 200

请求结果状态码

Message String OK

请求信息

RequestId String DACD263C-C068-5116-83EC-117245AA35CF

请求标识

Data Object

数据内容

Result Array of CertificateImageTranslateResult

翻译结果,当改批量翻译任务没有执行完毕时,该字段为空数组

InPaintingUrl String https://example.com/example.jpg

单张图片的译后编辑器背景图

FinalImageUrl String https://example.com/example.jpg

单张图片的翻译结果图 URL

TemplateJson String {"TemplateJson": "Editor Template Json String "}

单张图片的译后编辑器模版数据

SourceImageUrl String https://example.com/example.jpg

单张图片的原图 URL

Code Integer 200

单张图片的翻译状态码

Message String OK

单张图片的翻译信息

Success Boolean true

单张图片是否翻译成功标识

Status String finished

标识当前任务的运行状态,可能的值及含义如下:

  • created:批量翻译任务创建成功,等待运行
  • running:批量翻译任务正在运行中
  • finished:批量翻译任务运行结束,图片均已翻译完毕,此时 Result 字段会包含每张图片的翻译结果
  • invalid:传入的任务 ID 非法,或者任务的翻译结果已经过期被清理

示例

请求示例

http(s)://[Endpoint]/?Action=GetTranslateImageBatchResult
&TaskId=EEA28E6D-4828-5031-BD8C-8FF1B3216842
&公共请求参数

正常返回示例

XML格式

HTTP/1.1 200 OK
Content-Type:application/xml

<GetTranslateImageBatchResultResponse>
    <Code>200</Code>
    <Message>OK</Message>
    <RequestId>DACD263C-C068-5116-83EC-117245AA35CF</RequestId>
    <Data>
        <Result>
            <InPaintingUrl>https://example.com/example.jpg</InPaintingUrl>
            <FinalImageUrl>https://example.com/example.jpg</FinalImageUrl>
            <TemplateJson>{"TemplateJson": "Editor Template Json String	"}</TemplateJson>
            <SourceImageUrl>https://example.com/example.jpg</SourceImageUrl>
            <Code>200</Code>
            <Message>OK</Message>
            <Success>true</Success>
        </Result>
        <Status>finished</Status>
    </Data>
</GetTranslateImageBatchResultResponse>

JSON格式

HTTP/1.1 200 OK
Content-Type:application/json

{
  "Code" : 200,
  "Message" : "OK",
  "RequestId" : "DACD263C-C068-5116-83EC-117245AA35CF",
  "Data" : {
    "Result" : [ {
      "InPaintingUrl" : "https://example.com/example.jpg",
      "FinalImageUrl" : "https://example.com/example.jpg",
      "TemplateJson" : "{\"TemplateJson\": \"Editor Template Json String\t\"}",
      "SourceImageUrl" : "https://example.com/example.jpg",
      "Code" : 200,
      "Message" : "OK",
      "Success" : true
    } ],
    "Status" : "finished"
  }
}

错误码

HttpCode 错误码 错误信息 描述
101 System.RequestTimeOut The request has timed out. 请求超时
102 System.Error A system error occurred. 系统错误
103 System.UrlDecodingError An error occurred while decoding the URL. Verify that the specified URL is encoded. URL编码错误
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. 字符过长
110 System.AccountNotActivated The account has not activated the service. 账号没有开通服务
111 System.SubServiceFailed Sub-account service failed. 子账号服务失败
112 System.TranslateServiceCallFailed Failed to call the translation service. 翻译服务调用失败
113 System.AccountNotActivatedOrInArrears The service is not activated or the account has an outstanding balance. 账号服务没有开通或者欠费

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