remove-backgroundRemove the background from an image. Returns a mask of the foreground object.
/v1/images/remove-backgroundCredit cost: 1
Authorization β This endpoint requires an API key. Pass it in the api-key header on every request. See the quickstart
| Name | Type | Status | Description |
|---|---|---|---|
input_image | file | Required | Image file or URL to remove the background from. |
Background removed successfullyRemoveBackgroundResponse
| Name | Type | Description |
|---|---|---|
output_image_url | string | URL to download the result image (RGBA with transparent background) |
box | number[] | Bounding box [x1, y1, x2, y2] of foreground object |
curl -X POST "https://api.snapapi.ai/v1/images/remove-background" \
-H "api-key: YOUR_API_KEY" \
-F "input_image=@./image.jpg"{
"output_image_url": "https://outputs.snapapi.ai/outputs/abc123.png",
"box": [
10,
20,
300,
400
]
}