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_assetwithmetadata=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
- 200
- 400
- 401
- 403
- 500
Successful operation. Response depends on mode:
get_imageorget_image_and_save: PNG image bytes withContent-Type: image/png.save_image: JSON object with save details.
Bad request — invalid mode/disposition/conversion_name; missing required parameters; metadata used with non-add_new_asset disposition.
Unauthorized - Invalid or missing authentication
Forbidden - Insufficient permissions
Internal server error - Processing or save failure