Title: API Key returns 404 (Model not found) even though the model is listed in ListModels and works in Playground

**This Topic by Gemini (I Cannot English)

Body:** I am experiencing a consistent 404 error when calling the Gemini API from Google Apps Script, despite the setup being correct.

  1. Project Status: Newly created project in Google AI Studio.

  2. Environment: Individual @gmail.com account.

  3. The Issue: > - gemini-1.5-flash returns 404 “model not found” via API (v1/v1beta).

    • However, the same model works perfectly in the AI Studio Playground.

    • Calling GET https://generativelanguage.googleapis.com/v1beta/models returns the model in the list, but direct calls still result in 404.

  4. Outcome: After repeated project recreations and waiting, I started receiving 429 (Quota Exceeded) errors with limit 0, suggesting a sync issue between the project and API quota/capabilities.

This behavior is extremely confusing for developers. Please investigate the sync latency between AI Studio projects and the Generative Language API endpoints.

Update: Resolved

I finally managed to resolve this issue.

The solution: Even though gemini-1.5-flash was listed in the ListModels response, calling it via the API resulted in a consistent 404 error. However, when I changed the model endpoint to gemini-flash-latest, the API started responding correctly and the 404 error disappeared.

Observation: It seems there is a significant synchronization delay or a naming discrepancy for new projects/accounts between the backend model list and the actual API endpoints. For those experiencing “404 Model Not Found” despite the model being active in the Playground, using the -latest alias (e.g., gemini-flash-latest or gemini-2.0-flash) might be a viable workaround.

I hope this information helps the development team improve the sync reliability for new API keys.