Black Friday deposit bonus·Top up $50+ and get $10 · Top up $100+ and get $25·Ends November 30Top up →
Use case

AI product photos:
packshots and lifestyle scenes from one product photo

Turn one product photo into packshots and lifestyle scenes with GPT Image 2 and 2.5 edits: reference images, up to 10 images a request, one flat price each.

Last updated 2026-11-05

Prepaid, no subscriptionREST or MCPOne key for models, data and agents
a watercolor fox in a snowy forest, golden hour
Black Friday

Black Friday deposit bonus

Every qualifying top-up earns free credit, on top of any other offer.

Ends November 30

Deposit $50
+$10
20% bonus
Deposit $100
+$25
25% bonus
Sign up and claim

A product page needs the same item many times over: on white, on a kitchen counter, in a hand, in the colours of this season's campaign. With the image generation API you photograph the product once and make the rest from code. Send the photo to POST /v1/images/edits as a reference image, describe the scene, and get up to 10 versions back from one request. Add a second reference image for a background, a prop or a style you want matched. Every image costs $0.04 with GPT Image 2 or GPT Image 2.5, whatever the size or quality, so a catalog shoot has a price before you start. Try it without code in the image playground.

Hand it to your AI agent

Copy this prompt into Claude Code, Cursor, Codex or any coding agent. It tells the agent where the docs are and how to use your API key.

Build a batch job that turns product photos into packshots and lifestyle scenes with the Lovely Router images API.

- Docs (read first): https://lovelyrouter.com/docs/models/images.md
- POST https://lovelyrouter.com/v1/images/edits with the product photos as `image[]` references (or queue them with POST https://lovelyrouter.com/v1/images/jobs and fetch them when done); `n` asks for several images at once. One flat price per image.
- Auth: read my API key from the LOVELY_API_KEY environment variable and send it as `Authorization: Bearer $LOVELY_API_KEY`. Never print or commit the key. If it is not set, ask me to create one at https://lovelyrouter.com/app/keys.
- Billing is prepaid: every call is charged to my balance, so test with a small request before running anything large.
- Every docs page is plain Markdown; the full index is https://lovelyrouter.com/llms.txt.

My task: <the product photos and the scenes you want>
01

How it works

010203
  1. Photograph the product once

    A clear photo of the item on any plain background: PNG, JPEG or WebP. This is the reference the model keeps the shape, colours and label from.

  2. Describe the shot

    Send the photo as image[] with a prompt for the scene: "on a white seamless background, soft studio light, centred" or "on a marble bathroom counter by a window, morning light". Add more image[] files (up to 16) for a backdrop, a prop, or a photo whose style you want, and say in the prompt what to take from each.

  3. Get several versions

    Set n from 1 to 10 for several images of the same prompt in one request. You pay for each image you get, and with the GPT Image models four take about as long as one.

  4. Pick, check and publish

    Keep the best, compare it with the real product, and regenerate what drifted. For a whole catalog, queue the requests as image jobs and collect them when they are done.

02

The requests

One product photo and a backdrop, four versions back:

cURL
curl https://lovelyrouter.com/v1/images/edits \
  -H "Authorization: Bearer $LOVELY_API_KEY" \
  -F model=gpt-image-2.5-flare \
  -F "image[]=@mug.png" \
  -F "image[]=@oak-table.jpg" \
  -F prompt="The mug from the first image on the oak table from the second, steam rising, soft morning light from the left, shallow depth of field" \
  -F size=2048x2048 \
  -F n=4 | jq '.data | length'

A catalog, as image jobs, so no request holds a connection open:

Python
import os
import requests

BASE = "https://lovelyrouter.com/v1"
H = {"Authorization": f"Bearer {os.environ['LOVELY_API_KEY']}"}
SCENES = [
    "on a white seamless background, soft even studio light, centred, no shadows",
    "on a light wood kitchen counter beside fresh herbs, natural window light",
]

jobs = []
for sku in ["mug-blue", "mug-green", "teapot-black"]:
    for scene in SCENES:
        r = requests.post(f"{BASE}/images/jobs", headers=H,
                          data={"model": "gpt-image-2", "prompt": f"The product from the image {scene}",
                                "size": "2048x2048", "n": "2"},
                          files={"image": open(f"{sku}.png", "rb")})
        jobs.append((sku, r.json()["id"]))

for sku, job_id in jobs:
    job = requests.get(f"{BASE}/images/jobs/{job_id}?wait=300", headers=H).json()
    for i, image in enumerate(job["result"]["images"] if job["status"] == "succeeded" else []):
        with open(f"{sku}-{job_id}-{i}.png", "wb") as f:
            f.write(requests.get(image["url"], headers=H).content)

An account can have up to 20 images queued or generating at once (counting every image of an n); a request past that gets 429, so send a catalog in batches. Results stay downloadable for 7 days. The images guide has the same calls in Node.js and with the OpenAI SDKs.

03

The models

ModelPriceNotes
gpt-image-2$0.04 per imagequality low to high, all at the same price
gpt-image-2.5-flare$0.04 per imagequality has no effect
gpt-image-2.5-sunburst$0.04 per imagequality has no effect

All three generate and edit, take up to 16 reference images, and make sizes up to 3840×2160: 1024x1024, 1536x1024, 1024x1536, 2048x2048, 3840x2160, or any size with both sides multiples of 16, the long side at most 3840 pixels and at most three times the short side. Edits cost the same as generations.

04

The tools for the job

Reference images

Up to 16 image[] files per edit, or images as URLs or data: URLs in JSON. Input images are PNG, JPEG or WebP, up to 50 MB in total; URLs are downloaded once, when the request arrives.

Several images per request

n from 1 to 10. The price of all n is reserved, and you pay only for the images you get.

Masks

Send a mask with the edit to change only part of the picture, such as the background behind the product.

Transparent backgrounds

background: "transparent" with png or webp output, for cut-outs you place on your own page.

Output formats

png, jpeg or webp, with output_compression for jpeg and webp.

Image jobs

POST /v1/images/jobs takes the same fields and returns at once; poll or long-poll GET /v1/images/jobs/{id}?wait= and download each image from its url. Queued jobs can be cancelled for free.

From an agent

The MCP server has a generate_image tool that takes reference images by URL, so Claude Code or Cursor can make product shots while it builds your store.

05

Recipes

White-background packshots

One request per product with "on a pure white seamless background, centred, soft shadow" and size=2048x2048, for marketplaces that want square images.

Lifestyle sets

Three scene prompts per product (kitchen, desk, outdoors) with n: 3 each: nine images to choose from per product.

One look for a whole catalog

Pass the same style photo as the second image[] on every request, so a season's images share light, colour and props.

Colour variants

Photograph one variant, then ask for "the same mug in matte forest green" and compare against a photo of the real one before you publish it.

Banners and social posts

Wide 3840x2160 or tall 1024x1536 scenes with empty space on one side for your own headline.

06

What to check before you publish

The model keeps a product's shape and colours well, but it redraws the picture, so small things can change: label text, a logo, the number of buttons, the grain of a fabric. Compare every image you use with the real product, regenerate the ones that drifted, and use a real photo where exact details matter. A prompt refused by the model's safety system returns 400 and isn't charged.

07

What you pay

$0.04 per image, for generations and edits, at any size and quality. A catalog of 50 products with two scenes and two versions each is 200 images, $8. The price is reserved from your prepaid balance when you submit and charged when each image is made; refused, cancelled and failed requests cost nothing. GET /v1/models shows the current price as pricing.per_image, and every call is in your logs. Every price is on pricing.

08

Frequently asked questions

?
Does it keep my real product?+

It uses your photo as a reference, so the shape, colours and label usually carry over, but the image is redrawn, not composited. Check small text and logos against the real product before you publish.

How many images can I get from one request?+

Up to 10 with n. Each costs the price of one image, and an account can have 20 images queued or generating at once.

Does a 4K image cost more?+

No. Every image is $0.04, from 1024×1024 to 3840×2160, at any quality.

Can I use more than one reference image?+

Yes, up to 16 per edit, such as the product, a backdrop, a prop and a style photo. Say in the prompt what to take from each one.

Can I get a transparent background?+

Yes. Set background: "transparent" with png or webp output.

Can I make the product into a video ad?+

Yes, with other APIs on the same key. See AI UGC ads: product shots from here, a presenter in video shots, and a voiceover from text to speech.

Can an AI agent shoot my catalog?+

Yes. Copy the prompt on this page into Claude Code, Cursor or Codex: it reads the Markdown docs and writes the batch with your key.

For every field and limit, see the images guide; to start, create an account and open the image playground.

One prepaid key for models, data and agents

No subscription. Top up, use what you need, see every charge in your logs.