All Products
Search
Document Center

Intelligent Media Management:GetImageModerationResult

Last Updated:Jun 15, 2026

Retrieves an image content moderation task.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

imm:GetImageModerationResult

get

*Project

acs:imm:{#regionId}:{#accountId}:project/{#ProjectName}

None None

Request parameters

Parameter

Type

Required

Description

Example

ProjectName

string

Yes

The project name.

test-project

TaskType

string

Yes

The task type.

ImageModeration

TaskId

string

Yes

The task ID.

ImageModeration-ff207203-3f93-4645-a041-7b8f0f******

Response elements

Element

Type

Description

Example

object

The image moderation result.

RequestId

string

The request ID.

E6A120B1-BEB3-0F63-A7C2-0783B6******

ProjectName

string

The project name.

test-project

EventId

string

The event ID.

1B6-1XBMX3BixLMILvXVGtlkr******

Status

string

The running status of the task. Valid values:

  • Running: The task is running.

  • Succeeded: The task is completed successfully.

  • Failed: The task failed.

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 value is a UTC timestamp in ISO 8601 format with millisecond precision.

2023-04-03T09:44:31.029Z

EndTime

string

The end time of the task. The value is a UTC timestamp in ISO 8601 format with millisecond precision.

2023-04-03T09:44:32Z

UserData

string

The custom user data.

{ "fileId": "123" }

TaskType

string

The task type.

ImageModeration

TaskId

string

The task ID.

ImageModeration-ff207203-3f93-4645-a041-7b8f0f******

ModerationResult

object

The content moderation result.

URI

string

The storage location of the OSS file. The address follows the format oss://${bucketname}/${objectname}, where bucketname is the name of an OSS bucket 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:

  • pass: The image is normal. No further action is required.

  • review: The moderation result is uncertain. Manual review is required.

  • block: The image violates content policies. Further action is recommended, such as deleting or restricting the image.

block

Categories

array

The list of categories.

string

The category.

porn

Frames

object

The frame information for video or animated image moderation.

TotalCount

integer

The total number of detected frames.

30

BlockFrames

array<object>

The violated frames.

object

The information about violated frames.

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.