Retrieves the result of an HTML translation task from Tongyi Multimodal Translation.
Debugging
You can run this API directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After a successful run, OpenAPI Explorer can automatically generate SDK code examples.
Debug
Authorization information
The following table describes the authorization information of the API. You can use it in the Action element of a RAM permission policy statement to grant a RAM user or RAM role the permission to call this API. Details are as follows:
- Operation: the specific permission point.
- Access level: the access level of each operation. Valid values: Write, Read, or List.
-
Resource type: the resource types supported for authorization in the operation. Details:
- Required resource types are marked with a preceding *.
- For operations that do not support resource-level authorization,
All resourcesis used.
- Condition key: the condition keys defined by the cloud product itself.
- Dependent action: other permissions required to successfully perform the operation. The caller must also have the permissions of the dependent actions for the operation to succeed.
| Operation | Access level | Resource type | Condition key | Dependent action |
|---|---|---|---|---|
| anytrans:GetHtmlTranslateTask | none | *All resources * |
| None |
Request syntax
Request parameters
| Name | Type | Required | Description | Example value |
|---|---|---|---|---|
| workspaceId | string | Yes | The ID of the Model Studio workspace used for this request. | llm-kqtrcpdee4xm29xx |
| taskId | string | No | The ID of the HTML translation task. | 868c2fdd-96c2-4546-96d2-a259b8f35252 |
Response parameters
| Name | Type | Description | Example value |
|---|---|---|---|
| object | Schema of Response | ||
| code | string | The response status code. | success |
| message | string | The response message. | success |
| requestId | string | The request ID, used for tracing API calls. | 04B53310-CB1A-14B4-AC85-26C154D8366A |
| success | boolean | Whether the API call is successful. | true |
| httpStatusCode | string | The HTTP status code. | 200 |
| data | object | The returned data. | |
| translation | string | The translation result. | <!DOCTYPE html> <html lang="zh-CN"> <head> <meta charset="utf-8"/> <meta content="width=device-width, initial-scale=1.0" name="viewport"/> <title>My First Webpage</title> </head> <body> <h1>Welcome to my webpage!</h1> <p>This is a simple HTML page.</p> <p>Learning HTML is the first step to entering web development.</p> <a href="https://www.example.com">Click here to visit the sample website</a> </body> </html> |
| usage | object | The token usage. | |
| inputTokens | long | The number of input tokens. | 22 |
| outputTokens | long | The number of output tokens. | 19 |
| totalTokens | long | The total number of tokens. | 41 |
Examples
Normal response example
JSON format
Error codes
| HTTP status code | Error code | Error message |
|---|---|---|
| 400 | IdempotentParameterMismatch | The request uses the same client token as a previous, but non-identical request. Do not reuse a client token with different requests, unless the requests are identical. |
Change history
| Change time | Change summary | Operation |
|---|