125 product photos from one prompt
The template, the script, what failed and what it cost. Take it and run it with your own products.

The template
Two things change from picture to picture: the object and the colour of the paper. The rest stays word for word, and that is what makes the set look like one shoot.
Studio product photo of {object} on a seamless {backdrop} paper backdrop. The object is centered and fills about half of the frame. Soft diffused light from the upper left, gentle contact shadow. Clean, minimal, square composition. No text, no logos, no labels.The script
Plain Python, nothing to install. It works four pictures at a time, waits as long as a limit says, and starts again where it stopped. Our own 125 rows are in products.csv; the script itself is product-photos.py.
# Product photos from one template. Python 3.9 or newer, nothing to install.
# export ARLEE_API_KEY=sk-...
# python3 product-photos.py products.csv photos
import base64, csv, json, os, sys, time, urllib.error, urllib.request
from concurrent.futures import ThreadPoolExecutor
URL = os.environ.get("IMAGE_API", "https://api.arleelabs.com/v1") + "/images/generations"
KEY = os.environ["ARLEE_API_KEY"]
MODEL = os.environ.get("IMAGE_MODEL", "nano-banana-2.1")
AT_ONCE = 4 # not more than the parallel jobs of your plan
TIMEOUT = 180 # seconds; shorter than the model needs means lost pictures
TRIES = 5
RUN = time.strftime("%Y%m%d") # the same day, the same keys: a second start repeats nothing
TEMPLATE = (
"Studio product photo of {object} on a seamless {backdrop} paper backdrop. "
"The object is centered and fills about half of the frame. "
"Soft diffused light from the upper left, gentle contact shadow. "
"Clean, minimal, square composition. No text, no logos, no labels."
)
def ask(prompt, key):
body = json.dumps({"model": MODEL, "prompt": prompt, "size": "1024x1024"}).encode()
request = urllib.request.Request(URL, body, {
"Authorization": "Bearer " + KEY, "Content-Type": "application/json", "Idempotency-Key": key})
with urllib.request.urlopen(request, timeout=TIMEOUT) as answer:
picture = json.load(answer)["data"][0]
if picture.get("b64_json"):
return base64.b64decode(picture["b64_json"])
with urllib.request.urlopen(picture["url"], timeout=TIMEOUT) as file:
return file.read()
def extension(data):
return ".png" if data[:4] == b"\x89PNG" else ".jpg" if data[:2] == b"\xff\xd8" else ".webp"
def make(row, folder):
if any(name.startswith(row["id"] + ".") for name in os.listdir(folder)):
return row["id"], "already there"
key, spare = f"{RUN}-{row['id']}", 0
for attempt in range(1, TRIES + 1):
try:
data = ask(TEMPLATE.format(**row), f"{key}-{spare}" if spare else key)
with open(os.path.join(folder, row["id"] + extension(data)), "wb") as file:
file.write(data)
return row["id"], f"made on try {attempt}"
except urllib.error.HTTPError as error:
if error.code == 429: # a limit: wait as long as the API says
time.sleep(int(error.headers.get("Retry-After") or 10))
elif error.code == 409: # it was made, but the answer was lost: ask anew
spare += 1
elif error.code < 500: # the request itself is wrong: another try will not help
return row["id"], f"refused: {error.read().decode()[:200]}"
else:
time.sleep(5 * attempt)
except OSError: # a timeout or a broken connection
time.sleep(5 * attempt)
return row["id"], "gave up"
def main(table, folder):
os.makedirs(folder, exist_ok=True)
with open(table, newline="") as file:
rows = list(csv.DictReader(file))
with ThreadPoolExecutor(AT_ONCE) as pool:
for name, what in pool.map(lambda row: make(row, folder), rows):
print(name, what, flush=True)
main(*sys.argv[1:3])
It speaks the OpenAI image format, so IMAGE_API and IMAGE_MODEL can point it elsewhere. We have tried it with ours only.
What went wrong
129 requests made 125 pictures. Two timed out on our side after the picture was already made: the repeat under the same key was refused as already processed, so the script asks again under a new one. One file was lost to our own copying mistake, and one was made a second time to keep the whole set on one model.
Then we looked at every picture. 4 of 125 have a small star-shaped mark in the bottom right corner and need another run. We do not know the cause.
What it cost
At Google's list price of $0.0336 for a 1K image of Nano Banana 2.1, read on November 24, 2026, 129 requests come to $4.33.
For one set of this size you do not need a plan. Creator at $39 a month costs less than paying per image from 1,161 images a month: about 9 sets like this one.
In hours: Creator allows 125 images an hour, Pro allows 500 images an hour, Business allows 1,000 images an hour.