[Alpha] Describe Any Change

circle-exclamation

Overview

Describe Any Change allows you to automatically edit the input image by providing a textual description of the changes that you want to make.

For example, you can ask to add or remove objects from the image, change a color, etc.

To use Describe Any Change, set the parameter describeAnyChange.mode to ai.auto and use the parameter describeAnyChange.prompt to describe the changes:

(original image)

(edited image)

describeAnyChange.prompt="Change the shoes color to red"

describeAnyChange.prompt="Remove all the objects on the table"

describeAnyChange.prompt="Remove all the people"

If you want to give it a try, here's the code to reproduce the first example above:

curl --request POST \
  --url https://image-api.photoroom.com/v2/edit \
  --header 'Content-Type: multipart/form-data' \
  --header 'x-api-key: YOUR_API_KEY_HERE' \
  --form imageFile=@/path/to/image.png \
  --form removeBackground=false \
  --form referenceBox=originalImage \
  --form describeAnyChange.mode=ai.auto \
  --form describeAnyChange.prompt='Change the shoes color to red'

Examples of Use Cases

Product Staging

You can use Describe Any Change to place an item into a realistic lifestyle scene, like being held, worn, or placed on a table.

To do so, set the following value for the argument describeAnyChange.prompt:

Here are examples of the results it can produce:

(original image)

(edited image)

If you want to give it a try, here's the code to reproduce the results above:

Ghost Mannequin

You can use Describe Any Change to place a piece of clothing on a ghost mannequin.

To do so, set the following value for the argument describeAnyChange.prompt:

Here are examples of the results it can produce:

(original image)

(edited image)

If you want to give it a try, here's the code to reproduce the results above:

Flat Lay

You can use Describe Any Change to generate a flay lay shot of a piece of clothing.

To do so, set the following value for the argument describeAnyChange.prompt:

Here are examples of the results it can produce:

(original image)

(edited image)

If you want to give it a try, here's the code to reproduce the results above:

Other Angle

You can use Describe Any Change to create a new image from a different angle.

To do so, set the following value for the argument describeAnyChange.prompt:

circle-info

If you need to create images from a specific angle, it can be achieved by editing the prompt to explicitly mention which angle should be used.

For example, by replacing "Change the camera angle and viewpoint (e.g., frontal to 3/4 view or side view, high to low angle, wide to tight)" with "Change the camera angle and viewpoint to a 3/4 view".

Here are examples of the results it can produce:

(original image)

(edited image)

If you want to give it a try, here's the code to reproduce the results above:

Additional Parameters

describeAnyChange.seed

If you make several calls to the Image Editing API with the same image and prompt, you will notice that it will generate a different edited image image every time.

In order to reduce the randomness, you can set a fixed value for the seed that the API's random generator will use. The value of the argument describeAnyChange.seed can be any positive integer.

If you provide a value for describeAnyChange.seed, then the API should produce similar-looking outputs for the same image and prompt.

Last updated

Was this helpful?