Video Background Removal API
Cut the subject out of a video and keep it on a transparent, white, black or green background: send the clip and the background, get the same clip back without its setting.
/v1/generateworkflow: remove_video_background-v1One endpoint serves every workflow — this page documents remove_video_background-v1, the current version. Credits are debited at submission (1.1 cr/s standard, 1.1 cr/s pro); a failed generation is refunded automatically. Earlier versions of this endpoint, if any, keep being served under their own names. This workflow needs an active plan.
| Parameter | Value for this workflow |
|---|---|
| workflow | "remove_video_background-v1" required |
| source_video | Video to cut out — one public HTTPS URL.required |
| fields.background | Background. What the subject lands on. Transparent gives a .webm with an alpha channel (plays in Chrome, Edge, Firefox and editing tools; Safari shows black); the colours give an mp4 that plays everywhere.Transparent · White · Black · GreenDefaults to “White”. |
| duration | per engine (seconds) |
| tier | "standard" (1.1 cr/s) or "pro" (1.1 cr/s) |
| webhook_url | Optional — we POST the outcome here when the generation settles. Without it, poll the URL returned in the response until the status settles. |
Example request
curl -X POST https://thenewblack.ai/api/v1/generate \
-H "Authorization: Bearer tnb_live_XXXXXXXXXXXX" \
-H "Content-Type: application/json" \
-d '{
"workflow": "remove_video_background-v1",
"source_video": "https://example.com/clip.mp4",
"fields": {
"background": "Transparent"
},
"tier": "standard"
}'// 202 Accepted
{
"generation_id": "3f1c9a6e-...",
"status": "running",
"poll": "/api/v1/generations/3f1c9a6e-..."
}Example response
Poll /v1/generations/{id} (or receive the webhook) until the generation settles:
// 200 OK
{
"generation_id": "3f1c9a6e-...",
"workflow": "remove_video_background",
"status": "succeeded",
"result": {
"type": "video",
"url": "https://.../result.mp4",
"thumbnail": "https://.../thumb.webp"
}
}Results are stored for 48 hours — copy them to your own storage. Authentication, errors and webhooks are documented in the full API reference.
Frequently asked questions
What does the video background removal endpoint return?
The same clip, same length and shape, with the subject on the background you named. Transparent returns a .webm with an alpha channel; the colours return an mp4.
How is it billed?
By the second of the video you send: its length is read from the file before the job starts. A clip whose length cannot be read is refused, not charged.
How much does it cost?
1.1 credits per second on the standard tier, 1.1 per second on pro. Credits come with plans and packs; a failed generation is always refunded.
Other endpoints: Virtual Try-On API · AI Fashion Models API · Fashion Design API · Reimagine Model API · Swap Model API · AI Stylist API · all endpoints