---
title: "Remove burned-in subtitles from your own video"
method: POST
path: "/v1/studio/clean-text"
tags: ["Edit"]
---

# Remove burned-in subtitles from your own video

`POST /v1/studio/clean-text`

## Request

- Base URL: `https://apihub.co.il`
- URL: `https://apihub.co.il/v1/studio/clean-text`
- Auth: HTTP bearer

A video with subtitles (or another line of text) burned into its picture in, the same video out with that text painted out: a text detector finds the lines inside `region` (shares of the frame; default the lower 40 %), an inpainting model fills the background in under them, and every pixel outside the text stays the source's own; the sound is copied untouched, the picture re-encoded once at `quality`. `start` / `end` limit the work to one stretch. The customer's OWN video only; not a watermark remover (a logo or someone else's mark is not removed). Runs on a render node: minutes, not seconds. The render's `text_removal` reports the band, the frames looked at and painted and the lines found (0 = nothing in the band). Asynchronous: poll GET /v1/executions/{id}.

**Billing:** Per second of output at the text-removal tier (`clean_text`: the inpainting's measured compute on a render node); a clip where no text was found in the band pays a plain re-encode (the `hd` tier) — the estimate assumes text. Failed renders are not charged. · **Rate limit:** 30/min · **Asynchronous**

## Headers

- `Idempotency-Key` string
- `X-Tag` string
- `x-wait-ms` integer

## Request body

- object
  - `end` number: seconds: …to here (default: the end). The rest of the video is left exactly as it is
  - `model` 'lama' | 'sttn': The inpainting model: `lama` (big-lama, frame by frame — the default). `sttn` (video inpainting) is not installed yet
  - `start` number: seconds: paint text out only from here (default: the start)
  - `format` 'mp4' | 'mov' | 'webm': The container to write; the picture keeps the source's size and frame rate, the sound is copied as it is. Files up to 2 minutes — cut a longer one first (POST /v1/studio/convert with `trim`)
  - `region` object: Where the text sits, as shares of the frame's width and height (0–1): default the lower 40 % (`top: 0.6, bottom: 1, left: 0, right: 1`). Keep it tight: the whole band is searched for lines of text, and only text in it is painted out
    - `top` number
    - `left` number
    - `right` number
    - `bottom` number
  - `quality` 'draft' | 'standard' | 'high': The re-encode of the picture: high (default) = the best; draft renders fastest for a check
  - `video_url` string, uri, required: Public URL of the source video (mp4, mov, webm, mkv…) — or the `url` of a previous render

## Response `200`

Completed (or 202 while processing)

- object
  - `id` string: Execution id — stable across internal retries; use it with GET /v1/executions/{id}
  - `status` 'pending' | 'processing' | 'completed' | 'partial' | 'failed' | 'cancelled' | 'timeout'
  - `operation` string
  - `tag` string, nullable: Your X-Tag, if sent
  - `created_at` string, date-time
  - `completed_at` string, date-time, nullable
  - `output` object: Operation result (see each operation). While a Studio render is processing: `stage` (queued · transcribing · downloading · preparing · cleaning_voice · mixing_audio · rendering · finishing), `phase` (the engine's: download · prepare · voice · audio · encode · qa · upload, or null), `progress` (a percent, 0–100) and `progress_fraction` (0–1), `eta_seconds` (seconds left, never below 0) and `estimate_seconds`
  - `error` string, nullable
  - `usage` object
    - `credits_charged` number, nullable
    - `credits_reserved` number
    - `estimated_credits` number
    - `cost_source` 'provider_reported' | 'calculated' | 'estimated' | 'null', nullable
    - `provider_usage` object, nullable: Normalised consumption, e.g. { VIDEO_SECOND: 22.4 }
  - `balance` object
    - `available` number
    - `reserved` number

## Other responses

- `202`: Processing — poll GET /v1/executions/{id}
- `400`: Invalid input
- `402`: Insufficient credits / project budget
- `404`: Resource not found (or not yours)
- `429`: Rate limited
- `503`: Service temporarily paused

---

[API](https://skmtc.dev/apihub/apis/apihub-one-api-for-chat-image-video-ai.md) · [All operations](https://skmtc.dev/apihub/apis/apihub-one-api-for-chat-image-video-ai/llms.txt) · [OpenAPI document](https://skmtc.dev/apihub/apis/apihub-one-api-for-chat-image-video-ai/revisions/a8caa42835ce?raw)
