CreateClearAdTask

Update time: 2024-07-29 17:11:40

Call createClearAdTask to create AI de-advertising task for the specified video, and the system will automatically conduct AI de-advertising operation for the video (value-added service function, if necessary, please contact customer service to open the value-added service of "AI de-advertising").

  • Limit of request rate per user: 300/5min
  • Applicable Products: Cloud VoD
For API authentication details, please refer to: API Authentication Overview

Request

Body Params

NameDescription
*videoIdString

videoId

clearVideoAdBoolean

Whether to clear video ads. Choose at least one type of AD to remove. If not, the default value is false.

clearWatermarkAdBoolean

Whether to clear watermark ads. Choose at least one type of AD to remove. If not, the default value is false.

clearTextAdBoolean

Whether to clear text ads. Choose at least one type of AD to remove. If not, the default value is false.

videoAdTypesString

Type of video ads processed

videoAdLevelInteger

Video AD clearance level, value range: 0(default clearance level, may cause missing deletion) 1(Strong clear level, may cause incorrect deletion) If this parameter is not specified, the default value is 0.

watermarkAdTypeInteger

Processing watermark advertising types, value range: 0(stretch blur) 1(Gaussian blur) The default value is 0. After api-1.240.5 (inclusive), the watermarkAdType and textAdType parameters must be consistent. If they are inconsistent, the system automatically uses 0 by default

textAdTypeInteger

Clear handling of running horse lamp text advertising

*notifyUrlString

notifyUrl

Response

Body Params

NameDescription
codeInteger

200 success

messageString

Successful operation

dataObject

Return data

taskIdString

taskId

Error code

Error code(code)Description(message)HTTP statusSemantic
401

AI does not have the right to clear ads from value-added services

200AI does not have the right to clear ads from value-added services
1000

Parameter error

200Parameter error
1000

Choose at least one type of AD to remove

200Choose at least one type of AD to remove
1000

The videoId parameter is incorrect

200The videoId parameter is incorrect
1000

The videoId does not exist or has no permission

200The videoId does not exist or has no permission
1000

The videoId of a source file cannot be deleted

200The videoId of a source file cannot be deleted
1000

The videoAdTypes parameter is incorrect

200The videoAdTypes parameter is incorrect
1000

The videoAdTypes parameter is repeated

200The videoAdTypes parameter is repeated
1000

The videoAdLevel parameter is incorrect

200The videoAdLevel parameter is incorrect
1000

The watermarkAdType parameter is incorrect

200The watermarkAdType parameter is incorrect
1000

The textAdType parameter is incorrect

200The textAdType parameter is incorrect
1000

The notifyUrl parameter is incorrect

200The notifyUrl parameter is incorrect

Example

JSON
JSON
Request example
Copy Copy success
#!/bin/bash
username='example_username'
apiKey='example_apiKey'
date=`env LANG="en_US.UTF-8" date -u "+%a, %d %b %Y %H:%M:%S GMT"`
password=`echo -en "$date" | openssl dgst -sha1 -hmac $apiKey -binary | openssl enc -base64`
curl -i --url "https://api.cdnetworks.com/vod/ai/createClearAdTask" \
-X "POST" \
-u "$username:$password" \
-H "Date: $date" \
-H "x-cnc-auth-method: BASIC" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
    "videoId": "idxxxxxx",
    "clearVideoAd":false,
    "clearWatermarkAd":false,
    "clearTextAd":false
}'
Response example
Copy Copy success
{
	"code": 200,
	"data": {
		"taskId": "522b34f0-ca74-11ea-9fd3-9ce3742e46f4"
	},
	"message": "Operation succeeded"
}
Is the content of this document helpful to you?
Yes
I have suggestion
Submitted successfully! Thank you very much for your feedback, we will continue to strive to do better!