I'm following this tutorial to generate images using Google's Gemini API. However, when I try to run the code, I get the following error:
ClientError: 404 NOT_FOUND. {'error': {'code': 404, 'message': 'Publisher Model `projects/project_id/locations/us-central1/publishers/google/models/gemini-2.0-flash-exp-image-generation` not found.', 'status': 'NOT_FOUND'}}
The only difference from the tutorial is that I'm instantiating the client like this:
client = genai.Client(vertexai=True, project=PROJECT_ID, location=LOCATION)
Has anyone encountered this issue before? Is this model currently available, or do I need to enable something specific in my Google Cloud project?
Any help would be greatly appreciated! Thanks in advance.