Skip to content

Bug: Gemini API consistently returns 404 Not Found for 'gemini-pro' on all projects despite correct configuration #481

@kalivissa

Description

@kalivissa

Description of the bug:

Hello,

I am experiencing a persistent 404 Not Found error when trying to call the Gemini API. This issue occurs across multiple projects and API keys, despite following all troubleshooting steps.

The Core Error:
When calling generateContent for the gemini-pro model, the API returns:
[404 Not Found] models/gemini-pro is not found for API version v1beta...

Comprehensive Troubleshooting Steps Taken:

  1. API Enabled: Confirmed "Generative Language API" is ENABLED in the Google Cloud project.
  2. Billing Enabled: Confirmed an active billing account is linked to the project. This was initially missing but has been corrected. The error persists.
  3. Multiple Models: The error occurs for both gemini-pro and gemini-1.5-flash-latest.
  4. Multiple Library Versions: The error occurs using both @google/generative-ai versions 0.15.0 and 0.12.0.
  5. New API Key: Created a brand new, unrestricted API key. The error persists.
  6. COMPLETELY NEW PROJECT: Created a brand new Google Cloud Project from scratch. Repeated all steps (Enable API, Link Billing, Create New API Key). The error STILL PERSISTS even in the new, clean project.
  7. Successful API Calls: Crucially, calls to the embedding model (gemini-embedding-001) from the same environment SUCCEED. The function can generate embeddings, but the generateContent call fails.
  8. Diagnostic Test: A minimal test function that only calls gemini-pro with a hardcoded prompt also fails with the exact same 404 error.
  9. Region: I am located in Greece (EU).
  10. Support Loop: I was unable to file a technical support case via the Cloud Console due to a permissions error. When I contacted support via my Google One subscription, they redirected me back to the Cloud Console, creating a support loop.

Conclusion:
This appears to be a fundamental account-level or regional provisioning issue that is preventing my account from accessing the generateContent method, regardless of project or API key. Please investigate.

Thank you.

Actual vs expected behavior:

No response

Any other information you'd like to share?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions