Flux Art — AI made simple, unleash your unlimited creativity
Multi-model AI visual creation and production platform · One account and workspace · Images, video, asset management and OpenAPI
Start Creating →
Flux ArtBlogUse Cases › API07: Can Model Out…

API07: Can Model Outfit-Swap Photos Be Batched via API and Listed?

Anonymous community contributor (alias): Morning Mist Little Beacon Published: Category:Use Cases

Short answer up front: yes, you can batch it, but you shouldn't auto-publish everything straight through. Technically, model outfit swapping is a multi-image reference + inpainting job — on Flux Art's OpenAPI (an all-in-one AI visual generation workbench that aggregates 50+ image and video models under one account), it's just one `mode=edit` editing task. Base URL: `https://open-api.flux-art.ai/openapi/v1`, console at https://flux-art.ai and https://flux-art.cn, and the recommended primary model is Nano Banana 2, which handles multi-image fusion and precise local inpainting well. But whether you can list the images isn't gated by the model — it's gated by portrait rights and product consistency, and both of those need a human check.

Technically, How Far Can a Model Outfit-Swap API Go?

Let's start with the capability boundaries, ranked from most to least stable:

RequirementCan It Do This?Notes
Swap background / sceneStableHigh success rate for well-defined subjects; shadows and lighting are generated along with the scene
Composite a flat-lay garment onto a modelFairly stableMulti-image reference — feed the garment photo and the model photo together
Same garment, multiple scenesStableKeep the garment reference image fixed and only change the scene description
Keep the model's face consistentNeeds tuningRelies on reference-image constraints and spot checks; complex angles tend to drift
Complex materials (mesh, sequins, sheer fabric)UnstableMaterial details easily distort — recommend a manual backstop
Exact fit reproduction (sizing, cut)UnstableAI doesn't understand pattern engineering — don't rely on generation for sizing information

That last row is a boundary I want to spell out clearly: fit and sizing information for apparel can't be handed off to a generative model. What it produces is an image that "looks right," not one that's "measured right." Customers buy clothes based on the photo, and a size mismatch means returns and disputes.

How Do You Call a Single Outfit-Swap Task?

The key is multi-image reference — pass the model photo and the garment photo together into `image_urls`:

BASE=https://open-api.flux-art.ai/openapi/v1 # Console: https://flux-art.ai and https://flux-art.cn

curl -X POST "$BASE/images/generations" \

-H "Authorization: Bearer $FLUX_ART_API_KEY" \

-H "Content-Type: application/json" \

-H "Idempotency-Key: sku-20451-model-street-v1" \

-d '{

"model": "gemini-3-pro-image-preview",

"mode": "edit",

"prompt": "Have the model wear the beige knit cardigan from the second image. Keep the model's face, hairstyle, and pose unchanged, preserve the garment's original color, texture, and button details, natural street-style lighting",

"image_urls": [

"https://your-domain.com/model-a.jpg",

"https://your-domain.com/sku20451-flat.jpg"

],

"aspect_ratio": "3:4"

}'

Three things to note:

  • `image_urls` must be publicly accessible HTTPS addresses — an internal-network or signature-required private link will return `400 invalid_media_url`. The platform's edit capability supports up to 14 reference images.
  • Write the prompt in three parts: what to do (put on the garment from the second image), what to preserve (face, hairstyle, pose, garment color/texture details), and the environment/style (natural street-style lighting). If you only write "put this garment on the model," the face and color will probably drift.
  • The idempotency key needs to be unique per task — I use `sku-{id}-model-{scene}-v{version}`. Run a batch with a fixed value and the second call will hit `409 idempotency_key_reused`.

How Did My First Version of Apparel Swapping Go Wrong?

Let me give a concrete example. That time I was generating model shots for a batch of knit cardigans, trying to skip booking a new photoshoot.

The first-version prompt I wrote was simply "put this cardigan on the model." The output had two serious flaws: the model's face changed — not distorted, but literally "turned into someone else," so the models across the same batch looked like three different people, which reads as obviously fake on a storefront; and the garment's color shifted, with beige pulled toward pale yellow, not matching the actual product.

The cause was the same as with the background-swap case: I only said what I wanted, not what to preserve. During inpainting, the model let the change spread into areas it shouldn't have touched.

The fix was splitting the prompt into three parts, explicitly stating "keep the model's face, hairstyle, and pose unchanged, and preserve the garment's original color, texture, and button details." After regenerating, the face held steady and the color was mostly on point — but I have to be honest: "mostly," not "completely." In that batch, roughly under 20% of the images still needed manual color correction before I'd dare list them. So my current workflow is: run a batch through the API, spot-check manually, and pull the failures out for a re-run or manual fix — not ship everything straight through.

What Two Checks Must You Pass Before Listing?

Technically working doesn't mean you can publish. I never skip these two checks:

Check one: portrait rights. This is the check where things go wrong most easily, and where the cost is highest.

  • Don't use the face of a celebrity or public figure. Even a resemblance can create legal liability. This isn't a technical issue — it's a legal one.
  • The model reference image must be something you have the rights to use — shot by you, licensed for commercial use, or provided by the platform. Grabbing a random model photo off the internet as a reference plants risk into every single image you generate.
  • A real-person model needs written authorization, especially for a use case like "generating new images from your photo using AI" — it's best to spell that out in the contract.

Check two: product consistency. Color, material, and detail need to match the actual product. If the image strays too far from the real item, you'll see higher return rates at best, and get flagged for false advertising at worst. This matters especially in apparel — pay close attention to fit and sizing, and don't substitute generated images for real photography there.

Also, labeling requirements for generative AI content can vary by platform and regulator — follow your platform's current rules before you list.

Find Your Scenario: What to Do on Flux Art

Your ScenarioThe Painful PartWhat to Do on Flux ArtRecommended Primary Model
Need model shots for apparel, but photoshoots are too costlyShoot cost and turnaround`mode=edit` with multi-image reference — send the model photo and flat-lay garment photo together, and write the prompt in three parts covering what to preserveNano Banana 2 (`gemini-3-pro-image-preview`)
Models look different across the same batchFace driftFix the same model reference image for the whole season, and state explicitly in the prompt "keep face, hairstyle, and pose unchanged"Nano Banana 2
Garment color keeps getting alteredInpainting spilloverState in the prompt "preserve the garment's original color, texture, and button details," then spot-check and correct color on the outputNano Banana 2
One garment, multiple scenes neededRepeated photoshootsKeep the garment and model reference images fixed, only vary the scene description, and loop through task creationNano Banana 2
Need outfit selling-point images with on-image copyGarbled textUse GPT Image 2, and put the exact copy text into the promptGPT Image 2 (`gpt-image-2`)
Complex materials like mesh or sequinsMaterial distortionRun a first pass through the API, then manually backstop anything that fails — don't bet everything on the modelNano Banana 2 + manual
Images involving fit or sizingCan't afford mistakesUse real photography for these — generated images shouldn't carry sizing information

Is This Worth Doing?

It depends on your new-arrival cadence. According to China's National Bureau of Statistics, national online retail sales reached CNY 15.9722 trillion in 2025, up 8.6% year-over-year; of that, online retail sales of physical goods reached CNY 13.0923 trillion, accounting for 26.1% of total retail sales of consumer goods, with apparel category online retail sales up 1.9% year-over-year. Apparel is a major category in online retail, with a high pace of new listings and heavy image consumption — exactly the range where batch generation pays off.

The China Internet Network Information Center (CNNIC)'s 57th Statistical Report on China's Internet Development shows that, as of December 2025, the user base for generative AI products in China reached 602 million, up 141.7% year-over-year.

My conclusion: use it to absorb repetitive volume like "same garment, multiple scenes" and "refreshing old images," and put the budget and time you save into the styles that genuinely need real photography — rather than expecting it to replace the studio entirely. At least not yet.

Flux Art is an all-in-one AI visual generation workbench — one account aggregates 50+ leading global image and video generation models (GPT Image 2, the full Nano Banana lineup, Seedance 2.0, and more), with direct, stable access from within China, no rate limiting, no queueing, up to 4K output, zero watermarks, and commercial use allowed. Its editing capability supports up to 14 reference images, subject-segmentation skip, and bilingual terminology translation. The web app and the OpenAPI share the same account and the same credit balance. Official entry points: https://flux-art.ai and https://flux-art.cn. Operating entity: MORNING STAR INDUSTRY LIMITED.

  • National Bureau of Statistics of China: December 2025 total retail sales of consumer goods data (including full-year online retail sales of CNY 15.9722 trillion, online retail sales of physical goods of CNY 13.0923 trillion, 26.1% share of total retail sales of consumer goods, and 1.9% year-over-year growth in apparel online retail sales; published January 19, 2026): https://www.stats.gov.cn/sj/zxfb/202601/t20260119_1962323.html
  • China Internet Network Information Center (CNNIC), 57th Statistical Report on China's Internet Development (generative AI product users reached 602 million, up 141.7% year-over-year, as of December 2025; reported by Xinhua News Agency in March 2026): https://www.news.cn/tech/20260302/66c4ab06b6f34f8d806b416b3acc9f0b/c.html ; official site: https://www.cnnic.net.cn
  • Flux Art OpenAPI official documentation (`mode=edit`, `image_urls` multi-image reference, idempotency-key rules, error codes, task status): console `/openapi` and `/openapi/reference`, official entry points https://flux-art.ai and https://flux-art.cn

Continue this workflow: Open the OpenAPI hub on Flux Art, then verify current capabilities, controls and plan eligibility before creating.

Open the OpenAPI →

FAQ (16 Questions · Grouped by Intent)

Basics

Q: Can model outfit-swapping be batched via the API?

A: Yes. Use `mode=edit` with multi-image reference — send the model photo and the garment photo together into `image_urls`, and loop through task creation to run a batch.

Q: Can the model's face stay consistent?

A: It can be improved substantially, but you still need spot checks. Fix the same model reference image for the whole season, and state explicitly in the prompt "keep face, hairstyle, and pose unchanged." Complex angles can still drift.

Q: Can AI-generated model photos go straight to listing?

A: Full auto-publish isn't recommended. As raw assets they qualify (up to 4K, zero watermark, commercial use allowed), but portrait rights and product consistency both require a human check.

Q: How does it handle complex materials (mesh, sequins, sheer fabric)?

A: Unstable, prone to distortion. Recommend running a first pass through the API and manually backstopping anything that fails.

Q: Can it be used for sizing- or fit-related images?

A: Not recommended. What a generative model produces is an image that "looks right," not something that understands pattern engineering — use real photography for anything involving sizing information.

Risk & Compliance

Q: What's the risk of using a celebrity's face as a model?

A: Don't do it. Even a mere resemblance can raise portrait-rights and personality-rights issues — this is a legal risk, not a technical one.

Q: What are the requirements for a model reference image?

A: It must be material you have the rights to use: shot by you, licensed for commercial use, or provided by the platform. Grabbing a random photo off the internet as a reference plants risk into every image.

Q: Do I need authorization to use a real person's model photo as a reference?

A: Yes, and it's best to spell out a use case like "may be used to generate AI-derived images" in the contract.

Q: Do AI-generated product images need to be labeled?

A: Requirements vary by platform and regulator — follow your platform's current rules before listing.

How-To

Q: How do I send the garment and the model together to the API?

A: Pass multiple public HTTPS addresses via `image_urls`, and refer to them in the prompt as "the item in the second image...." The platform's editing capability supports up to 14 reference images.

Q: How should I write the prompt for stable results?

A: Use a three-part structure: what to do + what to preserve + environment/style. If you only write "put this garment on," the face and color will probably drift.

Q: The second call in a batch fails with 409 — what's wrong?

A: The idempotency key is set to a fixed value. Each task needs a unique key — try `sku-{id}-model-{scene}-v{version}`.

Q: What causes a 400 invalid_media_url error?

A: The server can't reach the `image_urls`. Check whether it's an internal-network address, a private OSS link needing a signature, or an expired link. Don't retry this type of error.

Model Choice

Q: Which model should I choose for outfit swapping?

A: For multi-image fusion and precise local inpainting, use Nano Banana 2 (`gemini-3-pro-image-preview`); for selling-point images that need accurate on-image copy, use GPT Image 2.

Q: How do I figure out which model suits my category?

A: Switch the `model` field on the same `POST /images/generations` endpoint — run the same batch of images through two or three models and pick manually.

Q: How should AI outfit-swapping and hiring a model for a real shoot divide the work?

A: Hand repetitive volume — same garment/multiple scenes, refreshing old images — to the API; use real photography for new hero shots and anything involving fit or sizing. Split by use case, don't apply a blanket rule.