Remove background from images in bulk with an API
Background removal takes one image per job, so a bulk run is one async job per image, paced by your concurrency limit, at one flat price per image.

To remove the background from images in bulk, submit one background-removal job per image and let the jobs run side by side. Sume's RMBG 1.0 takes a single image_url per request and returns a PNG with an alpha channel, at one price per image whatever its size, so a catalog of 1,000 product photos is 1,000 jobs, paced by your workspace's concurrency limit.
RMBG 1.0 is specified in the OpenAPI document behind the Sume API reference; the queue and job rules come from the Generation admission and Jobs and results docs, all read on 2026-09-27. The single-image call is covered in Remove background API.
How do I remove backgrounds from many images at once?
The request takes one public HTTPS image_url, so every photo must already be at a public HTTPS URL before the batch starts. Then loop over the list:
- Send one
POST /v1/rmbg-1.0/removeper image, with anIdempotency-Keyderived from the image, such as its SKU. A retry with the same key and body returns the original job instead of a second paid one. - Use
mode: "async", the default, ormode: "webhook"with awebhook_url. Both return the job id at once. - Keep a map from each image to its job id, and fetch
GET /v1/jobs/{id}/resultonceresult_readyis true. Before that it answers409 job_not_completed. - Completed results expose mirrored PNG artifacts with alpha. Download them to your own storage.
- The docs do not describe how edges such as hair or glass come out, so run a sample before the whole catalog.
curl -X POST https://api.sume.com/v1/rmbg-1.0/remove \
-H "Authorization: Bearer $SUME_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: rmbg-sku-4411-v1" \
-d '{
"image_url": "https://example.com/catalog/sku-4411.jpg",
"mode": "webhook",
"webhook_url": "https://example.com/webhooks/sume"
}'Should I poll each cutout or use a webhook?
For a batch, pick a mode that returns at once; every mode returns the job id in the first response. A webhook URL must be public HTTPS, since localhost, private-network, and non-HTTPS URLs are rejected, and a job.completed payload carries the artifacts.
A webhook is a delivery optimization, not your only recovery path, so keep status_url polling for missed deliveries. Verifying the signature is covered in signed webhooks. The three modes compare like this:
| Mode | What the submit does | In a batch |
|---|---|---|
async (default) | Returns at once with status_url, result_url, events_url, and cancel_url. | Poll each status_url with exponential backoff. |
sync or subscribe | Waits up to wait_timeout_seconds, at most 30; if the job is not done, returns it with sync.timed_out or sync.capacity_exhausted. | Holds one request open per image, and you still poll when it times out. |
webhook | Returns at once and stores webhook_url for terminal delivery only. | One terminal callback per job: job.completed, job.failed, or job.canceled. |
How many cutouts run at the same time?
In current code each request creates a background_removal job, which goes through the same queue-first admission as other paid generation jobs. Your workspace's concurrency_limit sets how many process at once, queued jobs wait for a free slot, and when the queue is also full the submit fails with 429 queue_full. On queue_full, stop adding work and wait for jobs to finish.
The pacing rules are the same as for any image batch, covered in bulk image generation; which calls take a concurrency slot lists the other job types.
How much does bulk background removal cost?
API pricing lists background removal at $0.0225 per image, plus a 5.5% agent fee by default, and the public catalog adds that the price does not vary by image size. 1,000 cutouts therefore come to $22.50 before the agent fee.
Sume reserves each job's estimate when it accepts the submit, captures it on success, and refunds it on failure or on a cancellation before capture. Cancellation works only before generation starts.
Can I upscale images in bulk the same way?
Yes. POST /v1/image-upscale-1.0/upscale also takes one public HTTPS image_url per job, so the same loop, keys, and pacing apply, and API pricing lists it at $0.20 per image. Neither endpoint takes a list of images: one URL, one job. The upscale factor and output formats are in AI image upscaler API.
Sources
Related posts
More in Media tools
- How to remove black bars from a video by cropping
Black bars baked into a video only go away with a crop. Measure them on a full-size still, then crop them off with FFmpeg's crop filter on Sume.
- Remove part of a video by API: cut a section and rejoin
Video trim keeps one range per job. To cut a section out of the middle, render the kept ranges back to back in one Sume Timeline 1.0 job.
- How to remove silence from a video automatically
Find every pause from a transcript's word timings, keep the speech with a small margin, and render the kept ranges back to back in one Timeline job.
- How to rotate a video 90 degrees and save it
Rotate a video 90 degrees with ffmpeg's transpose filter: clock turns it clockwise, cclock counterclockwise. Sume's video filter saves a new MP4.
Written by Sume