Creates a document translation task.
Operation description
This operation supports only POST requests.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
alimt:CreateDocTranslateTask |
create |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| SourceLanguage |
string |
Yes |
The source language. For more information, see Language codes. |
en |
| TargetLanguage |
string |
Yes |
The target language. For more information, see Language codes. |
zh |
| FileUrl |
string |
Yes |
The URL of the document. |
http://fileUrl |
| Scene |
string |
No |
The scenario. Valid values: `general`, `title` (product titles), `description` (product descriptions), `message` (buyer-seller communication), `medical`, `social`, and `tech`. |
general |
| CallbackUrl |
string |
No |
The webhook address for the translation result. The server sends a POST request to this address. Request body Raw JSON
IP address whitelist 59.82.61.52 203.119.241.30 203.119.241.98 59.82.84.90 203.119.241.56 59.82.61.75 Sample callback service: This service is used to receive the translation result through a callback.
|
http://callbackUrl |
| ClientToken |
string |
No |
Ensures idempotence. A request with the same client token is processed only once within 3 minutes. |
token |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| Status |
string |
The status of the task. |
ready |
| RequestId |
string |
The request ID. |
D3920BC3-A395-4CAD-9E84-7C39EB07507B |
| TaskId |
string |
The task ID. |
0586df512c8b4bb382d7d9a6a01b5854 |
Examples
Success response
JSON format
{
"Status": "ready",
"RequestId": "D3920BC3-A395-4CAD-9E84-7C39EB07507B",
"TaskId": "0586df512c8b4bb382d7d9a6a01b5854"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 110 | 10010 | The account has not activated the service. | |
| 111 | 10011 | Sub-account service failed. | |
| 199 | 19999 | An unknown error occurred. | |
| 112 | 10012 | Failed to call the translation service. | |
| 113 | 10013 | The account service is not enabled or has overdue payments. | |
| 400 | 10021 | The parameter is invalid. | |
| 400 | 10022 | The parameter fileUrl is invalid. | |
| 400 | 10023 | The parameter fileUrl is not accessible. | |
| 400 | 10024 | The parameter callbackUrl is invalid. | The parameter callbackUrl is invalid. |
| 400 | 10031 | The specified file type is invalid. | The type of file is not valid. |
| 400 | InvalidAccountStatus | The Machine Translation service has not been activated. | The Machine Translation service has not been activated. |
| 400 | RepeatInvoke | Repeated calls. | Repeated calls |
| 403 | 10029 | The number of calls per day exceeds the limit. | The number of calls per day limit exceeded. |
| 109 | 10009 | The sub-account does not have permission. | |
| 429 | REQUESTS.OVER.LIMIT | The request is too frequent, please try again later. | Request too frequent, please try again later |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.