AI price tag image: make the blank tag, set the price in code

For a price tag or shelf label image, let the model draw the tag and write the number yourself. Prices must be exact, and generated digits can drift.

5 min readSume
All posts

To make a price tag image with AI, generate the tag with no numbers on it, then set the price, currency and any discount text in code or a layout tool. A price is data that must be exact, and image models can swap or repeat digits. The model is good at the card, the paper texture and the shelf behind it.

Generate the blank tag

Ask for the tag shape, the material, the color blocks and clear space where the price goes. Say that there must be no text, numbers or symbols. Use a ratio close to the final tag so you do not crop later; 4:5 and 1:1 are both listed for GPT Image 2.5 and Nano Banana.

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":"Blank retail shelf tag in matte white card with a red top band, photographed on a wooden shelf edge, soft daylight, large empty area for a price, no text, no numbers, no symbols","quality":"high","aspect_ratio":"4:5"}'

Add the price yourself

Download the image from data[].url, then draw the text with Pillow, Canvas, or your design tool. Keep the price, unit and currency in a variable or a spreadsheet column so the same template renders every SKU. This also makes a sale easy: change the number and re-render instead of re-generating.

When you need the numbers drawn in the picture

Sometimes the price is part of a scene, such as a chalkboard or a shop window. Then generate on a text-strong model, read the digits back, and use an edit with a reference if one is wrong. Sume lists ideogram/ideogram-v4.5 for text edits; with references it edits the first image and takes up to 4 more. The prompt pattern for changing one label is in change one label with an Ideogram 4.5 edit.

A short checklist

  • No numbers in the generated art.
  • Price text rendered from data, not typed into a prompt.
  • One template ratio for the whole batch.
  • A visual check at the size shoppers see.
  • The source prompt and job id stored with each file.

Render the price with Pillow

This sketch loads the downloaded tag and writes a price from a variable. Swap the font path for one on your system.

from PIL import Image, ImageDraw, ImageFont

price = "$12.99"
img = Image.open("tag.png").convert("RGB")
draw = ImageDraw.Draw(img)
font = ImageFont.truetype("/System/Library/Fonts/Helvetica.ttc", 140)
w, h = img.size
draw.text((w // 2, int(h * 0.6)), price, font=font, fill="black", anchor="mm")
img.save("tag-12-99.png")

Batch it

Generate one blank tag, then loop over a CSV of SKUs and prices. Because the art is made once, the batch costs one image call plus local rendering. If you want variety, generate four blank tags with n: 4 and rotate them across categories.

Related posts

More in Use cases

All Use cases posts

Written by Sume