---
title: "Submit a background-removal job"
method: POST
path: "/v2/images/background-remove"
tags: ["Images"]
---

# Submit a background-removal job

`POST /v2/images/background-remove`

## Request

- Base URL: `https://api.apiframe.ai`
- URL: `https://api.apiframe.ai/v2/images/background-remove`
- Auth: one of:
  - API key in header `X-API-Key`
  - HTTP bearer

Two tiers behind the `model` discriminator: `bria-bg-remove` (state-of-the-art alpha matting, commercially licensed) and `851-bg-remove` (sub-cent fast path). Both return a transparent PNG.

## Headers

- `Idempotency-Key` string

## Request body

- union: Background removal via Bria RMBG 2.0 or 851-labs.
  - object
    - `model` 'bria-bg-remove', required
    - `webhookUrl` string, uri
    - `webhookEvents` string[]
    - `briaBgRemoveParams` object, required
      - `image` string, required
      - `content_moderation` boolean
  - object
    - `model` '851-bg-remove', required
    - `webhookUrl` string, uri
    - `webhookEvents` string[]
    - `lab851BgRemoveParams` object, required
      - `image` string, required
      - `format` 'png' | 'jpg'
      - `threshold` number
      - `reverse` boolean
      - `background_type` 'rgba' | 'map' | 'green' | 'white' | 'blur' | 'overlay'

## Response `202`

Job accepted and queued. Track via `GET /v2/jobs/{id}` or webhook.

- JobAccepted: Returned by every successful job submission.
  - `jobId` string, uuid, required
  - `status` 'QUEUED' | 'PROCESSING' | 'COMPLETED' | 'FAILED', required: Status at the moment the job record was persisted. Almost always `QUEUED`; idempotent replays may return the original status.

## Other responses

- `400`: Request body failed validation.
- `401`: Authentication failed (missing / invalid API key).
- `402`: Team has insufficient credits to run this model.
- `403`: Authenticated but the API key is inactive or lacks permission.
- `429`: Rate limit exceeded. Retry after the `Retry-After` seconds.
- `503`: Service temporarily unavailable (queue / DB outage). Retry with backoff.

---

[API](https://skmtc.dev/apiframe/apis/apiframe-api.md) · [All operations](https://skmtc.dev/apiframe/apis/apiframe-api/llms.txt) · [OpenAPI document](https://skmtc.dev/apiframe/apis/apiframe-api/revisions/ba1a4c26c86a?raw)
