remove-object-ganremove-object-sdremove-object-qwenRemove objects from an image using a manual mask, selected detected objects, or both. To erase detected objects, first call the Detect Objects API, then provide original_session_id plus mask_objects.
Provide at least one erase target: input_mask, or original_session_id + mask_objects.
/v1/images/remove-objectsCredit cost: 3 (normal), 4 (super), 13 (ultra)
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 erase objects from. |
original_session_id | string | Optional | Session ID returned by the Detect Objects API. Needed when using mask_objects. |
input_mask | file | Optional | Manual brush mask image file or URL. Can be combined with mask_objects. |
mask_objects | string | Optional | Selected object item or JSON array from detected_objects. Provide with original_session_id. |
erase_mode | string | Optional | Erase mode. normalsuperultra (default: normal) |
Objects erased successfullySingleImageResponse
| Name | Type | Description |
|---|---|---|
created | integer | Unix timestamp of when the response was created |
data | object[] | |
url | string | URL to download the result image |
curl -X POST "https://api.snapapi.ai/v1/images/remove-objects" \
-H "api-key: YOUR_API_KEY" \
-F "input_image=@./image.jpg" \
-F "input_mask=@./image.png" \
-F "erase_mode=normal"{
"created": 1745827200,
"data": [
{
"url": "https://outputs.snapapi.ai/outputs/abc123.png"
}
]
}