GetImageTranslateTask - 获取图片翻译任务结果

AI翻译获取图片翻译任务

调试

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

授权信息

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

请求语法

POST /anytrans/translate/image/get HTTP/1.1

请求参数

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

业务空间 Id

llm-kqtrcpdee4xm29xx
taskIdstring

图片翻译任务 id

2746f4be-cff2-465e-a2c6-12bff30ce0f9

返回参数

名称类型描述示例值
object

Schema of Response

codestring

响应状态码

success
messagestring

响应信息

success
requestIdstring

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

377A48D7-7CFA-53F9-8CA2-14FE3F2774B6
successboolean

接口调用是否成功

true
httpStatusCodestring

http 响应码

200
synchroboolean

是否同步

true
dataobject

返回数据

traceIdstring

链路 Id

213e391517328463424251152ec9fb
translationobject

翻译结果

anglelong

图片旋转角度

0
widthlong

图片旋转后宽度

800
heightlong

图片旋转后高度

800
orgWidthlong

原始图片宽度

800
orgHeightlong

原始图片高度

800
boxesCountlong

字块数量

13
boundingBoxesarray<object>

字块详情列表

boundingBoxesobject

字块详情

upLeftobject

左上角位置

xlong

x 坐标

10
ylong

y 坐标

66
upRightobject

右上角位置

xlong

x 坐标

328
ylong

y 坐标

69
downLeftobject

左下角位置

xlong

x 坐标

9
ylong

y 坐标

145
downRightobject

右下角位置

xlong

x 坐标

327
ylong

y 坐标

148
confidencefloat

标签置信度,取值范围为 0(表示置信度最低)~1(表示置信度最高)

0.99
textstring

图片识别出的文字块的源语言文案

修护头皮
directionlong

文字方向 0 为横向 1 为竖行

0
tableIdlong

文字块所属的表格 id 如果不在表格内值为-1

1
tableCellIdlong

文字块所属的单元格 id 如果不在表格内 值为-1

1
translationobject

翻译结果

{ "en": "Restore Scalp Health" }
tableInfosarray<object>

表格信息列表

tableInfosobject

表格信息

tableIdlong

源表 ID

1
xCellSizelong

横向单元格长度

50
yCellSizelong

纵向单元格长度

50
cellInfosarray<object>

单元格信息列表

cellInfosobject

单元格信息

tableCellIdlong

单元格 Id

1
textstring

图片文字块中待翻译的文本

活动价
xsclong

横轴方向该单元格起始在第几个单元格

1
xeclong

横轴方向该单元格结束在第几个单元格

2
ysclong

纵轴方向该单元格起始在第几个单元格

3
yeclong

纵轴方向该单元格结束在第几个单元格

1
posarray<object>

单元格位置列表

posobject

单元格位置

xlong

x 坐标

33
ylong

y 坐标

11

示例

正常返回示例

JSON格式

{
  "code": "success",
  "message": "success",
  "requestId": "377A48D7-7CFA-53F9-8CA2-14FE3F2774B6",
  "success": true,
  "httpStatusCode": 200,
  "synchro": true,
  "data": {
    "traceId": "213e391517328463424251152ec9fb",
    "translation": {
      "angle": 0,
      "width": 800,
      "height": 800,
      "orgWidth": 800,
      "orgHeight": 800,
      "boxesCount": 13,
      "boundingBoxes": [
        {
          "upLeft": {
            "x": 10,
            "y": 66
          },
          "upRight": {
            "x": 328,
            "y": 69
          },
          "downLeft": {
            "x": 9,
            "y": 145
          },
          "downRight": {
            "x": 327,
            "y": 148
          },
          "confidence": 0.99,
          "text": "修护头皮",
          "direction": 0,
          "tableId": 1,
          "tableCellId": 1,
          "translation": {
            "en": "Restore Scalp Health"
          }
        }
      ],
      "tableInfos": [
        {
          "tableId": 1,
          "xCellSize": 50,
          "yCellSize": 50,
          "cellInfos": [
            {
              "tableCellId": 1,
              "text": "活动价",
              "xsc": 1,
              "xec": 2,
              "ysc": 3,
              "yec": 1,
              "pos": [
                {
                  "x": 33,
                  "y": 11
                }
              ]
            }
          ]
        }
      ]
    }
  }
}

错误码

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.

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