Generate Images With High Input Fidelity
Generate images with high input fidelity
This cookbook shows how you can leverage the input_fidelity parameter, available in the Image API and the Responses image generation tool, to preserve distinctive features from the input.
Setting input_fidelity="high" is especially useful when editing images with faces, logos, or any other details that require high fidelity in the output.
If you're not already familiar with image generation using the OpenAI API, we recommend starting with our introductory image generation cookbook.
Set-up
Precise editing
High input fidelity allows you to make subtle edits to an image without altering unrelated areas. This is ideal for controlled, localized changes.
Example use cases:
- Item edits: Change isolated elements (e.g., swap a mug color) while leaving everything else untouched.
- Element removal: Cleanly remove an isolated element without changing the rest of the picture.
- Element addition: Seamlessly insert new objects into a scene.
Item edit
Remove item
Add item
Face preservation
When using high input fidelity, faces are preserved far more accurately than in standard mode. Use this when you need people to remain recognizable across edits.
Example use cases:
- Image editing: Edit your photos while preserving facial features.
- Personalization: Create avatars that still look like the original person across different backgrounds or styles.
- Photo merge: Combine faces from multiple pictures into one image.
Note: Currently, while all input images are preserved with high fidelity, only the first one you provide is preserved with extra richness in texture. When working with multiple faces from different photos, try combining all needed faces into a single composite image before sending the request (see the example below).
Image editing
Avatar
Combine multiple pictures with faces
Branding consistency
Sometimes, maintaining brand identity in generated images is essential. High input fidelity ensures that logos and other unique design elements remain true to the original assets.
Example use cases:
- Marketing assets: Generate banners or social posts that include your brand logo without distortion.
- Mockups: Place your logo or other brand assets into templates or lifestyle scenes without unintended changes.
- Product photography: Change a product’s background for different campaigns while keeping the product's details crisp.
Marketing assets
Mockups
Product photography
Fashion & Product Retouching
E-commerce and fashion often require editing outfits or product details without compromising realism. High input fidelity ensures fabric textures, patterns, and logos remain consistent.
Example use cases:
- Outfit variations: Change the color or style of clothing on a model photo.
- Accessory addition: Add jewelry, hats, or other accessories to a model photo without altering their pose or face.
- Product extraction: Show the same product or outfit in new settings while keeping details intact.
Outfit variations
Accessory addition
In this example, we'll combine 2 input images. The image containing the face should be provided as the first input as more details are retained from the first image.
Product extraction
Wrapping up
In this guide, we covered how to enable high input fidelity to better preserve important visual details from input images.
Use the example use cases above as inspiration, and try the parameter with your own images to see where high input fidelity makes the biggest difference.
Keep in mind that high input fidelity consumes more image input tokens than the default. Also, while all input images are processed with high input fidelity, the first image in the list preserves the finest detail and richest texture, which is especially important for faces.
Happy building!