You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 16, 2025. It is now read-only.
Repository navigation
This repository was archived by the owner on Dec 16, 2025. It is now read-only.
404 Not Found for generateContent despite exhaustive debugging (Server-Side Issue) #746
I am experiencing a persistent 404 Not Found error when trying to use the generateContent method with both gemini-1.0-pro and gemini-pro models. My region is India.
When I run genai.list_models(), the output correctly shows that I have access to these models.
However, any script that calls model.generate_content() or chat.send_message() fails with this error:
404 models/gemini-pro is not found for API version v1beta, or is not supported for generateContent.
I have performed exhaustive troubleshooting, including:
A full, clean reinstallation of the google-generativeai library using pip cache purge.
Verifying the environment variable is set and read correctly.
Generating a brand new API key within a brand new Google Cloud project.
Triple-checking the Python code for any typos.
The issue persists across all attempts. This proves the issue is server-side and specific to my account/region, where requests are being incorrectly routed to the v1beta API.
Activity