Nova Canvas rejects PNGs with transparent pixels: flatten before edits
Nova Canvas needs 8-bit PNG or JPEG with no transparent pixels in the alpha channel. Flatten cutouts onto white before any image edit, here and on Sume.
A cutout PNG with a transparent background is the usual input that breaks Nova Canvas. Amazon's request guide (read 2026-10-06) says inputs must be PNG or JPEG at 8 bits per channel, and an alpha channel in a PNG must hold no transparent pixels. Output and input sides are 320 to 4096 pixels.
Flatten once, upstream
The simplest fix is to composite onto a solid colour before the file leaves your system. Pick white for packshots or a neutral gray that does not appear in the product.
from PIL import Image
def flatten(path: str, out: str, bg=(255, 255, 255)) -> None:
im = Image.open(path).convert("RGBA")
base = Image.new("RGBA", im.size, bg + (255,))
base.alpha_composite(im)
base.convert("RGB").save(out, "PNG")
flatten("cutout.png", "cutout-flat.png")
print(Image.open("cutout-flat.png").mode)Does Sume have the same rule?
The Sume docs do not say how an edit reference with transparency is treated, and behaviour can differ by model. Do not assume it works. Flatten first, host the flat file at a public HTTPS URL, and send it in input_references. If you need transparency in the result, ask for it with background: "transparent", which only the two ChatGPT Image 2.5 variants accept.
A cheap guard
Add the check to your upload step so a transparent file never reaches the API, whichever vendor is behind it.
- Reject files whose mode is RGBA and whose alpha has any value below 255, or flatten them.
- Convert 16-bit PNGs to 8-bit.
- Keep the original; send the flattened copy.
Sources
Related posts
More in Developers
- Nuxt Nitro server route for an AI video webhook with readRawBody
A Nuxt server/api route calls readRawBody, checks Sume's sume-v1 HMAC and answers 401 on a mismatch before it queues the finished video download.
- One API key for Seedance 2.5, Wan 3.0, Kling 3 and MiniMax H3
Do you need a ByteDance, Alibaba, Kuaishou and MiniMax account to call their video models? On Sume one key and one wallet cover all four. How it works.
- One 6-minute b-roll, twelve Shorts episodes: source_in offsets
Slice one imported b-roll into twelve non-repeating 30-second episode backgrounds with Timeline 1.0 source_in, and plan the whole season unbilled in Python.
- One Sume API key per service: what it isolates and what it does not
Sume request budgets are per key and reads and writes are already separate. A key per service isolates revocation and scope, not generation capacity.
Written by Sume