Hi, I'm having an issue with multi-turn image editing on google/gemini-2.5-flash-image-preview.
- The first request to generate an image works correctly, even with
stream: true. - The second request, which includes the history of the first generated image for editing, fails to return a new image. The stream just ends without an image.
Here is the messages structure for my failing (second) request. Is this the correct format?
[
{
"role": "user",
"content": "Draw a cat"
},
{
"role": "assistant",
"content": [
{
"type": "image_url",
"image_url": {
"url": "<URL_of_the_first_generated_image>"
}
}
]
},
{
"role": "user",
"content": "Now, change it to a 3D style"
}
]
Is this a known issue, or am I formatting the assistant message history incorrectly for your API? Thanks.