GetHtmlTranslateTask - HTML翻译任务结果查询

通义多模态HMEL翻译获取翻译结果

调试

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

授权信息

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

请求语法

POST /anytrans/translate/html/get HTTP/1.1

请求参数

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

当前请求所使用的百炼业务空间 id

llm-kqtrcpdee4xm29xx
taskIdstring

html 翻译任务 id

868c2fdd-96c2-4546-96d2-a259b8f35252

返回参数

名称类型描述示例值
object

Schema of Response

codestring

响应状态码

success
messagestring

响应信息

success
requestIdstring

请求 id,用于追溯 API 调用链路

04B53310-CB1A-14B4-AC85-26C154D8366A
successboolean

接口调用是否成功

true
httpStatusCodestring

http 状态码

200
dataobject

返回数据

translationstring

翻译结果

<!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>
usageobject

token 用量

inputTokenslong

输入 token 数

22
outputTokenslong

输出 token 数

19
totalTokenslong

总 token 数

41

示例

正常返回示例

JSON格式

{
  "code": "success",
  "message": "success",
  "requestId": "04B53310-CB1A-14B4-AC85-26C154D8366A",
  "success": true,
  "httpStatusCode": 200,
  "data": {
    "translation": "<!DOCTYPE html>\n\n<html lang=\"zh-CN\">\n<head>\n<meta charset=\"utf-8\"/>\n<meta content=\"width=device-width, initial-scale=1.0\" name=\"viewport\"/>\n<title>My First Webpage</title>\n</head>\n<body>\n<h1>Welcome to my webpage!</h1>\n<p>This is a simple HTML page.</p>\n<p>Learning HTML is the first step to entering web development.</p>\n<a href=\"https://www.example.com\">Click here to visit the sample website</a>\n</body>\n</html>",
    "usage": {
      "inputTokens": 22,
      "outputTokens": 19,
      "totalTokens": 41
    }
  }
}

错误码

HTTP status code错误码错误信息
400IdempotentParameterMismatchThe 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.

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