This topic describes the data returned by ImAudit.
Data returned for image moderation
| Parameter | Type | Example | Description |
| code | Integer | 200 | The returned HTTP status code. |
| msg | String | OK | The message that is returned for the request. |
| dataId | String | uuid-1234-1234-1234 | The ID of the moderated object. Note If you specify the dataId parameter in the request, the dataId parameter is returned in the response. |
| taskId | String | img4wlJcb7p4wH4lAP3111111-123456 | The ID of the moderation task. |
| url | String | http://xxx.xxx.xxx/xxx.jpg | The URL of the moderation object. |
| extras | JSONObject | {"hitLibInfo":[{"context":"Haokan","libCode":"2144002","libName":"Text pattern library a"}]} | Additional information about the image. If the scene parameter is ad, the extras parameter can return the following content: hitLibInfo: the information about the custom text library that the detected text in the moderated image hits. The value of this parameter is an array. For more information about the structure, see hitLibInfo. |
| results | JSONArray | The returned results. If the call is successful, the returned results contain one or more elements. Each element is a structure. For more information about the structure, see result. |
| Parameter | Type | Example | Description |
| scene | String | porn | The image detection scenario. Valid values:
|
| label | String | sexy | The category of the detection results. Valid values vary based on the specified moderation scenario.
|
| sublabel | String | porn | If the scene parameter is set to porn or terrorism, the subcategory of the moderation result can be returned. |
| suggestion | String | block | The suggested course of action. Valid values:
|
| rate | Float | 91.54 | The score of the confidence level. Valid values: 0 to 100. A greater value indicates a higher confidence level. If a value of pass is returned for the suggestion parameter, a higher confidence level indicates a higher probability that the content is normal. If a value of review or block is returned for the suggestion parameter, a lower confidence level indicates a higher probability that the content contains violations. Important This score is only for reference. We strongly recommend that you do not use this score in your business. We recommend that you use the values that are returned for the suggestion, label, and sublabel parameters to determine whether the content contains violations. The sublabel parameter is returned by some operations. |
| frames | JSONArray | If the temporary access URL of the image is too long, a truncated temporary access URL is returned for each frame. For more information about the structure, see frame. | |
| hintWordsInfo | JSONArray | The information about the text that is detected in the moderated image. Detected text include ads or words that match high-risk words. For more information about the structure, see hintWordsInfo. Note This parameter is applicable only to ad violation detection. | |
| qrcodeData | StringArray | {"http://example.com/01ZZOliO"} | The information about content hidden behind QR codes in the moderated image. Note This parameter is applicable only to QR code detection. |
| qrcodeLocations | JSONArray | The coordinate information about the detected QR code in the moderated image. For more information about the structure, see qrcodeLocation. | |
| programCodeData | JSONArray | The coordinate information about the detected mini program code in the moderated image. For more information about the structure, see programCodeData. Note This parameter is applicable only to mini program code detection. Make sure that mini program code detection is enabled. | |
| logoData | JSONArray | The information about the detected logo in the moderated image. For more information about the structure, see logoData. Note This parameter is applicable only to logo detection. | |
| sfaceData | JSONArray | The information about the detected terrorist content in the moderated image. For more information about the structure, see sfaceData. Note This parameter is applicable only to terrorist content detection. | |
| ocrData | StringArray | The information about the detected complete text in the moderated image. |
| Parameter | Type | Example | Description |
| rate | Float | 89.85 | The score of the confidence level. Valid values: 0 to 100. A higher confidence level indicates higher reliability of the moderation result. We recommend that you do not use this score in your business. |
| url | String | http://example.com/test-01.jpg | The temporary access URL of the truncated frame. The URL is valid for 5 minutes. |
| Parameter | Type | Example | Description |
| x | Float | 11.0 | The distance between the upper-left corner of the mini program code area and the y-axis, with the upper-left corner of the image being the coordinate origin. Unit: pixels. |
| y | Float | 0.0 | The distance between the upper-left corner of the mini program code area and the x-axis, with the upper-left corner of the image being the coordinate origin. Unit: pixels. |
| w | Float | 402.0 | The width of the mini program code area. Unit: pixels. |
| h | Float | 413.0 | The height of the mini program code area. Unit: pixels. |
| Parameter | Type | Example | Description |
| type | String | TV | The type of the detected logo. For example, a value of TV indicates the logo of a TV station. |
| name | String | Hunan TV | The name of the detected logo. |
| x | Float | 140 | The distance between the upper-left corner of the logo area and the y-axis, with the upper-left corner of the image being the coordinate origin. Unit: pixels. |
| y | Float | 68 | The distance between the upper-left corner of the logo area and the x-axis, with the upper-left corner of the image being the coordinate origin. Unit: pixels. |
| w | Float | 106 | The width of the logo area. Unit: pixels. |
| h | Float | 106 | The height of the logo area. Unit: pixels. |
| Parameter | Type | Example | Description |
| x | Float | 49 | The distance between the upper-left corner of the face area and the y-axis, with the upper-left corner of the image being the coordinate origin. Unit: pixels. |
| y | Float | 39 | The distance between the upper-left corner of the face area and the x-axis, with the upper-left corner of the image being the coordinate origin. Unit: pixels. |
| w | Float | 47 | The width of the face area. Unit: pixels. |
| h | Float | 121 | The height of the face area. Unit: pixels. |
| faces | JSONArray | [{"id":"AliFace_0001234","name":"Hit name","rate":91.54}] | The information about the recognized face. The array contains the following parameters:
|
| Parameter | Type | Example | Description |
| context | String | The custom text that the detected text hits. | |
| libCode | String | 123456 | The code of the library that contains the custom text hit by the detected text. |
| libName | String | abc | The name of the library that contains the custom text hit by the detected text. |
| Parameter | Type | Example | Description |
| context | String | The label of the text that is detected. |
| Parameter | Type | Example | Description |
| x | Float | 11.0 | The distance between the upper-left corner of the QR code area and the y-axis, with the upper-left corner of the image being the coordinate origin. Unit: pixels. |
| y | Float | 0.0 | The distance between the upper-left corner of the QR code area and the x-axis, with the upper-left corner of the image being the coordinate origin. Unit: pixels. |
| w | Float | 402.0 | The width of the QR code area. Unit: pixels. |
| h | Float | 413.0 | The height of the QR code area. Unit: pixels. |
| qrcode | String | http://xxx | The URL in the detected QR code. |
Data returned for text moderation
| Parameter | Type | Example | Description |
| code | Integer | 200 | The returned HTTP status code. For more information, see Error codes. |
| msg | String | OK | The message that is returned for the request. |
| dataId | String | cfd33235-71a4-468b-8137-a5ffe323**** | The sequence number of the text. |
| taskId | String | txt6HB8NQoEbU@5fosnj2xVEM-1t**** | The ID of the moderation task. |
| content | String | We are a micro-lending company that provides same-day unsecured loans with secure, fast, convenient, and door-to-door services when you apply for a loan on your mobile phone. | The content of the moderated text that you specify in the moderation request. |
| filteredContent | String | We are a **** company that provides same-day *** loans with secure, fast, convenient, and **** services when you apply for a loan on your mobile phone. | The text that is returned if the original text hits terms in the custom term library, with the terms being replaced with asterisks (*). |
| results | JSONArray | The returned results. If the HTTP status code 200 is returned, the array in the returned results contains one or more elements. Each element is a structure. For more information about the structure, see result. |
| Parameter | Type | Example | Description |
| scene | String | antispam | The moderation scenario. |
| suggestion | String | block | The suggested course of action. Valid values:
|
| label | String | porn | The category of the moderation result. Valid values:
|
| rate | Float | 99.91 | The score of the confidence level. Valid values: 0 to 100. A greater value indicates a higher confidence level. If a value of pass is returned for the suggestion parameter, a higher confidence level indicates a higher probability that the content is normal. If a value of review or block is returned for the suggestion parameter, a lower confidence level indicates a higher probability that the content contains violations. Important This score is only for reference. We strongly recommend that you do not use this score in your business. We recommend that you use the values that are returned for the suggestion, label, and sublabel parameters to determine whether the content contains violations. The sublabel parameter is returned by some operations. |
| extras | JSONObject | {"userId":"xxx"} | The additional information. This is an extended parameter. |
| details | JSONArray | The details of the risky content that the moderated text hits. A text entry can hit multiple pieces of risky content. For more information about the structure of each piece of risky content, see detail. |
| Parameter | Type | Example | Description |
| label | String | porn | The category of the risky content that the moderated text hits. Valid values:
|
| contexts | JSONArray | The context information of the risky content that the moderated text hits. For more information about the structure, see context. |
| Parameter | Type | Example | Description |
| context | String | door-to-door | The term that the moderated text hits. If the text hits a term, the term is returned. If the text hits the algorithmic model, this parameter is not returned. |
| positions | JSONArray | {"startPos":1, "endPos":10} | The position of the term that the moderated text hits in the original text. |
| libName | String | Name of your custom text library | The name of the custom text library. This parameter is returned if the moderated text hits a term in the custom text library. |
| libCode | String | 123456 | The code of the custom text library. This parameter is returned if the moderated text hits a term in the custom text library. |
| ruleType | String | ip | The behavior rule. This parameter is returned if the moderated text hits the behavior rule. Valid values:
|
该文章对您有帮助吗?