Does gemini-2.5-flash-image support Structured Output or not?

Doc says yes supported @https://ai.google.dev/gemini-api/docs/models#gemini-2.5-flash-image

but when making api call, it throws `400 error: JSON mode is not enabled for this model`

1 Like

Hii @wenhui_luo
Welcome to the AI Forum!!!

Yes, The Gemini-2.5-flash-image supports structured output. Could you please share the full payload details along with some sample of the code which you are using? We would like to reproduce the issue.
In the meantime, could you try running it with the Gemini-2.5 model? If you still encounter the problem, please let me know.

1 Like