# Invalid Model - The model gemini-\* does not work with your current plan or api key

**URL:** <https://forum.cursor.com/t/invalid-model-the-model-gemini-does-not-work-with-your-current-plan-or-api-key/44844>\
**Category:** Bug Reports\
**Created:** [January 25, 2025, 8:38pm UTC](https://forum.cursor.com/t/invalid-model-the-model-gemini-does-not-work-with-your-current-plan-or-api-key/44844 "2025-01-25T20:38:45Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![fireworks](https://avatars.discourse-cdn.com/v4/letter/f/59ef9b/32.png) [@fireworks](https://forum.cursor.com/u/fireworks)\
**Post date:** [January 25, 2025, 8:38pm UTC](https://forum.cursor.com/t/invalid-model-the-model-gemini-does-not-work-with-your-current-plan-or-api-key/44844/1 "2025-01-25T20:38:45Z")

</div>

The API key is correct and the model-name is also correct (actually a default one), but I get this error message. I can’t find any way to debug the request.

For example, `gemini-2.0-flash-exp` does not work (nor any of the other AI studio ones). I tried enabling/disabling the models, removing the key, and restarting/updating (on macOS, 0.45.3).

I pay for pro as well.

 ![image](https://us1.discourse-cdn.com/cursor1/original/3X/c/6/c6276a9a4f05bd676ffe79da21f28263191bd409.png)

---

<div class="post-metadata">

**Author:** ![deanrie](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/deanrie/32/1263_2.png) [@deanrie](https://forum.cursor.com/u/deanrie)\
**Post date:** [January 26, 2025, 8:17am UTC](https://forum.cursor.com/t/invalid-model-the-model-gemini-does-not-work-with-your-current-plan-or-api-key/44844/2 "2025-01-26T08:17:44Z")

</div>

Hey, it looks like you’re trying to use Composer, but your API keys only work in Chat. They don’t work in Composer.

---

<div class="post-metadata">

**Author:** ![fireworks](https://avatars.discourse-cdn.com/v4/letter/f/59ef9b/32.png) [@fireworks](https://forum.cursor.com/u/fireworks)\
**Post date:** [January 26, 2025, 2:31pm UTC](https://forum.cursor.com/t/invalid-model-the-model-gemini-does-not-work-with-your-current-plan-or-api-key/44844/3 "2025-01-26T14:31:16Z")

</div>

Nope I’m not just in Chat😅

---

<div class="post-metadata">

**Author:** ![fireworks](https://avatars.discourse-cdn.com/v4/letter/f/59ef9b/32.png) [@fireworks](https://forum.cursor.com/u/fireworks)\
**Post date:** [January 26, 2025, 9:22pm UTC](https://forum.cursor.com/t/invalid-model-the-model-gemini-does-not-work-with-your-current-plan-or-api-key/44844/4 "2025-01-26T21:22:49Z")

</div>

Just to confirm, this issue happens in the Chat tab (as seen in the attached picture).

 ![image](https://us1.discourse-cdn.com/cursor1/original/3X/3/d/3d11a81b8581438c569887eb2d570ec27516c6dc.png)

---

<div class="post-metadata">

**Author:** ![danperks](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/danperks/32/19087_2.png) [@danperks](https://forum.cursor.com/u/danperks)\
**Post date:** [January 28, 2025, 12:17pm UTC](https://forum.cursor.com/t/invalid-model-the-model-gemini-does-not-work-with-your-current-plan-or-api-key/44844/5 "2025-01-28T12:17:51Z")

</div>

Have you confirmed the key is working outside of Cursor?

---

<div class="post-metadata">

**Author:** ![fireworks](https://avatars.discourse-cdn.com/v4/letter/f/59ef9b/32.png) [@fireworks](https://forum.cursor.com/u/fireworks)\
**Post date:** [January 28, 2025, 5:35pm UTC](https://forum.cursor.com/t/invalid-model-the-model-gemini-does-not-work-with-your-current-plan-or-api-key/44844/6 "2025-01-28T17:35:52Z")

</div>

Yep, I have. It seemed to work for a request or two initially and then stop. But it works outside in several other applications + a very simple curl. Would be great if we could get a more specific error to debug—perhaps cursor isn’t properly saving/sending the key somehow.

---

<div class="post-metadata">

**Author:** ![danperks](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/danperks/32/19087_2.png) [@danperks](https://forum.cursor.com/u/danperks)\
**Post date:** [January 30, 2025, 12:39pm UTC](https://forum.cursor.com/t/invalid-model-the-model-gemini-does-not-work-with-your-current-plan-or-api-key/44844/7 "2025-01-30T12:39:47Z")

</div>

Good shout, will see if we can get this in an upcoming client update!

For now, can you confirm everything works if you clear the OpenAI key field, just to ensure the wrong key isn’t being used here?

---

<div class="post-metadata">

**Author:** ![fireworks](https://avatars.discourse-cdn.com/v4/letter/f/59ef9b/32.png) [@fireworks](https://forum.cursor.com/u/fireworks)\
**Post date:** [February 1, 2025, 9:21pm UTC](https://forum.cursor.com/t/invalid-model-the-model-gemini-does-not-work-with-your-current-plan-or-api-key/44844/8 "2025-02-01T21:21:38Z")

</div>

Thanks! Yeah still doesn’t work in this case 😕

---

<div class="post-metadata">

**Author:** ![danperks](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/danperks/32/19087_2.png) [@danperks](https://forum.cursor.com/u/danperks)\
**Post date:** [February 1, 2025, 11:23pm UTC](https://forum.cursor.com/t/invalid-model-the-model-gemini-does-not-work-with-your-current-plan-or-api-key/44844/9 "2025-02-01T23:23:31Z")

</div>

And this happens with every Gemini model?

---

<div class="post-metadata">

**Author:** ![fireworks](https://avatars.discourse-cdn.com/v4/letter/f/59ef9b/32.png) [@fireworks](https://forum.cursor.com/u/fireworks)\
**Post date:** [February 12, 2025, 12:15am UTC](https://forum.cursor.com/t/invalid-model-the-model-gemini-does-not-work-with-your-current-plan-or-api-key/44844/10 "2025-02-12T00:15:01Z")

</div>

Yes, it does not work for **any** gemini model. OpenRouter does work (e.g., through the OpenAI API settings) although the interface is terribly buggy and keeps overriding my settings after I save.

Please (please) take a look at the API Key settings if possible. I get the desire to have users pay directly instead of using the API but paying users want to use API keys as well. Gate the API keys behind the subscription even, just make it work. Each model name should map to a set of named credentials so that we can e.g., use openrouter AND openai, etc.

---

<div class="post-metadata">

**Author:** ![splitmoop](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/splitmoop/32/41132_2.png) [@splitmoop](https://forum.cursor.com/u/splitmoop)\
**Post date:** [April 9, 2025, 5:10am UTC](https://forum.cursor.com/t/invalid-model-the-model-gemini-does-not-work-with-your-current-plan-or-api-key/44844/11 "2025-04-09T05:10:28Z")

</div>

> [@fireworks](#):
>
> Each model name should map to a set of named credentials so that we can e.g., use openrouter AND openai, etc.

Yes! That would be perfect.
