WWeydub API

Workflow

Video Subtitle and Text Removal

Use this workflow to remove hardcoded subtitles, watermarks, logos, lower thirds, plot hints, registration numbers, captions, or other visible text from video.

Want to inspect output quality before building? Try the same removal workflow in the Weydub web app: Remove subtitles online.

For the technical background behind OCR-guided detection, temporal grouping, false-positive controls, and video inpainting, read How Weydub removes hardcoded subtitles.

Endpoint

text
POST /v-w-c/gateway/ve/work/free

The task is asynchronous. Save body.idProject and body.dataList[].id, then use Async task model for polling, callbacks, retry behavior, and callback signing.

Access And Limits

RuleRequirement
Account accessCore video API access must be enabled. Advanced Lite and Advanced Pro removal may require account entitlement.
Source videoUse a stable public HTTPS URL. Current video hard limits are 15 minutes per file and 1000 MB per file.
BillingVideo workflows are billed in 30-second units. Clips shorter than 30 seconds count as 30 seconds. Combined services are billed together.
Failed taskIf the final processStatus > 1, zero credits are deducted.
RetentionAPI outputs follow Weydub web retention rules. By default, source/rendered assets for the last 30 days are retained. Download durable copies after callback.

Entitlement And Version Matrix

Removal has several versions with different cost, quality, and account requirements. Confirm the enabled tier before sending production traffic.

VersionAccess RequirementMain ParametersWhen To Use
Basic full-screenSigned-in accounts can open API access for free.needChineseOcclude: 1, videoInpaintLang.Low-cost automatic removal when text position is unknown or broad.
Basic regionSigned-in accounts can open API access for free.needChineseOcclude: 2, videoInpaintMasks.Stable subtitle bars, logos, lower thirds, plot hints, or registration numbers.
Basic moving textMust be enabled for the account.needChineseOcclude: 3, videoInpaintLang.Moving captions, scrolling text, or overlays that do not stay in one region.
Advanced LiteAdvanced Lite entitlement may be required.needChineseOcclude: 2, videoInpaintMasks, extraOptions.extra_inpaint_config.model: "advanced_lite".Short drama and e-commerce clips where region removal needs better fill quality at lower cost than Pro.
Advanced Pro, Bounding BoxAdvanced Pro entitlement may be required.needChineseOcclude: 2, videoInpaintMasks, extraOptions.extra_inpaint_config.model: "advanced_large_box".Harder regions where you know the affected box and want stronger inpainting without processing the full frame.
Advanced Pro, Full ScreenAdvanced Pro entitlement may be required.needChineseOcclude: 1, extraOptions.extra_inpaint_config.model: "advanced_full".Difficult clips where text is scattered, unknown, or full-frame quality matters more than cost.
Encoder CRF overrideEncoder/write option entitlement may be required.extraOptions.write_options.crf.Extreme quality requirements. Lower CRF values such as 15 or 16 can increase storage/bandwidth cost.

Removal Versions

VersionBest ForField PatternNotes
Basic full-screenLow-cost removal for TikTok, e-commerce, simple subtitles, and unknown text positions.needChineseOcclude: 1, videoInpaintLang.Runs automatic detection across the frame.
Basic regionStable subtitle bars, fixed logos, lower thirds, or areas you can describe with coordinates.needChineseOcclude: 2, videoInpaintMasks.Most predictable when text stays inside a known region.
Basic moving textMoving captions or scrolling text when enabled for the account.needChineseOcclude: 3, videoInpaintLang.Availability can vary by account.
Advanced LiteLower-cost upgraded inpainting, commonly used for short-drama subtitle regions.needChineseOcclude: 2, mask list, extraOptions.extra_inpaint_config.model: "advanced_lite".Requires a region mask.
Advanced Pro, Bounding BoxHigher quality for difficult regions while limiting the processed area.needChineseOcclude: 2, one or more masks, Pro model such as advanced_large_box when enabled.Some accounts enforce a max mask area.
Advanced Pro, Full ScreenBest quality for hard clips when the text location is unknown or scattered.needChineseOcclude: 1, extraOptions.extra_inpaint_config.model: "advanced_full".Higher cost and account entitlement may apply.

Minimal Basic Payload

json
{
  "urls": ["https://example.com/video.mp4"],
  "needChineseOcclude": 1,
  "videoInpaintLang": "all",
  "callback": "https://your-domain.example/webhooks/weydub"
}

Use videoInpaintLang: "all" when source text language is uncertain. Use a specific language such as en, zh, es, or pt only when you know the visible text language.

Advanced Lite Payload

json
{
  "urls": ["https://example.com/video.mp4"],
  "needChineseOcclude": 2,
  "videoInpaintLang": "all",
  "videoInpaintMasks": "[{\"type\":\"remove\",\"region\":[[0,0.8],[1,0.8],[1,1],[0,1]]}]",
  "extraOptions": "{\"extra_inpaint_config\":{\"model\":\"advanced_lite\"}}"
}

Advanced Pro Bounding-Box Payload

json
{
  "urls": ["https://example.com/video.mp4"],
  "needChineseOcclude": 2,
  "videoInpaintLang": "all",
  "videoInpaintMasks": "[{\"type\":\"remove\",\"start\":0,\"end\":18,\"region\":[[0,0.8],[1,0.8],[1,1],[0,1]]}]",
  "extraOptions": "{\"extra_inpaint_config\":{\"model\":\"advanced_large_box\"}}"
}

Use bounding-box Pro when the text stays in a known area. Keep start and end tight for short-lived overlays such as plot hints or registration numbers.

Advanced Pro Full-Screen Payload

json
{
  "urls": ["https://example.com/video.mp4"],
  "needChineseOcclude": 1,
  "videoInpaintLang": "all",
  "extraOptions": "{\"extra_inpaint_config\":{\"model\":\"advanced_full\"}}"
}

Region Mask Payload

json
{
  "urls": ["https://example.com/video.mp4"],
  "needChineseOcclude": 2,
  "videoInpaintLang": "all",
  "videoInpaintMasks": "[{\"type\":\"remove_only_ocr\",\"start\":0,\"end\":12,\"region\":[[0,0.72],[1,0.72],[1,0.92],[0,0.92]]}]"
}

Coordinates are normalized from 0 to 1, ordered as top-left, top-right, bottom-right, bottom-left. This makes the same mask adapt across resolutions.

videoInpaintMasks Schema

videoInpaintMasks is a compact JSON string before signing. Some internal product flows hold it as an array before serialization, but public API clients should send the string form shown above unless your account contract says otherwise.

FieldTypeRequiredDescription
typestringYesremove removes the area, keep protects an area, remove_only_ocr removes text detected by OCR inside the area.
regionarrayYesFour normalized points: [[x1,y1],[x2,y2],[x3,y3],[x4,y4]].
startnumberNoStart time in seconds. Omit or use 0 when the mask applies from the beginning.
endnumberNoEnd time in seconds. Use this for temporary plot hints, registration numbers, and short-lived overlays.
to_endnumberNoSeconds before the video end. Some tools use this to derive end. Prefer explicit end in API payloads when known.

Use explicit end values when an overlay only appears during the first seconds. This prevents the model from erasing unrelated content later in the video.

Common Mask Coordinates

ScenarioRegion
Vertical 16:9 subtitle band[[0,0.56],[1,0.56],[1,0.76],[0,0.76]]
Horizontal standard subtitle area[[0,0.8],[1,0.8],[1,1],[0,1]]
Vertical top-right plot hint[[0.85,0.02],[1,0.02],[1,0.33],[0.85,0.33]]
Vertical top-left plot hint[[0,0.01],[0.15,0.01],[0.15,0.33],[0,0.33]]
Vertical bottom-right registration number[[0.5,0.95],[1,0.95],[1,1],[0.5,1]]

Quality And CRF

Weydub defaults to CRF 17, which is visually lossless for most distribution workflows. If your account enables encoder overrides, use extraOptions.write_options to request CRF 15 or 16 for extreme quality requirements. Lower CRF values can create much larger files and may add bandwidth or storage charges.

Example:

json
{
  "extraOptions": "{\"write_options\":{\"crf\":16},\"extra_inpaint_config\":{\"model\":\"advanced_full\"}}"
}

Parameters

ParameterRequiredDescription
urlsYesPublic video URLs. Use stable HTTPS URLs in production.
needChineseOccludeYesRemoval mode: 1 full-screen auto removal, 2 region mask removal, 3 moving text removal when enabled, 0 off.
videoInpaintLangConditionalText language to detect. Use all when unsure. Required for auto/full-screen detection.
videoInpaintMasksConditionalCompact JSON string of mask objects for region-based removal.
extraOptionsOptionalCompact JSON string for Advanced Lite/Pro model, CRF/write options, subtitle inference, or other provisioned advanced options.
callbackOptionalWebhook URL for async completion.
uidOptionalYour user/customer identifier when your account uses sub-user tracking.

Outputs

Successful tasks can return:

  • videoUrl
  • coverUrl
  • sourceVideoUrl
  • processStatus
  • processProgress
  • paidPoint
  • task metadata under the returned work item

Poll until processStatus === 1 before reading output URLs.

Agent Notes

  • Use Demo scenarios before customer media.
  • Prefer region masks when subtitles always appear in a known band.
  • Use videoInpaintLang: "all" when the source language is uncertain.
  • Keep extraOptions and videoInpaintMasks compact and stringified before signing.
  • Do not combine text removal with unrelated dubbing or translation features unless your payload exactly matches a documented combined workflow.