Skip to content

Automatic watermark removal

Use automatic video watermark removal and understand the legacy annotation endpoints.

The China edition currently identifies video watermarks automatically. Once an upload is ready, submit toolId: "watermark" with params: {"type":"none"}, then poll and download as usual. Candidate detection, saved annotations and mask previews are not prerequisites.

{
"assetId": "YOUR_READY_VIDEO_ASSET_ID",
"toolId": "watermark",
"params": {"type": "none"},
"maxCostCredits": 100
}

The 100-credit cap is an example; use your own budget or a quote. An Idempotency-Key is required. Quotes are optional but recommended for checking input and cost.

Legacy helpers such as watermark-find and watermark-mask can remain in the catalog without being executable on current workers. Do not submit an unavailable tool or one whose price is null. Check live tools and quotes. Historical regions/watermark parameter variants do not make them valid for current automatic removal.

This replaces all marks on the specified version. Coordinates are normalized from 0 to 1 with the top-left as the origin; x + width and y + height must stay within 1. timeMs identifies a video frame in milliseconds; omit it for a fixed position over the whole clip. Marks with the same objectId describe the same watermark.

positive marks indicate a watermark; negative excludes an area; absent marks an interval without that object; suggested is an unconfirmed candidate and is not executed. Pass timeMs for negative/absent/suggested marks, and objectId for absent/suggested marks. endMs, when used, must be at least timeMs. Use at most 64 total marks and eight objects, with at most 32 positive regions for processing. Sending regions: [] clears all marks; omitting objects clears their names.

This endpoint supports historical annotations and processing setups that accept manual marks. It only saves data; it does not configure or start the current automatic removal task.

PUT/api/v1/assets/{assetId}/versions/{versionId}/watermark-marks
Bearer API KeyScope: writeSuccess: 204
Path, query and headers
ParameterLocationType & constraints
assetId
required
pathstring

versionId
required
pathstring

Request body fields · application/json
objectsobject[]optional

maxItems: 8

Expand fields / variants
namestringrequired

minLength: 1 · maxLength: 24

objectIdinteger · int64required

minimum: 0 · maximum: 7

regionsobject[]required

maxItems: 64

Expand fields / variants
colorstringoptional

pattern: "^#[0-9a-fA-F]{6}$"

endMsinteger · int64optional

minimum: 0

heightnumber · doublerequired

minimum: 0 · maximum: 1

kind"positive" | "negative" | "absent" | "suggested"optional
objectIdinteger · int64optional

minimum: 0 · maximum: 7

strokesobject[]optional

maxItems: 64

Expand fields / variants
pointsnumber · double[][]required

minItems: 1 · maxItems: 4000

Expand fields / variants

number · double

radiusnumber · doublerequired

minimum: 0 · maximum: 0.25

timeMsinteger · int64optional

minimum: 0

widthnumber · doublerequired

minimum: 0 · maximum: 1

xnumber · doublerequired

minimum: 0 · maximum: 1

ynumber · doublerequired

minimum: 0 · maximum: 1

Request example

终端窗口
curl --include --fail-with-body --silent --show-error --max-time 60 \
--request PUT 'https://www.chaozapi.com/api/v1/assets/ASSET_ID/versions/VERSION_ID/watermark-marks' \
--header "Authorization: Bearer $GLACIER_API_KEY" \
--header 'Content-Type: application/json' \
--data-raw '{
"regions": [
{
"x": 0.7,
"y": 0.05,
"width": 0.2,
"height": 0.1,
"timeMs": 0,
"objectId": 0,
"kind": "positive"
}
],
"objects": [
{
"id": 0,
"name": "Logo"
}
]
}'
Response fields · 204

No response body. Do not attempt to parse empty JSON.

Query a non-null watermarkAnalysisUrl or an existing analysis task. This requires the API key and is not a signed file URL. Reports contain objects, intervals and review regions. Automatic removal does not guarantee an auxiliary report; its absence does not indicate failure.

GET/api/v1/tasks/{taskId}/watermark-analysis
Bearer API KeyScope: readSuccess: 200
Path, query and headers
ParameterLocationType & constraints
taskId
required
pathstring

Request example

终端窗口
curl --include --fail-with-body --silent --show-error --max-time 60 \
--request GET 'https://www.chaozapi.com/api/v1/tasks/TASK_ID/watermark-analysis' \
--header "Authorization: Bearer $GLACIER_API_KEY"
Response fields · 200
framesinteger · int64required
heightinteger · int64required
marksHashstringrequired
objectsobject[]required
Expand fields / variants
colorobject | nullrequired
Expand fields / variants
Variant 1 · object
alphanumber · doublerequired
rgbinteger · int64[]required

minItems: 3 · maxItems: 3

Expand fields / variants

integer · int64

samplesinteger · int64required
Variant 2 · null

null

intervalsobject[]required
Expand fields / variants
endFrameinteger · int64required
endMsinteger · int64required
reasonsstring[]required
Expand fields / variants

string

sourcestringrequired
startFrameinteger · int64required
startMsinteger · int64required
state"present" | "bridge" | "manual" | "uncertain" | "absent"required
namestringrequired
objectIdinteger | null · int64required
poseobject[]required
Expand fields / variants
detailstringrequired
okbooleanrequired
reasonstringrequired
sourcestringrequired
shapeobjectrequired
Expand fields / variants
qualitystringrequired
reasonstringrequired
policystringrequired
ratenumber · doublerequired
reviewobject[]required
Expand fields / variants
boxobject | nullrequired
Expand fields / variants
Variant 1 · object
heightnumber · doublerequired

minimum: 0 · maximum: 1

widthnumber · doublerequired

minimum: 0 · maximum: 1

xnumber · doublerequired

minimum: 0 · maximum: 1

ynumber · doublerequired

minimum: 0 · maximum: 1

Variant 2 · null

null

endFrameinteger · int64required
endMsinteger · int64required
namestringrequired
objectIdinteger | null · int64required
reasonstringrequired
scorenumber | null · doublerequired
startFrameinteger · int64required
startMsinteger · int64required
staticobject[]required
Expand fields / variants
namestringrequired
objectIdinteger | null · int64required
reasonstringrequired
shapestringrequired
versioninteger · int64required
widthinteger · int64required