models/gemini-2.0-flash-preview-image-generation is not found for API version v1main, or is not supported for predict. Call ListModels to see the list of available models and their supported methods
gemini-2.0-flash-exp-image-generation is also not available, but imagen-3.0-generate-002 is.
Please let me know whether we can expect this on the OpenAI compatible API at
Hi @ktc, Thanks for reporting this. while using 2.0 flash preview image generation model to generate images with open ai library has encountered the same error. will bring this to the engineering team attention. Thank You.
Further insights from looking at the ListModels response and the error message about predict:
I believe gemini-2.0-flash-preview-image-generation requires me to call generateContent via the client.chat call whereas imagen-3.0-generate-002 uses predict via the client.images.generate call.
Using the former with the model works, but there’s no way to specify the response modality to return images in the OpenAI-compatible API, with the following error messages: