文档

GetTranslateImageBatchResult - 图片异步批量翻译结果获取

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

接口说明

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

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

调试

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

授权信息

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

请求参数

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

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

EEA28E6D-4828-5031-BD8C-8FF1B3216842

返回参数

名称类型描述示例值
object

请求结果结构

Codeinteger

请求结果状态码

200
Messagestring

请求信息

OK
RequestIdstring

请求标识

DACD263C-C068-5116-83EC-117245AA35CF
Dataobject

数据内容

Resultobject []

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

InPaintingUrlstring

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

https://example.com/example.jpg
FinalImageUrlstring

单张图片的翻译结果图 URL

https://example.com/example.jpg
TemplateJsonstring

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

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

单张图片的原图 URL

https://example.com/example.jpg
Codeinteger

单张图片的翻译状态码

200
Messagestring

单张图片的翻译信息

OK
Successboolean

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

true
Statusstring

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

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

示例

正常返回示例

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"
  }
}

错误码

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)
文档反馈