How do I edit an image through the prompt

hello, how do I edit an image through the prompt without using mask.
I’ve tried several ways.

I used this way:

curl -H 'Authorization: Bearer sk-***uPb' https://api.openai.com/v1/images/edits --form 'image=@"./tmp/selfie.png"' --form 'prompt="replace background to river and use watercolor style for photo"' --form 'size="256x256"' --form 'n=1'

I already typed some commands in the prompts but nothing changed.

What I want to do to be objective, I need to upload 1 image and through the prompt, example: ‘change background to a beach background’ it can be changed.

thanks

It seems like the API docs are implying you could use just a purely transparent image, to mask your entire image. That’s such a trivial case however it seems like it would be built-in (and not requiring this separate image) doesn’t it?

1 Like

Thank you very much for the answer, so I saw this ‘mask’, I already sent it transparently, but it didn’t actually execute the command I gave.
As I said, my desire is to upload an image and through that image I was able to change that image through the prompt command.
example: I uploaded the image. prompt: change the background to a beach background. But it doesn’t happen :confused:

It’s not possible with DALLE3 API at this time.

2 Likes

Thank you very much for responding, not even in DALL-E-2?

Edit endpoint is still available in DALLE2, but you need to send the mask to tell it what/where to replace along with the original image.

2 Likes

Hello @PaulBellow , thank you very much for the answer, I am not able to change the main image, I am passing the transparent mask (without anything) and passing commands at the prompt, but the main image is not being changed, for example:

image

1 Like

This doesn’t work the way you think it works, I believe?

Can you post the image and mask?

The mask should be the original image with the part you want replaced cut out.

You can’t guide where to replace with text (at this time)…

1 Like

OK, I’ll give you an example of what I want to happen.
first image:
image

mask: transparent

Maybe you question me, but the mask has nothing, but that’s it, I don’t want the mask to have no influence, I want the prompt to have the effect I want.

I repeat, what I want to do, use some API to edit images.
example: I upload the image and through the prompt I change the image. prompt: change the background to the background of a beach he runs.

The generated photo will be the photo I uploaded and the beach background.

hi,
same here: the generated photo is the same as the original.
Have you found a solution?
Thanks for help