Cloudflare Images segment=foreground vs Sume RMBG PNG alpha
Cloudflare Images removes a background with segment=foreground, but its listed output formats lack PNG. Sume RMBG returns PNG artifacts with alpha.

Cloudflare Images can cut out a subject with the segment=foreground option in a transform URL, and the format list on its page names avif, webp and jpeg but not PNG. Sume's RMBG 1.0 returns mirrored PNG artifacts with alpha, so the file you get is a PNG by design.
Cloudflare's side is from its Transform via URL page and Sume's from the Sume OpenAPI schema, both read on 2026-10-03.
What does segment=foreground do?
The page describes segment as automatically isolating the subject of an image by replacing the background with transparent pixels, and it accepts the value foreground. It says the feature uses an open-source BiRefNet model through Workers AI.
It sits among the other URL options: seven fit modes (scale-down is the default), width in pixels or auto, and height in pixels. The page documents no maximum file size, megapixel limit or input dimension for transforms.
| Format value | Listed on the page |
|---|---|
| auto | Yes, the default for hosted images |
| avif | Yes |
| webp | Yes |
| jpeg / baseline-jpeg | Yes |
| png | Not listed |
Why does the missing PNG matter?
A cutout is only useful if the transparency survives. JPEG cannot hold an alpha channel, so a segment=foreground result needs avif or webp. Most browsers handle webp, but plenty of design tools, marketplaces and print workflows still ask for PNG, and the page does not offer a PNG route.
If your destination needs PNG, you either convert after the fact, which Cloudflare's page does not cover, or you use a service that returns PNG directly.
What does Sume RMBG return?
POST /v1/rmbg-1.0/remove takes a public HTTPS image_url and returns a job. Completed results expose mirrored PNG artifacts with alpha, hosted on media.sume.com. You do not choose a format, and there is no webp option on this route.
Cloudflare is a URL transform, so the result comes back in the same request. Sume is a job: mode: sync waits up to 30 seconds, and if the job is not done you poll status_url and fetch the result when result_ready is true. That is slower to wire up but gives you a durable URL, as the jobs and results page explains.
curl -X POST https://api.sume.com/v1/rmbg-1.0/remove \
-H "Authorization: Bearer $SUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"image_url": "https://example.com/inputs/mug.jpg",
"mode": "sync",
"wait_timeout_seconds": 30
}'What should you test on a cutout before shipping?
Place the result on three backdrops: white, black and a saturated colour. Halos around hair or glass show on one of them. If your page uses a dark theme, black matters most.
Check file size too. A PNG with alpha is usually heavier than a webp of the same cutout. Where page weight matters, convert the Sume PNG to webp in your own pipeline after you have confirmed the edges; Sume's RMBG route itself has no format option.
Which one fits your pipeline?
If you serve images through Cloudflare and want a cutout on the fly in a browser-friendly format, segment=foreground is one parameter. If you need a transparent PNG to hand to a designer, a marketplace or a later Sume step, RMBG gives you that file directly. Whichever you pick, open the result on a dark and a light background before you ship, because edge halos only show up on a contrasting backdrop.
Sources
Related posts
More in Media tools
- Cloudflare transforms: 100 MB, 10 min input vs Sume trim's 1800 s
Cloudflare Media Transformations takes input up to 100 MB and 10 minutes and returns 1-60 s. Sume trim reads sources to 1800 s and cuts up to 900 s.
- Cloudflare's four transform modes vs Sume frames, detach and trim
Cloudflare Media Transformations has video, frame, spritesheet and audio modes. In Sume these are video trim, video frames and audio detach, each billed apart.
- Cloudflare's 10-2000 px media transform vs Sume's 256-2160 trim output
Cloudflare Media Transformations resizes to 10-2000 px and bills per operation. Sume trim output takes 256-2160 on each side with fps 24, 25, 30 or 60.
- Cloudflare Stream's 30 GB upload cap vs Sume's per-source media limit
Cloudflare Stream accepts uploads up to 30 GB by default. Sume's media tools read sources under a 300 MiB per-source cap, so shrink a big master before import.
Written by Sume