# Persistent 404 Error for gemini-1.5-flash via Generative Language API (Next.js SDK)

**URL:** <https://discuss.ai.google.dev/t/persistent-404-error-for-gemini-1-5-flash-via-generative-language-api-next-js-sdk/144670>\
**Category:** Gemini API\
**Tags:** gemini-flash\
**Created:** [May 13, 2026, 11:56am UTC](https://discuss.ai.google.dev/t/persistent-404-error-for-gemini-1-5-flash-via-generative-language-api-next-js-sdk/144670 "2026-05-13T11:56:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![David\_Manneveau](https://d1dlmcr85iqnpo.cloudfront.net/user_avatar/discuss.ai.google.dev/david_manneveau/32/121432_2.png) [@David\_Manneveau](https://discuss.ai.google.dev/u/David_Manneveau)\
**Post date:** [May 13, 2026, 11:56am UTC](https://discuss.ai.google.dev/t/persistent-404-error-for-gemini-1-5-flash-via-generative-language-api-next-js-sdk/144670/1 "2026-05-13T11:56:43Z")

</div>

I am consistently receiving a 404 error when trying to access `gemini-1.5-flash` using the `@google/generative-ai` SDK in a Next.js environment. Despite verified configuration, the model is reported as “not found”.

**Technical Details:**

- **SDK:** `@google/generative-ai` (latest)

- **Environment:** Node.js (Next.js 14/15)

- **Endpoint called by SDK:** `https://generativelanguage.googleapis.com/v1beta/models/gemini-1.5-flash:generateContent`

- **Region:** France (EU)

- **Account Type:** Google Workspace account (`.org` domain)

**The Error Log:**

Plaintext

```auto
[GoogleGenerativeAI Error]: Error fetching from https://generativelanguage.googleapis.com/v1beta/models/gemini-1.5-flash:generateContent: [404 Not Found] models/gemini-1.5-flash is not found for API version v1beta, or is not supported for generateContent.

```

**Steps Already Taken:**

1. **API Key:** Verified valid. Read correctly by the server.

2. **API Activation:** “Generative Language API” is explicitly enabled in the Google Cloud Console for the specific project.

3. **Project Context:** Tried both an existing project and creating a brand new project via Google AI Studio.

4. **Models Tested:** Tried `gemini-1.5-flash`, `gemini-1.5-flash-latest`, and `gemini-pro`. All return 404.

5. **Cache:** Deleted `.next` folder and performed clean installs.

6. **Browser Direct Call:** Calling the models list via `https://generativelanguage.googleapis.com/v1beta/models?key=MY_KEY` returns an empty list or doesn’t show the flash models.

**Additional Context:** The project is currently listed under “No Organization” but the user account belongs to a Workspace domain. There seems to be a disconnect between the API being “Enabled” in the console and the models actually being provisioned for the API key.

Is there a known propagation delay or a specific regional restriction for Workspace-linked projects in France using the Generative Language endpoint?

---

<div class="post-metadata">

**Author:** ![Mahesh\_Sutar](https://d1dlmcr85iqnpo.cloudfront.net/user_avatar/discuss.ai.google.dev/mahesh_sutar/32/31644_2.png) [@Mahesh\_Sutar](https://discuss.ai.google.dev/u/Mahesh_Sutar)\
**Post date:** [May 21, 2026, 6:44am UTC](https://discuss.ai.google.dev/t/persistent-404-error-for-gemini-1-5-flash-via-generative-language-api-next-js-sdk/144670/2 "2026-05-21T06:44:25Z")

</div>

Hello @Desi_Garcia,  
Note that gemini-1.5-flash and gemini-1.5-flash-latest is deprecated and no longer supported. Try using the latest Gemini models listed at [https://ai.google.dev/gemini-api/docs/models](https://ai.google.dev/gemini-api/docs/models)
