AI Curtain Photography API — Color and Fabric Variants

Oct 22, 2026·6 min read

A curtain brand has one linen panel photographed on a bright window wall: oat color, pinch-pleat heading, floor length. The catalog needs six colors and three heading styles (pinch pleat, grommet, and rod pocket), which makes eighteen product images. Reshooting means rehanging panels, steaming every fold, and matching the window light each time. Generating the other seventeen from the single reference photo lets listings go live while the remaining fabric samples are still on their way from the mill.

Direct answer: a reference-guided image generation API takes one curtain photo as image input plus a prompt describing the target color, fabric weight, or heading style, and returns a new image that keeps the window, room, and camera angle consistent while changing the requested elements.

How Does an API Generate Curtain Variants From One Photo?

Reference-guided generation anchors the output to the composition 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 curtains, that anchoring preserves the window frame, the wall, and the camera perspective of your real photo, where a text-only prompt would invent a generic window that does not match your catalog.

Describe the change in visual terms ("sage-green linen, grommet heading, same window and light") rather than an internal SKU code, which the model cannot map to a color or material.

Can the Generated Fabric Be Trusted as Accurate?

No, treat generated curtain images as a visual placeholder, not a fabric reference. Image models approximate drape, sheerness, and weave. Pleat depth and spacing can shift, a sheer can look more or less opaque than the real cloth, and a heading style can come out slightly different from your actual hardware. Shoppers judge curtains by drape and light transmission, so errors there matter.

Two practical rules:

  1. Use generated images for the variant grid, internal review, and pre-order pages, then swap in real photography once samples exist.
  2. Compare each generated image with the physical sample, in daylight, before it reaches a customer-facing page.

Which Model Fits Curtain Photography?

Nano Banana Pro's reference-guided mode holds the window and room consistent across color and heading 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 stray cable or changing the wall tone behind the panel.

Model Mode Resolution / price Composition consistency Best for
Nano Banana Pro Reference-guided 1K $0.030 / 2K $0.030 / 4K $0.042 High Full color sets from one window-wall 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) Small touch-ups 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 Color Variant via API?

Submit the base photo as image input with a prompt describing the target color and heading; 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, heading):
    r = requests.post(
        f"{BASE}/images/generations",
        headers={"Authorization": f"Bearer {API_KEY}"},
        json={
            "model": "nano-banana-pro",
            "prompt": f"same window wall, room and camera angle, "
                      f"{color} linen curtain panel, {heading}, "
                      f"soft natural daylight, studio product shot",
            "image": reference_url,
            "resolution": "2k",
        },
    )
    return r.json()["id"]

job_id = generate_variant(
    "https://cdn.example.com/curtain-oat-pinchpleat.jpg",
    "sage green",
    "grommet heading with evenly spaced metal rings",
)

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 Color Range?

Loop over the color and heading list and submit each as its own job. The batch image generation guide covers the concurrency and retry pattern this scales to.

combos = [
    ("oat", "pinch-pleat heading"),
    ("sage green", "grommet heading"),
    ("charcoal", "rod-pocket heading"),
    ("terracotta", "pinch-pleat heading"),
]

jobs = [(c, h, generate_variant(reference_url, c, h)) for c, h in combos]

for color, heading, job in jobs:
    print(f"{color} / {heading}: {wait_for_result(job)}")

What Does a Full Variant Set Cost?

Eighteen combinations (6 colors × 3 heading styles) at 2K on Nano Banana Pro cost 18 × $0.030 = $0.54. A brand adding a close-up of the weave for each of the 6 colors (6 more images) pays 24 × $0.030 = $0.72 in total.

Launch size Images Model Cost
6 colors × 3 heading styles 18 Nano Banana Pro, 2K $0.54
Plus weave close-up per color 24 Nano Banana Pro, 2K $0.72
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 curtain showcase video guide for breeze-sway and daylight-shift clips.

FAQ

Can the API change the curtain color without changing the room?
Yes. Describe the target color and state that the window, room, and camera angle stay the same; the reference image keeps the composition anchored.

Will the model reproduce a printed pattern or embroidery exactly?
Not reliably. Fine prints and embroidery often blur or shift. Generate the color and composite real pattern artwork afterward.

Can I show true opacity or blackout performance?
No. Light transmission in a generated image is a visual approximation. State opacity and blackout ratings in the listing text.

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 curtain video guide shows how to animate each variant into a short sway and daylight-shift clip.


See the Nano Banana Pro model page for parameter docs.

Related posts

Join our DiscordAI Curtain Photography API — Color and Fabric Variants — GenRelay