文档

GetAsyncTranslate - 获取文本异步翻译任务

获取文本异步翻译任务内容。

接口说明

通过 jobID 获取对应的异步任务翻译内容

调试

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

授权信息

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

请求参数

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

异步任务 ID。您调用 CreateAsyncTranslate 创建异步任务返回的 JobId

77056ab7-7be1-4c2a-91a1-f20f63894048

返回参数

名称类型描述示例值
object

Schema of Response

RequestIdstring

请求的唯一 id,用于后续排查问题使用

DC2DCCC9-C3DF-4F59-8D8E-78185729F16D
Codeinteger

状态码

200
Messagestring

返回信息。

ok
Dataobject

数据内容

Statusstring

任务状态

ready
TranslatedTextstring

翻译内容

hello
WordCountstring

原文的字符数

2
DetectedLanguagestring

源语言传入 auto 时,语种识别后的源语言代码

zh

示例

正常返回示例

JSON格式

{
  "RequestId": "DC2DCCC9-C3DF-4F59-8D8E-78185729F16D",
  "Code": 200,
  "Message": "ok",
  "Data": {
    "Status": "ready",
    "TranslatedText": "hello",
    "WordCount": "2",
    "DetectedLanguage": "zh"
  }
}

错误码

HTTP status code错误码错误信息描述
109System.SubNotPermissionThe sub account is not authorized to perform the operation.子账号没有权限
400Parameter.SourceLangErrorSource languages are not supported.源语种不支持。
400Parameter.TargetLangErrorTarget languages are not supported.目标语种不支持。
400System.AccountNotActivatedThe account has not activated the service.账号没有开通服务
400System.AccountNotActivatedOrInArrearsThe service is not activated or the account has an outstanding balance.账号服务没有开通或者欠费
400System.LanguageNotSupportedThe specified language pair is not supported.该语向不支持
400System.ParameterErrorSome required parameters are missing.参数错误
400System.StringTooLongThe maximum length of the specified string is exceeded.字符过长
403System.subNotPermissionThe sub-account is not authorized to perform the operation.子账号没有权限
500System.ErrorA system error occurred.系统错误
500System.LanguageDetectErrorAn error occurred while detecting the language.语种识别错误
500System.RequestTimeOutThe request has timed out.请求超时
500System.SubServiceFailedSub-account service failed.子账号服务失败
500System.TranslateErrorAn error occurred while translating.翻译错误
500System.TranslateServiceCallFailedFailed to call the translation service.翻译服务调用失败
500System.unknownErrorAn unknown error occurred.未知错误
500System.UrlDecodingErrorAn error occurred while decoding the URL. Verify that the specified URL is encoded.URL编码错误

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

变更历史

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