创建文档翻译任务。
接口说明
仅支持通过 POST 方式调用
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
alimt:CreateDocTranslateTask |
create |
*全部资源
|
无 | 无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| 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 |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
|||
| Status |
string |
任务状态。 |
ready |
| RequestId |
string |
请求 ID。 |
D3920BC3-A395-4CAD-9E84-7C39EB07507B |
| TaskId |
string |
任务 ID。 |
0586df512c8b4bb382d7d9a6a01b5854 |
示例
正常返回示例
JSON格式
{
"Status": "ready",
"RequestId": "D3920BC3-A395-4CAD-9E84-7C39EB07507B",
"TaskId": "0586df512c8b4bb382d7d9a6a01b5854"
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 110 | 10010 | 账号没有开通服务 | |
| 111 | 10011 | 子账号服务失败 | |
| 199 | 19999 | An unknown error occurred. | |
| 112 | 10012 | 翻译服务调用失败 | |
| 113 | 10013 | 账号服务没有开通或者欠费 | |
| 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 | 10031 | The specified file type is invalid. | 文件类型不支持。 |
| 400 | InvalidAccountStatus | The Machine Translation service has not been activated. | 用户未开通机器翻译服务。 |
| 400 | RepeatInvoke | Repeated calls. | 重复调用 |
| 403 | 10029 | The number of calls per day exceeds the limit. | 超出单日调用次数限制。 |
| 109 | 10009 | 子账号没有权限 | |
| 429 | REQUESTS.OVER.LIMIT | The request is too frequent, please try again later. | 请求过于频繁,请稍后重试 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。