Skip to main content
POST

Overview

Starts removing the background of an image. The result is a PNG with real transparency, attached to the image in your library a few seconds later. The call answers 202 with the media to follow: poll Get Image until backgroundRemoval.status is COMPLETED. The image can be one already in your library (media) or a public URL (imageUrl). A URL is imported into your library first, so the result is always attached to a media you own. When both are sent, media is used.
  • An image that already has its cut-out answers 200 at once with the PNG. Nothing is charged.
  • An image whose removal is already running answers 202 again with the same job. Nothing is charged.
Both of those answers work even when the team has no credits left (when you pass media).
Accepted formats: JPEG, PNG and WEBP, up to 25 MB.

Credits

Errors

If Bria fails after accepting the job, the image shows backgroundRemoval.status: "FAILED" in Get Image and the credits are refunded.

Get Image

Follow the removal and read the result

Expand Image

Grow an image to another aspect ratio

Remove Video Background

The same for a video

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

ID of an image in your media library. Required unless imageUrl is given. When both are sent, media is used. A media that is not COMPLETED yet (an import or upload in progress) answers 400 media: Media "<id>" is not ready (status PROCESSING).

imageUrl
string<uri>

Public URL of a JPEG, PNG or WEBP image (up to 25 MB). It is imported into your library first, so the result is attached to a media you own. Required unless media is given.

Response

The image already had its cut-out

success
boolean
message
string
data
object