Nova Canvas inpainting mask rules vs a Sume reference edit

Nova Canvas inpainting wants a pure black and white mask, same size as the input. What to build, and how Sume's edit call differs.

4 min readSume
All posts

If you built an inpainting step on Amazon Nova Canvas, the mask is where it breaks. Amazon's user guide sets strict rules for the mask image, and a mask that looks right in an editor can still fail them. This page lists those rules, then shows the Sume side: what an edit call takes instead.

Facts about Nova Canvas are from Amazon's docs, read 2026-10-06. Facts about Sume are from the image models docs.

What Nova Canvas requires of an inpainting mask

Nova Canvas has an INPAINTING task type. For inpainting, pure black marks the pixels that are edited and pure white marks the pixels that are kept. Outpainting uses the reverse convention, which is a common source of inverted results.

  • Only pure black and pure white pixels are allowed. Gray anti-aliased edges are not.
  • A JPEG mask must be saved at 100% quality, because lossy compression creates gray pixels.
  • The mask must be the same size as the input image.
  • You can send a maskPrompt (text that names the region) instead of a maskImage, but not both.

What a Sume edit call takes instead

Sume's Image API is POST /v1/images. You pass the source as input_references (a public HTTPS URL) and describe the change in prompt. Most edit-capable models take no mask at all. Only the two ChatGPT Image 2.5 variants advertise mask_url, and the API rejects mask_url on any model whose catalog row does not list it.

The Sume docs do not state which colour marks the edited area for mask_url, so do not carry Nova's black-means-edit rule across. Run one test edit and diff the result against the source before you trust a mask. The post on checking that an edit stayed inside the mask has the numpy check.

Mask handling, Nova Canvas (Amazon docs, read 2026-10-06) vs Sume (Sume docs)
QuestionNova CanvasSume /v1/images
How do I mark the region?maskImage (pure black/white) or maskPromptmask_url on GPT Image 2.5 only; otherwise describe it in prompt
Mask sizeSame as the inputCheck with a test edit
Source imageSent in the requestPublic HTTPS URL in input_references
Wrong parameterRequest error400 unsupported_parameter

A minimal Sume edit with no mask

This call edits one region by naming it. It prints the status code, the billed cost and the first image URL. A slow edit can return 202 instead of 200, so branch on the status.

import os, requests

r = requests.post(
    "https://api.sume.com/v1/images",
    headers={"Authorization": f"Bearer {os.environ['SUME_API_KEY']}"},
    json={
        "model": "ideogram/ideogram-v4.5",
        "prompt": "Replace only the red mug on the desk with a white mug. Keep everything else.",
        "input_references": [{"type": "image_url", "image_url": {"url": "https://example.com/desk.jpg"}}],
    },
    timeout=60,
)
print(r.status_code)
body = r.json()
if r.status_code == 200:
    print(body["usage"]["cost"], body["data"][0]["url"])
else:
    print(body)

When to keep a mask

If the region must not move by a single pixel, use a model that takes mask_url and verify. If a prompt-only edit is close enough, skip the mask and save the step. Either way, measure the pixels outside the region once per model before you rely on it.

Sources

Related posts

More in Comparisons

All Comparisons posts

Written by Sume