CleanVid API Documentation
The CleanVid API instantly brings high-quality watermark removal, object removal, and video enhancement to your software, apps, saas and automated workflow. Powered by cutting-edge generative AI, it removes watermarks, text, logos, subtitles, and unwanted people or objects, then reconstructs the background at the pixel level—No blurry. Video output is supported at resolutions up to 2K.
On this page
Quick start
CleanVid API is a task-based RESTful API. It was designed with the goal of being extremely easy to use and integrate. With the CleanVid API, you can use the following three endpoints to create different tasks for your use case:
-
videowatermark_removalSeamlessly removes watermarks, text, logos, and burned-in subtitles added during post-production. It can remove both static and moving watermarks. -
videoobject_removalSeamlessly removes unwanted people or objects from videos, as well as overlays such as mosaic effects and stickers, to restore the underlying video. -
video_enhanceImproves video clarity by intelligently adding visual detail and enhancing contrast, turning ordinary footage into high-definition video.
Every task goes through the same three steps.
-
STEP 01
Upload your video to CleanVid
Use the
asset_uploadurlendpoint to obtain a presigned upload URL, then upload the video to CleanVid via an HTTP PUT request. -
STEP 02
Create a task, then start processing
Create the task with one of the three endpoints above, then start processing with
task_start. -
STEP 03
Download the processed video
Query
task_resultfor processing progress, then download the video once the task is finished.
Base URL and endpoints
https://api.cleanvid.pro
| Function | Method | Purpose |
|---|---|---|
asset_uploadurl | GET | Get a presigned upload URL and its storage key. |
videowatermark_removal | POST | Create a watermark-removal task. |
videoobject_removal | POST | Create an object-removal task. |
video_enhance | POST | Create a video-enhancement task. |
task_start | POST | Start a task and deduct credits. |
task_result | GET | Read progress of the task, and the download URL. |
task_cancel | POST | Cancel a queued task and refund credits. |
All functions live at the root of the API host. Append the function name directly — there is no version prefix and no trailing slash. Task actions carry the task_id as a path segment.
https://api.cleanvid.pro/asset_uploadurl
https://api.cleanvid.pro/videowatermark_removal
https://api.cleanvid.pro/task_start/{taskId}
Authentication
API keys are the only valid credentials for accessing the CleanVid API. Every request carries an API key in the Authorization header. If you don’t have one yet, create it in CleanVid Studio, and the API key looks like cvk_live_<key_id>.<secret>.
Keep your API keys secure. If you suspect that a key may have been compromised, disable it immediately and create a new API key to replace it.
Authorization: Bearer cvk_live_<key_id>.<secret>
A missing, malformed, or disabled key is rejected before the request reaches a model, and the body is always the same:
{ "code": 401, "msg": "Unauthorized", "data": {} }
Anything in browser or app code is public the moment it ships. Call the API from your backend and give your own users your own session — never a CleanVid key.
Response envelope
Successful and failed calls return the same three keys, so one parser handles both.
{
"code": 0,
"msg": "success",
"data": {}
}
code—0means the call did what you asked. Any other value is a failure;datais then an empty object.msg— a short description, useful in logs and error messages you surface to your own users.data— the payload. Its shape depends on the endpoint and is documented per endpoint below.
Check the HTTP status first, then code === 0, then read data. The two layers agree in practice, but the body is what tells you why a call failed.
Get an upload URL
/asset_uploadurl
Returns a presigned URL for the file you are about to send, plus the storage key every later call will reference. Nothing is charged here — this endpoint only prepares the upload.
We have strict confidentiality measures in place to protect your privacy. Your videos will not be manually previewed or inspected. Original video files will be automatically deleted within 24 hours of upload completion or once processing is complete, whichever comes first.
Query parameter
| Parameter | Type | Required | Description |
|---|---|---|---|
ext |
string | required | Container extension. mp4 and mov only, with or without the leading dot. |
Response data
| Field | Type | Description |
|---|---|---|
upload_url | string | Presigned URL for the file upload. Valid for a single PUT. |
object_path | string | Storage key of the uploaded object. Send it as video_path when you create a task. |
headers | object | Headers that must be sent with the upload, exactly as returned. |
Uploading the file
The upload does not go through the API host: PUT the bytes straight to upload_url and replay every key in headers.
PUT {upload_url}
{...every key/value from "headers", verbatim...}
Content-Length: {file size}
<file bytes>
Create a watermark-removal task
/videowatermark_removal
Create a video watermark removal task. This task removes watermarks, text, logos, burned-in subtitles, and other elements added during post-production. It supports removing static watermarks and automatically detecting and removing moving watermarks.
box_removalSendrectto mark the area of the frame where the watermark should be removed. Width × height of rect, must be less than 480,000 pixels. If the rect exceeds this limit, use fullvideo_removal mode.fullvideo_removalThe watermark is removed across the whole frame; no rectangle is needed.
Body
| Field | Type | Required | Description |
|---|---|---|---|
task_name | string | required | Name of the task. Shown in the Studio task list. |
video_path | string | required | The object_path returned by asset_uploadurl. |
method | string | required | box_removal fullvideo_removal |
rect | object | box only | Required when method is box_removal. Send all four keys — {x, y, w, h}. x/y give the pixel coordinates of the box's top-left corner, w/h its width and height. The area, w × h, must be less than 480,000 pixels — roughly an 800 × 600 box. |
{
"task_name": "promo-cut-a",
"video_path": "u/4821/9f2c4a.mp4",
"method": "box_removal",
"rect": { "x": 940, "y": 36, "w": 220, "h": 88 }
}
Response data
| Field | Type | Description |
|---|---|---|
task_id | string | Identifier to use in task_start, task_result, and task_cancel. |
status | string | Paused |
credits | number | Credits required for this task. |
Create an object-removal task
/videoobject_removal
Create a video object removal task. This task can remove unwanted people or objects from videos and automatically detect and track their movement throughout the video. It can also remove overlays such as stickers and mosaic effects, seamlessly restoring the underlying footage.
no_trackingRemoval is applied only to the fixed mask region.auto_trackingThe object within the mask is automatically tracked and removed as it moves throughout the video.
Body
| Field | Type | Required | Description |
|---|---|---|---|
task_name | string | optional | Defaults to the file name. |
video_path | string | required | The object_path returned by asset_uploadurl. |
method
| string | required | no_tracking auto_tracking |
time_mask | integer | required | Non-negative integer. |
custom_mask | string | required | Base64-encoded mask that marks the region to remove. The mask resolution must match the video resolution. |
{
"task_name": "banner-strip",
"video_path": "u/4821/9f2c4a.mp4",
"method": "auto_tracking",
"time_mask": 0,
"custom_mask": "iVBORw0KGgoAAAANSUhEUg..."
}
Response data
| Field | Type | Description |
|---|---|---|
task_id | string | Identifier to use in task_start, task_result, and task_cancel. |
status | string | Paused |
credits | number | Credits required for this task. |
Create a video-enhancement task
/video_enhance
Create a video enhancement task. This task uses generative AI to add visual detail and improve image sharpness, turning low-quality videos into true 1080p or 2K high-definition video.
UPS_1080POutputs a 1080p HD video with a long edge of 1920 px and a proportionally scaled short edge.UPS_2KOutputs a 2K high-resolution video with a long edge of 2560 px and a proportionally scaled short edge.
Body
| Field | Type | Required | Description |
|---|---|---|---|
task_name | string | optional | Defaults to the file name. |
video_path | string | required | The object_path returned by asset_uploadurl. |
method | string | required | UPS_1080P UPS_2K |
{
"task_name": "reel-2k",
"video_path": "u/4821/9f2c4a.mp4",
"method": "UPS_2K"
}
Response data
| Field | Type | Description |
|---|---|---|
task_id | string | Identifier to use in task_start, task_result, and task_cancel. |
status | string | Paused |
credits | number | Credits required for this task. |
Start a task
/task_start/{taskId}
Start a task. Only tasks with a status of Paused or Error can be started. Upon successful task startup, the required credits are deducted upfront. If the task ultimately fails, the deducted credits are refunded. If the account has insufficient credits, the request fails and returns business code 1100.
Each account gets 5 concurrent tasks per task type. Beyond that, new tasks land in Queued and start on their own as slots free up — no retry loop is needed.
Response data
| Field | Type | Description |
|---|---|---|
task_id | string | The task you just started. |
status | string | Processing when a slot is free, Queued when you are at the concurrency limit. |
credits | number | Credits deducted by this call, as a negative number — for example -5. |
Fetch task progress and the result
/task_result/{taskId}
Retrieve the processing progress and result download URL for the task identified by task_id. Polling at 20-second intervals is recommended. Once processing is complete, you can download the result from the URL specified by download_url.
Task results are retained for only 24 hours and will be automatically deleted after they expire. Please download them promptly.
Response data
| Field | Type | Description |
|---|---|---|
task_id | string | The task you asked about. |
status | string | Current status of the task. |
progress | number | 0–100. Task progress, reported while Processing. |
download_url | string | URL served with a download disposition — use it to save the file. |
output_url | string | Preview URL — use it to play the result in place. |
{
"code": 0,
"msg": "success",
"data": {
"task_id": "tsk_7Qd2f8",
"status": "Finished",
"progress": 100,
"download_url": "https://…/output.mp4?response-content-disposition=attachment",
"output_url": "https://…/output.mp4"
}
}
Cancel a task
/task_cancel/{taskId}
Cancel a queued task. A task can only be canceled while its status is Queued. Once it enters the Processing status, it can no longer be canceled. Once the task is successfully canceled, it transitions to the Paused status. You can restart it at any time using the task_start endpoint.
Response data
| Field | Type | Description |
|---|---|---|
task_id | string | The cancelled task. |
status | string | Paused |
credits | number | Credits returned, as a positive number. |
Task states
A task moves through a small, fixed set of states. Only Finished produces a result URL, and only Paused and Error can be started.
| State | Meaning |
|---|---|
| Paused | Created but not started. This is the initial state of every task. |
| Queued | Waiting because you are at the concurrency limit for this task type. |
| Processing | A slot was free and the model is running. |
| Finished | Done. task_result returns the download and preview URLs. |
| Error | Processing failed. The task can be started again with a corrected rule. |
- STATE 01PausedCall task_start
- STATE 02QueuedNo free slot
- STATE 03ProcessingModel running
- STATE 04FinishedURLs available
Credits and limits
Credits are deducted once, at task_start, in 30-second units with a minimum of one unit. The rate depends on the model and, where it applies, on the mode you chose.
| Task | METHOD | Credits per 30 s |
|---|---|---|
videowatermark_removal | box_removal | 5credits |
videowatermark_removal | fullvideo_removal | 10credits |
videoobject_removal | no_tracking | 10credits |
videoobject_removal | auto_tracking | 20credits |
video_enhance | UPS_1080P | 20credits |
video_enhance | UPS_2K | 30credits |
Running out of credits
If the balance does not cover the task, task_start returns code: 1100 with HTTP 200 and the task stays Paused. Nothing is deducted and nothing is queued, so the task can be started after a top-up.
Error codes
The body always carries code and msg. Most failures also set a matching HTTP status; business failures return HTTP 200 with a 1xxx code, so read code first.
| HTTP | code | Meaning |
|---|---|---|
| 200 | 0 | Success. |
| 200 | 1200 | Operation not allowed. |
| 400 | 400 | Parameter validation failed. Check the field list for the endpoint. |
| 401 | 401 | Unauthorized. The API key is invalid or has been disabled. |
| 402 | 1100 | Insufficient credits. Please top up. |
| 405 | 405 | HTTP method not allowed. |
| 500 | 500 | Internal server error. |