# Gemini API: models.get returns 200, but generateContent returns 404

**URL:** <https://discuss.ai.google.dev/t/gemini-api-models-get-returns-200-but-generatecontent-returns-404/199058>\
**Category:** Gemini API\
**Tags:** api\
**Created:** [November 8, 2026, 6:13pm UTC](https://discuss.ai.google.dev/t/gemini-api-models-get-returns-200-but-generatecontent-returns-404/199058 "2026-11-08T18:13:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zsolt\_Ujkery](https://d1dlmcr85iqnpo.cloudfront.net/user_avatar/discuss.ai.google.dev/zsolt_ujkery/32/167117_2.png) [@Zsolt\_Ujkery](https://discuss.ai.google.dev/u/Zsolt_Ujkery)\
**Post date:** [November 8, 2026, 6:13pm UTC](https://discuss.ai.google.dev/t/gemini-api-models-get-returns-200-but-generatecontent-returns-404/199058/1 "2026-11-08T18:13:57Z")

</div>

Hello,

I am experiencing an issue with the Gemini Developer API.

**Environment:**

- Model: `gemini-2.5-flash-lite`

- API version: `v1beta`

- Python: 3.13.14

- Google GenAI SDK: 2.34.0

- Authentication: `GEMINI_API_KEY`

- Vertex AI: disabled

**Issue:**

- `models.get` returns HTTP 200 OK.

- The model’s `supported_actions` includes `generateContent`.

- `models.generate_content` returns HTTP 404.

The generation request contains only a simple text prompt. The model name, endpoint, request body, and SDK configuration were checked locally and appear correct.

Both operations use the `GEMINI_API_KEY` environment variable.

Could you please investigate whether there is a model availability, project access, or server-side routing issue?

Thank you for your assistance.

---

<div class="post-metadata">

**Author:** ![PavelTkachyk](https://d1dlmcr85iqnpo.cloudfront.net/user_avatar/discuss.ai.google.dev/paveltkachyk/32/162255_2.png) [@PavelTkachyk](https://discuss.ai.google.dev/u/PavelTkachyk)\
**Post date:** [November 10, 2026, 4:54pm UTC](https://discuss.ai.google.dev/t/gemini-api-models-get-returns-200-but-generatecontent-returns-404/199058/2 "2026-11-10T16:54:17Z")

</div>

Hi,

The request you are making is most likely fine.  
models.get just reads out the public model catalog, so it returns 200 and lists generateContent for any valid key

For some reason access to the 2.5 models is limited to projects that have used them before. Google’s Deprecations page in the AI Studio docs describes this.  
So on a new project or a new key you will get a 404 error when trying to call generateContent with gemini-2.5-flash-lite, even if the model itself is not deprecated.

Google staff gave this same answer in two similar threads here in the last week or so (197464 and 197853)

The fix for this is to change the model name you are using to either gemini-3.5-flash-lite (the lite tier, so likely the closest) or gemini-3.8-flash  
Only the model name should need to change, though check the output and pricing

Google staff say failed 4xx requests are not billed
