Documentation Index

Fetch the complete documentation index at: https://cloudinary.com/documentation/llms.txt

Use this file to discover all available pages before exploring further.

Image & Video APIs

Generative replace

Last updated: Jul-22-2026

Use generative AI to replace objects in images with other objects.

Visualize product and design variations directly in context, such as different furniture in a room, an alternative outfit on a model, or a different item on a shelf, all from one base image. Marketing and merchandising teams can explore concepts quickly, without commissioning new photography for every idea.

See also

Explore the complete syntax and all options for this effect, or try it out on your own images in the Console:

Generative replace overview

Use natural language to describe what you want to replace in the image, and what to replace it with.

For example, replace "the picture" with "a mirror with a silver frame" (e_gen_replace:from_the%20picture;to_a%20mirror%20with%20a%20silver%20frame):

Original image with a picture on the wall Original image Picture replaced with mirror Picture replaced
with mirror

Preserve the shape of the object

If you want to maintain the shape of the object you're replacing, set the preserve-geometry parameter to true. For example, below, notice the difference between the position of the sleeves and neckline of the sweater, with and without preserving the geometry when the shirt is replaced with a cable knit sweater:

Comparison of with and without preserve-geometry

Replace shirt with sweater - compare with and without preserving geometry
Original image of a woman in a shirt Original Shirt replaced with sweater Geometry
not preserved
Shirt replaced with sweater Geometry
preserved

Limitations

  • The generative replace effect can only be used on non-transparent images.
  • The use of generative AI means that results may not be 100% accurate.
  • The generative replace effect works best on simple objects that are clearly visible.
  • Very small objects and very large objects may not be detected.
  • Don't attempt to replace faces, hands or text.
  • During processing, large images are downscaled to a maximum of 2048 x 2048 pixels, then upscaled back to their original size, which may affect quality.
  • There is a special transformation count for the generative replace effect.
  • The generative replace effect isn't supported for animated images or fetched images.
  • When Cloudinary is generating a derived version, you may get a 423 response returned until the version is ready. You can prepare derived versions in advance using an eager transformation.
  • When Cloudinary is generating an incoming transformation, you may get a 420 response returned, with status pending until the asset is ready.
  • If you're using our Asia Pacific data center, you currently can't apply the generative replace effect.

✔️ Feedback sent!

Rate this page:

one star two stars three stars four stars five stars