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:
- Created a new Google Cloud project.
- Imported it into Google AI Studio.
- Created a new API key for that project.
- Confirmed that the Gemini API (generativelanguage.googleapis.com) is enabled.
- Confirmed that the project has free-tier quota for gemini-2.5-flash:
- RPM: 5
- TPM: 250K
- RPD: 20
- 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.