latestSwagger 2.02026-08-19218237253.7 KB

3af866d68651

Images

Remove the background from a single image, returning the subject isolated on a transparent background. Supply the source image (URL or base64); optionally set crop to trim the result to the content, and creative_edit (default true) for higher-quality output that may not match the input pixel-for-pixel. Synchronous: the call blocks and returns a single image result with a url (not an array). The image is uploaded and validated, and an image larger than 15MB is rejected with HTTP 400. Credits are charged only on success. Use removeBackground for this dedicated cutout task; editImage can also remove backgrounds via a prompt but is better for broader edits, while createImage and generateWithStyle produce new images rather than process an existing one. Pass an optional request_id to tag the result so you can retrieve it later via getImageResults. Requires an API key (user scope).

post/assets/image/remove-background

Request body

imagestring required

URL or base64-encoded image to remove the background from.

cropboolean

Whether to crop/trim the result to fit the content.

creative_editboolean

Higher quality results but the image will not be exactly the same as the input.

request_idstring

Optional client-provided identifier for this request. Use this to retrieve results later via the results endpoint.

Response

Success

urlstring
request_idstring
created_atinteger