A reference image can pin down details that words leave vague. It can guide a face, a product’s shape, a pose, a layout, or a visual style, while your prompt sets the new scene around it. The catch is that adding more reference images does not always lead to better results. Here is a five-step process for picking the right input, choosing the right workflow, and testing results before they reach your app.
How many reference images a model accepts depends on the model, and sometimes on the company hosting it and the type of reference. Ideogram accepts up to 10 style reference images through its own API, while its editor caps a quick style reference at three. On Apiframe, Seedream 5.0 Pro takes up to 10 reference images and Flux 2 Pro takes up to 8. Limits like these change as models get updated, so confirm the current number in the docs of the exact service you call before you build around it.
Step 1: Choose and Prepare the Right Reference Image
The first step is picking a reference that actually shows the detail you want to keep. A good reference clearly shows facial structure, product shape, fabric texture, camera angle, or lighting. A pretty image with a hidden subject will not help much.
Start by naming the job in plain terms. Are you trying to keep a person’s face? Match a color palette? Copy a room layout? Place a product into a new scene? One image can guide several traits at once, but a focused image gives the model less to guess at.
Pick a clear source with enough visible detail. Avoid heavy blur, strong filters, extreme crops, and objects hidden behind hands or shadows. If you are keeping a product’s shape, make sure its edges are visible, and our AI product photography API guide covers what makes a good source photo. If you are keeping a face, use a well-lit shot with clear features. The model can only work with what the image shows.
Multiple references help when each one has a clear, separate role. For example, one image can show the subject while a second supplies the lighting. Two faces of different ages, or two versions of a product, can confuse the result. Write down each image’s role before you upload anything.
Keep a small, curated set of approved images. A folder full of near-duplicates makes testing harder than it needs to be. Save the source image, its role, its crop, and the prompt version that worked with it. That record helps if someone else on your team needs to reproduce the same output.
For production teams, this step is also a rights check. Use images you own or have permission to use, especially when the input shows a person or a branded item. A reference image guides the model, but it does not remove your responsibility to check where the source came from. Our overview of copyright and commercial rights for AI-generated art is a useful primer here.
Key takeaway: Choose the smallest set of clear images where each one has one specific, useful job.
Step 2: Select an AI Image Generation Workflow
Your next choice is the workflow. Image-to-image, direct reference image input, IP-Adapter, and ControlNet each solve a different problem. IP-Adapter is a add-on that lets a model copy the look of a reference image, and ControlNet is one that locks pose or layout. The right method depends on what needs to stay fixed in the new image. Our AI image editing API guide explains when to edit an existing photo and when to start fresh.
Use image-to-image when you want a variation of the source. It keeps some of the source’s broad structure, color, and tone while the prompt changes the scene. This works well for restyling a photo or making alternate versions of a rough concept.
Use a reference image field when the model accepts direct image input for editing or composition. The field name changes from model to model. On Apiframe, Flux models use a list field called input_images, while Seedream models use image_input. Other APIs use a single field such as image_url. The field name depends on the model, not on image generation as a whole.
Different APIs separate single-image editing from multi-image input. Some models accept several reference images at once, such as Seedream 5.0 Pro, but you should check each model’s input rules before switching between models. Our Nano Banana API guide and Flux API guide show how two popular model families handle image inputs, and our roundup of the best AI image generation APIs is a good way to shortlist candidates.
Use IP-Adapter when the image should guide broader traits like style or subject appearance, while the prompt builds a new composition. Use ControlNet when pose, edges, depth, or layout matter more than visual style. A pose outline and a mood board image are two very different kinds of control.
If you are building a product, Apiframe’s image API guide shows how one consistent request format works across image models. You submit a job to POST /v2/images/generate and get back a job ID. From there you either check the job yourself or use a webhook, which is an automatic message your server receives when the job finishes. You can change the model value without rewriting your whole media pipeline, which helps when one model handles identity well but another gives better detail or a lower cost. Our guide to setting up media webhook callbacks covers the webhook part.
Apiframe also covers video and music models under the same account. A team building a media app can keep image references in one workflow, then hand approved stills to a video step. Our guide to AI development platforms is worth a look once your pipeline grows past a single image endpoint.
Before writing any code, note three limits for whichever model you are using: the number of reference images allowed, the input field name, and the output size. Do this for each model, since a model’s name alone will not tell you how its reference system behaves.
Step 3: Match the Reference Method to Your Goal
To use reference images well, match the input method to the specific detail you want to control. A subject reference, a style reference, and a composition reference can all start as ordinary images, but each one needs different handling.
| Goal | Best starting method | What to preserve | Main risk |
|---|---|---|---|
| Make a new version of one image | Image-to-image | Broad layout, colors, and subject placement | The result stays too close to the source |
| Keep a character recognizable | Subject reference or IP-Adapter | Face shape, hair, clothing, and key traits | The face drifts across scenes |
| Match a pose or room layout | ControlNet | Edges, depth, pose, or structure | The output feels stiff |
| Apply a visual style | Style reference | Palette, light, texture, and brush feel | The style changes the subject too much |
| Combine several assets | Multi-reference editing | Selected people, products, or environments | Conflicting inputs reduce clarity |
Image-to-image is usually the simplest place to start. Keep the source and output aspect ratios close when layout matters, since a mismatch can stretch the source or force an unwanted crop. Center cropping in particular can cut off the exact detail you were trying to keep.
For identity-focused work, start with one strong image. Add a second angle only if the model supports it and both images clearly show the same subject. A high input limit is not a reason to fill every slot, and more inputs do not reliably lead to a better or larger output. Our guide to keeping AI-generated characters consistent across images goes deeper on this.
That trade-off matters in a production queue. Seedream 5.0 Pro accepts up to 10 references but tops out at 2K, while the Flux 2 Pro documentation lists up to 8 references and resolutions up to 4 MP. Test the actual output you need instead of judging a model by its input count.
For style transfer, choose an image with a clear, strong visual look. A distinct film style or bold illustration is easier for a model to read than a nearly plain photo. Keep the new subject specific in your text prompt so the style does not swallow its shape.
When your product needs face-focused editing, a dedicated face-swap operation is often easier to test and control than asking a general model to keep identity while changing an entire scene.
Set a decision rule before comparing outputs: are you keeping identity, structure, or style? Asking one reference image to do all three at once usually means more failed generations.
Step 4: Write a Prompt That Works With the Reference
A reference image supplies visual context, but your prompt still has to tell the model what to show, what to change, and what must stay exactly the same. Think of the image as the mood board and the prompt as the shot brief.
Start with the new scene. Then name the subject and its key traits. Next, describe the details that matter most. End with any limits. This order makes the request easier to read and easier to edit later.
For a single reference, try a structure like this:
Create a photorealistic editorial image of the same ceramic lamp in the reference image.
Place it on a walnut desk beside an open notebook.
Keep the lamp's shape, handle, glaze color, and brass switch unchanged.
Use soft morning window light, a 50mm view, and leave open space on the right.
Change only the setting. Do not add text, logos, or extra lamps.Be direct about what comes from each input. With two images, say, “Use Image 1 for the product shape. Use Image 2 for the warm side lighting.” A vague instruction like “combine these references” leaves the model to decide which details win.
For edits, repeat the keep list on each turn. Say “change only the background” when the background is the only target. If the first result changes the product color, add color to the locked details on the next request.
Use words that describe the output you want. Say “full body visible” if feet matter. Say “top-down view” if the layout needs a flat plan. Say “empty space on the left” if text will sit beside the image later. For photorealism, name the medium directly and describe natural texture instead of asking for a vague “better” image. Our guide to how prompt engineering shapes photorealistic images has more examples.
When text needs to appear inside the image, put the exact words in quotation marks and say where it goes, how large it is, what color it is, and what type style to use. Use a higher quality setting for small text when the model offers one. For cost-sensitive testing, start at a lower quality setting, then raise it once the layout works. Quality settings usually trade off against speed, so test both ends before settling on a default.
Keep the first prompt clean, and change one thing per revision. If you change the camera angle, color, clothing, and background together, you will not know which instruction caused the problem.
Step 5: Adjust Influence, Generate Variations, and Evaluate Results
The final step is controlled testing. Generate a small batch, look closely at the results, then change one control at a time. Our guide to batch image generation covers how to run those batches without flooding your queue.
Start with the model’s default reference strength if it has one. If the result ignores the subject, raise the influence slightly. If it copies the source too closely, lower it. Some models do not offer a strength control at all, in which case you will need to adjust the prompt or switch methods.
For style work, keep the influence lower than you would for identity work. You want the colors and lighting to carry over, but the new subject still needs to come through clearly. For a product or character, stronger influence can help, though pushing it too far can limit how much the pose or scene can change.
Generate a few variations using the same source and base prompt first, then compare them side by side. Look closely at the details that matter for your use case:
- Does the face keep its key proportions?
- Does the product keep its shape and small parts?
- Does the pose match the guide?
- Does the style carry over without hiding the subject?
- Does the output meet the required aspect ratio and size?
Keep a simple test log with the model, prompt, reference image links, strength setting, output size, and notes on the result. Include the seed if the model uses one, which is a number that lets you repeat the same generation. A seed can help you reproduce a result later, but it will not replace a reference image when identity is what matters.
Watch for a few common warning signs. A face that changes noticeably from one scene to the next usually needs a stronger subject reference or a model built for consistency. A product with warped edges may need a cleaner source image or a method that controls layout. A style transfer that quietly changes the subject’s pose is often using too much image influence.
Speed is worth testing on its own. Published speed numbers vary a lot with load and settings, so measure queue time and completion time yourself. Our unified media API latency guide shows how.
Cost deserves the same care. Apiframe bills in credits, where 1 credit equals $0.01, and the cost varies by model and settings. A 1K Seedream 5.0 Pro image costs 6 credits, for example, while a 2K image costs 11. You can test with a cheaper model during prompt development, then switch to a higher-quality model for approved images without changing your endpoint or integration. Our per-image pricing breakdown helps you estimate the cost of a high-detail workflow, and our comparison of AI media generation APIs is useful if you are weighing Apiframe against other providers.
For teams that also ship sound or video, the same account can support a wider media flow. A still image can become the first frame for motion, which our comparison of image-to-video APIs walks through, and a campaign can pair generated visuals with music through Apiframe’s music generation models. Keep each stage of the pipeline separate in your job records, so a failed video step does not force you to regenerate an image you already approved. Our overview of unified AI media APIs covers this kind of multi-stage setup in more detail.
Tip: Hold the reference image, model, and base prompt steady while you tune one variable at a time. That turns random trial and error into something you can repeat and compare.
Before shipping anything, review a sample from every batch. Check identity, layout, unwanted text, visual flaws, and rights to the source images. If you need automated screening alongside human review, our AI content moderation guide covers the options. Reference images are a useful tool, but they do not guarantee that every output will hold onto the same details.
FAQ
What is a reference image in AI generation?
A reference image is an input that guides an AI model’s visual output. It can show a subject, style, layout, pose, or product detail, while the text prompt describes the new image being created. The model reads both inputs together, so the output can change in the ways you want without losing every visual anchor.
How many reference images should I use?
Start with one reference image, then add a second only if it has a clearly separate role. A subject image plus a lighting image can work well together, but several conflicting faces or product versions can confuse the model. The right number depends on the model’s input limit and what your output needs. More references do not guarantee higher resolution or better detail.
What is the best reference image method for character consistency?
A subject reference workflow or IP-Adapter is a strong starting point for character consistency. Use one clear main image and keep the character description the same across prompts. If pose matters more than identity, add ControlNet when the model supports it. Test several scenes before you assume the face will stay the same, and see our character consistency guide for a fuller method.
Why does my AI image ignore the reference?
Your image may ignore the reference because the input is unclear, the prompt conflicts with it, or the model gives text more weight. Start with a better crop and a simpler instruction. Name the exact feature to keep, then raise the reference influence if that control exists. If the model still drifts, try a method built for subject or layout control.
Can developers use reference images through an API?
Yes, developers can pass reference images through an API when the chosen model supports image input. The request may need a single image link or a list of links. With Apiframe, you send the generation job to the shared image endpoint, then check the job or receive a webhook. Always confirm the model’s own field names before you deploy.
Conclusion
Start with one clear reference and one defined goal. Test it with a structured prompt, adjust influence in small steps, and record the result. If you are building this into a product, follow our Getting Started with Apiframe guide so you can compare supported image models through one API before committing your pipeline to a single provider.