Tutorial · product photography

AI product photography API: batch workflow

Generate a clean packshot, a lifestyle scene and a detail crop for every SKU — without booking a studio for each one. The hard part is not the prompt; it is keeping the product accurate and the batch reviewable.

Short answer. For each SKU, generate three to five images: a white-background packshot, a lifestyle scene, a detail crop and one or two angle variants. Use a prompt template, keep the real product photo as the reference, and run a QA check for label, logo, color and proportions. On Plugsky, flux-schnell costs 1 credit per image and flux-dev or edits cost 3; Hobby includes 200 images/month.

The shot list

ShotPurposePrompt pattern
PackshotMarketplace main image, catalogProduct on seamless white, soft shadow, centered, no props
LifestyleHomepage, ads, socialProduct in a realistic setting, natural light, negative space for copy
DetailMaterial, texture, craftMacro crop, shallow depth of field, visible texture
AngleSize, shape, back labelThree-quarter or side view, same lighting and background
ScaleContextProduct next to a hand or common object, realistic proportions

Prompt templates

Packshot:
"{{product}} on a seamless pure white background, soft studio light,
centered, subtle contact shadow, no props, no text, catalog photography"

Lifestyle:
"{{product}} on a warm oak table beside a linen napkin, morning window light,
shallow depth of field, generous negative space on the right for copy"

Detail:
"Extreme close-up of {{product}} showing {{material}} texture, raking light,
shallow depth of field, neutral background"

Angle:
"{{product}} three-quarter view, same lighting and background as the packshot,
accurate proportions, no perspective distortion"

Replace the variables per SKU. Keep the lighting and background phrases identical across a batch so the catalog looks coherent.

Batch 500 SKUs

import asyncio
from openai import AsyncOpenAI

client = AsyncOpenAI(
    api_key="YOUR_PLUGSKY_KEY",
    base_url="https://api.plugsky.com/v1",
)

SHOTS = {
    "packshot": "on a seamless pure white background, soft studio light, centered, subtle contact shadow, no props, no text",
    "lifestyle": "on a warm oak table, morning window light, shallow depth of field, negative space on the right",
    "detail": "extreme close-up showing material texture, raking light, shallow depth of field",
}

async def shot(sku, product, kind, prompt):
    result = await client.images.generate(
        model="plugsky-flux",
        prompt=f"{product} {prompt}",
        size="1024x1024",
        n=1,
        response_format="url",
    )
    return {"sku": sku, "kind": kind, "url": result.data[0].url}

async def main(products):
    jobs = [
        shot(p["sku"], p["name"], kind, prompt)
        for p in products
        for kind, prompt in SHOTS.items()
    ]
    return await asyncio.gather(*jobs, return_exceptions=True)

Control concurrency. A batch of 500 SKUs × 3 shots is 1,500 images; send them in waves and store the returned URL with the SKU and prompt version. Make the job idempotent so a retry does not create a duplicate image.

QA checklist

  • Product fidelity: shape, proportions and color match the reference.
  • Label and logo: text is legible and correct; if not, use the editing endpoint or a human retouch.
  • Background: meets the marketplace rule (often pure white for the main image).
  • Shadows: contact shadow looks natural, not floating.
  • Hands and reflections: check for artifacts; reject and regenerate.
  • Rights: you have the rights to the product image and any props or models.

Cost per SKU

At three images per SKU with flux-schnell, a 500-SKU batch is 1,500 credits. Hobby includes 200 images/month, Starter 500, Builder 1,500 and Scale 5,000; top-ups are available. flux-dev or edits cost 3 credits each, so a mixed batch costs more. Add the human QA time; it is usually the largest line item.

cost_per_sku =
    images_per_sku × credit_cost × effective_price_per_credit
    + QA_minutes × reviewer_cost_per_minute
    + storage / CDN

Marketplace rules

Check the current rules for each channel before generating. Common requirements are a pure white background for the main image, the product occupying most of the frame, no watermarks or added text, and a minimum resolution. Lifestyle images often belong in secondary slots, not the main image.

When AI is the wrong tool

  • Regulated packaging where the label must be exact and auditable.
  • Products with complex transparent or reflective materials where artifacts are obvious.
  • Campaigns that require a real model, location or usage rights you do not have.
  • Marketplaces that explicitly require an unedited photograph of the actual product.

FAQ

Can I generate product photos with an API?

Yes. Use image generation with a prompt template per shot, or image editing to change the background of a real photo. Keep a reference and a QA step.

How many images per product?

Start with three to five: packshot, lifestyle, detail and one or two angles.

How much does it cost per SKU?

Plan credits: Hobby 200, Starter 500, Builder 1,500, Scale 5,000 images/month. flux-schnell is 1 credit; flux-dev and edits are 3. Add QA time.

Will the label and logo stay accurate?

Not reliably from text alone. Use the real photo as reference and the editing endpoint, then QA the label and logo.

Do marketplaces accept AI-generated images?

Policies vary. Check each marketplace; keep the original photo and edit history.

Reviewed 20 November 2026. Image endpoint behaviour and credits were checked against the Plugsky API documentation on that date. Marketplace rules and product rights are your responsibility; review before publishing.