All Products
Search
Document Center

ApsaraVideo Media Processing:QueryMediaCensorJobDetail

Last Updated:Mar 03, 2024

Queries the information about a content moderation job.

Operation description

In the content moderation results, the moderation results of the video are sorted in ascending order by time into a timeline. If the video is long, the content moderation results are paginated, and the first page is returned. You can call this operation again to query the remaining moderation results of the video.

QPS limit

You can call this operation up to 100 times per second per account. Requests that exceed this limit are dropped and you will experience service interruptions. We recommend that you take note of this limit when you call this operation. For more information, see QPS limit.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
JobIdstringYes

The ID of the content moderation job. You can obtain the job ID from the response parameters of the SubmitMediaCensorJob operation.

2288c6ca184c0e47098a5b665e2a12****
NextPageTokenstringNo

The pagination token that is used in the next request to retrieve a new page of results. You do not need to specify this parameter for the first request. The token of the next page is returned after you call this operation to query the results of a content moderation job for the first time.

ae0fd49c0840e14daf0d66a75b83****
MaximumPageSizelongNo

The maximum number of entries to return on each page.

  • Default value: 30.
  • Valid values: 1 to 300.
30

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

RequestIdstring

The ID of the request.

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

The results of the content moderation job.

CreationTimestring

The time when the job was created.

2018-09-13T16:32:24Z
FinishTimestring

The time when the job was complete.

2018-09-21
Suggestionstring

The overall result of the job. Valid values:

  • pass: The content passes the moderation.
  • review: The content needs to be manually reviewed again.
  • block: The content needs to be blocked.

If the moderation result of one type of the moderated content is review, the overall result is review. If the moderation result of one type of the moderated content is block, the overall result is block.

block
CoverImageCensorResultsobject []

The moderation results of thumbnails.

Objectstring

The Object Storage Service (OSS) object that is used as the video thumbnail.

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

The OSS region in which the video thumbnail resides.

oss-cn-shanghai
Bucketstring

The OSS bucket that stores the video thumbnail.

bucket-out-test-****
Resultsobject []

The moderation results.

Suggestionstring

The recommended subsequent operation. Valid values:

  • pass: The content passes the moderation.
  • review: The content needs to be manually reviewed again.
  • block: The content needs to be blocked.
pass
Labelstring

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

  • Valid values in the pornographic content moderation scenario:

    • normal: normal content
    • sexy: sexy content
    • porn: pornographic content
  • Valid values in the terrorist content moderation scenario:

    • narmal: normal content
    • bloody: bloody content
    • explosion: explosion and smoke
    • outfit: special costume
    • logo: special logo
    • weapon: weapon
    • politics: political content
    • violence: violence
    • crowd: crowd
    • parade: parade
    • carcrash: car accident
    • flag: flag
    • location: landmark
    • others: other content
  • Valid values in the ad moderation scenario:

    • normal: normal content
    • ad: other ads
    • politics: political content in text
    • porn: pornographic content in text
    • abuse: abuse in text
    • terrorism: terrorist content in text
    • contraband: prohibited content in text
    • spam: spam in text
    • npx: illegal ads
    • qrcode: QR code
    • programCode: mini program code
  • Valid values in the live moderation scenario:

    • normal: normal content
    • meaningless: meaningless content, such as a black or white screen
    • PIP: picture-in-picture
    • smoking: smoking
    • drivelive: live broadcasting in a running vehicle
  • Valid values in the logo moderation scenario:

    • normal: normal content
    • TV: controlled TV station logo
    • trademark: trademark
normal
Scenestring

The moderation scenario. Valid values:

  • porn: pornographic content moderation
  • terrorism: terrorist content moderation
  • ad: ad violation moderation
  • live: undesirable scene moderation
  • logo: logo moderation
porn
Ratestring

The score. Valid values: 0 to 100.

100
Statestring

The status of the job. Valid values:

Success
TitleCensorResultobject

The moderation result of the title.

Suggestionstring

The recommended subsequent operation. Valid values:

  • pass: The content passes the moderation.
  • review: The content needs to be manually reviewed again.
  • block: The content needs to be blocked.
block
Labelstring

The labels of the moderation result. Valid values:

  • normal: normal content
  • spam: spam
  • ad: ads
  • abuse: abuse
  • flood: excessive junk content
  • contraband: prohibited content
  • meaningless: meaningless content
meaningless
Scenestring

The moderation scenario. Valid values: The value is antispam.

antispam
Ratestring

The score.

99.91
Messagestring

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

The resource operated cannot be found
Inputobject

The information about the job input.

Objectstring

The name of the OSS object that is used as the input media file.

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

The OSS region in which the input media file resides.

oss-cn-shanghai
Bucketstring

The name of the OSS bucket in which the input media file is stored.

bucket-test-in-****
BarrageCensorResultobject

The moderation result of live comments.

Suggestionstring

The recommended subsequent operation. Valid values:

  • pass: The content passes the moderation.
  • review: The content needs to be manually reviewed again.
  • block: The content needs to be blocked.
pass
Labelstring

The labels of the moderation result. Multiple labels are separated with commas (,). Valid values:

  • spam: spam
  • ad: ads
  • abuse: abuse
  • flood: excessive junk content
  • contraband: prohibited content
  • meaningless: meaningless content
  • normal: normal content
normal
Scenestring

The moderation scenario. Valid values: The value is antispam.

antispam
Ratestring

The score.

99.91
DescCensorResultobject

The moderation result of the description.

Suggestionstring

The recommended subsequent operation. Valid values:

  • pass: The content passes the moderation.
  • review: The content needs to be manually reviewed again.
  • block: The content needs to be blocked.
review
Labelstring

The labels of the moderation result. Valid values:

  • spam: spam
  • ad: ads
  • abuse: abuse
  • flood: excessive junk content
  • contraband: prohibited content
  • meaningless: meaningless content
  • normal: normal content
normal
Scenestring

The moderation scenario. Valid values: The value is antispam.

antispam
Ratestring

The score.

100
VideoCensorConfigobject

The video moderation configurations.

OutputFileobject

The information about output snapshots.

Objectstring

The one or more OSS objects that are generated as the output snapshots.

Note In the example, {Count} is a placeholder. The OSS objects that are generated as output snapshots are named output00001-****.jpg, output00002-****.jpg, and so on.
output{Count}.jpg
Locationstring

The region in which the OSS bucket that stores the output snapshot resides.

oss-cn-shanghai
Bucketstring

The OSS bucket that stores the output snapshots.

test-bucket-****
VideoCensorstring

Indicates whether the video content needs to be moderated. Default value: true Valid values:

  • true: The video content needs to be moderated.
  • false: The video content does not need to be moderated.
true
BizTypestring

The custom business type. Default value: common.

common
JobIdstring

The ID of the content moderation job.

f8f166eea7a44e9bb0a4aecf9543****
UserDatastring

The custom data.

example userdata ****
Codestring

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

InvalidParameter.ResourceNotFound
VensorCensorResultobject

The moderation results of the video.

VideoTimelinesobject []

The moderation results that are sorted in ascending order by time.

Timestampstring

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

00:02:59.999
Objectstring

The one or more OSS objects that are generated as the output snapshots.

Note In the example, {Count} is a placeholder. The OSS objects that are generated as output snapshots are named output00001-****.jpg, output00002-****.jpg, and so on.
output{Count}.jpg
CensorResultsobject []

The moderation results that include information such as labels and scores.

Suggestionstring

The recommended subsequent operation. Valid values:

  • pass: The content passes the moderation.
  • review: The content needs to be manually reviewed again.
  • block: The content needs to be blocked.
block
Labelstring

The labels of the moderation result. Multiple labels are separated with commas (,). Valid values:

  • Valid values in the pornographic content moderation scenario:

    • porn: pornographic content
    • sexy: sexy content
    • normal: normal content
  • Valid values in the terrorist content moderation scenario:

    • normal: normal content
    • bloody: bloody content
    • explosion: explosion and smoke
    • outfit: special costume
    • logo: special logo
    • weapon: weapon
    • politics: political content
    • violence: violence
    • crowd: crowd
    • parade: parade
    • carcrash: car accident
    • flag: flag
    • location: landmark
    • others: other content
  • Valid values in the ad moderation scenario:

    • normal: normal content
    • ad: other ads
    • politics: political content in text
    • porn: pornographic content in text
    • abuse: abuse in text
    • terrorism: terrorist content in text
    • contraband: prohibited content in text
    • spam: spam in text
    • npx: illegal ads
    • qrcode: QR code
    • programCode: mini program code
  • Valid values in the live moderation scenario:

    • normal: normal content
    • meaningless: meaningless content, such as a black or white screen
    • PIP: picture-in-picture
    • smoking: smoking
    • drivelive: live broadcasting in a running vehicle
  • Valid values in the logo moderation scenario:

    • normal: normal content
    • TV: controlled TV station logo
    • trademark: trademark
porn,ad
Scenestring

The moderation scenario. Valid values:

  • porn: pornographic content moderation
  • terrorism: terrorist content moderation
  • ad: ad violation moderation
  • live: undesirable scene moderation
  • logo: logo moderation
porn
Ratestring

The score.

99.99
NextPageTokenstring

The returned value of NextToken is a pagination token, which can be used in the next request to retrieve a new page of results.

ea04afcca7cd4e80b9ece8fbb251****
CensorResultsobject []

A collection of the moderation results. The information includes the summary of various scenarios such as pornographic content and terrorist content.

Suggestionstring

The recommended subsequent operation. Valid values:

  • pass: The content passes the moderation.
  • review: The content needs to be manually reviewed again.
  • block: The content needs to be blocked.
review
Labelstring

The labels of the moderation result. Multiple labels are separated with commas (,). Valid values:

  • Valid values in the pornographic content moderation scenario:

    • porn: pornographic content
    • sexy: sexy content
    • normal: normal content
  • Valid values in the terrorist content moderation scenario:

    • normal: normal content
    • bloody: bloody content
    • explosion: explosion and smoke
    • outfit: special costume
    • logo: special logo
    • weapon: weapon
    • politics: political content
    • violence: violence
    • crowd: crowd
    • parade: parade
    • carcrash: car accident
    • flag: flag
    • location: landmark
    • others: other content
  • Valid values in the ad moderation scenario:

    • normal: normal content
    • ad: other ads
    • politics: political content in text
    • porn: pornographic content in text
    • abuse: abuse in text
    • terrorism: terrorist content in text
    • contraband: prohibited content in text
    • spam: spam in text
    • npx: illegal ads
    • qrcode: QR code
    • programCode: mini program code
  • Valid values in the live moderation scenario:

    • normal: normal content
    • meaningless: meaningless content, such as a black or white screen
    • PIP: picture-in-picture
    • smoking: smoking
    • drivelive: live broadcasting in a running vehicle
  • Valid values in the logo moderation scenario:

    • normal: normal content
    • TV: controlled TV station logo
    • trademark: trademark
meaningless
Scenestring

The moderation scenario. Valid values:

  • porn: pornographic content moderation
  • terrorism: terrorist content moderation
  • ad: ad violation moderation
  • live: undesirable scene moderation
  • logo: logo moderation
terrorism
Ratestring

The score.

100
PipelineIdstring

The ID of the ApsaraVideo Media Processing (MPS) queue to which the content moderation job is submitted.

c5b30b7c0d0e4a0abde1d5f9e751****

Examples

Sample success responses

JSONformat

{
  "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"
          }
        ]
      }
    },
    "PipelineId": "c5b30b7c0d0e4a0abde1d5f9e751****"
  }
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2023-12-07The response structure of the API has changedsee changesets
Change itemChange content
Output ParametersThe response structure of the API has changed.