AI image generator with a transparent background: 2 steps

Make an AI image with a transparent background in two steps: generate it on a plain backdrop, then remove the background to get a PNG with alpha.

5 min readSume
All posts

To get an AI image with a transparent background, generate the subject on a plain, contrasting background, then run background removal on the result. The cutout is a PNG with an alpha channel, so everything around the subject is see-through and the graphic sits cleanly on any page, slide or photo. With the Sume API that is two calls, POST /v1/images and then POST /v1/rmbg-1.0/remove with the new image's URL; the transparency comes from the second call.

Generation facts below come from Sume's Image API docs. Background removal (RMBG 1.0) and upscaling are specified in the OpenAPI document behind the Sume API reference. Both were read on 2026-09-28.

How do I prompt for an image that cuts out cleanly?

Background removal has to find the edge between the subject and everything else, so give it an easy edge. These are prompt habits, not settings:

  • One subject, whole and centered, with space around it. Anything cropped by the frame edge ends in a straight cut.
  • A plain background in a color the subject doesn't use: light gray behind a dark product, dark gray behind a pale one.
  • No cast shadow, floor, reflection or props, so nothing but the subject sits on the background.
  • Several candidates at once. n sets how many images one call returns; the current catalog allows up to 4 on ChatGPT Image 2.5 (openai/gpt-image-2.5). Cut out only the one you keep, since every cutout is a separate billed job.

How do I generate the image and cut it out with the API?

Two requests, the second fed by the first:

  • POST /v1/images with model and prompt. It waits up to 30 seconds. A 200 carries the images in data[].url; a 202 carries a job to poll at GET /v1/jobs/{id}/status and read at GET /v1/jobs/{id}/result.
  • POST /v1/rmbg-1.0/remove with the chosen image's URL as image_url, the only required field. The schema asks for a public HTTPS URL and prefers a Sume media URL, which is what the first call returns.
  • The cutout runs as a job, async by default. Poll its status until it is completed, failed or canceled; a completed job's result holds PNG artifacts with alpha, mirrored to Sume.
  • Download the files you keep. /v1/images returns signed URLs.
curl -X POST https://api.sume.com/v1/images \
  -H "Authorization: Bearer $SUME_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "openai/gpt-image-2.5",
    "prompt": "A ceramic teapot, whole object centered, plain light gray background, soft even light, no shadow",
    "n": 4,
    "output_format": "png"
  }'

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://media.sume.com/img/01J.../0.png" }'

Should I upscale before or after removing the background?

Before. POST /v1/image-upscale-1.0/upscale enlarges an image by an upscale_factor from 1 to 4 (default 2) and returns a PNG by default, or a JPG; in current code a webp request comes back as PNG. The API reference doesn't describe how the upscaler treats an alpha channel, so enlarge the opaque image and cut out the larger file. The cutout's price does not vary by image size. AI image upscaler API covers the upscale call.

How much does a transparent AI image cost?

Two charges. The image is priced per model, and ChatGPT Image 2.5 estimates each request's price from its size and quality; in current code its catalog price line is for one 1024 × 1024 image at high. So read the real figure from the response: usage.cost is the USD amount billed. Failed or canceled generations are not billed. AI image generator API cost compares the models.

The cutout is listed at $0.0225 per image on API pricing, plus a 5.5% agent fee by default.

What are the limits?

Each step is its own request and returns new files. For an image you already have, Remove background API covers the cutout call on its own.

  • One image per cutout job, with no format or color option: the result is a PNG with alpha.
  • Keep the cutout as a PNG. JPEG has no alpha channel, so a JPG copy fills the transparent area with a solid color; Can a JPG have a transparent background? explains why.
  • Check the edges at full size before you publish, especially around hair, glass and smoke.
From Image API and the Sume API reference, read 2026-09-28.
StepEndpointTakesReturns
GeneratePOST /v1/imagesmodel and prompt; optional n, output_formatPNG, JPEG or WebP at signed, Sume-hosted URLs
Upscale (optional)POST /v1/image-upscale-1.0/upscalePublic HTTPS image_url, upscale_factor 1–4PNG (default) or JPG
Cut outPOST /v1/rmbg-1.0/removeOne public HTTPS image_urlPNG with alpha

Sources

Related posts

More in Media tools

All Media tools posts

Written by Sume