Create a picture of my cat eating a nano-banana in a fancy restaurant under the gemini constellation """ image = Image.open('/path/to/image.png') # Start the generation job response = client.models.generate_content( model="gemini-2.5-flash-ima

Create a picture of my cat eating a nano-banana in a fancy restaurant under the gemini constellation

“”"

image = Image.open(‘/path/to/image.png’)

Start the generation job

response = client.models.generate_content(

model="gemini-2.5-flash-image-preview",

contents=[prompt, image],

)

for part in response.parts:

if part.text:

print (part.text)

elif image:= part.as_image():

image.show()

image.save("generated_image.png")