Skip to content
This repository was archived by the owner on Dec 16, 2025. It is now read-only.
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

@atharvrana77811

Description

@atharvrana77811

Description of the bug:

Hello,

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.

Thank you for your help.

Image

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
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions