API Access Issue: 404 Not Found for all Gemini Models

I am writing to report a critical issue with my Google Cloud project. I am unable to access any Gemini generative models via the Generative Language API, consistently receiving a 404 Not Found error.

Here is a summary of the situation and the steps I have already taken:

  1. Billing is Active: My billing account is fully activated and linked to the project. I have received the confirmation email (“Thanks for activating your full account”).

  2. API is Enabled: In the Google Cloud Console, the “Gemini API” / “Generative Language API” is marked as “Enabled” for my project.

  3. Code is Correct: The issue persists even with a minimal, standalone Python script using the official google-generativeai library.

  4. New Project & Key: I have tried creating a completely new project and a new API key from the Google AI Studio, but the error remains the same.

  5. Library is Updated: My google-generativeai Python library is updated to the latest version.

Despite all of the above, every API call to generate content fails. A diagnostic script shows failures for gemini-1.5-pro, gemini-1.5-flash, and even the basic gemini-pro model.

Here is the complete error message returned by the server:

google.api_core.exceptions.NotFound: 404 Publisher Model `.../models/gemini-1.5-pro...` was not found or your project does not have access to it.

And for the gemini-pro model, the error is:

google.api_core.exceptions.NotFound: 404 models/gemini-pro is not found for API version v1beta, or is not supported for generateContent.

The UI shows that everything should be working, but the API server is denying access. This suggests a potential regional restriction or a provisioning issue with my account.

Could you please investigate why my project is not authorized to use the generateContent method for any Gemini models, despite the API being enabled and the billing account being active?

For Gemini models on Google Cloud, please try one of the active models: Gemini 2.5 Flash  |  Generative AI on Vertex AI  |  Google Cloud ? Model gemini-1.5-pro, gemini-1.5-flash are no longer available for new projects/users.

2 Likes

I am having the same issue, al already I have already verified the following on my own:"

  • Billing is active and linked to the project.

  • The “Vertex AI API” is shown as “Enabled” in the console.

  • My user account has the “Vertex AI User” and “Owner” roles for this project.

  • I am using a fresh OAuth 2.0 access token for authentication.

Can someone really help us with this?