Background Remove / Replace
studio-backgroundPer-frame cutout, then composite the subject over white (remove), a solid colour (hex), or a replacement image. Optional trim; audio preserved; output MP4.
Send a source video URL and choose a background. The subject is cut out from every frame — including fine detail like hair — and composited over white, a solid colour, or a replacement image. The original audio is preserved, and the output is an MP4 at the same resolution as the input. Pass start/end to process only part of the video.
/v1/proxy/studio-backgroundBackground remove/replace (async)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
videoUrl | string | required | Direct URL of the source video. |
back_ground | string | optional | Hex colour (#RRGGBB) for a solid replacement. Note the underscore in the field name. |
imageUrl | string | optional | URL of a replacement background image. Takes precedence over back_ground if both are set. |
start | string|number | optional | Trim start (seconds or hh:mm:ss) |
end | string|number | optional | Trim end (seconds or hh:mm:ss) |
curl -X POST https://api.cn8.io/v1/proxy/studio-background \
-H "X-API-Key: <cn8_api_key>" \
-H "Content-Type: application/json" \
-d '{"videoUrl":"https://example.com/file"}'{
"status": "accepted",
"message": "Job queued for processing",
"job": { "id": "550e8400-...", "status": "queued", "service": "studio-background" }
}
Poll the job endpoint until completed, then use the output video URL from the result. Billed per second of source (or trimmed) video.