Image Elements Detection Query API Reference

Image Elements Detection Query

GET/POST /ai/image/detection/query

Using the taskID obtained from the Image Elements Detection Submit API, you can call this API to query the results of the background-generated images.

Request Parameters

NameTypeRequiredDescription

taskId

String

Yes

The taskId obtained through the submission interface.

Sample Request

IopClient client = new IopClient(url, appkey, appSecret);
IopRequest request = new IopRequest();
request.setApiName("/ai/image/detection/query");
request.addApiParameter("taskId", "70a63d93-9cf5-45b1-9c4e-a4141cc534a4");
IopResponse response = client.execute(request);
System.out.println(response.getBody());
Thread.sleep(10);

Response Parameters

NameTypeDescription

resCode

Number

Response code; 200 indicates a successful call, other codes can refer to error code information.

data

Object

The structure of the returned result.

For example, productCharacter refers to the text in the main body area of the image, while backgroundCharacter refers to the text in the non-main body area of the image.

requestId

String

The request ID; used to identify a unique request call.

success

Boolean

Whether the operation was successful; true for success, false for failure.

resMessage

String

Error message, such as "content has sensitive data, please try other input"

Sample Response

{
  "data": {
    "usage": 0,
    "taskResult": [
      {
        "usage": 1,
        "taskResult": {
          "productSemitransparentElement": false,
          "backgroundQRCode": false,
          "usage": 1,
          "backgroundSemitransparentElement": false,
          "productColorBlocksWithCharacter": false,
          "productCharacter": false,
          "backgroundCharacter": true,
          "productSpecificName": false,
          "productQRCode": false,
          "backgroundColorBlocksWithCharacter": true,
          "backgroundSpecificName": false,
          "class": "com.aidc.service.api.client.image.dto.ImageDetectResponse"
        },
        "class": "com.aidc.service.api.client.image.dto.ImageDetectResultResponse",
        "taskStatus": "finished",
        "requestBizId": "1234"
      }
    ],
    "class": "com.aidc.service.api.client.image.dto.BatchImageDetectResultResponse",
    "taskId": "70a63d93-9cf5-45b1-9c4e-a4141cc534a4",
    "taskStatus": "finished"
  },
  "requestId": "2140e84617193040567071025e3436",
  "success": true,
  "resCode": 200,
  "resMessage": "success",
  "code": "0",
  "request_id": "21015e2217193040567094314",
  "_trace_id_": "2140e84617193040567071025e3436"
}

Errors

Error CodeError MessageDescription

200

success

The call was successful.

501

rate limit exceed

The current interface has reached the rate limit. Please contact us via navigation bar or email us (aidge_support@service.alibaba.com) to increase the limit.

700

invalid input

The format of the input parameters does not meet the requirements, and resMessage will return detailed information about the non-compliance.

801

model failed

An internal model call exception occurred. Please contact us via navigation bar or email us (aidge_support@service.alibaba.com) for troubleshooting.

900

tpp url error

An internal TPP URL call exception occurred. Please contact us via navigation bar or email us (aidge_support@service.alibaba.com) for troubleshooting.

1000

content has sensitive data, please try other input

The request contains sensitive information which is not supported at the moment. Please try other inputs.

1001

content control failed, please retry

The content control service failed to run. Please retry. If the error persists after retrying, please contact us via navigation bar or email us (aidge_support@service.alibaba.com).

1002

content risk filter failed, please contact us

The content risk filter service encountered an exception.Please contact us via navigation bar or email us (aidge_support@service.alibaba.com).

Notice

By using this API, you confirm that you are a legal owner of all intellectual property rights pertaining to the data and content that you provide to us via the API, or have obtained the necessary authorizations for us to receive and use the same from you. You further agree that you will not use this product or any output thereof for any unlawful, unethical, unauthorized or harmful activities.