Gemini Developer API generateContent returns 404 although models.list reports gemini-2.5-flash with generateContent support

Hello,

I am experiencing a persistent issue with the Gemini Developer API where generation requests fail even though the API, model, authentication, and quota appear to be available.

The issue has persisted across different Google Cloud projects, API keys, models, SDK calls, and direct REST calls.

Environment:

  • Gemini Developer API
  • Python google-genai: 1.75.0
  • Model used for the main reproduction: gemini-2.5-flash
  • Free tier
  • Vertex AI: not used
  • Custom endpoint: not used

Current reproduction with a newly created Google Cloud project:

  1. Created a new Google Cloud project.
  2. Imported it into Google AI Studio.
  3. Created a new API key for that project.
  4. Confirmed that the Gemini API (generativelanguage.googleapis.com) is enabled.
  5. Confirmed that the project has free-tier quota for gemini-2.5-flash:
    • RPM: 5
    • TPM: 250K
    • RPD: 20
  6. Called models.list() using the new API key.

Result:

  • models.list(): SUCCESS
  • gemini-2.5-flash: FOUND
  • generateContent is included in the model’s supported actions.

However, a minimal generateContent request fails.

SDK configuration:

  • Client: google.genai.Client(api_key=…)
  • Model: gemini-2.5-flash
  • Contents: a single short string
  • No config
  • No system instruction
  • No API version override
  • Vertex AI mode: false
  • No custom base URL

The SDK call returns an error, and Google AI Studio Usage reports:

HTTP 404 NotFound

I also tested the official REST endpoint directly:

POST
https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash:generateContent

with a minimal text-only request.

Result:

HTTP 404 NotFound

Therefore, the issue does not appear to be specific to the Python SDK.

I also tested the Interactions API with the same new project/API key/model.

Result:

HTTP 404 NotFound

Google Cloud Console confirms that the requests are reaching the Gemini API.

Under Gemini API > Metrics, the following method is recorded:

google.ai.generativelanguage.v1beta.GenerativeService.GenerateContent

For the reproduction requests:

  • Requests: 3
  • Errors: 100%
  • Average latency: approximately 0.056 seconds
  • 99th percentile latency: approximately 0.065 seconds

This suggests that the requests reach the GenerateContent service but fail almost immediately.

Additional context:

Before creating the new project, I was using an existing Gemini API project.

Generation had previously worked successfully in that project, including analysis of video segments.

Later, generation requests in the existing project began returning:

503 ServiceUnavailable

This also occurred with a very small text-only smoke test, so it did not appear to be related to video size or prompt size.

I then tested another model (gemini-2.5-flash) and also encountered generation failures.

To rule out a project/API-key-specific issue, I created the completely new Google Cloud project described above.

The new project behaves differently:

Existing project:

  • Generation previously worked.
  • Generation now returns 503 ServiceUnavailable.

New project/new API key:

  • models.list() succeeds.
  • gemini-2.5-flash is listed.
  • generateContent is listed as a supported action.
  • Gemini API is enabled.
  • Free-tier quota is available.
  • SDK generateContent returns 404.
  • Direct REST generateContent returns 404.
  • Interactions API returns 404.
  • Cloud Metrics confirms GenerateContent requests reach the service.

I also waited and repeated a single minimal recovery test later, but the new project still returned HTTP 404.

Could you please check whether there is a service-side, account-level, project provisioning, routing, or access issue affecting Gemini generation?

I can provide project IDs, timestamps, screenshots, or additional diagnostic information privately if needed.

For security reasons, I have not included any API keys in this post.

Thank you.

Additional diagnostic information:

I performed another recovery test using a different Gemini model and the actual video-analysis path that had previously worked successfully.

Test conditions:

  • API: Gemini Developer API
  • SDK: google-genai
  • Model: gemini-3.7-flash
  • Input: the same previously successful MP4 Part
  • Retry: disabled
  • Generation attempts: exactly 1

Result:

ATS_PART_RECOVERY_TEST: FAILED
DIAGNOSTIC_STATE: terminal
FAILURE_STAGE: generation
HTTP_STATUS: 503
SAFE_ERROR_CLASS: GEMINI_SERVICE_UNAVAILABLE
API_COMMUNICATIONS: 1

The request reached the generation stage, and the public HTTP status returned by the SDK was 503.

This is particularly interesting because I am now observing two different failures:

  1. Minimal text generation with gemini-2.5-flash:
    HTTP 404 Not Found

  2. A previously working video Part generation path with gemini-3.7-flash:
    HTTP 503 Service Unavailable

The video-analysis workflow and the same type of input had worked successfully before this issue started.

I have also already confirmed for the gemini-2.5-flash case that:

  • models.list() succeeds
  • gemini-2.5-flash is returned by models.list()
  • generateContent is listed as a supported generation method
  • the client is using the Gemini Developer API, not Vertex AI
  • no custom endpoint is configured
  • no API version override is configured
  • the issue was reproduced with a newly created Google Cloud project and a new API key
  • a direct REST generateContent request also returned HTTP 404

Because a previously working generation workflow is now also returning HTTP 503 with another model, I am wondering whether there may be an account/project provisioning or backend routing issue rather than simply an invalid model name or endpoint.

Could someone from the Gemini API team please check whether there is any known service-side, provisioning, or routing issue that could cause this combination of 404 and 503 responses?

Thank you.