Skip to main content

Remove Background (Asset + Upload)

POST 

/api/v1/assets/:asset_id/addons/bg_remove

Remove background from an uploaded image, using the {asset_id} in the path as the target asset for conversions or as the source for metadata inheritance.

Use image as the multipart-form field name for the uploaded file.

Behaviour and response type are controlled by the mode and disposition query parameters. See the GET method documentation for full details on mode, disposition, and validation rules.

The {asset_id} in the path is used as:

  • The target asset when disposition=add_conversion.
  • The source for metadata when disposition=add_new_asset with metadata=inherit.

Response

  • mode = get_image (default): Content-Type: image/png — PNG bytes in body.
  • mode = get_image_and_save: Content-Type: image/png — PNG bytes in body (save happens in background).
  • mode = save_image: JSON object with save details (see GET method documentation).

Request

Responses

Successful operation. Response depends on mode:

  • get_image or get_image_and_save: PNG image bytes with Content-Type: image/png.
  • save_image: JSON object with save details.