Intelligent video restoration operator, based on a multimodal large model to enable intelligent removal of watermarks and subtitles from videos. Supports automatic detection and removal of unwanted content such as watermarks, subtitles, and scrolling subtitles in videos, and outputs the restored video file.
Operator ID: las_video_inpaint
Input video: landscape video - watermark + subtitles
Core parameters
"targets": ["watermark", "subtitle"], "detection_precise_mode": "true", "inpainting_backend": "pixel_replace"
Output result
Input video: landscape video - dynamic watermark
Core parameters
"targets": ["watermark"], "detection_precise_mode": "true", "inpainting_backend": "pixel_generate"
Output result
Input video: portrait video - dynamic watermark
Core parameters
"targets": ["watermark"], "detection_precise_mode": "true", "inpainting_backend": "pixel_generate"
Output result
Input video: landscape video - scrolling subtitles
Core parameters
"targets": ["scrolling_subtitle"], "detection_precise_mode": "true", "inpainting_backend": "pixel_replace"
Output result
Input video: portrait video - scrolling subtitles
Core parameters
"targets": ["scrolling_subtitle"], "detection_precise_mode": "true", "inpainting_backend": "pixel_replace"
Output result
Subcategory | Performance impact description |
|---|---|
Maximum RPM | 600 |
Maximum concurrency | 10 |
Processing time |
|
Network performance |
|
Subdivision | Detailed description |
|---|---|
Supported input data modalities |
|
Input format: video |
|
Input path requirements | Provide input data to the operator via the request parameter
|
Subdivision | Detailed description |
|---|---|
Output data modality |
|
Output path: TOS | Specify the storage path for the operator's output results via the request parameter
|
Billing standards
Sub-item | Description of billing standards |
|---|---|
Billing item | Billing usage is calculated based on the duration of the output video. If the output video frame rate exceeds 30 fps, the duration of the output video will be adjusted by the multiplier of the actual output video frame rate to the base frame rate (30 fps), rounded up. |
Billing type | Pay-as-you-go, unit: |
Unit price | The unit price depends on the video detection and video restoration mode you select when using video restoration. |
warning
Billing details
Billing formula: Total cost = Unit price * Billing usage = Unit price * (Video duration * Duration conversion coefficient)
Sub-scenario | Unit price | Billing duration conversion coefficient (per thousand tokens) |
|---|---|---|
| 1.2 CNY/minute |
|
| 1.6 CNY/minute | |
| 2.8 CNY/minute | |
| 3.2 CNY/minute |
Billing example
When performing video restoration using the standard detection mode - pixel_replace restoration mode, if the actual output video frame rate is 50 fps and the video duration is 10 minutes:
Total cost = 1.2 CNY/minute * (10 minutes * 2) = 24 CNY.Details | Caution and prerequisites |
|---|---|
Costs | Before calling an operator, you need to understand the model invocation costs associated with using the operator. For details, see Large model invocation billing. |
Authentication (API Key) | Before calling an operator, you need to generate an API Key for operator invocation. It is recommended to configure the API Key as an environment variable to ensure safer operator calls. For details, see Obtain and configure API Key. |
BaseURL | Before calling an operator, you need to determine the BaseURL for operator invocation based on the region where your current LAS service is deployed. This is used to configure the path parameter values for operator calls. |
Call the video inpainting operator to submit a restoration task, supporting intelligent removal of watermarks, subtitles, logos, and other content from video source files on the public network, Volcano Engine intranet, or TOS.
Parameters | Type | Required | Example value | Description |
|---|---|---|---|---|
operator_id | string | Yes | `https://example.com/video.mp4` | Operator ID |
operator_version | string | Yes | v1 | Operator version |
data | VideoInpaintUserRequest | Yes | Video restoration request parameters | |
video_url | string | Yes | `https://example.com/video.mp4` | Downloadable address of the video file. Supports http/https, Volcano Engine TOS (tos://bucket/key). |
output_tos_path | string | Yes | tos://bucket/output | The TOS address where the video restoration results are saved. The restored video will be saved to this address. Caution: The region of the TOS bucket must be consistent with the region of the operator's BaseURL. |
targets | array | No | ["watermark", "subtitle"] | The target types to be erased. The default value is ["watermark", "subtitle"]. Optional values:
|
return_subtitle_bbox | boolean | No | true | Whether to return the subtitle region bbox. Default is true. |
detection_precise_mode | boolean | No | false | Whether to enable precise detection mode. Default is True. |
inpainting_backend | string | No | pixel_replace | Backend repair algorithm, optional values:
|
max_process_frames | integer | No | -1 | Maximum number of frames to process. If a value is provided, only that specific number of frames in the video will be processed. For example, if the original video has an fps of 30 and 300 is provided, only 10 seconds of the video will be processed. A value of -1 means no limit. The default is -1. |
subtitle_mask_precise | boolean | No | false | Whether to enable precise subtitle masking. The default is false. When set to true, it works well for white and yellow subtitles, but performs poorly for transparent and scrolling subtitles. Enable as needed. |
fixed_bboxes | array | No | [[100, 600, 300, 650], [1000, 1000, 1000, 1000]] | Fixed repair area, formatted as [x1, y1, x2, y2]. The coordinate system uses the top-left corner of the video as the origin (0,0). Input values are based on a 1000x1000 coordinate system (that is, the bottom-right corner coordinates are [1000,1000]). The system automatically adjusts the area according to the actual width and height of the video. x1 and y1 represent the coordinates of the top-left corner, and x2 and y2 represent the coordinates of the bottom-right corner. When this parameter is specified, the system will repair only the designated area and will not repair other areas. |
parameter | type | example value | Description |
|---|---|---|---|
metadata | metadata | - | Request metadata |
task_id | string | task-xxx | Task ID in asynchronous mode, used for job status queries. |
task_status | string | PENDING | Task status in asynchronous mode.
|
business_code | string | 0 | Business code. |
error_msg | string | - | If an exception occurs, detailed exception information will be returned. |
# Set OUTPUT_TOS_PATH to a TOS path writable by this account export OUTPUT_TOS_PATH="tos://path/to/output" curl --location "https://operator.las.ap-southeast-1.volces.com/api/v1/submit" \ --header "Content-Type: application/json" \ --header "Authorization: Bearer $LAS_API_KEY" \ --data '{ "operator_id": "las_video_inpaint", "operator_version": "v1", "data": { "video_url": "https://*****/watermark_video.mp4", "output_tos_path": "$OUTPUT_TOS_PATH", "targets": ["watermark", "subtitle"] } }'
{ "metadata": { "task_id": "task-20251125163544-abc123", "task_status": "PENDING", "business_code": "0", "error_msg": "" } }
HttpCode | Error code | Error message | Note |
|---|---|---|---|
400 | Url.Invalid | The url is invalid. | Video link is invalid |
400 | Video.Invalid | The video file is invalid. | Video file is invalid |
400 | Video.DurationExceeded | Video duration exceeds maximum limit of 4 hours. | Video duration exceeds the maximum limit |
400 | Video.FileTooLarge | Video file size exceeds maximum limit of 30GB. | Video file size exceeds the limit |
400 | Parameter.Invalid | The parameter is invalid. | Invalid parameter |
401 | Authorization.Missing | Missing Authorization. | Missing authorization |
401 | ApiKey.InValid | The api key is invalid. | API is invalid |
400 | Video.DurationTooShort | Video duration is too short, minimum 1 second required. | Video duration too short |
400 | Video.Timeout | Video processing timeout. | Video processing timeout |
500 | Internal.ServerError | Internal server error. | Internal server error |
Query the execution status and result of the video restoration task.
Parameters | Type | Required | Example value | Note |
|---|---|---|---|---|
operator_id | string | Is | las_video_inpaint | Operator ID |
operator_version | string | Is | v1 | Operator version |
task_id | string | Is | task-xxx | Task ID |
Parameter | Type | Example value | Description |
|---|---|---|---|
metadata | metadata | Request metadata | |
task_id | string | task-xxx | Task ID in asynchronous mode. |
task_status | string | COMPLETED | Task status in asynchronous mode.
|
submit_time | string | 2026-07-21T16:04:06+08:00 | Task submission time, in ISO 8601 timestamp format. |
end_time | string | 2026-07-21T16:04:06+08:00 | Task end time, in ISO 8601 timestamp format. |
business_code | string | 0 | Business code. |
error_msg | string | If an exception occurs, detailed exception information will be returned. | |
data | VideoInpaintResponse | Returned data | |
inpainted_video_path | string | tos://bucket/output/video.mp4 | Path to the restored video (TOS address). |
output_video_url | string | https://video.mp4 | Pre-signed link to the restored video, valid for 24 hours. |
subtitle_bbox | string | 100,200,800,400 | Subtitle region bbox (if detected), format: x1,y1,x2,y2, values are pixel coordinates from the original video. |
curl --location "https://operator.las.ap-southeast-1.volces.com/api/v1/poll" \ --header "Content-Type: application/json" \ --header "Authorization: Bearer $LAS_API_KEY" \ --data '{ "operator_id": "las_video_inpaint", "operator_version": "v1", "task_id": "task-20251125163544-abc123" }'
{ "metadata": { "task_id": "task-20251125163544-abc123", "task_status": "COMPLETED", "submit_time": "2026-07-21T16:04:06+08:00", "end_time": "2026-07-21T16:04:06+08:00", "business_code": "0", "error_msg": "" }, "data": { "inpainted_video_path": "tos://bucket/output/video_inpaint/xxx/output.mp4", "subtitle_bbox": "120,800,1800,960", "resolution": "1920x1080" } }
HttpStatusCode | Error code | Error message | Description |
|---|---|---|---|
400 | MISSING_REQUIRED_PARAMETER | Missing required parameter. | Missing required parameter |
400 | INVALID_PARAMETER | Invalid parameter. | Invalid parameter |
400 | INVALID_URL | Invalid URL. | Invalid URL |
400 | INVALID_VIDEO_FILE | Invalid video file. | Invalid video file |
400 | VIDEO_DOWNLOAD_FAILED | Video download failed. | Video download failed |
400 | VIDEO_FORMAT_UNSUPPORTED | Video format not supported. | Video format not supported |
400 | VIDEO_TIMEOUT | Video processing timeout. | Video processing timeout |
400 | VLM_CALL_FAILED | VLM call failed. | VLM call failed |
400 | VIDEO_UPLOAD_FAILED | Video upload failed. | Video upload failed |
400 | TOS_ACCESS_FAILED | TOS access failed. | TOS access failed |
401 | Authorization.Missing | Missing Authorization. | Missing authorization |
401 | ApiKey.InValid | The api key is invalid. | API is invalid |
400 | Task.NotFound | Task not found. | Task not found |
500 | Internal.ServerError | Internal server error. | Internal server error |