AI Speaker Photography API — Finish and Grille Variants
A home audio brand is launching one portable Bluetooth speaker in five finishes, each available with a fabric or perforated-metal grille. That is ten combinations, and the studio has shot one: the graphite unit with the fabric grille. The product page, the retailer feed, and the pre-order email all need the full lineup before the remaining production units arrive. Generating the other combinations from the one reference photo lets the page go live on schedule while physical samples catch up.
Direct answer: a reference-guided image generation API takes one speaker photo as image input plus a prompt describing the target finish, grille material, or accent color, and returns a new image that keeps the housing silhouette and control layout consistent while changing the requested elements.
How Does an API Generate Finish Variants From One Photo?
Reference-guided generation anchors the output to the geometry of the source image, then applies the change described 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 speakers, that anchoring preserves the housing proportions, button placement, and strap loop of the real product, where a text-only prompt would invent a generic speaker that does not match the SKU.
Describe finish in visual terms ("warm sand, matte powder-coat, woven fabric grille") rather than an internal code like "Finish 03", which the model cannot map to a hue.
Can the Generated Finish Be Trusted as Accurate?
No, treat generated finishes as a visual placeholder, not a color-matched swatch. Powder-coat texture, gloss level, and grille weave can drift in generated output, and shoppers compare shades closely, so a listing that differs from the shipped item invites returns.
Two practical rules:
- Use generated images for the lineup grid, internal review, and pre-order pages, then swap in real photography once units exist.
- Compare each generated image with the physical sample or approved color reference before it reaches a customer-facing page.
Which Model Fits Speaker Photography?
Nano Banana Pro's reference-guided mode holds the speaker geometry consistent across finish and grille changes, which matters when shoppers view colors side by side. GPT-image-2 suits instruction-based touch-ups on an image that is otherwise final, such as a background swap or removing a stray reflection on the grille.
| 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-range sets from one base studio photo |
| Nano Banana 2 | Reference-guided | 1K $0.020 / 4K $0.036 | Medium-high | Lower-cost drafts for internal color review |
| GPT-image-2 | Instruction-based edit | $0.014/image | N/A (edits existing photo) | Background swap or cleanup 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 Finish Variant via API?
Submit the base photo as image input with a prompt describing the target finish and grille; 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, finish, grille):
r = requests.post(
f"{BASE}/images/generations",
headers={"Authorization": f"Bearer {API_KEY}"},
json={
"model": "nano-banana-pro",
"prompt": f"same portable speaker shape and proportions, {finish} "
f"housing, matte powder-coat finish, {grille} grille, "
f"studio product shot, light neutral background",
"image": reference_url,
"resolution": "2k",
},
)
return r.json()["id"]
job_id = generate_variant(
"https://cdn.example.com/speaker-sample.jpg",
"warm sand",
"woven fabric",
)
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 Finish Range?
Loop over the finish and grille list and submit each as its own job. The batch image generation guide covers the concurrency and retry pattern this scales to.
combos = [
("graphite", "woven fabric"),
("warm sand", "woven fabric"),
("olive green", "perforated metal"),
("coral", "woven fabric"),
]
jobs = [(f, g, generate_variant(reference_url, f, g)) for f, g in combos]
for finish, grille, job in jobs:
print(f"{finish} / {grille}: {wait_for_result(job)}")
What Does a Full Finish Range Cost?
Ten combinations (5 finishes × 2 grille materials) at 2K on Nano Banana Pro cost 10 × $0.030 = $0.30. A brand adding a second angle with the carry strap visible for each combination (20 images) pays 20 × $0.030 = $0.60.
| Launch size | Images | Model | Cost |
|---|---|---|---|
| 5 finishes × 2 grilles | 10 | Nano Banana Pro, 2K | $0.30 |
| Plus strap-visible angle | 20 | Nano Banana Pro, 2K | $0.60 |
| Internal color review pass | 5 | Nano Banana 2, 1K | $0.10 |
Running the internal review on Nano Banana 2 first keeps early color decisions inexpensive, and approved finishes then move to Nano Banana Pro. Once stills are approved, the same photos can feed the speaker showcase video guide for rotation and LED-pulse clips.
FAQ
Can the API change the finish without changing the speaker shape?
Yes. Describe the target finish and state that the shape and proportions stay the same; the reference image keeps the geometry anchored.
Will the model reproduce my logo and button icons?
Not reliably at small sizes. Request a plain surface and composite the real logo and icons 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 finish 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 speaker video guide shows how to animate each finish variant into a short rotation clip.
See the Nano Banana Pro model page for parameter docs.