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 Stream animated GIF thumbnail vs a Sume silent MP4 clip
Cloudflare Stream builds a GIF from thumbnail.gif at 5 seconds and 8 fps by default. Sume makes no GIF; video trim returns a silent MP4 at 24 fps or more.
- Cloudflare Stream thumbnail fit modes vs Sume Timeline fit modes
Cloudflare Stream fit: crop, clip, scale, fill. Sume Timeline 1.0 fit: cover, contain, stretch, blur. Which names map and where they differ.
- Cloudinary ar_9:16,c_fill,g_auto vs Sume per-shot crop fractions
Cloudinary reframes video with ar_9:16,c_fill,g_auto. On Sume you pick crop x per shot (left, centre, right), with a runnable Python script.
- Cost of subtitling 20 Shorts in 5 languages: 100 caption jobs
20 Shorts x 5 languages is 100 Video captions jobs. Price it at $0.20 each, plan the idempotency keys, and know what a failed job costs.
Written by Sume