APIセンター

CreateClearAdTask

更新時間: 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").

  • 単一ユーザーの使用頻度: 300/5min
  • 使用できるプロダクト: Cloud VoD

リクエストパラメータ

Body パラメータ

パラメータ名説明
*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

レスポンスパラメータ

Body パラメータ

パラメータ名説明
codeInteger
200 success
messageString
Successful operation
dataObject
Return data
taskIdString
taskId

エラーコード

エラーコード(code)説明(message)HTTPステータスコード意味
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

入力例

JSON
JSON
リクエスト例
コピー コピー完了
#!/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"
}