GetImageModerationResult
Retrieves an image moderation task.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
imm:GetImageModerationResult |
get |
*Project
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ProjectName |
string |
Yes |
The name of the project. |
test-project |
| TaskType |
string |
Yes |
The type of the task. |
ImageModeration |
| TaskId |
string |
Yes |
The ID of the task. |
ImageModeration-ff207203-3f93-4645-a041-7b8f0f****** |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The image moderation result. |
||
| RequestId |
string |
The ID of the request. |
E6A120B1-BEB3-0F63-A7C2-0783B6****** |
| ProjectName |
string |
The name of the project. |
test-project |
| EventId |
string |
The ID of the event. |
1B6-1XBMX3BixLMILvXVGtlkr****** |
| Status |
string |
The running status of the task. Valid values:
|
Succeeded |
| Code |
string |
The error code of the task. |
ResourceNotFound |
| Message |
string |
The error message of the task. |
The specified resource TaskId is not found. |
| StartTime |
string |
The start time of the task. The time is in the ISO 8601 UTC format with millisecond precision. |
2023-04-03T09:44:31.029Z |
| EndTime |
string |
The end time of the task. The time is in the ISO 8601 UTC format with millisecond precision. |
2023-04-03T09:44:32Z |
| UserData |
string |
The custom user data. |
{ "fileId": "123" } |
| TaskType |
string |
The type of the task. |
ImageModeration |
| TaskId |
string |
The ID of the task. |
ImageModeration-ff207203-3f93-4645-a041-7b8f0f****** |
| ModerationResult |
object |
The moderation result. |
|
| URI |
string |
The storage location of the OSS file. The address format of the storage location is oss://${bucketname}/${objectname}, where bucketname is the name of the OSS bucket that resides in the same region as the current project, and objectname is the file path. |
oss://test-bucket/test-object |
| Suggestion |
string |
The recommended action. Valid values:
|
block |
| Categories |
array |
The list of categories. |
|
|
string |
The category. |
porn |
|
| Frames |
object |
The information about the frames detected in videos and animated images. |
|
| TotalCount |
integer |
The total number of detected frames. |
30 |
| BlockFrames |
array<object> |
The frames that contain violations. |
|
|
object |
The information about the frame that contains violations. |
||
| Rate |
number |
The confidence level of the violation. |
30 |
| Offset |
integer |
The offset of the frame. |
2 |
| Label |
string |
The label of the violation. |
{ "test": "val" } |
Examples
Success response
JSON format
{
"RequestId": "E6A120B1-BEB3-0F63-A7C2-0783B6******",
"ProjectName": "test-project",
"EventId": "1B6-1XBMX3BixLMILvXVGtlkr******",
"Status": "Succeeded",
"Code": "ResourceNotFound",
"Message": "The specified resource TaskId is not found.",
"StartTime": "2023-04-03T09:44:31.029Z",
"EndTime": "2023-04-03T09:44:32Z",
"UserData": "{\n \"fileId\": \"123\"\n}",
"TaskType": "ImageModeration",
"TaskId": "ImageModeration-ff207203-3f93-4645-a041-7b8f0f******",
"ModerationResult": {
"URI": "oss://test-bucket/test-object",
"Suggestion": "block",
"Categories": [
"porn"
],
"Frames": {
"TotalCount": 30,
"BlockFrames": [
{
"Rate": 30,
"Offset": 2,
"Label": "{\n \"test\": \"val\"\n}"
}
]
}
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.