AI Lamp Photography API — Shade and Finish Variants
A lighting brand is launching one table lamp in six shade colors and three base finishes: brushed brass, matte black, and ceramic white. That is eighteen combinations, and the studio has shot exactly one: the ivory shade on the brass base. Shooting the rest means darkening the set, rebuilding the light balance, and re-photographing the glow for every variant. Generating the other seventeen from the one reference photo lets the product page and the retailer feed go live while physical samples are still being finished.
Direct answer: a reference-guided image generation API takes one lamp photo as image input plus a prompt describing the target shade color, base finish, or glow, and returns a new image that keeps the lamp shape, table setting, and camera angle consistent while changing only the requested elements.
How Does an API Generate Lamp Variants From One Photo?
Reference-guided generation anchors the output to the composition of the source image, then applies the change in the prompt. Reference-guided generation means the model receives an existing image as input alongside the text prompt, rather than starting from text alone. For lamps, that anchoring preserves the base silhouette, shade proportions, and side-table styling of your real photo, where a text-only prompt would invent a generic lamp that does not match your catalog.
Describe the change in visual terms ("sage green linen shade, matte black metal base") rather than an internal SKU code, which the model cannot map to a color or material.
Can the Generated Glow Be Trusted as Accurate?
No, treat generated lamp images as a visual placeholder, not a lighting reference. Light is the hardest thing for image models to get consistent: color temperature, brightness falloff on the wall, and how a shade's fabric transmits light can all drift from the real product, and shoppers judge a lamp largely by how it looks lit.
Two practical rules:
- Use generated images for the variant grid, internal review, and pre-order pages, then swap in real photography once units exist.
- Compare each generated image with the physical sample, switched on and off, before it reaches a customer-facing page.
Which Model Fits Lamp Photography?
Nano Banana Pro's reference-guided mode holds the lamp composition consistent across shade and finish changes, which matters when shoppers compare variants side by side. GPT-image-2 suits instruction-based touch-ups on an image that is otherwise final, such as removing a cable or swapping the background wall color.
| Model | Mode | Resolution / price | Composition consistency | Best for |
|---|---|---|---|---|
| Nano Banana Pro | Reference-guided | 1K $0.030 / 2K $0.030 / 4K $0.042 | High | Full variant sets from one studio lamp shot |
| Nano Banana 2 | Reference-guided | 1K $0.020 / 4K $0.036 | Medium-high | Lower-cost drafts for internal review |
| GPT-image-2 | Instruction-based edit | $0.014/image | N/A (edits existing photo) | Cable removal or wall swap on a near-final shot |
Nano Banana Pro at 2K costs the same $0.030 as 1K, so a retail-facing set gains resolution at no extra cost.
How Do I Generate a Shade Variant via API?
Submit the base photo as image input with a prompt describing the target shade and base; the endpoint returns a job ID to poll for the finished image.
import requests, time
API_KEY = "YOUR_KEY"
BASE = "https://genrelay.ai/v1"
def generate_variant(reference_url, shade, base_finish):
r = requests.post(
f"{BASE}/images/generations",
headers={"Authorization": f"Bearer {API_KEY}"},
json={
"model": "nano-banana-pro",
"prompt": f"same table lamp shape, side table and camera angle, "
f"{shade} fabric shade, {base_finish} base, soft warm "
f"ambient light, studio product shot",
"image": reference_url,
"resolution": "2k",
},
)
return r.json()["id"]
job_id = generate_variant(
"https://cdn.example.com/lamp-ivory-brass.jpg",
"sage green linen",
"matte black metal",
)
Reference-guided generation is asynchronous, so poll the job until it completes:
def wait_for_result(job_id, timeout=90):
start = time.time()
while time.time() - start < timeout:
status = requests.get(
f"{BASE}/images/generations/{job_id}",
headers={"Authorization": f"Bearer {API_KEY}"},
).json()
if status["status"] == "completed":
return status["output_url"]
if status["status"] == "failed":
raise RuntimeError(status.get("error"))
time.sleep(2)
raise TimeoutError(f"Job {job_id} did not finish in {timeout}s")
image_url = wait_for_result(job_id)
How Do I Batch a Full Shade Range?
Loop over the shade and base list and submit each as its own job. The batch image generation guide covers the concurrency and retry pattern this scales to.
combos = [
("ivory linen", "brushed brass"),
("sage green linen", "matte black metal"),
("charcoal linen", "ceramic white"),
("terracotta linen", "brushed brass"),
]
jobs = [(s, b, generate_variant(reference_url, s, b)) for s, b in combos]
for shade, base_finish, job in jobs:
print(f"{shade} / {base_finish}: {wait_for_result(job)}")
What Does a Full Variant Set Cost?
Eighteen combinations (6 shades × 3 base finishes) at 2K on Nano Banana Pro cost 18 × $0.030 = $0.54. A brand adding a close-up of the base finish for each of the 3 finishes (3 more images) pays 21 × $0.030 = $0.63 in total.
| Launch size | Images | Model | Cost |
|---|---|---|---|
| 6 shades × 3 base finishes | 18 | Nano Banana Pro, 2K | $0.54 |
| Plus base-finish close-up per finish | 21 | Nano Banana Pro, 2K | $0.63 |
| Internal review pass | 6 | Nano Banana 2, 1K | $0.12 |
Running the internal review on Nano Banana 2 first keeps early decisions inexpensive, and approved variants then move to Nano Banana Pro. Once stills are approved, the same photos can feed the lamp showcase video guide for switch-on glow and orbit clips.
FAQ
Can the API change the shade color without changing the lamp shape?
Yes. Describe the target shade and state that the lamp shape, table, and camera angle stay the same; the reference image keeps the composition anchored.
Will the model reproduce a pleated shade or a small brand logo?
Not reliably. Fine pleats and small logos often blur or distort. Generate the plain shade and composite real logo artwork afterward.
Can I use the output for a retailer listing?
That is a decision for your own brand and retailer guidelines. Many retailers require images to match the shipped item, so verify each variant against the real product before publishing.
How long does a generation take?
Jobs are asynchronous. The polling loop above uses a 90-second timeout, which is a conservative ceiling rather than a typical time.
Can I generate matching clips from the same photos?
Yes. The lamp video guide shows how to animate each variant into a short glow and orbit clip.
See the Nano Banana Pro model page for parameter docs.