The image API response is often missing the content or data field.

I’m using the gemini-2.5-flash-image model to generate images, and very frequently the returned result doesn’t contain either the content or data field. If I retry the exact same code and prompt without any changes, it usually succeeds. What’s going on here?