Copy space in an AI image: leave room for text, overlay it in code

Ask for empty space in the prompt, check the region with Pillow, and put the headline on top in code, so the text is exact and the picture stays a picture.

5 min readSume
All posts

To leave room for a headline in an AI image, say where the empty area is in the prompt, such as a plain sky across the top third, check that region in code, and add the text yourself afterwards. The picture then carries the mood and your code carries the exact words, fonts and positions, which a model cannot guarantee.

This is a different route from asking a model to draw the text. Models that render text well exist on Sume, and Ideogram's page on fal describes Ideogram 4.5 as strong at text (read 2026-10-06, fal). But overlaying in code is the right choice when the words must be exact, change often, or come from a database, such as prices, names or dates. It also lets you use the same image with many headlines, and means a text change never costs a generation.

Choosing the route

Use the table as a rule of thumb. The deciding question is how bad a wrong letter would be and how often the text changes.

Model-drawn text against code overlay, read 2026-10-06
SituationModel draws the textOverlay in code
One-off poster headlineFine, proofread itAlso fine
Price or dateAvoidUse this
Weekly changing linePay for an edit each timeFree to change
Brand font requiredCannot match exactlyUse the font file
Text in many languagesCheck every languageUse a font that covers them

Generate with room, measure, overlay

The script asks for a 3:2 image with an empty top third, crops that third, and checks how flat it is before adding text. The threshold is something to tune on your own images, so print the number first and pick the cutoff from a few examples.

import io
import os
import requests
from PIL import Image, ImageDraw, ImageStat

r = requests.post(
    "https://api.sume.com/v1/images",
    headers={"Authorization": f"Bearer {os.environ['SUME_API_KEY']}"},
    json={
        "model": "openai/gpt-image-2.5",
        "prompt": "A lone red kayak on calm water at dawn. The top third of "
        "the frame is plain soft sky with no objects. No text.",
        "aspect_ratio": "3:2",
        "quality": "medium",
    },
    timeout=60,
)
r.raise_for_status()
raw = requests.get(r.json()["data"][0]["url"], timeout=60).content
img = Image.open(io.BytesIO(raw)).convert("RGB")
w, h = img.size
top = img.crop((0, 0, w, h // 3)).convert("L")
print("top-third brightness spread:", round(ImageStat.Stat(top).stddev[0], 1))
ImageDraw.Draw(img).text((w // 12, h // 12), "SUMMER PADDLE CLUB", fill="white")
img.save("poster.png")

Picking a threshold

Run the script on five images you like and five you do not, print the spread for each, and set the cutoff between the groups. A flat sky gives a small number; a cloudy or textured area gives a larger one. If the number is too high, regenerate with a firmer sentence about empty space and a simple surface, such as plain wall or clear sky.

Check contrast as well as flatness. White text on a pale sky is flat but unreadable. Measure mean brightness of the region and choose white or black text accordingly, or place a translucent panel behind the text.

Prompt phrases that create copy space

The phrases below describe the layout in plain words. Use one of them per prompt, and check the result rather than assuming it worked.

  • Subject on the right third of the frame, empty sky on the left.
  • A plain, evenly lit wall across the top, subject centered below.
  • Large smooth gradient at the bottom, no objects in the lower quarter.
  • Product on the lower left, clean negative space above and to the right.
  • Wide margins on every side, nothing within a tenth of the edge.

Measuring the space

Copy space is a claim about pixels, so you can test it. Crop the intended text region and look at its variance: a flat region has a low standard deviation of brightness, and a busy one has a high one. Pillow's ImageStat gives you that in two lines. Set a threshold from a few images you consider good, then reject any generation whose region exceeds it, and regenerate with a stronger copy-space sentence. This turns a vague look and decide step into a rule your batch job can apply to a hundred images without a person.

What this gives you

You get an exact headline, a free change of copy, and one billed image per design. You give up the model's ability to integrate letters into the scene, such as text on a sign in the picture. Choose per project. The vintage travel poster example shows the same split at a 3:4 ratio.

Sources

Related posts

More in Media tools

All Media tools posts

Written by Sume