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").
Name | Description |
---|---|
*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 |
Name | Description |
---|---|
codeInteger | 200 success |
messageString | Successful operation |
dataObject | Return data |
taskIdString | taskId |
Error code(code) | Description(message) | HTTP status | Semantic |
---|---|---|---|
401 | AI does not have the right to clear ads from value-added services | 200 | AI does not have the right to clear ads from value-added services |
1000 | Parameter error | 200 | Parameter error |
1000 | Choose at least one type of AD to remove | 200 | Choose at least one type of AD to remove |
1000 | The videoId parameter is incorrect | 200 | The videoId parameter is incorrect |
1000 | The videoId does not exist or has no permission | 200 | The videoId does not exist or has no permission |
1000 | The videoId of a source file cannot be deleted | 200 | The videoId of a source file cannot be deleted |
1000 | The videoAdTypes parameter is incorrect | 200 | The videoAdTypes parameter is incorrect |
1000 | The videoAdTypes parameter is repeated | 200 | The videoAdTypes parameter is repeated |
1000 | The videoAdLevel parameter is incorrect | 200 | The videoAdLevel parameter is incorrect |
1000 | The watermarkAdType parameter is incorrect | 200 | The watermarkAdType parameter is incorrect |
1000 | The textAdType parameter is incorrect | 200 | The textAdType parameter is incorrect |
1000 | The notifyUrl parameter is incorrect | 200 | The notifyUrl parameter is incorrect |
#!/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 }'
{ "code": 200, "data": { "taskId": "522b34f0-ca74-11ea-9fd3-9ce3742e46f4" }, "message": "Operation succeeded" }