Auth key can list models, but generateContent returns HTTP 404 NOT_FOUND for gemini-2.5-flash

Title: Auth key can list models, but generateContent returns HTTP 404 NOT_FOUND for gemini-2.5-flash

Hello,

I am encountering a reproducible HTTP 404 NOT_FOUND response when calling the Gemini GenerateContent API with a newly created Google AI Studio authorization key.

Environment:

  • Date tested: August 29, 2026

  • Client OS: Windows 10

  • Python: 3.14.7

  • Google Gen AI SDK: google-genai 2.20.0

  • Model: gemini-2.5-flash

  • API: Gemini Developer API / Generative Language API

  • Key type: Fresh authorization key created in Google AI Studio

  • Generative Language API: Enabled

  • Vertex AI environment configuration: Not enabled

  • HTTP proxy environment configuration: Not present

Successful verification:

  • GET /v1beta/models returned HTTP 200.

  • 53 models were returned.

  • gemini-2.5-flash was present.

  • The model advertised support for generateContent.

Failing verification:

The same operation through google-genai 2.20.0 also returned HTTP 404 with ClientError. A direct REST request reproduced the result, so the failure does not appear to be limited to the SDK.

Credential handling was independently verified: the same authorization key successfully completed Models List immediately before the GenerateContent tests. The key, request body, response body, project identifier, service-account identifier, and raw error message have not been disclosed publicly.

Could you please clarify:

  1. Whether authorization keys currently support the v1beta models.generateContent endpoint for gemini-2.5-flash.

  2. Why Models List succeeds while GenerateContent returns NOT_FOUND for the same key and project.

  3. Whether an additional IAM role is required for the service account bound to an authorization key.

  4. Whether authorization-key users must use a different endpoint or API operation.

  5. Whether this is a known issue with the current authorization-key rollout.

I can provide the project identifier and additional request metadata through a secure, non-public support channel if required.

Thank you.

Hello @H_I1 ,

To ensure reliable performance for everyone, we are limiting access to the 2.5 models to users who have actively used them in the past. These models are not deprecated and will continue to be served until further notice. For your new projects, please use our latest models of equivalent quality: 3.1 Flash-Lite or 3.5 Flash. This helps us maintain sufficient capacity for both ongoing legacy workflows and new applications.

Hi @Pooja_Kapse,

Could I check whether your comment that the 2.5 models are “not deprecated and will continue to be served until further notice” applies specifically to the Gemini Developer API, rather than to usage through Vertex AI / the Agent Platform Gemini API?

I’m trying to reconcile the current Google documentation for gemini-2.5-flash-lite.

The Gemini API deprecations page currently says there is no shutdown date announced, along with what you have just said https://ai.google.dev/gemini-api/docs/deprecations#gemini-2.5-flash-models . Whereas the Google Cloud Model Versions and Lifecycle page lists a retirement date of October 20, 2026 for gemini-2.5-flash-lite. Model versions and lifecycle | Gemini Enterprise Agent Platform | Google Cloud Documentation

Could you confirm whether gemini-2.5-flash-lite used through Vertex AI / Agent Platform is still expected to retire on October 20, 2026, or whether the “until further notice” statement also applies there?

Thanks — I’m mainly trying to establish which lifecycle date applies depending on the API provider.