Edit images using an API

Hey everyone!

I have a question – is it possible to edit images using an API, for example, with the Gemini 2.0 Flash Experimental model? I’d like to upload a picture of my hand, specify in the API request to generate a tattoo on it, and receive the output as an image.

Has anyone tried something similar or knows if this is possible?

Thanks in advance for any insights! :blush:

Hi @Krzysztof1, It is possible to pass an image to the model and you can add a prompt describing how the image should be modified. while trying to generate the image as output, you have to define the resopnse_modalities to image. For your use case please refer to this gist for code example. Thank You.