Generate image error continuously

Generating image using API keeps getting errors

client.Models.GenerateContent error: Error 500, Message: An internal error has occurred. Please retry or report in https://developers.generativeai.google/guide/troubleshooting, Status: INTERNAL, Details:

ModelName: gemini-3-pro-image-preview
prompt length = 424 characters.

any suggestions and solutions are highly appreciated.

Hi @Sty
500 errors can often be intermittent. Are you experiencing this issue continuously?

I successfully ran the code snippet provided in the documentation (https://ai.google.dev/gemini-api/docs/image-generation#use-with-grounding) without encountering any issues.

If the problem persists, please share your code snippet so I can attempt to reproduce the error on my end.
Thanks

I do get a lot of 500 errors. I really like the results of gemini-3-pro-image-preview. But the 500 errors make it really unreliable and u workable.

My site mijneigenboekje.nl uses the images, but this way I cant make it work..

Someone better luck with batches, is that more reliable?

Or use vertex ai?

Hi,

Could you please let us know your input context?

Thank you!