Skip to main content
How to Get the Image You Want answers “this one attempt failed, how do I rescue it.” This page answers the next question: how do I make every attempt land. A question that comes up constantly: consumer image products like freepik.com and higgsfield.ai run on the same base models you do — the same Nano Banana, GPT-Image and FLUX families — yet their output looks more finished. The gap is not in the model weights. It is the layer wrapped around the model, and you can build that layer yourself. This page shows how.

1. What consumer image products wrap around the model

Take one of these products apart and you find roughly eight layers outside the model. Every one of them is reproducible on the API:
Two platform boundaries to settle before you copy a competitor’s feature list:
  1. APIYI has no upscaling, background-removal, or face-restoration endpoint. If you need a large image, pick the high resolution tier at generation time (gpt-image-2 at 4K, Nano Banana Pro at 4K) rather than planning to enlarge afterwards. For a transparent background, only seedream-5-0 and seedream-5-0-pro can be prompted to return PNG with an alpha channel.
  2. APIYI does not offer LoRA or identity training. The “train once, lock the face forever” capability behind Soul ID can only be approximated with reference images: the same character will still drift across scenes and lighting changes, and holds best when the new shot stays close to a frontal view and the original lighting. For commercial characters that demand strict consistency, budget for a human review step.

2. The first layer already separates the results: turn casual input into structure

This is the highest-leverage layer, and the one most often skipped.

Side-by-side test: one model, one brief, two prompts

The brief is “an e-commerce product shot for coffee.” On the left is what a user actually types; on the right is the same brief with the missing decisions filled in. Both ran once on gemini-3-pro-image (Nano Banana Pro) at 2K, 1:1:
Coffee image from the casual prompt: wooden table, grinder, burlap sack and other unrequested props, warm nostalgic grading, and an invented brand name printed on the cup

Casual prompt: 'Make me a coffee product shot, make it look nice, make it feel premium'

Coffee image from the structured prompt: a matte black ceramic cup on a light grey microcement surface, clean blurred background, clear light direction, generous negative space

Structured prompt: subject, environment, light position, lens, grading, imperfections and composition all specified

The left image is not ugly, but it is unusable. The model made a pile of decisions nobody authorized: it added a grinder and a burlap sack, settled on nostalgic warm grading, and printed an invented brand name on the cup — auto-generated text like that makes the frame worthless commercially. The right image can go straight onto a product page: neutral background, a light setup you can describe out loud, and room for copy. “Looks nice” and “is usable” are different targets. A casual prompt can only reach the first one.

The six elements a rewrite layer must supply

Rewriting does not mean making the prompt longer. It means filling in missing decisions. An image prompt has six load-bearing parts:
Resolution is not a seventh element. Output resolution comes only from parameters such as size / imageSize; writing “4K” or “8K” in the prompt does not add a single pixel. See Image Compression and Output Resolution.

The rewrite layer in code

A cheap, fast text model is enough here; its cost is negligible next to generation:
Note the rule banning “8K, ultra HD, masterpiece, perfect” — section 4 explains why.

3. A pipeline you can actually ship

Chain the remaining four layers onto the rewrite layer and you have the whole thing:
1

Rewrite: casual input to structured prompt

See section 2. This step also neutralizes sensitive content in user input along the way, which measurably reduces how often the request is blocked downstream.
2

Anchor: reference images plus a style constant

Style is pinned by two things: a style constant appended to every prompt (your preset), and a fixed set of reference images.Reference limits differ sharply by family — confirm yours before you design the pipeline:Two rules to respect: “image 1 / image 2” in the prompt map strictly to array order, so state explicitly which is which; and Grok only honours reference images on /v1/images/edits — passing them to /v1/images/generations silently discards them and still bills you.
3

Sample: generate N in parallel, do not rely on n

The “it nailed it first try” feel of a consumer product is really the product drawing several cards on your behalf.But the server-side n parameter has no effect on most image models (Seedream ignores it outright). To get multiple candidates, fire multiple requests concurrently from the client — the skill pages on this site cap it at 5 at a time. Tune concurrency per channel; some start returning 429 at 2, so add exponential backoff.
4

Select: use a vision model as the judge

Once you have N candidates you must pick automatically, otherwise you have simply pushed the choice onto the user.Send the candidates back to a vision model for scoring over the standard /v1/chat/completions image input; see Vision Understanding for eligible models. Fix the rubric at five dimensions and demand JSON back: instruction compliance, structure and anatomy, text correctness, texture realism, composition.
Do not use /v1/rerank for this. bge-reranker-v2-m3 is a text-only reranking model and does not accept images. Scoring images requires a vision understanding model.
5

Retouch and land it

Adjust locally after the composition is settled — far higher success rate than one compound instruction:
  • Pixel-level local repaint: only the official-relay gpt-image-2 supports masks; see Mask Inpainting Guide.
  • Multi-turn cumulative editing: supported on the native Gemini endpoint for Nano Banana models (feed the previous image back as role: "model"); the reverse-engineered routes do not support it.
  • Rehost immediately: every returned URL is temporary (FLUX about 10 minutes and without CORS; Seedream and R2 about 24 hours), so download into your own object storage as soon as you have it.

Minimal end-to-end implementation

4. Removing the AI look

“AI look” is not a mystery. It is a set of concrete traits you can remove one at a time.

Side-by-side test

Same model (gemini-3-pro-image), same subject, two prompt styles, two images each, first one shown from each batch:
Portrait from the bare prompt: subject centred and facing the camera, even illumination with no discernible light direction, tidy background, the look of generic stock photography

Bare prompt: 'A photorealistic half-body portrait of a young woman by a cafe window, smiling at the camera, 8K, ultra HD, ultra detailed, flawless skin, beautiful, perfect lighting, masterpiece'

Portrait from the controlled prompt: single directional window light, half the face in shadow, visible pores and facial fuzz, a small mole on the cheek, loose strands of hair, film grading, subject placed right of centre

The same subject after adding four blocks of control language: light position, lens, medium, imperfections

The left image is not bad — the base model is strong enough that a bare prompt still yields a good-looking picture. But it carries the full trait set: the subject is locked dead centre, the light is so even you cannot say where it comes from, and every element is agreeable. And it is not a fluke: both images from that batch shared essentially the same framing and lighting pattern. The right image switched approach: the light has a direction, half the face is allowed to fall into shadow, skin shows oil and pores, there is a mole on the cheek, stray hairs are unbrushed, and the subject sits right of centre. It reads as a specific person photographed at a specific moment, rather than “stock image of woman smiling in cafe.”
This is also where the real value of a pipeline shows. It does not turn ugly output into pretty output — it turns “lucky good” into “the good you specified, can describe, and can reproduce.” A stakeholder might not prefer the right image, but with the left one you cannot say why it looks the way it does, and you cannot ask the next image to match it.

Symptom, fix, and what not to write

Vague quality words such as 8K, ultra HD, ultra detailed, masterpiece and perfect are a net negative. They add no resolution (only parameters do that) and they push the model toward an over-sharpened, oversaturated render — precisely the core of the AI look. The left-hand prompt above was stuffed with them, and the result shows it. If you want quality, write specific light, lens and medium instead.

Four blocks of copy-paste control language

Mix into the prompt as needed; one or two lines from each block is usually enough:

Light

window light from the left is the only source in frame / hard back-side light at three in the afternoon / backlit, with a rim light on the hair / a desk lamp as a practical light inside the frame / overcast diffuse light with no distinct shadows

Lens

35mm f/2.0, candid, at eye level / 85mm f/2.8, focus on the near eye / 24mm from a low camera position, slight edge distortion / long lens compressing the space, flattened background layers / mild vignetting in the corners

Medium

Kodak Portra 400 character, fine grain / warm highlights, cool shadows / Polaroid instant film, low contrast, soft edges / noise and colour cast of an early CCD digital camera / low saturation overall, no sharpening

Imperfections

natural skin texture, visible pores and facial fuzz / a few loose strands of hair, unbrushed / pilled sweater, worn cuffs / water rings, fingerprints and crumbs on the table / off-centre framing, part of the subject cropped at the edge

Three complete examples

Candid half-body portrait: a woman in her mid-twenties by a cafe window, turned to the side, looking out, a smile she is not quite holding back. Window light from the left is the only source in the frame; the right half of her face falls into shadow, with a small hard-edged shadow under the bridge of her nose. 85mm lens, f/2.8, eye level, focus on the near eye. Kodak Portra 400 character with fine visible grain, warm highlights and cool shadows, low saturation overall. Natural skin: visible pores and facial fuzz, a little shine on the side of the nose, a small mole on the left cheek, a few stray eyebrow hairs, loose strands of hair unbrushed at the forehead. No skin smoothing, no beauty retouching, no sharpening. Subject right of centre, negative space at left.
E-commerce hero shot: a matte black ceramic pour-over cup filled to 80% with black coffee, a fine ring of crema on the surface. It sits on a light grey microcement surface, with a wall in the same tone blurred behind it. Key light from a softbox at upper left, 45 degrees; a white bounce card at the right leaves a narrow highlight along the right edge of the cup; a soft cast shadow falls to the rear right. 85mm macro lens, f/5.6, front view angled 15 degrees down, the whole cup sharp. Cool neutral white balance, low saturation overall. The glaze has slight handmade unevenness and one tiny kiln mark, and the rim shows a very faint trace of use. Generous negative space, cup on the left third of the frame. No brand names or text anywhere in the image.
A narrow old-town street at six in the evening, just after rain, puddles reflecting the light boxes of the shops on both sides. The only key light is a warm street lamp at the end of the street, with shop windows as fill, and a trace of cold dusk still in the sky, setting up a warm-cool contrast. 28mm lens, f/4, camera at eye level, tilted slightly up. Low saturation overall, noise retained in the shadows, no shadow lifting. The walls carry water stains, torn old posters and air-conditioning units; power lines cross the upper part of the frame. Nobody faces the camera; the passers-by are seen from behind and slightly motion blurred.

5. Facts that will reshape your pipeline design

Knowing these up front saves a round of rework:

6. Cost math: when the pipeline is worth it

A pipeline trades money for success rate. Output dominates image cost (gpt-image-2 bills output at $30 per million tokens), while the text and vision models used for rewriting and scoring are close to noise. So cost is essentially “how many candidates did you generate.” Use three tiers rather than one setting for everything: The test is simple: will anyone outside your team see this image? If yes, Standard or above pays for itself; if it is an internal glance, Draft is enough. You can also add a gate in between — only generate more candidates when the top score falls below a threshold, which lets most requests converge at two.

Quick summary

  • The gap is not in the model weights, it is in the eight layers around the model: rewrite, presets, anchoring, sampling, selection, step-by-step editing, post-processing, rehosting.
  • The rewrite layer has the best return: fill in subject, environment, light, lens, grading and composition, and “looks nice” becomes “is usable.”
  • Multiple candidates plus vision-model scoring is where the high perceived success rate of consumer products actually comes from. n does not work, so fan out client-side; /v1/rerank cannot score images.
  • Removing the AI look means adding specifics, not adjectives: name one light source, give focal length and aperture, specify medium and grain, add imperfections on purpose, and move the subject off centre.
  • 8K / masterpiece / perfect lighting are net negatives — no extra resolution, and they push the frame toward a rendered look.
  • Do not count on seeds for reproduction; archive the full request instead. Image APIs are synchronous and bill on disconnect, so the pipeline needs a queue.
  • APIYI has no upscaling, background-removal, or identity-training endpoints; design around those layers from the start.

How to Get the Image You Want

Rescuing a single failed call: rewrite the prompt, retry, switch models, isolate with a test tool

Image API Essentials

Synchronous calls, timeout tiers, billing, base64 handling, input image preprocessing

Mask Inpainting Guide

Pixel-level local edits, exclusive to the official-relay gpt-image-2

Multi-Image Fusion Testing

How reference limits were measured, plus a 14-image fusion result

Vision Understanding

Vision models you can use to score candidate images, and how to call them

Build Your Own Async Queue

Wrapping synchronous generation in a task queue to support a multi-candidate pipeline