Transform Clip
lab_transformRelight and restyle an EXISTING clip while the performance stays untouched (Beeble Switch X): lighting, background and props change, the subject and its motion do not. The source is the clip of a generated-video row — or, with asset_id, an uploaded file that stands in for it. in_sec/out_sec cut the source server-side first, so a long take can be transformed in pieces. ASYNCHRONOUS: a new video row comes back as pending; poll it with lab_job_status. Costs credits when called without get_cost.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| in_sec | No | Cut the source server-side before it reaches the provider: start of the excerpt, in seconds. Only together with out_sec. What is billed is the MEASURED length of the cut, not out_sec minus in_sec. | |
| out_sec | No | End of the excerpt, in seconds. Must lie behind in_sec; both are set together or neither. | |
| asset_id | No | R2 asset key of an uploaded video (the `key` from lab_list_assets, asset_type 'video') to transform INSTEAD of the row's own clip. The row from video_id still supplies project and scene; only the pixels come from the asset. The key must belong to that same project. | |
| get_cost | No | `true` returns the published rate per unit and your balance WITHOUT transforming and without spending anything — NOT a total. Switch X charges by the MEASURED length of the source, which only the server knows before the run, and it is not priced from the lab_list_models catalog (that covers generation models). The real amount comes back with the actual call. | |
| video_id | Yes | Generated-video id (from lab_animate/lab_job_status/lab_review_queue) — positive integer as string. ALWAYS required, also together with asset_id: this row anchors the run (project, scene, billing) and the backend answers 404 without it. | |
| alpha_mode | No | How the subject is cut out from its background. Omit to let the backend decide ('auto'); the other modes fill, take a supplied matte, or work on a selection. | |
| resolution | No | Output tier of the transform. This is Switch X's OWN tier list, not one of the video-model resolutions in lab_list_models — that catalog covers generation models and has no entry for this path. The tier drives the price; omit it for the backend default. | |
| transformation_prompt | Yes | What the clip should look like afterwards — light, place, props. The subject and its performance are preserved by the model; describing them again does not help. |