DEV Community

yao zhong
yao zhong

Posted on

Building a Two-Reference AI Portrait Pipeline with GPT Image 2

Building a Two-Reference AI Portrait Pipeline with GPT Image 2

Consumer AI photo products have a hard constraint that most demos ignore: the subject is not a single person, and the input is not a studio session. An AI engagement portrait needs to take two separate reference photos of two different people and produce one shared portrait that looks like both of them. This post walks through the pipeline design behind that kind of product, using a live example at the end.

The input problem

The first design decision is what the user must provide. A one-photo prompt is easy; two photos introduce identity consistency across two subjects. In practice the cleanest contract is one clear photo per person, with faces well lit, similar framing, and no heavy filters or extreme angles. The product then treats both images as fixed references and never merges them into a single averaged face.

The generation layer here is GPT Image 2. The two references are passed as image inputs, and the prompt supplies the scene, the relationship between the subjects, and the output constraints. The service offers eight editorial styles, including Korean Garden, Beach Romance, Enchanted Forest, Classic Elegance, Golden Hour, Bohemian Dream, Urban Chic, and Twilight Magic. Each style label is essentially a shorthand that anchors lighting, wardrobe mood, and backdrop in the generated scene.

The preview and credit model

A portrait generator needs a trust loop before any payment. The product's approach: after email verification, each account gets one watermarked preview at 1K resolution. That preview is the quality gate. If a provider or storage request fails, the attempt does not consume a credit, which matters when users iterate across styles with the same two photos.

Paid access is split between one-time HD packs and monthly plans. The one-time packs cover 20, 50, or 120 portraits, all HD and unwatermarked, with credits that never expire and failed renders refunded. Monthly plans start at the Basic tier and scale up to Pro, which also includes commercial-use rights per the published terms. Prices are time-sensitive and should be rechecked on the site.

The honesty constraint

The most important part of the pipeline is labeling. Outputs are AI-generated from the two reference photos, and the product states that they are not photographs from a real engagement session. That distinction matters legally and practically: usage rights are plan-dependent. Personal use covers the trial, Basic, and standard packs; commercial-use rights come with Pro, per the published terms.

A working example

If you want to see the two-reference workflow in production rather than in diagrams, the studio AI Engagement Photos is built on this exact pattern: two uploads, a style choice, a watermarked preview after email verification, and HD packs without expiry. The same honesty rules apply there, so it is a good reference implementation for the category.

Top comments (0)