API Center

CreateClearAdTask

Update time: 2023-04-21 17:13:06

Applicable Products

Cloud VoD

API Description

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").

Call frequency

Single user trigger frequency: 300/5min

We recommend you to use API Explorer

The API Explorer provides the ability of visual interface online call API, code examples generation, and API documents quickly search .Try it

Request parameter(s)

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 parameter(s)

Body Params

NameDescription
codeInteger
200 success
messageString
Successful operation
dataData
Return data
taskIdString
taskId

Error code

Error code(code)Description(message)HTTP statusSemantic
401AI does not have the right to clear ads from value-added services200AI does not have the right to clear ads from value-added services
1000Parameter error200Parameter error
1000Choose at least one type of AD to remove200Choose at least one type of AD to remove
1000The videoId parameter is incorrect200The videoId parameter is incorrect
1000The videoId does not exist or has no permission200The videoId does not exist or has no permission
1000The videoId of a source file cannot be deleted200The videoId of a source file cannot be deleted
1000The videoAdTypes parameter is incorrect200The videoAdTypes parameter is incorrect
1000The videoAdTypes parameter is repeated200The videoAdTypes parameter is repeated
1000The videoAdLevel parameter is incorrect200The videoAdLevel parameter is incorrect
1000The watermarkAdType parameter is incorrect200The watermarkAdType parameter is incorrect
1000The textAdType parameter is incorrect200The textAdType parameter is incorrect
1000The notifyUrl parameter is incorrect200The 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": "操作成功"
}
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!