创建文档翻译任务。
接口说明
说明
仅支持通过 POST 方式调用
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
授权信息
当前API暂无授权信息透出。
请求参数
名称 | 类型 | 必填 | 描述 | 示例值 |
---|---|---|---|---|
SourceLanguage | string | 是 | 原文语言,语言 code 参考 | en |
TargetLanguage | string | 是 | 目标语言,语言 code 参考 | zh |
FileUrl | string | 是 | 文档 URL。 | http://fileUrl |
Scene | string | 否 | 场景,支持:通用(general)、商品标题(title)、商品详情(description)、买卖家沟通(message)、医疗(medical)、社交(social)、科技(tech)。 | general |
CallbackUrl | string | 否 | 翻译结果回调 URL,服务器会向回调地址发起 post 请求 请求 body raw json
IP 白名单 59.82.61.52 203.119.241.30 203.119.241.98 59.82.84.90 203.119.241.56 59.82.61.75 回调服务示例:该服务用于回调方式获取翻译结果
| http://callbackUrl |
ClientToken | string | 否 | 提供幂等能力,3 分钟内,相同的值只会生效一次。 | token |
返回参数
示例
正常返回示例
JSON
格式
{
"Status": "ready",
"RequestId": "D3920BC3-A395-4CAD-9E84-7C39EB07507B",
"TaskId": "0586df512c8b4bb382d7d9a6a01b5854"
}
错误码
HTTP status code | 错误码 | 错误信息 | 描述 |
---|---|---|---|
109 | 10009 | 子账号没有权限 | - |
110 | 10010 | 账号没有开通服务 | - |
111 | 10011 | 子账号服务失败 | - |
112 | 10012 | 翻译服务调用失败 | - |
113 | 10013 | 账号服务没有开通或者欠费 | - |
199 | 19999 | An unknown error occurred. | 未知异常 |
400 | 10021 | The parameter is invalid. | 参数无效。 |
400 | 10022 | The parameter fileUrl is invalid. | 参数fileUrl非法。 |
400 | 10023 | The parameter fileUrl is not accessible. | 参数fileUrl无法访问。 |
400 | 10024 | The parameter callbackUrl is invalid. | 参数callbackUrl非法。 |
400 | 10030 | The file size exceeds the limit. | 文件大小超过了限制。 |
400 | 10031 | The specified file type is invalid. | 文件类型不支持。 |
400 | InvalidAccountStatus | The Machine Translation service has not been activated. | 用户未开通机器翻译服务。 |
403 | 10029 | The number of calls per day exceeds the limit. | 超出单日调用次数限制。 |
访问错误中心查看更多错误码。
变更历史
变更时间 | 变更内容概要 | 操作 |
---|
暂无变更历史