Submit a video background removal job
Changed onStart an asynchronous job that removes the background from a source video, keeping only the foreground subject. Accepts source videos up to 4K.
It takes video only, and returns the cutout: placing it over a new background is up to you.
Inputs
- video_url — public URL of the source video
- output_codec — optional; vp9 (the default) renders one WebM with an alpha channel, h264 renders two files (the RGB video and an alpha matte) and is recommended for better RGB quality
- refine_foreground_edges — optional; improves the quality of the extracted subject's edges (defaults to true)
- subject_is_person — optional; set to false when the subject is not a person (defaults to true)
What happens next
The job is accepted immediately — you get 202 Accepted with a job_id and status PROCESSING. Rendering runs in the background; poll GET /v1/video-background-removal/{job_id} until the job is COMPLETED or FAILED.
Request
- Base URLhttps://api.veed.io
- AuthHTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Headers
Set to 0 to not store this request's and response's bodies. They are then not available in your request logs for debugging.
Number of seconds before the media URLs returned for this request expire. A value above the maximum is capped rather than rejected.
Request body
Example request
{
"$schema": "https://api.veed.io/schemas/VideoBackgroundRemovalInput.json",
"output_codec": "vp9",
"video_url": "https://static-assets.veed.io/api-examples/bg-v2v-input.mp4"
}Response
Accepted
Example response
{
"$schema": "https://api.veed.io/schemas/ResourceVideoBackgroundRemovalJob.json",
"data": {
"result": {
"files": [
{
"content_type": "video/mp4"
}
]
}
}
}Changes
- warning
added the new
model_access_requiredenum value to the///response property for the response status - warning
added the new
model_access_requiredenum value to the///response property for the response status - warning
added the new
model_access_requiredenum value to the///response property for the response status - warning
added the new
model_access_requiredenum value to the///response property for the response status - warning
added the new
model_access_requiredenum value to the///response property for the response status
- warning
- warning
added the new
insufficient_creditsenum value to the//response property for the response status
- warning