About this endpoint
What it does
Uploads a subject image and a background image, then returns the generated result as a PNG binary download with the background changed. The request body accepts multipart file and option fields for sizing, rotation, opacity, placement, and background selection.
Request Body
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| image | String | Yes | Subject image file (background removed server-side). |
| image_size | String | No | Optional WidthxHeight for resized subject after background removal. |
| image_angle | String | No | Rotation degrees 0–360 (string decimal). |
| image_opacity | String | No | Subject opacity 0–1 (string decimal). |
| image_position | ENUM | No | Allowed values: top_right, top_left, bottom_right, bottom_left, center. |
| background_size | String | No | Optional WidthxHeight for background canvas or resize target. |
| background_color | String | Yes (if background_image not given) | Hex color #000000 (use instead of background_image). |
| background_image | String | Yes (if background_color not given) | Background image file (use instead of background_color). |
| background_opacity | String | No | Background layer opacity 0–1 (string decimal). |
Response
Returns a binary file response containing the generated PNG image. The output schema is a single binary string, so there is no JSON wrapper or named response fields to read.
| Attribute | Type | Mandatory | Description |
|---|---|---|---|
| value | String | Yes | Binary PNG data returned by the endpoint. |