Skip to content
Use cases

AI Product Photography API: Packshots to Scenes

An AI product photography API that keeps your product exact: packshots to lifestyle scenes, label and shape held, batches per SKU, a price per image.

Updated 6 min read

An AI product photography API places the product from your own photo into new pictures: the same bottle on a marble counter, on warm sand or under soft studio light, ready for a store page. On Frameport it takes one request to POST /v1/images/generations with your packshot as a reference picture, on Frameport Image 1 at $0.025 an image or Nano Banana Pro at $0.16, and only the images that come back are charged.

Below: what product photography covers, the request from packshot to scene, how to keep the label and the shape, light and backgrounds, a batch script per SKU, and a price table.

What is product photography, and where does an API fit?

Product photography is the set of pictures that sells an item: the clean packshot a marketplace asks for, a lifestyle shot that shows it at home, a flat lay seen from above, a close-up of a texture or a print. Each one used to mean a set, lights and a session per product. With an API, one sharp photo of each SKU becomes the source for as many scenes as you can describe, and the calls run from the code that already holds your catalog.

Product photography examples you can make this way:

  • Packshot: the product alone on white or a flat colour, for a listing.
  • Lifestyle: the product where it gets used, a mug on a desk by a window.
  • Flat lay: the item among a few props, shot straight down.
  • Detail: the weave of a fabric, the embossing on a box.
  • Seasonal: the same product in a winter or a summer set, with no new shoot.

Studios price a shoot their own way, often by the image or by the day. Here the price is per image, set per model and known before the call, and an image that fails costs nothing.

Packshot to scene with the AI product photography API

Send the packshot in reference_images, describe the setting, and say what must stay the same. A public https URL works, and so do an upload id (upl_…) and one of your earlier outputs (file_…), as the uploads page explains. n asks for up to 4 takes of the same scene in one request.

curl https://frameport.ai/v1/images/generations \
  -H "Authorization: Bearer $FRAMEPORT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "fp-image-1",
    "prompt": "The bottle from the picture standing on a white marble kitchen counter in soft morning window light. Keep its shape, colours, label and proportions exactly as in the picture.",
    "reference_images": ["https://example.com/packshots/btl-001.png"],
    "n": 4,
    "aspect_ratio": "1:1"
  }'

# Then read it until "status" is no longer "queued" or "running"
curl https://frameport.ai/v1/images/generations/$GENERATION_ID \
  -H "Authorization: Bearer $FRAMEPORT_API_KEY"
202 Accepted (abridged, outputs left out)
{
  "id": "gen_6Pq3WnT8vXc1Lm5Rk9YbZs",
  "object": "generation",
  "type": "image",
  "model": "fp-image-1",
  "status": "queued",
  "input": {
    "prompt": "The bottle from the picture standing on a white marble kitchen counter in soft morning window light. Keep its shape, colours, label and proportions exactly as in the picture.",
    "n": 4,
    "aspect_ratio": "1:1",
    "reference_images": 1
  },
  "reserved_usd": 0.1,
  "cost_usd": null,
  "error": null,
  "created_at": "2026-11-28T10:00:00.000Z"
}

Each image settles on its own: if one of the four fails, the other three are delivered and charged, and the failed one costs nothing (outputs). The Python image generation guide goes further into polling, errors and downloads.

Keeping the label and shape exact

The model knows your product only from the pictures you send, so their quality sets the ceiling.

  • Shoot the reference straight on: label toward the camera, sharp, evenly lit, nothing over the logo.
  • Send more than one view when the shape matters: front, side, top, a close-up of the label. Frameport Image 1 reads up to 10 pictures and Nano Banana Pro up to 6.
  • Name what must not change: "same label text, same cap, same proportions". Call the item "the bottle from the picture" rather than describing it again in new words.
  • Edit rather than start over: both models edit by instruction. Send a photo and write the change: "replace the background with a linen tablecloth", "remove the price sticker", "make the light warmer".

On Frameport Image 1, every reference beyond the first raises the price of each image slightly. A quote shows the exact figure in its breakdown before anything runs, so a request with five angles holds no surprise.

When a label drifts on one model, send the same SKU to the other: a few test images on each cost little, and you keep the model that holds your packaging. The prompt-only models in the catalog, such as Flux 3 Image, Seedream 5.0 Pro or GPT Image 2.5 Sunburst, read no pictures at all: they can draw a bottle, never yours. They still help with empty sets and backgrounds.

Lighting and backgrounds for a consistent catalog

Write light the way a photographer would set it: "soft key light from the left, white bounce on the right, a gentle shadow under the product", "hard midday sun with crisp shadows", "warm backlight at golden hour". Then name the surface and what sits behind it: "on a walnut desk, plants softly blurred behind".

For a whole catalog in one look, keep the scene words identical for every SKU. For a closer match, make the empty set once, then send it as a second reference with each product and ask for "the product from the first picture, placed in the scene from the second picture". Every SKU then lands in the same room under the same light, for one extra reference per request. Frameport Image 1 takes 1:1, 3:4, 4:3, 9:16 and 16:9: square for a product grid, 3:4 for a portrait listing, 9:16 for stories, 16:9 for a banner.

To find a look before writing code, the Studio has apps made for this. Product in a scene sets a product photo on a marble counter, a beach, forest moss, a colour studio set or a desk. New background keeps the subject and swaps what is behind it. Relight moves the light to golden hour, blue hour, neon or soft studio. Copy as API call on a result hands you the request body for your script.

Batches per SKU

A catalog run is the same request in a loop: one row per SKU, a few scenes per row, each request with an Idempotency-Key built from the SKU and the scene. If the script stops halfway, running it again within a day replays the requests that already went through instead of paying for them twice (idempotency). Price one request before the loop starts; a quote is free and holds nothing.

Price four images before they run
curl https://frameport.ai/v1/generations/quote \
  -H "Authorization: Bearer $FRAMEPORT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "fp-image-1", "n": 4, "reference_images": ["https://example.com/packshots/btl-001.png"]}'
200 OK
{
  "object": "quote",
  "model": "fp-image-1",
  "type": "image",
  "mode": "generate",
  "price_usd": 0.1,
  "reserved_usd": 0.1,
  "breakdown": "4 images × $0.025",
  "available_usd": 42.5,
  "enough_balance": true
}
product_photos.py
import csv
import os
import time
from concurrent.futures import ThreadPoolExecutor

import requests

API = "https://frameport.ai/v1"
HEADERS = {"Authorization": f"Bearer {os.environ['FRAMEPORT_API_KEY']}"}
SCENES = {
    "marble": "standing on a white marble kitchen counter in soft morning window light",
    "linen": "on a folded natural linen cloth, soft daylight from the left, a gentle shadow",
    "podium": "on a pastel colour block podium in a clean studio set, soft even light",
}
os.makedirs("photos", exist_ok=True)


def submit(body, key):
    while True:
        res = requests.post(f"{API}/images/generations", json=body,
                            headers={**HEADERS, "Idempotency-Key": key})
        if res.status_code == 429 or res.status_code >= 500:
            time.sleep(int(res.headers.get("Retry-After", "10")))
            continue
        return res.json()


def shoot(task):
    row, scene = task
    name = f"{row['sku']}-{scene}"
    gen = submit({
        "model": "fp-image-1",
        "prompt": f"The {row['name']} from the picture {SCENES[scene]}. "
                  "Keep its shape, colours, label and proportions exactly as in the picture.",
        "reference_images": [row["photo_url"]],
        "n": 4,
        "aspect_ratio": "1:1",
        "max_cost_usd": 0.1,
    }, key=f"photo-{name}-v1")
    if gen.get("error"):
        return f"{name}: not charged, {gen['error']['message']}"
    while gen["status"] in ("queued", "running"):
        time.sleep(3)
        gen = requests.get(f"{API}/generations/{gen['id']}", headers=HEADERS).json()
    saved = 0
    for i, output in enumerate(gen["outputs"]):
        if output["status"] != "succeeded":
            continue  # a failed image is not charged
        ext = output["content_type"].split("/")[-1]
        image = requests.get(f"{API}/generations/{gen['id']}/content/{i}", headers=HEADERS)
        with open(f"photos/{name}-{i}.{ext}", "wb") as out:
            out.write(image.content)
        saved += 1
    return f"{name}: {saved} saved, charged {gen['cost_usd']}"


with open("skus.csv", newline="", encoding="utf-8") as sheet:
    tasks = [(row, scene) for row in csv.DictReader(sheet) for scene in SCENES]

with ThreadPoolExecutor(max_workers=8) as pool:
    for line in pool.map(shoot, tasks):
        print(line)

Eight workers stay well under the workspace's 20 generations at once, and a 429 is waited out with its Retry-After. Each file is read with your key through GET /v1/generations/{id}/content/{index}, so no signed link is needed (downloads). Stored outputs expire after a while, so copy the keepers to your own storage. For a clip of each SKU, the AI product video generator guide starts from the same packshots.

AI product photography pricing

ModelReference pictures1 image4 images100 images
Frameport Image 1Up to 10$0.025$0.10$2.50
Nano Banana ProUp to 6$0.16$0.64$16.00

The table prices images made with one reference picture; on Frameport Image 1, extra references add a little per image, as the quote shows. A hundred SKUs at four images each is four hundred images: $10.00 on Frameport Image 1. The balance is prepaid, with no subscription. Pricing covers top-ups, the image generation API cost guide compares every image model, and the Nano Banana Pro API guide covers that model's other modes.

Which of our engines suits which shot is in the photorealistic image generation API guide.

FAQ

What is product photography?

It is the pictures a brand uses to show and sell an item: packshots on a plain background, lifestyle scenes, flat lays and close-ups. An AI product photography API makes those scenes on request from one good photo of the product.

Is there a free product image API?

Opening an account, creating a key and quoting a request are all free, and so is any image that fails. Each delivered image is paid from a prepaid balance, starting at $0.025, without a monthly plan. You can create an account and test a look in the Studio first.

Will AI keep my product's label readable?

It can when the reference is sharp and the label faces the camera, but small print can still drift, so check every image before it goes live. A close-up of the label as an extra reference and the words "same label text" in the prompt both help, and running a few SKUs on both models shows which one holds your packaging.

How much does AI product photography cost?

Frameport Image 1 costs $0.025 an image with one reference picture, and Nano Banana Pro costs $0.16. Only delivered images are charged, and a quote gives the exact price of any request, extra references included, before it runs.

Can I change the background of an existing product photo?

Yes. Both models edit by instruction: send the photo as a reference and write the change, such as "replace the background with a linen tablecloth in daylight". In the Studio, the New background app does the same in a few clicks.

Start building.

Your API key is free. Top up from $10 when you are ready.