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

Name
Type
Required
Description

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

Name
Type
Description

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.

obj_character / noobj_character indicates whether there is text in the main/non-main body area of the image, true means there is, false means there isn't;

obj_npx / noobj_npx indicates whether there are text-containing blocks in the main/non-main body area of the image;

obj_watermark / noobj_watermark indicates whether there is a watermark in the main/non-main body area of the image;

obj_logo / noobj_logo indicates whether there is a logo in the main/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": {
        "taskResult": [
            {
                "usage": 1,
                "taskResult": {
                    "result": {
                        "code": 0,
                        "data": {
                            "noobj_character": true,
                            "noobj_npx": false,
                            "noobj_watermark": false,
                            "obj_logo": false,
                            "obj_watermark": false,
                            "noobj_logo": false,
                            "obj_character": true,
                            "obj_npx": false
                        },
                        "message": "success"
                    },
                    "usage": 1
                },
                "taskStatus": "finished",
                "requestBizId": ""
            }
        ],
        "taskStatus": "finished"
    },
    "requestId": "0b51259117319376514557374e2580",
    "success": true,
    "resCode": 200,
    "resMessage": "success",
    "code": "0",
    "request_id": "2151fa1917319376516431433",
    "_trace_id_": "0b51259117319376514557374e2580"
}

Errors

Error Code
Error Message
Description

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.

Last updated