Image Translation Pro Version Layer Data Result Query API Reference
The Image Translation Pro result data query API provides complete translation parameters, such as text position, color, and size, for secondary editing and optimization in an editor. First, obtain a task ID Image Translation Pro Version API Synchronous Interface, then use this API to get the detailed parameter information.
Request Parameter
Parameter
Parameter
Type
Required
Description
paramJson
Object
true
srcImage
String
true
The field src_image
in the response of the Image Translation Pro Editor or Image Translation Pro Synchronous API.
editInfo
String
true
The field edit_info (in JSON string format) in the response of the Image Translation Pro Editor or Image Translation Pro Synchronous API. Note: If modification of the text after image composition is required, please manually parse the edit_info field and edit the value at edit_info.textAreas.texts.value level.
Sample Request
request.setApiName("/ai/image/translation_mllm/imageData");
// If you have not purchased a formal quota, please add a trial flag; otherwise, you will receive a NoResource error code.
// request.addHeaderParameter("x-iop-trial","true");
JSONObject jsonObject = new JSONObject();
jsonObject.put("editInfo", "{\"goodsRects\":{\"top\":238,\"left\":0,\"width\":631,\"height\":459},\"languages\":[\"ja\"],\"resultImageIds\":[\"58538d2a-5258-11f0-b542-00163e0eb98a\"],\"textAreas\":[{\"horizontalLayout\":\"left\",\"verticalLayout\":\"center\",\"color\":\"#000000\",\"texts\":[{\"valid\":true,\"horizontalLayout\":\"left\",\"verticalLayout\":\"center\",\"color\":\"#525252\",\"ovis_err_msg\":\"| ovis time: 1.655\",\"imageRect\":{\"top\":78,\"left\":39,\"width\":429,\"degree\":0,\"height\":65},\"fontsize\":40,\"language\":\"ja\",\"value\":\"かわいいデザイン・クリアなベル音\",\"textRect\":{\"top\":91,\"left\":48,\"width\":700,\"degree\":0,\"height\":40},\"trans_model_name\":\"MarcoVL2-8B-PicTrans\",\"lineCount\":1}],\"fontsize\":40,\"content\":\"萌趣造型·清脆响铃\",\"lineCount\":1},{\"horizontalLayout\":\"left\",\"verticalLayout\":\"center\",\"color\":\"#000000\",\"texts\":[{\"valid\":true,\"horizontalLayout\":\"left\",\"verticalLayout\":\"center\",\"color\":\"#a2a2a2\",\"ovis_err_msg\":\"| ovis time: 1.655\",\"imageRect\":{\"top\":146,\"left\":39,\"width\":460,\"degree\":0,\"height\":76},\"fontsize\":27,\"language\":\"ja\",\"value\":\"揺れるとクリアなベル音が鳴り、子供の目を引きます\",\"textRect\":{\"top\":154,\"left\":45,\"width\":700,\"degree\":0,\"height\":60},\"trans_model_name\":\"MarcoVL2-8B-PicTrans\",\"lineCount\":1}],\"fontsize\":23,\"content\":\"在摇晃的时候,会发出清脆的铃铃声 吸引孩子目光\",\"lineCount\":2},{\"horizontalLayout\":\"right\",\"verticalLayout\":\"center\",\"color\":\"#000000\",\"texts\":[{\"valid\":true,\"horizontalLayout\":\"right\",\"verticalLayout\":\"center\",\"color\":\"#098b98\",\"ovis_err_msg\":\"| ovis time: 1.655\",\"imageRect\":{\"top\":224,\"left\":616,\"width\":160,\"degree\":0,\"height\":94},\"fontsize\":22,\"language\":\"ja\",\"value\":\"ベルベルベル\",\"textRect\":{\"top\":251,\"left\":629,\"width\":134,\"degree\":15.036200506607228,\"height\":40},\"trans_model_name\":\"MarcoVL2-8B-PicTrans\",\"lineCount\":1}],\"fontsize\":41,\"content\":\"铃铃铃\",\"lineCount\":1}],\"repairedUrl\":\"https://aib-image.oss-ap-southeast-1.aliyuncs.com/tufan%2F574da64a-5258-11f0-a074-00163e0eb98a.png?OSSAccessKeyId=LTAI5tSEGjGp5wixZgHLc3bV&Expires=4967591982&Signature=Dm2Ck8zobVXmVluvfsRdjtbneo4%3D\",\"font\":[\"AlibabaSansJP-Bold\"]}");
jsonObject.put("srcImage", "https://img.alicdn.com/imgextra/i3/O1CN01HTDhDi28Fd85ZYs7H_!!6000000007903-0-tps-800-800.jpg");
request.addApiParameter("paramJson", jsonObject.toString());
IopResponse response = client.execute(request);
System.out.println(response.getBody());
Thread.sleep(10);
// Request Parameter Example
{
"editInfo":"{\"goodsRects\":{\"top\":238,\"left\":0,\"width\":631,\"height\":459},\"languages\":[\"ja\"],\"resultImageIds\":[\"58538d2a-5258-11f0-b542-00163e0eb98a\"],\"textAreas\":[{\"horizontalLayout\":\"left\",\"verticalLayout\":\"center\",\"color\":\"#000000\",\"texts\":[{\"valid\":true,\"horizontalLayout\":\"left\",\"verticalLayout\":\"center\",\"color\":\"#525252\",\"ovis_err_msg\":\"| ovis time: 1.655\",\"imageRect\":{\"top\":78,\"left\":39,\"width\":429,\"degree\":0,\"height\":65},\"fontsize\":40,\"language\":\"ja\",\"value\":\"かわいいデザイン・クリアなベル音\",\"textRect\":{\"top\":91,\"left\":48,\"width\":700,\"degree\":0,\"height\":40},\"trans_model_name\":\"MarcoVL2-8B-PicTrans\",\"lineCount\":1}],\"fontsize\":40,\"content\":\"萌趣造型·清脆响铃\",\"lineCount\":1},{\"horizontalLayout\":\"left\",\"verticalLayout\":\"center\",\"color\":\"#000000\",\"texts\":[{\"valid\":true,\"horizontalLayout\":\"left\",\"verticalLayout\":\"center\",\"color\":\"#a2a2a2\",\"ovis_err_msg\":\"| ovis time: 1.655\",\"imageRect\":{\"top\":146,\"left\":39,\"width\":460,\"degree\":0,\"height\":76},\"fontsize\":27,\"language\":\"ja\",\"value\":\"揺れるとクリアなベル音が鳴り、子供の目を引きます\",\"textRect\":{\"top\":154,\"left\":45,\"width\":700,\"degree\":0,\"height\":60},\"trans_model_name\":\"MarcoVL2-8B-PicTrans\",\"lineCount\":1}],\"fontsize\":23,\"content\":\"在摇晃的时候,会发出清脆的铃铃声 吸引孩子目光\",\"lineCount\":2},{\"horizontalLayout\":\"right\",\"verticalLayout\":\"center\",\"color\":\"#000000\",\"texts\":[{\"valid\":true,\"horizontalLayout\":\"right\",\"verticalLayout\":\"center\",\"color\":\"#098b98\",\"ovis_err_msg\":\"| ovis time: 1.655\",\"imageRect\":{\"top\":224,\"left\":616,\"width\":160,\"degree\":0,\"height\":94},\"fontsize\":22,\"language\":\"ja\",\"value\":\"ベルベルベル\",\"textRect\":{\"top\":251,\"left\":629,\"width\":134,\"degree\":15.036200506607228,\"height\":40},\"trans_model_name\":\"MarcoVL2-8B-PicTrans\",\"lineCount\":1}],\"fontsize\":41,\"content\":\"铃铃铃\",\"lineCount\":1}],\"repairedUrl\":\"https://aib-image.oss-ap-southeast-1.aliyuncs.com/tufan%2F574da64a-5258-11f0-a074-00163e0eb98a.png?OSSAccessKeyId=LTAI5tSEGjGp5wixZgHLc3bV&Expires=4967591982&Signature=Dm2Ck8zobVXmVluvfsRdjtbneo4%3D\",\"font\":[\"AlibabaSansJP-Bold\"]}",
"srcImage":"https://img.alicdn.com/imgextra/i3/O1CN01HTDhDi28Fd85ZYs7H_!!6000000007903-0-tps-800-800.jpg"
}
IopClient client = new IopClientImpl(url, appkey, appSecret);
IopRequest request = new IopRequest();
request.
Response Parameters
Parameter
Parameter
Type
Description
imageResult
Object[]
response result
preview
String
image url
language
String
language
id
String
request ID
templateJson
String
Layer structure: refer to the response example and parse it yourself.
resCode
Number
response code 200
resMessage
String
response message
request_id
String
requestID
_trace_id_
String
Trace
Sample Response
{
"resCode": 200,
"resMessage": "success",
"imageResultList": [
{
"preview": "https://piccopilot.oss-accelerate.aliyuncs.com/compose/c38e7aca-eb0e-4574-b726-4a4e00af34bb.png?OSSAccessKeyId=LTAI5tR9CxJh5q35LYbhGAeT&Expires=4967594083&Signature=9IOKe90SO%2B4B%2F8P4%2F7mPi4vi1%2Bs%3D",
"language": "ja",
"id": "1121f7bc-50a9-11f0-b0c1-00163e0eb98a",
"templateJson": "{\"id\":\"1121f7bc-50a9-11f0-b0c1-00163e0eb98a\",\"language\":\"ja\",\"type\":\"template\",\"layers\":[{\"type\":\"image\",\"top\":400,\"left\":400,\"width\":800,\"height\":800,\"scaleX\":1,\"scaleY\":1,\"selectable\":false,\"visible\":true,\"opacity\":1,\"rotate\":0,\"flipX\":false,\"flipY\":false,\"locked\":true,\"id\":\"030d081e-9de4-488f-bd24-264a6eacd877\",\"src\":\"https://aib-image.oss-ap-southeast-1.aliyuncs.com/tufan%2F103b14be-50a9-11f0-9ae9-00163e0eb98a.png?OSSAccessKeyId=LTAI5tSEGjGp5wixZgHLc3bV&Expires=4967406750&Signature=TX07haYQNNhPM7Oi09buUGTUcNc%3D\",\"zIndex\":1},{\"visible\":true,\"opacity\":1,\"rotate\":0,\"flipX\":false,\"flipY\":false,\"locked\":false,\"id\":\"0f8d13fd-4919-4ab8-aec5-3b0da08e1669\",\"type\":\"text\",\"splitByGrapheme\":true,\"direction\":\"ltr\",\"top\":111,\"left\":398,\"width\":700,\"height\":40,\"fontSize\":40,\"content\":\"かわいいデザイン・クリアなベル\",\"originalFontSize\":40,\"originalContent\":\"萌趣造型·清脆响铃\",\"scaleX\":1,\"scaleY\":1,\"fontFamily\":\"AlibabaSansJP-Bold\",\"textAlign\":\"left\",\"fontStyle\":\"normal\",\"fontWeight\":\"normal\",\"color\":\"#525252\",\"backgroundColor\":\"transparent\",\"textDecoration\":\"none\",\"zIndex\":2,\"refId\":\"408582b3-4389-4a9c-949a-be5aea081c37\"},{\"visible\":false,\"opacity\":1,\"rotate\":0,\"flipX\":false,\"flipY\":false,\"locked\":true,\"id\":\"408582b3-4389-4a9c-949a-be5aea081c37\",\"type\":\"image\",\"top\":110.5,\"left\":253.5,\"width\":429,\"height\":65,\"scaleX\":1,\"scaleY\":1,\"src\":\"https://piccopilot.oss-accelerate.aliyuncs.com/compose/9c048443-d11e-4e58-a207-168349785121.png?OSSAccessKeyId=LTAI5tR9CxJh5q35LYbhGAeT&Expires=4967594083&Signature=qSL6CxE5uXdeuxvaMLbzK4KtRY0%3D\",\"zIndex\":2,\"refId\":\"0f8d13fd-4919-4ab8-aec5-3b0da08e1669\"},{\"visible\":true,\"opacity\":1,\"rotate\":0,\"flipX\":false,\"flipY\":false,\"locked\":false,\"id\":\"2d28fcea-5061-4837-8a18-e52a4ccbee24\",\"type\":\"text\",\"splitByGrapheme\":true,\"direction\":\"ltr\",\"top\":184,\"left\":395,\"width\":700,\"height\":60,\"fontSize\":27,\"content\":\"揺れるとクリアなベルの音が鳴り、子供の目を引きます\",\"originalFontSize\":27,\"originalContent\":\"在摇晃的时候,会发出清脆的铃铃声 吸引孩子目光\",\"scaleX\":1,\"scaleY\":1,\"fontFamily\":\"AlibabaSansJP-Bold\",\"textAlign\":\"left\",\"fontStyle\":\"normal\",\"fontWeight\":\"normal\",\"color\":\"#a2a2a2\",\"backgroundColor\":\"transparent\",\"textDecoration\":\"none\",\"zIndex\":3,\"refId\":\"b97e871d-fc70-42e5-b463-a12d0c1134ae\"},{\"visible\":false,\"opacity\":1,\"rotate\":0,\"flipX\":false,\"flipY\":false,\"locked\":true,\"id\":\"b97e871d-fc70-42e5-b463-a12d0c1134ae\",\"type\":\"image\",\"top\":184,\"left\":269,\"width\":460,\"height\":76,\"scaleX\":1,\"scaleY\":1,\"src\":\"https://piccopilot.oss-accelerate.aliyuncs.com/compose/0c1563f0-b543-4fd0-8d4e-0edf76f6e07b.png?OSSAccessKeyId=LTAI5tR9CxJh5q35LYbhGAeT&Expires=4967594083&Signature=7HjrSFctkkpEmCGGdkhmGTgni5Y%3D\",\"zIndex\":3,\"refId\":\"2d28fcea-5061-4837-8a18-e52a4ccbee24\"},{\"visible\":true,\"opacity\":1,\"rotate\":-15.036200506607228,\"flipX\":false,\"flipY\":false,\"locked\":false,\"id\":\"9d9934ab-cddd-45ce-b204-31d9eb4dc72f\",\"type\":\"text\",\"splitByGrapheme\":true,\"direction\":\"ltr\",\"top\":271,\"left\":696,\"width\":134,\"height\":40,\"fontSize\":22,\"content\":\"ベルベルベル\",\"originalFontSize\":22,\"originalContent\":\"铃铃铃\",\"scaleX\":1,\"scaleY\":1,\"fontFamily\":\"AlibabaSansJP-Bold\",\"textAlign\":\"right\",\"fontStyle\":\"normal\",\"fontWeight\":\"normal\",\"color\":\"#098b98\",\"backgroundColor\":\"transparent\",\"textDecoration\":\"none\",\"zIndex\":4,\"refId\":\"af89ca82-9807-472a-aa07-de0717ab7a01\"},{\"visible\":false,\"opacity\":1,\"rotate\":0,\"flipX\":false,\"flipY\":false,\"locked\":true,\"id\":\"af89ca82-9807-472a-aa07-de0717ab7a01\",\"type\":\"image\",\"top\":271,\"left\":696,\"width\":160,\"height\":94,\"scaleX\":1,\"scaleY\":1,\"src\":\"https://piccopilot.oss-accelerate.aliyuncs.com/compose/05c23cb4-2c5a-4677-be8c-ef192c7e2f0a.png?OSSAccessKeyId=LTAI5tR9CxJh5q35LYbhGAeT&Expires=4967594083&Signature=JKwkTm2hc20kpFu1BeAvzVZmAiw%3D\",\"zIndex\":4,\"refId\":\"9d9934ab-cddd-45ce-b204-31d9eb4dc72f\"},{\"id\":\"6ef076aa-0513-43e2-83e3-6411f61c0c27\",\"type\":\"image\",\"top\":400,\"left\":400,\"width\":800,\"height\":800,\"scaleX\":1,\"scaleY\":1,\"selectable\":false,\"visible\":false,\"opacity\":1,\"rotate\":0,\"flipX\":false,\"flipY\":false,\"locked\":false,\"src\":\"https://piccopilot.oss-accelerate.aliyuncs.com/compose/accc8119-8450-4f56-b772-12b55454906e.png?OSSAccessKeyId=LTAI5tR9CxJh5q35LYbhGAeT&Expires=4967508381&Signature=TxQm4vALW1%2BqOfCPoUIdBEGtgHI%3D\",\"zIndex\":8,\"label\":\"original\"}],\"width\":800,\"height\":800,\"backgroundColor\":\"transparent\"}"
}
],
"code": "0",
"request_id": "2151fa1917509220821592659",
"_trace_id_": "0be29def17509220818572201e10ae"
}
Errors
Error Code
Error Message
Description
501
rate limit exceed
The current interface has reached the current limit. Please contact us via Discord or email us ([email protected]) to increase the current limit value.
700
invalid input
The format of the input parameters does not meet the requirements, and resMessage
will return detailed fields that do not meet the requirements.
801
model failed
Internal call exception,please contact us via Discord or email us ([email protected]) for troubleshooting.
900
tpp url error
Internal call exception,please contact us via Discord or email us ([email protected]) for troubleshooting.
1000
content has sensitive data, please try other input
Content has sensitive data, please try other input.
1001
content control failed, please retry
Content control failed, please retry.
1002
content risk filter failed, please contact us
Content risk filter failed. Please contact us via Discord or email us ([email protected]).
Last updated
Was this helpful?