You need to enable JavaScript to run this app.
Lake AI Service

Lake AI Service

Copy page
Download PDF
Video Restoration
Video Inpaint
Copy page
Download PDF
Video Inpaint

The video intelligent inpainting operator takes a single video as input and outputs a repaired video with specified content erased. Supports subtitles, scrolling subtitles, text watermarks, corner marks, logos, and episode information, and allows separate control of the erasure range for subtitles and watermarks.

Operator introduction

Operator ID: las_video_inpaint_pro

Core capabilities

  • standard_subtitle: Standard erasure of subtitles and scrolling subtitles; default mode.
  • standard_watermark: Standard erasure of text watermarks; best suited for static text watermarks in the corners of the frame.
  • standard_subtitle_watermark: Standard simultaneous erasure of subtitles, scrolling subtitles, and text watermarks.
  • precise: When non-empty fixed_bboxes are not provided, non-empty targets can be used to precisely specify watermarks, subtitles, scrolling subtitles, or episode information; when non-empty fixed_bboxes are provided, fixed regions are used directly and targets are not required. The standard mode automatically selects objects and ignores the targets parameter.
  • Supports specifying one or more fixed inpainting regions using fixed_bboxes. Coordinates must satisfy top_left_x < bottom_right_x and top_left_y < bottom_right_y.
  • Supports stable processing of long videos and retains the original audio in the output video.

Supported languages

  • “standard_*” detection mode: Designed for text detection, supports Simplified Chinese, Traditional Chinese, English, Japanese, French, German, Italian, Spanish, Portuguese, Dutch, Polish, Romanian, Czech, Swedish, Norwegian, Danish, Finnish, Hungarian, Turkish, Vietnamese, Indonesian, Malay, Azerbaijani, Afrikaans, Bosnian, Croatian, Welsh, Estonian, Irish, Icelandic, Kurdish, Lithuanian, Latvian, Maltese, Maori, Occitan, Slovak, Slovenian, Albanian, Swahili, Tagalog, Uzbek, Latin, Serbian (Latin), Catalan, Basque, Galician, Luxembourgish, Romansh, Quechua.

    tip

    Language support indicates detectable text, but does not guarantee consistent results for all fonts, artistic text, or low-contrast text.

  • precise detection mode: Based on large models for target recognition, supports identification and inpainting of text in various common languages.

Supported regions

  • Beijing: cn-beijing

To use the operator in the Shanghai or Shenzhen region, submit a ticket to contact technical support for evaluation and assistance.

Operator performance

Caution and prerequisites

Performance impact description

Submit RPM

600

Poll RPM

600

Maximum concurrency

  • 10

Estimated processing duration

  • lite: Processing 720p and 1080p takes approximately 3 times the original video duration, and 4K takes approximately 6 times;
  • pro: 720p takes approximately 6 times, 1080p takes approximately 10 times, and 4K takes approximately 15 times.

Actual processing time may be affected by video content, service load, and task queueing.

Input and output requirements

Input requirements

Subdivision

Detailed description

Supported input data modalities

  • Video

Input format: video

  • Format: mp4, mov, avi, mkv, and other common formats;
  • Size: 1 second to 3 hours, maximum 10 GB;
  • Resolution: Resolution must not exceed 4K (long side ≤ 3840, short side ≤ 2160).

Input path requirements

Supports public URLs, Volcengine intranet, and tos:// video sources. The TOS bucket must belong to the same account and region as the API Key.

Output requirements

Subdivision
Detailed description

Output data modalities

  • Video

Output path: TOS

Specify the storage path for the operator's output results using the request parameter output_tos_path. Currently, setting a TOS path is supported.

  • TOS path: A writable TOS Bucket directory under the same primary account and region as the LAS service.

Billing information
  • 计费标准

    细分项
    计费标准说明

    计费项

    基于输出视频的时长进行用量统计,计费时,会基于输出视频的帧率、分辨率,对输出视频时长进行系数折算,折算后的计费时长作为计费用量。
    任务处理完成后,您可通过 poll 接口返回的 output_fps、resolution 参数查看当前任务实际输出视频的帧率、分辨率取值。

    计费类型

    按量计费,单位:元/分钟,按实际的计费用量每小时出账。计费精度:分钟计费,精确到毫秒级

    单价

    单价与您选择使用视频修复时的修复版本、目标检测和修复模式有关。提交算子任务时,支持通过
    model_level、detection_mode 请求参数设置任务的修复版本、目标检测和修复模式

    warning

    • 支付的总费用:除单价外,服务计费与实际修复后视频时长和视频帧率、分辨率关联。
    • 视频修复不改变视频帧率,修复后的视频时长可能会小于输入的视频时长。
  • 计费详情
    计费公式:总费用 = 单价 * 计费用量 = 单价 * (视频时长 * 时长-输出帧率折算系数 * 时长-输出分辨率折算系数)

    细分场景
    单价
    计费时长-输出帧率折算系数
    计费时长-输出分辨率折算系数
    • 极速版修复,即
      • model_level : lite

    0.5 元/分钟

    实际输出帧率:

    • (0 , 24fps]:系数为 0.8
    • (24fps , 30fps]:系数为 1
    • 大于 30fps:将按照实际输出视频的帧率与基础帧率(30fps)的倍率(向上取整)作为系数

    实际输出总像素数:

    • (0 , 1920×1080]:系数为 1
    • (1920×1080 , 3840×2160]:系数为 2
    • 专业版 - standard 级目标检测与修复,即
      • model_level : pro
      • detection_mode : standard_*

    1.5 元/分钟

    实际输出总像素数 :

    • (0 , 1280×720]:系数为 0.6
    • (1280×720 ,1920×1080]:系数为 1
    • (1920×1080 , 3840×2160]:系数为 2
    • 专业版 - precise 级目标检测与修复,即
      • model_level : pro
      • detection_mode : precise

    3 元/分钟

  • 计费示例
    使用专业版 - precise 级目标检测与修复模式进行视频修复,修复后实际输出视频的帧率为 50fps 、分辨率为 1080p(1920×1080)视频时长为 10 分钟时:

    • 实际输出视频帧率与基础帧率的倍率为1.6,向上取整后为 2.0。
    • 实际费用为:
      总费用 = 3 元/分钟 * (10分钟 * 2 * 1)= 60 元 。

Enable LAS

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.
For details, see Obtain the Base URL. The Examples below are for reference only; when making actual calls, replace the path values with those corresponding to your region.

Rest API invocation

API invocation instructions

  • The API of this operator is an asynchronous task interface. You need to submit a task via the Submit interface to obtain the task's task_id, then use the Poll interface to check the status of the corresponding task (task_id) and retrieve the operator's processing result.
  • Caution: After a task is submitted, the task_id is valid for 3 days. After 3 days, you will not be able to retrieve the operator's processing result using this task_id.

Submit

Interface description

Submit an asynchronous Video Inpaint task. The operator reads a video, determines the inpainting range based on detection mode or fixed region, outputs the inpainted video, and retains the original audio.

Request parameters

Parameter
Type
Required
Example value
Description
operator_id
string
Yes
las_video_inpaint_pro
Fixed as las_video_inpaint_pro.
operator_version
string
Yes
v1
Fixed as v1.
data
VideoInpaintUserReqParams
Yes
Video input, detection method, restoration scope, and output settings.

Response parameters

Parameter
Type
Example value
Description
metadata
metadata
Asynchronous task metadata. A successful Submit only indicates that the task has been accepted, not that the repair is complete.

Example

Request example

export OUTPUT_TOS_PATH="tos://path/to/output/"

curl --location "https://operator.las.cn-beijing.volces.com/api/v1/submit" \
--header "Content-Type: application/json" \
--header "Authorization: Bearer $LAS_API_KEY" \
--data '{
  "operator_id": "las_video_inpaint_pro",
  "operator_version": "v1",
  "data": {
    "video_url": "https://${LAS_TOS_BUCKET}.${TOS_ENDPOINT}/operator_cards_serving/public/${LAS_ENVIRONMENT}/las_video_inpaint_pro/v1/input.mp4",
    "output_tos_path": "$OUTPUT_TOS_PATH",
    "model_level": "pro",
    "detection_mode": "precise",
    "targets": ["watermark", "subtitle"],
    "maximum_output_fps": 30,
    "maximum_resolution": "1080p",
    "output_video_mode": "balanced"
  }
}'

Response example

{
  "metadata": {
    "task_id": "task-20260812154600-abc123",
    "task_status": "PENDING",
    "business_code": "0",
    "error_msg": ""
  }
}

Error code

HttpStatusCode

Error code

Error message

Description

400

Url.Invalid

video_url is invalid or inaccessible; check the URL, validity period, and TOS read permissions.

video_url is invalid or inaccessible; check the URL, validity period, and TOS read permissions.

400

Video.Invalid

The file is corrupted, cannot be decoded, or is not recognized as a valid video; check the source file and try again.

The file is corrupted, cannot be decoded, or is not recognized as a valid video; check the source file and try again.

400

Video.FormatUnsupported

The container or encoding format is not supported; convert to a common format and try again.

The container or encoding format is not supported; convert to a common format and try again.

400

Video.DownloadFailed

Failed to download the source video; check the network, URL validity period, and access permissions.

Failed to download the source video; check the network, URL validity period, and access permissions.

400

Video.DurationTooShort

The video is less than 1 second.

The video is less than 1 second.

400

Video.DurationExceeded

The video exceeds 3 hours; submit after trimming or splitting.

The video exceeds 3 hours; submit after trimming or splitting.

400

Video.FileTooLarge

The video exceeds 10 GB; submit after compressing or splitting.

The video exceeds 10 GB; submit after compressing or splitting.

400

Parameter.Invalid

The type, enumeration, coordinates, or value is invalid; correct according to the parameter table.

The type, enumeration, coordinates, or value is invalid; correct according to the parameter table.

400

Video.Timeout

Processing timed out; you can try again after shortening the video or reducing the frame rate/resolution.

Processing timed out; you can try again after shortening the video or reducing the frame rate/resolution.

400

Video.VLMFailed

Precision detection failed; you can retry, or use the standard detection mode when applicable.

Precision detection failed; you can retry, or use the standard detection mode when applicable.

400

Video.UploadFailed

Failed to upload the result; check the output directory and write permissions.

Failed to upload the result; check the output directory and write permissions.

401

Authorization.Missing

Authentication information not provided.

Authentication information not provided.

401

ApiKey.Invalid

The API Key is invalid.

The API Key is invalid.

Poll

Interface description

Query the status of the Video Inpaint task using the task_id returned by Submit. After the task is completed, data returns the result address and information about the regions requested to be enabled and actually detected.

Request parameters

Name

Type

Required

Example value

Description

operator_id

string

Yes

las_video_inpaint_pro

Must be consistent with the task submission, and fixed to las_video_inpaint_pro.

operator_version

string

Yes

v1

Must be consistent with the task submission, and fixed to v1.

task_id

string

Yes

task-20260812154600-abc123

The asynchronous task ID returned by Submit. If the task ID does not exist, is misspelled, or does not belong to the current request context, the result cannot be obtained.

Response parameters

Parameter
Type
Example value
Description
metadata
metadata
Always
Task ID, status, business code, and error information.
data
VideoInpaintResponse
Usually after the task is completed
Inpaint result. This object should not be assumed to exist when the task is queued, in progress, or has failed.

Example

Request example

curl --location "https://operator.las.cn-beijing.volces.com/api/v1/poll" \
--header "Content-Type: application/json" \
--header "Authorization: Bearer $LAS_API_KEY" \
--data '{
  "operator_id": "las_video_inpaint_pro",
  "operator_version": "v1",
  "task_id": "task-20260812154600-abc123"
}'

Response example

{
  "metadata": {
    "task_id": "task-20260812154600-abc123",
    "task_status": "COMPLETED",
    "business_code": "0",
    "error_msg": ""
  },
  "data": {
    "inpainted_video_path": "tos://bucket/output/video_inpaint/xxx/output.mp4",
    "output_video_url": "https://example.com/output.mp4",
    "subtitle_bbox": "120,800,1800,960",
    "resolution": "1920x1080",
    "output_fps": 29.97
  }
}

Error code

HttpStatusCode

Error code

Error message

Description

400

Operator.InvalidId

The operator is invalid.

Missing operator_id or operator_version, or the operator and version combination is not supported.

400

TaskId.Missing

The task id is missing.

Missing task_id or its value is empty.

200

TaskId.Invalid

The task does not exist

Poll returns normally, metadata.task_status is FAILED, metadata.business_code is TaskId.Invalid, and data is {}. Check whether the task ID is correct.

400

Parameter.Invalid

The parameter type or value is invalid.

The parameter type or value is invalid.

401

Authorization.Missing

Missing authentication information.

Missing authentication information.

401

ApiKey.Invalid

The API Key is invalid.

The API Key is invalid.

  • HTTP 200 only indicates that the Poll request was successful; it does not mean the task was successful. If the task fails, check metadata.task_status, metadata.business_code, and metadata.error_msg.
Last updated: 2026.09.11 13:54:33