QueryMediaCensorJobDetail

Updated at:

Queries the details of a content moderation job.

Operation description

In the content moderation results, the video section is organized into a timeline sorted by timestamp in ascending order. If the video is very long, the query returns only the first page of results. To query the full results of the video section, call this operation separately.

QPS limit

The QPS limit for a single user for this operation is 100 queries per second. If the limit is exceeded, API calls are throttled, which may affect your business. Make API calls at a reasonable rate. For more information, see QPS limit.

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

mts:QueryMediaCensorJobDetail

get

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

JobId

string

Yes

The ID of the content moderation job. You can obtain the ID from the response parameters of Submit a content moderation job.

2288c6ca184c0e47098a5b665e2a12****

NextPageToken

string

No

The next page token. Leave this parameter empty for the first request. The next page token is returned after the first query.

ae0fd49c0840e14daf0d66a75b83****

MaximumPageSize

integer

No

The maximum number of entries to return on each page.

  • Default value: 30.

  • Valid values: 1 to 300.

30

Response elements

Element

Type

Description

Example

object

The response parameters.

RequestId

string

The request ID.

B42299E6-F71F-465F-8FE9-4FC2E3D3C2CA

MediaCensorJobDetail

object

The list of content moderation job results.

CreationTime

string

The creation time. The time is displayed in UTC and follows the ISO 8601 standard in the YYYY-MM-DDTHH:mm:ssZ format.

2018-09-13T16:32:24Z

FinishTime

string

The completion time in the YYYY-MM-DD format.

2018-09-21

Suggestion

string

The overall moderation result of the job. Valid values:

  • pass: The content passes the moderation.

  • review: The content requires manual review.

  • block: The content is blocked.

If the moderation result of any category is review, the overall result is review. If the moderation result of any category is block, the overall result is block.

block

CoverImageCensorResults

object

CoverImageCensorResult

array<object>

The cover image moderation results.

array<object>

The response parameters.

Object

string

The OSS object of the video cover image.

test/ai/censor/v2/vme-****.jpg

Location

string

The OSS location of the video cover image.

oss-cn-shanghai

Bucket

string

The OSS bucket of the video cover image.

bucket-out-test-****

Results

object

Result

array<object>

The moderation results.

object

The response parameters.

Suggestion

string

The moderation suggestion. Valid values:

  • pass: The content passes the moderation.

  • review: The content requires manual review.

  • block: The content is blocked.

pass

Label

string

The label of the moderation result. Multiple labels are separated by commas (,).

  • Pornography detection (porn) result categories:

    • normal: Normal.

    • sexy: Sexy.

    • porn: Pornographic.

  • Terrorism and political content detection (terrorism) result categories:

    • normal: Normal.

    • bloody: Bloody.

    • explosion: Explosion and smoke.

    • outfit: Special outfit.

    • logo: Special logo.

    • weapon: Weapon.

    • politics: Political content.

    • violence: Violence.

    • crowd: Crowd gathering.

    • parade: Parade.

    • carcrash: Car crash scene.

    • flag: Flag.

    • location: Landmark.

    • others: Others.

  • Text and image violation (ad) result categories:

    • normal: Normal.

    • ad: Other advertisements.

    • politics: Text containing political content.

    • porn: Text containing pornographic content.

    • abuse: Text containing abusive content.

    • terrorism: Text containing terrorism content.

    • contraband: Text containing contraband content.

    • spam: Text containing other spam content.

    • npx: Messy advertisement.

    • qrcode: Contains a QR code.

    • programCode: Contains a mini program code.

  • Undesirable scene (live) result categories:

    • normal: Normal.

    • meaningless: No content in the image, such as a black or white screen.

    • PIP: Picture-in-picture.

    • smoking: Smoking.

    • drivelive: Live streaming in a car.

  • Logo detection (logo) result categories:

    • normal: Normal.

    • TV: Contains a regulated logo.

    • trademark: Contains a trademark.

normal

Scene

string

The moderation scenario. Valid values:

  • porn: Pornography detection.

  • terrorism: Terrorism and political content detection.

  • ad: Text and image violation.

  • live: Undesirable scene.

  • logo: Logo detection.

porn

Rate

string

The confidence score. Valid values: 0 to 100.

100

State

string

The job status.

Success

TitleCensorResult

object

The title moderation result.

Suggestion

string

The moderation suggestion. Valid values:

  • pass: The content passes the moderation.

  • review: The content requires manual review.

  • block: The content is blocked.

block

Label

string

The label of the moderation result. Valid values:

  • normal: Normal.

  • spam: Spam.

  • ad: Advertisement.

  • politics: Political content.

  • terrorism: Terrorism.

  • abuse: Abuse.

  • porn: Pornography.

  • flood: Flooding.

  • contraband: Contraband.

  • meaningless: Meaningless.

  • harmful: Undesirable scene. This includes scenarios such as money worship, fan support, negative emotions, and negative inducement.

meaningless

Scene

string

The moderation scenario. Set the value to antispam, which indicates text anti-spam.

antispam

Rate

string

The confidence score.

99.91

Message

string

The error message returned when the job fails. This parameter is not returned when the job is successful.

The resource operated cannot be found

Input

object

The job input.

Object

string

The OSS object of the input file.

test/ai/censor/test-****.mp4

Location

string

The OSS location of the input file.

oss-cn-shanghai

Bucket

string

The OSS bucket of the input file.

bucket-test-in-****

BarrageCensorResult

object

The live comment moderation result.

Suggestion

string

The moderation suggestion. Valid values:

  • pass: The content passes the moderation.

  • review: The content requires manual review.

  • block: The content is blocked.

pass

Label

string

The category of the moderation result. Multiple categories are separated by commas (,). Valid values:

  • normal: Normal.

  • spam: Spam.

  • ad: Advertisement.

  • politics: Political content.

  • terrorism: Terrorism.

  • abuse: Abuse.

  • porn: Pornography.

  • flood: Flooding.

  • contraband: Contraband.

  • meaningless: Meaningless.

  • harmful: Undesirable scene. This includes scenarios such as money worship, fan support, negative emotions, and negative inducement.

normal

Scene

string

The moderation scenario. Set the value to antispam, which indicates text anti-spam.

antispam

Rate

string

The confidence score.

99.91

DescCensorResult

object

The description moderation result.

Suggestion

string

The moderation suggestion. Valid values:

  • pass: The content passes the moderation.

  • review: The content requires manual review.

  • block: The content is blocked.

review

Label

string

The category of the moderation result. Valid values:

  • normal: Normal.

  • spam: Spam.

  • ad: Advertisement.

  • politics: Political content.

  • terrorism: Terrorism.

  • abuse: Abuse.

  • porn: Pornography.

  • flood: Flooding.

  • contraband: Contraband.

  • meaningless: Meaningless.

  • harmful: Undesirable scene. This includes scenarios such as money worship, fan support, negative emotions, and negative inducement.

normal

Scene

string

The moderation scenario. Set the value to antispam, which indicates text anti-spam.

antispam

Rate

string

The confidence score.

100

VideoCensorConfig

object

The video moderation configuration.

OutputFile

object

The storage path of the video snapshot results.

Object

string

The OSS object of the snapshot output file.

Note

In the example, {Count} is a placeholder. The image objects are named in the format of output00001-****.jpg, output00002-****.jpg, and so on.

output{Count}.jpg

Location

string

The OSS location of the data center where the snapshot output OSS bucket resides.

oss-cn-shanghai

Bucket

string

The OSS bucket where the snapshot output file is stored.

test-bucket-****

VideoCensor

string

Specifies whether to moderate the video content. Default value: true. Valid values:

  • true: Moderate the video content.

  • false: Do not moderate the video content.

true

BizType

string

The custom business type. Default value: common.

common

JobId

string

The ID of the content moderation job.

f8f166eea7a44e9bb0a4aecf9543****

UserData

string

The custom user data.

example userdata ****

Code

string

The error code returned when the job fails. This parameter is not returned when the job is successful.

InvalidParameter.ResourceNotFound

VensorCensorResult

object

The video moderation result.

VideoTimelines

object

VideoTimeline

array<object>

The moderation results at specific timestamps, sorted in ascending order of time. Because the content at specific timestamps is large, the query results are retained for only 10 days. For results older than 10 days, view the {jobId}.output file saved in the same folder as OutputFile.

array<object>

The response parameters.

Timestamp

string

The position in the video. Format: hh:mm:ss[.SSS].

00:02:59.999

Object

string

The OSS object of the snapshot output file.

Note

In the example, {Count} is a placeholder. The image objects are named in the format of output00001-****.jpg, output00002-****.jpg, and so on.

output{Count}.jpg

CensorResults

object

CensorResult

array<object>

The labels and confidence scores of various types of moderation results.

object

The response parameters.

Suggestion

string

The moderation suggestion. Valid values:

  • pass: The content passes the moderation.

  • review: The content requires manual review.

  • block: The content is blocked.

block

Label

string

The category of the moderation result. Multiple categories are separated by commas (,). Valid values:

  • Pornography detection (porn) result categories:
    • porn: Pornographic.

    • sexy: Sexy.

    • normal: Normal.

  • Terrorism and political content detection (terrorism) result categories:
    • normal: Normal.

    • bloody: Bloody.

    • explosion: Explosion and smoke.

    • outfit: Special outfit.

    • logo: Special logo.

    • weapon: Weapon.

    • politics: Political content.

    • violence: Violence.

    • crowd: Crowd gathering.

    • parade: Parade.

    • carcrash: Car crash scene.

    • flag: Flag.

    • location: Landmark.

    • others: Others.

  • Advertisement (ad) result categories:
    • normal: Normal.

    • ad: Other advertisements.

    • politics: Text containing political content.

    • porn: Text containing pornographic content.

    • abuse: Text containing abusive content.

    • terrorism: Text containing terrorism content.

    • contraband: Text containing contraband content.

    • spam: Text containing other spam content.

    • npx: Messy advertisement.

    • qrcode: Contains a QR code.

    • programCode: Contains a mini program code.

  • Undesirable scene (live) result categories:
    • normal: Normal.

    • meaningless: No content in the image, such as a black or white screen.

    • PIP: Picture-in-picture.

    • smoking: Smoking.

    • drivelive: Live streaming in a car.

  • Logo (logo) result categories:
    • normal: Normal.

    • TV: Contains a regulated logo.

    • trademark: Contains a trademark.

porn,ad

Scene

string

The moderation scenario. Valid values:

  • porn: Pornography detection.

  • terrorism: Terrorism and political content detection.

  • ad: Text and image violation.

  • live: Undesirable scene.

  • logo: Logo detection.

porn

Rate

string

The confidence score.

99.99

NextPageToken

string

The token for the next page.

ea04afcca7cd4e80b9ece8fbb251****

CensorResults

object

CensorResult

array<object>

The collection of moderation results, which includes the summary information of various scenarios such as pornography, violence, terrorism, and political content.

object

The moderation result details.

Suggestion

string

The moderation suggestion. Valid values:

  • pass: The content passes the moderation.

  • review: The content requires manual review.

  • block: The content is blocked.

review

Label

string

The category of the moderation result. Multiple categories are separated by commas (,). Valid values:

  • Pornography detection (porn) result categories:
    • porn: Pornographic.

    • sexy: Sexy.

    • normal: Normal.

  • Terrorism and political content detection (terrorism) result categories:
    • normal: Normal.

    • bloody: Bloody.

    • explosion: Explosion and smoke.

    • outfit: Special outfit.

    • logo: Special logo.

    • weapon: Weapon.

    • politics: Political content.

    • violence: Violence.

    • crowd: Crowd gathering.

    • parade: Parade.

    • carcrash: Car crash scene.

    • flag: Flag.

    • location: Landmark.

    • others: Others.

  • Advertisement (ad) result categories:
    • normal: Normal.

    • ad: Other advertisements.

    • politics: Text containing political content.

    • porn: Text containing pornographic content.

    • abuse: Text containing abusive content.

    • terrorism: Text containing terrorism content.

    • contraband: Text containing contraband content.

    • spam: Text containing other spam content.

    • npx: Messy advertisement.

    • qrcode: Contains a QR code.

    • programCode: Contains a mini program code.

  • Undesirable scene (live) result categories:
    • normal: Normal.

    • meaningless: No content in the image, such as a black or white screen.

    • PIP: Picture-in-picture.

    • smoking: Smoking.

    • drivelive: Live streaming in a car.

  • Logo (logo) result categories:
    • normal: Normal.

    • TV: Contains a regulated logo.

    • trademark: Contains a trademark.

meaningless

Scene

string

The moderation scenario. Valid values:

  • porn: Pornography detection.

  • terrorism: Terrorism and political content detection.

  • ad: Text and image violation.

  • live: Undesirable scene.

  • logo: Logo detection.

terrorism

Rate

string

The confidence score.

100

AudioCensorResult

object

The audio moderation result.

Suggestion

string

The moderation suggestion. Valid values:

  • pass: The content passes the moderation.

  • review: The content requires manual review.

  • block: The content is blocked.

pass

Label

string

The category of the detection result. Valid values:

  • normal: Normal text.

  • spam: Spam.

  • ad: Advertisement.

  • politics: Political content.

  • terrorism: Terrorism.

  • abuse: Abuse.

  • porn: Pornography.

  • flood: Flooding.

  • contraband: Contraband.

  • meaningless: Meaningless.

  • harmful: Undesirable scene. This includes scenarios such as money worship, fan support, negative emotions, and negative inducement.

normal

AudioDetailResultList

object

AudioDetailResult

array<object>

The specific audio moderation results.

object

The result content.

StartTime

integer

The start time of the sentence. Unit: seconds.

0

EndTime

integer

The end time of the sentence. Unit: seconds.

30

Text

string

The speech-to-text result.

Test

Label

string

The category of the detection result. Valid values:

  • normal: Normal text.

  • spam: Spam.

  • ad: Advertisement.

  • politics: Political content.

  • terrorism: Terrorism.

  • abuse: Abuse.

  • porn: Pornography.

  • flood: Flooding.

  • contraband: Contraband.

  • meaningless: Meaningless.

  • harmful: Undesirable scene. This includes scenarios such as money worship, fan support, negative emotions, and negative inducement.

normal

PipelineId

string

The ID of the MPS queue.

c5b30b7c0d0e4a0abde1d5f9e751****

Examples

Success response

JSON format

{
  "RequestId": "B42299E6-F71F-465F-8FE9-4FC2E3D3C2CA",
  "MediaCensorJobDetail": {
    "CreationTime": "2018-09-13T16:32:24Z",
    "FinishTime": "2018-09-21",
    "Suggestion": "block",
    "CoverImageCensorResults": {
      "CoverImageCensorResult": [
        {
          "Object": "test/ai/censor/v2/vme-****.jpg",
          "Location": "oss-cn-shanghai",
          "Bucket": "bucket-out-test-****",
          "Results": {
            "Result": [
              {
                "Suggestion": "pass",
                "Label": "normal",
                "Scene": "porn",
                "Rate": "100"
              }
            ]
          }
        }
      ]
    },
    "State": "Success",
    "TitleCensorResult": {
      "Suggestion": "block",
      "Label": "meaningless",
      "Scene": "antispam",
      "Rate": "99.91"
    },
    "Message": "The resource operated cannot be found",
    "Input": {
      "Object": "test/ai/censor/test-****.mp4",
      "Location": "oss-cn-shanghai",
      "Bucket": "bucket-test-in-****"
    },
    "BarrageCensorResult": {
      "Suggestion": "pass",
      "Label": "normal",
      "Scene": "antispam",
      "Rate": "99.91"
    },
    "DescCensorResult": {
      "Suggestion": "review",
      "Label": "normal",
      "Scene": "antispam",
      "Rate": "100"
    },
    "VideoCensorConfig": {
      "OutputFile": {
        "Object": "output{Count}.jpg",
        "Location": "oss-cn-shanghai",
        "Bucket": "test-bucket-****"
      },
      "VideoCensor": "true",
      "BizType": "common"
    },
    "JobId": "f8f166eea7a44e9bb0a4aecf9543****",
    "UserData": "example userdata ****",
    "Code": "InvalidParameter.ResourceNotFound",
    "VensorCensorResult": {
      "VideoTimelines": {
        "VideoTimeline": [
          {
            "Timestamp": "00:02:59.999",
            "Object": "output{Count}.jpg",
            "CensorResults": {
              "CensorResult": [
                {
                  "Suggestion": "block",
                  "Label": "porn,ad",
                  "Scene": "porn",
                  "Rate": "99.99"
                }
              ]
            }
          }
        ]
      },
      "NextPageToken": "ea04afcca7cd4e80b9ece8fbb251****",
      "CensorResults": {
        "CensorResult": [
          {
            "Suggestion": "review",
            "Label": "meaningless",
            "Scene": "terrorism",
            "Rate": "100"
          }
        ]
      }
    },
    "AudioCensorResult": {
      "Suggestion": "pass",
      "Label": "normal",
      "AudioDetailResultList": {
        "AudioDetailResult": [
          {
            "StartTime": 0,
            "EndTime": 30,
            "Text": "Test",
            "Label": "normal"
          }
        ]
      }
    },
    "PipelineId": "c5b30b7c0d0e4a0abde1d5f9e751****"
  }
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.