Remove background
Remove the background from an image and return the foreground as a
transparent PNG. Upload the source image using multipart/form-data.
Returns the result directly by default; set async to get a
generation_id and poll GET /v2/generations/{generation_id}.
Authentication
API key for access control. Use in the header with the name "Api-Key"
Query parameters
When true, the request is validated and priced but not run: nothing is
generated, stored, or billed, and no safety review is performed. The
response is a PriceQuote object instead of the usual response for this
endpoint. Send exactly the request you would send to generate, so the
quote reflects the same options.
Request
When false (the default), wait for and return the foreground image. When true, return as soon as the request is accepted; poll GET /v2/generations/{generation_id} for the result.
Response
The foreground image (synchronous requests), or an acknowledgement to poll (async requests). If a synchronous request fails after the response has started streaming, the HTTP status is already 200; the body contains error and status_code instead.
The generation ID to poll with GET /v2/generations/{generation_id}.