Skip to main content
POST

Overview

Remove Background takes one video from your team’s media library, removes the background behind the person and renders the result. Videos up to 10 minutes are accepted; anything longer than 60 seconds is processed in parts and joined back automatically. Captions are off unless you send a videoSettings.caption object (its disabled defaults to false, so sending it turns them on); they cost no extra credits.
media is the id of a video in your team’s media library. Add one with Upload Media or Import Media from URL, or find it with List Media; it must be COMPLETED.
The rendered file is an MP4, which has no alpha channel. The cut-out is kept in the project, so you can open it in the editor and place the person over other footage.


What happens next

The background is removed (in 60-second parts for longer videos), captions are added if you asked for them, and the project is rendered. Either:
  • poll GET /v1/project/{projectId} until data.video is present and data.video.status is COMPLETED, then download data.video.url; or
  • pass webhook and wait for the COMPLETED (or FAILED) call described in Webhooks:

Credits and your own keys

  • Managed teams (Hooked’s provider keys) pay in credits: a base of 8 credits plus 5 credits per started 30 seconds of video. The balance is checked when you create the project and the credits are taken when processing starts. If the project fails, they are refunded automatically.
  • Teams on their own provider keys (BYOK) are not charged credits. They need an OpenRouter key and a Bria key (background removal) in Settings → AI keys. Without them the request answers 402 missing_credentials before anything is created or charged.

Errors

Send an Idempotency-Key header to retry safely: if a request times out or answers 5xx, sending it again with the same key and body returns the first answer instead of creating (and charging) the project twice.

Project details

Follow the project until its video is ready

Webhooks

Payloads and delivery rules

Add Captions

Caption a video without removing its background

Remove image background

The same for a still image

Authorizations

x-api-key
string
header
required

Headers

Idempotency-Key
string

Makes the request safe to retry. 1-255 printable ASCII characters, one per operation (your job id, or a UUID you store), reused on every retry. Within 24 hours the same key with the same body answers with the first response and the header Idempotent-Replayed: true, without running or charging again. Keys are scoped to your team and the endpoint. 5xx answers and refusals before anything ran (401, 402, 403, 409, 429) are not kept. See Idempotency.

Required string length: 1 - 255
Pattern: ^[\x20-\x7E]+$

Body

application/json
media
string
required

ID of a video in your team's library (add one with POST /v1/media/upload or POST /v1/media/import), at most 10 minutes long (longer answers 400). An unknown ID or another team's media answers 400 media: Video not found; an image answers 400 media: Media must be a video file. A media that is not COMPLETED yet (an import or upload in progress) answers 400 media: Media "<id>" is not ready (status PROCESSING).

name
string

Project name (max 100 characters). Generated when omitted.

Maximum string length: 100
videoSettings
object

Output settings

webhook
string<uri>

HTTPS URL on a public host, called when the video is ready or the project fails (max 500 characters). Requests are signed: verify the Hooked-Signature header (HMAC-SHA256 of ".") with the signing secret from Settings → Webhooks; Hooked-Event and Hooked-Delivery headers name the event and the delivery. No redirects are followed; 10 s timeout; 3 immediate attempts. See the Webhooks guide for the payload.

Maximum string length: 500
metadata
object

Any JSON object of your own (max 5 KB). Sent back in the webhook payload. The key automationId is reserved for dashboard automations and is removed.

Response

Project created. Follow it with GET /v1/project/{projectId} or wait for the webhook.

success
enum<boolean>
required
Available options:
true
data
object
required
message
string
required