图片翻译结果数据查询API调用说明

图片翻译结果数据查询API

GET/POST /ai/image/translation/imageData

图片翻译结果数据协议查询,可获取图片翻译完整参数数据,适用于放入编辑器进行二次编辑优化。您可先通过图片翻译的接口获取任务 ID,再通过当前接口获取对应的文字位置、颜色、大小等参数信息。

请求参数

参数名称
类型
必填
参数描述及示例值

imageEditorId

String

I图片翻译结果参数协议查询ID。

示例值:"aabe5b16-df78-11ee-baa1-00163e0c5518"

请求示例

[
  {
    "imageEditorId": "aabe5b16-df78-11ee-baa1-00163e0c5518",
    "scene": "Test-Scene"
  }
]

响应参数

参数名称
类型
参数描述

imageEditorId

String

图片翻译结果参数协议查询ID。

imageEditor

String

图片翻译结果协议内容,即完整的结果参数信息。

错误码

错误码
错误信息
描述

501

rate limit exceed

当前接口已达到限流上限,请通过导航栏或搜Aidge产品咨询&服务群钉钉群号:105455001046,入群联系我们增加当前限制值。

700

invalid input

输入参数的格式不符合要求,resMessage 将返回详细的不符合要求的字段。

801

model failed

内部调用异常,请通过导航栏或或搜Aidge产品咨询&服务群钉钉群号:105455001046,入群联系我们进行故障排除。

900

tpp url error

内部调用异常,请通过导航栏或或搜Aidge产品咨询&服务群钉钉群号:105455001046,入群联系我们进行故障排除。

1000

content has sensitive data, please try other input

内容包含敏感数据,请尝试其他输入。

1001

content control failed, please retry

风控服务运行失败,请重试。

1002

content risk filter failed, please contact us

风控服务运行异常,请通过导航栏或或搜Aidge产品咨询&服务群钉钉群号:105455001046,入群联系我们。

Sample Response响应示例

{
  "code": 200,
  "data": {
    "imageEditor": "{\"id\":\"aabe5b16-df78-11ee-baa1-00163e0c5518\",\"language\":\"en\",\"type\":\"template\",\"layers\":[{\"type\":\"image\",\"top\":525,\"left\":400,\"width\":800,\"height\":1050,\"scaleX\":1,\"scaleY\":1,\"selectable\":false,\"visible\":true,\"opacity\":1,\"rotate\":0,\"flipX\":false,\"flipY\":false,\"locked\":true,\"id\":\"991efdcc-1716-4061-9034-ccb17754b824\",\"src\":\"https://nhci-aigc.oss-cn-zhangjiakou.aliyuncs.com/ppc-records%2Fimage-translation%2Fa9865c6c-df78-11ee-acd3-00163e0c5518.png?OSSAccessKeyId=LTAI5tCv9DpB7gYic1oGsAyv&Expires=4926813983&Signature=UWG0Fhs721Ec72xF%2BiLmzda5ad0%3D\",\"zIndex\":1},{\"visible\":true,\"opacity\":1,\"rotate\":0,\"flipX\":false,\"flipY\":false,\"locked\":false,\"id\":\"f3fd14e0-fe5d-4f74-b99f-abbd171fc98e\",\"type\":\"text\",\"top\":93,\"left\":402.5,\"width\":151,\"height\":28,\"fontSize\":15,\"content\":\"Bold Steel Wire Lock\",\"originalFontSize\":28,\"scaleX\":1,\"scaleY\":1,\"fontFamily\":\"AlibabaSansSEA\",\"textAlign\":\"left\",\"fontStyle\":\"normal\",\"fontWeight\":\"normal\",\"color\":\"#000000\",\"backgroundColor\":\"transparent\",\"textDecoration\":\"none\",\"zIndex\":2,\"refId\":\"6dfdc821-792a-42b7-84e6-d05fc42b3df0\"},{\"visible\":false,\"opacity\":1,\"rotate\":0,\"flipX\":false,\"flipY\":false,\"locked\":true,\"id\":\"6dfdc821-792a-42b7-84e6-d05fc42b3df0\",\"type\":\"image\",\"top\":93,\"left\":402.5,\"width\":161,\"height\":44,\"scaleX\":1,\"scaleY\":1,\"src\":\"https://imagine-oss.oss-accelerate.aliyuncs.com/compose/b94e74b1-c141-4c47-b349-f0c41fb8424a.png?OSSAccessKeyId=LTAI5tR9CxJh5q35LYbhGAeT&Expires=4926813986&Signature=Hos3vJv6%2BZXx4H0r8rnl1WcvETI%3D\",\"zIndex\":2,\"refId\":\"f3fd14e0-fe5d-4f74-b99f-abbd171fc98e\"},{\"visible\":true,\"opacity\":1,\"rotate\":0,\"flipX\":false,\"flipY\":false,\"locked\":false,\"id\":\"fd19e6a0-4240-473a-83ab-514b2f2d3d41\",\"type\":\"text\",\"top\":411.5,\"left\":411.5,\"width\":377,\"height\":41,\"fontSize\":18,\"content\":\"Copper lock cylinder bold and lengthened\",\"originalFontSize\":41,\"scaleX\":1,\"scaleY\":1,\"fontFamily\":\"AlibabaSansSEA\",\"textAlign\":\"left\",\"fontStyle\":\"normal\",\"fontWeight\":\"normal\",\"color\":\"#000000\",\"backgroundColor\":\"transparent\",\"textDecoration\":\"none\",\"zIndex\":5,\"refId\":\"ca3c7ae3-6a34-4719-abc9-233fd5572b37\"},{\"visible\":false,\"opacity\":1,\"rotate\":0,\"flipX\":false,\"flipY\":false,\"locked\":true,\"id\":\"ca3c7ae3-6a34-4719-abc9-233fd5572b37\",\"type\":\"image\",\"top\":411.5,\"left\":411.5,\"width\":393,\"height\":65,\"scaleX\":1,\"scaleY\":1,\"src\":\"https://imagine-oss.oss-accelerate.aliyuncs.com/compose/0701499d-a228-402e-9e9f-2d6c39c47353.png?OSSAccessKeyId=LTAI5tR9CxJh5q35LYbhGAeT&Expires=4926813986&Signature=MFyALi%2Bos0JD8GzqnjrxDCaAEy8%3D\",\"zIndex\":5,\"refId\":\"fd19e6a0-4240-473a-83ab-514b2f2d3d41\"},{\"visible\":true,\"opacity\":1,\"rotate\":0,\"flipX\":false,\"flipY\":false,\"locked\":false,\"id\":\"96065f30-2272-4d26-9a30-73dd6da35db4\",\"type\":\"text\",\"top\":295,\"left\":411,\"width\":488,\"height\":24,\"fontSize\":15,\"content\":\"Steel wire is made of high-strength steel wire composite winding\",\"originalFontSize\":24,\"scaleX\":1,\"scaleY\":1,\"fontFamily\":\"AlibabaSansSEA\",\"textAlign\":\"left\",\"fontStyle\":\"normal\",\"fontWeight\":\"normal\",\"color\":\"#000000\",\"backgroundColor\":\"transparent\",\"textDecoration\":\"none\",\"zIndex\":4,\"refId\":\"e7c14fbd-6f73-4cd8-a715-94cf316cbbca\"},{\"visible\":false,\"opacity\":1,\"rotate\":0,\"flipX\":false,\"flipY\":false,\"locked\":true,\"id\":\"e7c14fbd-6f73-4cd8-a715-94cf316cbbca\",\"type\":\"image\",\"top\":295,\"left\":411,\"width\":496,\"height\":38,\"scaleX\":1,\"scaleY\":1,\"src\":\"https://imagine-oss.oss-accelerate.aliyuncs.com/compose/2df51c00-d45c-41d6-9f8e-3a7f45265b1d.png?OSSAccessKeyId=LTAI5tR9CxJh5q35LYbhGAeT&Expires=4926813986&Signature=vYrNP%2BCZcjl%2FWcwx3E6NW3tR0ss%3D\",\"zIndex\":4,\"refId\":\"96065f30-2272-4d26-9a30-73dd6da35db4\"},{\"visible\":true,\"opacity\":1,\"rotate\":0,\"flipX\":false,\"flipY\":false,\"locked\":false,\"id\":\"9bcb7b84-ddc8-44ac-8a90-a932ff0d0ecd\",\"type\":\"text\",\"top\":186.5,\"left\":406,\"width\":406,\"height\":73,\"fontSize\":42,\"content\":\"Bold Steel Wire Lock\",\"originalFontSize\":73,\"scaleX\":1,\"scaleY\":1,\"fontFamily\":\"AlibabaSansSEA\",\"textAlign\":\"left\",\"fontStyle\":\"normal\",\"fontWeight\":\"normal\",\"color\":\"#000000\",\"backgroundColor\":\"transparent\",\"textDecoration\":\"none\",\"zIndex\":3,\"refId\":\"ba4464b8-a4b3-4b59-9197-8e957d3eba5c\"},{\"visible\":false,\"opacity\":1,\"rotate\":0,\"flipX\":false,\"flipY\":false,\"locked\":true,\"id\":\"ba4464b8-a4b3-4b59-9197-8e957d3eba5c\",\"type\":\"image\",\"top\":186.5,\"left\":406,\"width\":434,\"height\":115,\"scaleX\":1,\"scaleY\":1,\"src\":\"https://imagine-oss.oss-accelerate.aliyuncs.com/compose/42441141-f608-4e2a-b708-8c400b5adcdd.png?OSSAccessKeyId=LTAI5tR9CxJh5q35LYbhGAeT&Expires=4926813986&Signature=NkGhywqVt2urxLFNypgMu1KBWfY%3D\",\"zIndex\":3,\"refId\":\"9bcb7b84-ddc8-44ac-8a90-a932ff0d0ecd\"},{\"visible\":true,\"opacity\":1,\"rotate\":0,\"flipX\":false,\"flipY\":false,\"locked\":false,\"id\":\"174fc861-000c-4ea1-9b52-d23c14149747\",\"type\":\"text\",\"top\":1020.5,\"left\":397.5,\"width\":765,\"height\":23,\"fontSize\":16,\"content\":\"Scope of Application: bicycles, motorcycles, electric vehicles, iron sliding doors, glass doors, etc.\",\"originalFontSize\":23,\"scaleX\":1,\"scaleY\":1,\"fontFamily\":\"AlibabaSansSEA\",\"textAlign\":\"left\",\"fontStyle\":\"normal\",\"fontWeight\":\"normal\",\"color\":\"#000000\",\"backgroundColor\":\"transparent\",\"textDecoration\":\"none\",\"zIndex\":6,\"refId\":\"d4dc458c-634d-418a-8003-14e330b7d780\"},{\"visible\":false,\"opacity\":1,\"rotate\":0,\"flipX\":false,\"flipY\":false,\"locked\":true,\"id\":\"d4dc458c-634d-418a-8003-14e330b7d780\",\"type\":\"image\",\"top\":1020.5,\"left\":397.5,\"width\":773,\"height\":35,\"scaleX\":1,\"scaleY\":1,\"src\":\"https://imagine-oss.oss-accelerate.aliyuncs.com/compose/6a37840d-bcc7-4ac4-9e72-324c532a4b88.png?OSSAccessKeyId=LTAI5tR9CxJh5q35LYbhGAeT&Expires=4926813986&Signature=iKtf26Q6qFyOpzrGs54%2BGWCNhcg%3D\",\"zIndex\":6,\"refId\":\"174fc861-000c-4ea1-9b52-d23c14149747\"},{\"id\":\"880f9cc5-dd00-4c6f-a94d-5a61743ab161\",\"type\":\"image\",\"top\":525,\"left\":400,\"width\":800,\"height\":1050,\"scaleX\":1,\"scaleY\":1,\"selectable\":false,\"visible\":false,\"opacity\":1,\"rotate\":0,\"flipX\":false,\"flipY\":false,\"locked\":false,\"src\":\"https://nhci-aigc.oss-cn-zhangjiakou.aliyuncs.com/ppc-records/image-translation/a7ef2df2-845b-11ee-b8ac-00163e0639e8.png?OSSAccessKeyId=LTAI5tCv9DpB7gYic1oGsAyv&Expires=4916795969&Signature=jJyqT8GLLlmzpUEeKiiG13RBSm4=\",\"zIndex\":12,\"label\":\"original\"}],\"width\":800,\"height\":1050,\"backgroundColor\":\"transparent\"}",
    "imageEditorId": "aabe5b16-df78-11ee-baa1-00163e0c5518"
  },
  "requestId": "2132b41c17101454105751074ea449",
  "success": true,
  "message": "success"
}

Last updated