AI Electronics Product Photography API — Finish and Color Variants

Sep 29, 2026·7 min read

An earbuds brand launching a charging case in five anodized colors has one studio photo of the sample unit from its CNC shop, and the marketplace listing needs a clean product shot for every finish before the launch date — but anodizing runs ship in small color batches, with most of the lineup still weeks from a physical sample landing on a desk. Generating the remaining finishes from the one reference photo means the listing can go live with a full color grid before the last anodizing run clears the factory floor.

Direct answer: a reference-guided image generation API takes one electronics product photo as image input plus a prompt describing the target finish or color, and outputs a new image that holds the device's shape, ports, buttons, and seams consistent while altering only the requested surface — no second CNC batch required before the listing goes live.

How Does an API Generate Electronics Color Variants From One Photo?

Reference-guided generation anchors the output to the geometry of the source image — port placement, button positions, seam lines, and hinge gaps — then applies the finish or color change described in the prompt. This differs from text-to-image generation, which has no source device to match and would produce a plausible-looking earbuds case rather than the exact SKU shipping to a fulfillment center — a real risk when a slightly shifted USB-C port or a resized LED indicator reads as a different revision to a reviewer comparing unboxing photos against the listing.

Anodized aluminum, matte polycarbonate, and glossy ABS each catch studio lighting differently under a color swap, so naming the finish in the prompt matters: "brushed anodized aluminum" holds a directional highlight that "matte polycarbonate" doesn't, and leaving the finish unstated lets the model default to whichever surface property the reference photo already shows — wrong for a matte variant generated from a glossy reference or the reverse.

What Should the Prompt Do About Screens and Displays?

Keep the screen instruction explicit, because an unscripted display is the most common electronics-photography failure mode. A reference photo of a smartwatch or earbuds case with a small status screen gives the model a plausible surface to fill with invented UI, icons, or text if the prompt doesn't say otherwise — and a hallucinated interface in a listing photo reads as a rendering error the moment a customer compares it to the real device on power-up.

State the screen state directly: "screen off, black display" for a device shown powered down, or supply the exact screen content as a second reference image when the listing needs to show a specific UI. Neither Nano Banana Pro nor GPT-image-2 reliably renders small, legible on-screen text from a text prompt alone, so treat any screen content that needs to be readable as a compositing step after generation rather than something the prompt should attempt.

Which Model Fits Electronics Photography?

Nano Banana Pro's reference-guided mode holds port placement, button geometry, and seam lines consistent across finish changes, which matters for electronics because a shifted charging port or a misaligned speaker grille reads as a different hardware revision rather than a rendering artifact — a category where reviewers zoom in on exact port and button placement. GPT-image-2 fits smaller instruction-based touch-ups — background swap, packaging crop, or a reflection cleanup — on a photo that's otherwise already final.

Model Mode Resolution / price Geometry consistency Best for
Nano Banana Pro Reference-guided 1K $0.030 / 2K $0.030 / 4K $0.042 High Full finish/color sets from one base studio photo
Nano Banana 2 Reference-guided 1K $0.020 / 4K $0.036 Medium-high Lower-cost variant runs for internal buyer review
GPT-image-2 Instruction-based edit $0.014/image N/A (edits existing photo) Packaging crop or reflection cleanup on a near-final shot

For a retail-facing color launch, Nano Banana Pro's consistency at 2K resolution is worth the small premium over Nano Banana 2 — a warped port or misaligned button reads as a hardware defect to a shopper zooming into a product photo, not a rendering quirk.

How Do I Generate a Finish Variant via API?

Submit the base product photo as image input with a prompt describing the target color, finish, and screen state; 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, color, finish):
    r = requests.post(
        f"{BASE}/images/generations",
        headers={"Authorization": f"Bearer {API_KEY}"},
        json={
            "model": "nano-banana-pro",
            "prompt": f"same shape, ports, buttons, and seams, "
                      f"{color} {finish}, screen off black display, "
                      f"studio product shot, 45-degree angle, white background",
            "image": reference_url,
            "resolution": "2k",
        },
    )
    return r.json()["id"]

job_id = generate_variant(
    "https://cdn.example.com/earbuds-case-sample.jpg",
    "midnight blue",
    "brushed anodized aluminum",
)

Poll the job until it completes, since reference-guided generation is asynchronous:

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 SKU Lineup?

Loop over the finish list and submit each as its own job, holding concurrency low enough to stay under the account's rate limit — see the batch image generation guide for the concurrency and retry pattern this scales to.

finishes = [
    ("midnight blue", "brushed anodized aluminum"),
    ("graphite", "brushed anodized aluminum"),
    ("rose gold", "polished anodized aluminum"),
    ("stealth black", "matte anodized aluminum"),
]

jobs = []
for color, finish in finishes:
    job_id = generate_variant(reference_url, color, finish)
    jobs.append((color, job_id))

results = [(color, wait_for_result(j)) for color, j in jobs]
for color, url in results:
    print(f"{color}: {url}")

What Does a Full Launch Cost?

Five finishes at 2K resolution on Nano Banana Pro cost 5 × $0.030 = $0.15. A wider lineup spanning three SKUs (case, dongle, cable clip) in five finishes each costs 15 × $0.030 = $0.45.

Launch size Images Model Cost
Single SKU, 5 finishes 5 Nano Banana Pro, 2K $0.15
Three SKUs, 5 finishes each 15 Nano Banana Pro, 2K $0.45
Internal buyer review pass 15 Nano Banana 2, 1K $0.30

Running an internal buyer review pass on Nano Banana 2 before committing the final set to Nano Banana Pro keeps early-stage finish decisions cheap without touching the launch-quality model until the lineup is finalized.

Internal Links

FAQ

Can the API change a device's finish (matte to glossy) as well as its color?
Yes — describe the target finish explicitly in the prompt alongside the color, since leaving it unstated causes the model to default to the reference photo's existing surface property.

Does it preserve small hardware details like port shapes and button labels?
It approximates fine hardware detail based on the reference photo's resolution; for markings that must stay pixel-exact (regulatory labels, engraved model numbers), plan on a manual overlay pass rather than relying on the model to reproduce small text precisely.

How do I stop the model from inventing content on a device's screen?
State the screen state directly in the prompt — "screen off, black display" is the most reliable instruction — since an unscripted display is the most common failure mode in electronics reference-guided generation.

What resolution is needed for a marketplace listing versus a print catalog?
2K covers most e-commerce listing and zoom needs; 4K adds a $0.012 premium per image and is worth it mainly for print catalogs or large in-store display graphics.

Is there a free tier to test finish consistency before a full lineup launch?
Yes. GenRelay includes free credits on signup, enough to generate a handful of finish variants from one reference photo before committing to a full lineup batch.


As of September 2026. Pricing subject to change — verify current rates at genrelay.ai.

Related posts

Join our DiscordAI Electronics Product Photography API — Finish and Color Variants — GenRelay