About this endpoint
What it does
Fetches a foreground image from a URL, removes its background, and composites it onto either a background image URL or a solid background color. The result is returned as a stored PNG accessible through a time-limited signed URL.
Query Parameter(s)
| Attribute | Type | Mandatory | Description |
|---|---|---|---|
| output | String | No | Output filename / slug used for the generated asset URL. |
Request Body
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| image_url | String | Yes | Foreground image URL (subject — background removed via rembg). Must be a URI. |
| 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 | Placement of the subject on the background canvas. Allowed values: top_right, top_left, bottom_right, bottom_left, center. Defaults to center when omitted. |
| background_size | String | No | Optional WidthxHeight for background canvas or resize target. |
| background_color | String | No | Hex color #RRGGBB (six hex digits with leading #). Use instead of background_image_url — only one background field may be present per request. |
| background_opacity | String | No | Background layer opacity 0–1 (string decimal). |
| background_image_url | String | No | Background image URL. Use instead of background_color — only one background field may be present per request. Must be a URI. |
Response
Returns a JSON object with a data string field — a time-limited pre-signed URL to the generated PNG file. The URL is generated at request time and is not a stable public asset link.
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| data | String | Yes | Time-limited pre-signed URL to the stored PNG file. Always present on a 200 response. The URL is generated and signed at request time and will expire. |