HiAPI
  • Models
  • Pricing
Search

Search HiAPI models, tools, and resources.

LoginGet Started
  • Models
  • Pricing
HiAPI

One API, All AI Models

Generate images, video, and audio with leading models through one production-ready API.

Get a free API key

AI Image API

  • All image models
  • GPT Image 2
  • Nano Banana 2
  • Seedream 5.0 Pro
  • Qwen Image 2.0 Pro
  • FLUX 1.1 Pro

AI Video API

  • All video models
  • Seedance 2.5
  • FLUX.3 Video
  • Seedance 2.0
  • Veo 3.1
  • Kling 3.0

AI Audio API

  • All audio models
  • MiniMax Music 2.6
  • MiniMax Music 1.5
  • ElevenLabs v3
  • Text to music
  • Text to speech

Product

  • Model marketplace
  • Playground
  • Pricing
  • Image API Cost Calculator
  • Free GPT Image 2 Generator
  • Free Nano Banana Image Generator
  • Outfit Preview
  • Product Photo Lab

Developers

  • Documentation
  • API Reference
  • Agent Skills
  • LLM integration index
  • Blog

Company

  • About
  • Contact support
  • Terms of Service
  • Privacy Policy

© 2026 hiapi. All rights reserved.

Open source on GitHubPython SDK on PyPI
  • TL;DR
  • Why gpt-image-2 for product images
  • The one rule: write the product spec once, reuse it
  • Shot 1 — the white-background listing image
  • Shot 2 & 3 — variants of the same product
  • Shot 4 — the lifestyle / social variant
  • The API, end to end
  • Batch script: one product, many shots
  • Cost math for a real catalog
  • Wrap-up
GuideJul 1, 20266 min read

gpt-image-2 for E-Commerce Product Images: A Batch Workflow on hiapi

Generate clean white-background listing shots, angle/detail variants, and lifestyle scenes for a whole catalog with the gpt-image-2/text-to-image task API on hiapi — real reproduced images, verified $0.03/image pricing, and a copy-paste batch script.

HiAPI Teamgpt-image-2Image APIE-CommerceGuide

Latest models

Explore models

Contents
  • TL;DR
  • Why gpt-image-2 for product images
  • The one rule: write the product spec once, reuse it
  • Shot 1 — the white-background listing image
  • Shot 2 & 3 — variants of the same product
  • Shot 4 — the lifestyle / social variant
  • The API, end to end
  • Batch script: one product, many shots
  • Cost math for a real catalog
  • Wrap-up

Generate it with HiAPI

Choose a model, enter your prompt, and see the result.

HiAPI Blog

Related articles

HiAPI

Generate it with HiAPI

TL;DR

  • What this is: a working, reproducible workflow for generating e-commerce product images with gpt-image-2/text-to-image on hiapi. Every image on this page was rendered from the exact prompt printed next to it — no stock photos, no borrowed demos.
  • One model, three jobs: clean white-background catalog shots, angle/detail variants of the same product, and a lifestyle scene — all from one text-to-image task endpoint.
  • API facts (verified on the platform): gpt-image-2/text-to-image runs on the async task endpoint (/v1/tasks). The input object needs prompt, aspect_ratio (1:1 for listings, 4:5 for social, 16:9 for banners), and resolution (1K / 2K / 4K). The result is an image at output[0].url.
  • Pricing: gpt-image-2/text-to-image is a flat $0.03 per image. A 20-SKU catalog with 3 shots each is 60 images for $1.80. See pricing for live numbers.
  • How to run it: POST to the task API, poll until success, then download the image from output[0].url — that URL expires, so save the bytes immediately. Full copy-paste submit/poll/download script and a batch loop at the end.

Why gpt-image-2 for product images

A product-image pipeline has a boring but strict spec: the same product, shown cleanly, on a consistent background, at listing-friendly aspect ratios. gpt-image-2/text-to-image is a good fit for three reasons.

First, it holds a product description steady across a batch — describe the item once, reuse that description, and vary only the camera. That is what turns "one hero shot" into a full listing set.

Second, it is a single async task per image. You submit a job, poll a task id, and pull back a finished file — the same task protocol every other hiapi generation model uses, so if you already call the other models, the control flow here is identical.

Third, it is cheap enough to iterate. At $0.03 an image you can afford to render three angles per SKU and throw away the ones that miss.

Sage green ceramic pour-over dripper on an off-white studio backdrop

The one rule: write the product spec once, reuse it

The trick to a consistent listing set is to keep the product half of the prompt fixed and change only the shot half. Here is the fixed product spec used for every image below:

a matte ceramic pour-over coffee dripper in sage green with a short conical body and a small pouring spout

Everything else — angle, background, lighting, framing — is appended per shot. Keep it in a variable and concatenate.

Shot 1 — the white-background listing image

This is the shot marketplaces want: pure white, soft even light, one subtle shadow, nothing else in frame.

Prompt: Studio e-commerce product photo of a matte ceramic pour-over coffee dripper in sage green with a short conical body and a small pouring spout, front three-quarter angle, centered on a pure white seamless background (#ffffff), soft even box lighting, subtle soft shadow directly beneath, sharp focus, true-to-life color, catalog listing style, no props, no text.

Settings: aspect_ratio: 1:1, resolution: 1K

White-background catalog product photo, front three-quarter angle

Shot 2 & 3 — variants of the same product

Now reuse the exact product spec and change only the camera instruction. Because the product half of the prompt is identical, the dripper stays recognizably the same item across the set.

Prompt (angle): …high side angle looking down into the cone, pure white seamless background (#ffffff), soft even box lighting, subtle soft shadow, sharp focus, true-to-life color, catalog listing style, no props, no text.

Top-down angle variant of the same dripper on white

Prompt (detail): Close-up… focus on the spout and rim texture, pure white seamless background (#ffffff), soft even box lighting, subtle soft shadow, sharp focus, macro detail, catalog listing style, no props, no text.

Macro detail shot of the spout and rim

Shot 4 — the lifestyle / social variant

Listings need the clean cut-out; ads and social need context. Same product spec, new scene, and a portrait 4:5 frame for feeds.

Prompt: Lifestyle e-commerce scene of a matte ceramic pour-over coffee dripper in sage green with a short conical body and a small pouring spout sitting on a light oak kitchen counter beside a glass carafe and a small pile of coffee beans, warm morning window light, shallow depth of field, cozy Scandinavian interior blurred in the background, natural color, premium social-media product shot, no text.

Settings: aspect_ratio: 4:5, resolution: 1K

Lifestyle scene: the dripper on a wood counter beside a coffee carafe

The API, end to end

Three calls: submit a task, poll it, download the file.

1. Submit — POST the model and an input object:

curl -s -X POST https://api.hiapi.ai/v1/tasks \
  -H "Authorization: Bearer $HIAPI_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-image-2/text-to-image",
    "input": {
      "prompt": "Studio e-commerce product photo ... no text.",
      "aspect_ratio": "1:1",
      "resolution": "1K"
    }
  }'
# -> {"data": {"taskId": "task_abc123"}}

2. Poll — GET the task until status is success:

curl -s https://api.hiapi.ai/v1/tasks/task_abc123 \
  -H "Authorization: Bearer $HIAPI_TOKEN"
# -> {"data": {"status": "success", "output": [{"url": "https://.../image.png"}]}}

3. Download — the output[0].url is temporary, so save it right away:

curl -s -o dripper-front.jpg "<output[0].url>"

Batch script: one product, many shots

Here is a copy-paste Python loop that renders a full listing set from a single product spec. It keeps the product description fixed and iterates the shot instructions.

import os, time, requests

BASE = "https://api.hiapi.ai/v1/tasks"
TOKEN = os.environ["HIAPI_TOKEN"]
HEAD = {"Authorization": f"Bearer {TOKEN}", "Content-Type": "application/json"}

# Fixed product spec — write it once.
PRODUCT = ("a matte ceramic pour-over coffee dripper in sage green with a short "
           "conical body and a small pouring spout")

# Vary only the shot half.
SHOTS = {
    "front":     ("1:1", "front three-quarter angle, pure white seamless background (#ffffff), "
                         "soft even box lighting, subtle soft shadow, catalog listing style, no text"),
    "angle":     ("1:1", "high side angle looking into the cone, pure white background, "
                         "soft even lighting, catalog listing style, no text"),
    "detail":    ("1:1", "close-up macro on the spout and rim, pure white background, "
                         "soft even lighting, catalog listing style, no text"),
    "lifestyle": ("4:5", "on a light oak kitchen counter with a glass carafe and coffee beans, "
                         "warm morning window light, shallow depth of field, no text"),
}

def submit(prompt, ratio):
    body = {"model": "gpt-image-2/text-to-image",
            "input": {"prompt": prompt, "aspect_ratio": ratio, "resolution": "1K"}}
    r = requests.post(BASE, headers=HEAD, json=body, timeout=60)
    return r.json()["data"]["taskId"]

def wait(task_id, timeout=600):
    deadline = time.time() + timeout
    while time.time() < deadline:
        d = requests.get(f"{BASE}/{task_id}", headers=HEAD, timeout=30).json()["data"]
        if d["status"] == "success":
            return d["output"][0]["url"]
        if d["status"] == "fail":
            raise RuntimeError(d.get("error"))
        time.sleep(5)
    raise TimeoutError(task_id)

for name, (ratio, shot) in SHOTS.items():
    prompt = f"Studio e-commerce product photo of {PRODUCT}, {shot}."
    url = wait(submit(prompt, ratio))
    img = requests.get(url, timeout=120).content   # URL expires — save now
    open(f"dripper-{name}.jpg", "wb").write(img)
    print(f"saved dripper-{name}.jpg  (cost $0.03)")

Swap PRODUCT for your SKU, keep the SHOTS map, and wrap it in an outer loop over your catalog to render every product the same way.

Cost math for a real catalog

gpt-image-2/text-to-image bills a flat $0.03 per image (verified on the platform; check pricing for the current number). So:

Catalog sizeShots per SKUImagesCost
20 SKUs360$1.80
100 SKUs3300$9.00
100 SKUs4 (+ lifestyle)400$12.00

That is cheap enough to re-render a whole catalog when you change your background standard, instead of re-shooting it.

Wrap-up

The workflow is small on purpose: fix the product spec, vary the shot, submit → poll → download, and save the output bytes before the URL expires. One gpt-image-2/text-to-image task per image, $0.03 each, and the same task protocol you already use for the other hiapi models. Point the batch loop at your catalog and it scales linearly.

Latest models

View all models
  • GPT Image 2From $0.007/image
  • Nano Banana 2From $0.051/image
  • Seedream 5.0 ProFrom $0.050/image
  • Seedance 2.5From $0.121/s

Explore models

TextImageVideoAudio
Back to blog
GPT Image 2From $0.007/image
Nano Banana 2From $0.051/image
Seedream 5.0 ProFrom $0.050/image
Seedance 2.5From $0.121/s
View all models
TextChat and reasoning
ImageGenerate and edit
VideoText and image to video
AudioSpeech and music
Start generating
View model pricing
View all articles
Seedance 2.5 Text-to-Video: Build Short-Form Clips with the hiapi API

Seedance 2.5 Text-to-Video: Build Short-Form Clips with the hiapi API

Seedance 2.5 Reference-to-Video for Short-Form TikTok and Reels Clips

Seedance 2.5 Reference-to-Video for Short-Form TikTok and Reels Clips

Grok Imagine Image 2.0 Image-to-Image Prompts: 4 Recipes With Real Outputs

Grok Imagine Image 2.0 Image-to-Image Prompts: 4 Recipes With Real Outputs

Grok Imagine 2.0 Text-to-Image Prompt Recipes: Copy-Paste Prompts With Real Outputs

Grok Imagine 2.0 Text-to-Image Prompt Recipes: Copy-Paste Prompts With Real Outputs

Using flux-2-klein-9b/text-to-image for E-Commerce Product Images via the hiapi API

Using flux-2-klein-9b/text-to-image for E-Commerce Product Images via the hiapi API

Flux-2-Klein-9b Image-to-Image for E-Commerce Product Photos

Flux-2-Klein-9b Image-to-Image for E-Commerce Product Photos

Start generating