Describe Any Change

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'

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?