Unable to add Google API Key

but not sure when will be fixed

1 Like

I’m facing the same issue.

1 Like

relaoad worked but only for ask, if you switch to agent, issue persist

Can you give me a screenshot or how did you find the error pasted here? I am getting just “Unaurhozized User API key”

lol, they aren’t going to fix it.

Hey, which version of Cursor are you using? I just checked, and it’s fixed in version 0.48.6.

1 Like

Yes, just checked it on 0.48.6 and it doesn’t give the error anymore.

Idk if they would phase out personal API keys, that would be a horrible business decision.

Many people (myself included) have enterprise API keys through our employer which means the companies don’t include chats in training data and we’re generally required to use them for security purposes.

Please clarify.

Are you saying that you:

  • added Gemini API key
  • tried to verify, it failed
  • used Gemini models and it didn’t count towards your requests?

Yes exactly. Also, I don’t see the verification error in cursor 0.48.6

Yup I just saw that with the last update. The agent support with Gemini is trash but at least I can use my key now lol

Version: 0.47.8 (Universal)
VSCode Version: 1.96.2
Commit: 82ef0f61c01d079d1b7e5ab04d88499d5af500e0
Date: 2025-03-18T05:28:47.245Z
Electron: 32.2.6
Chromium: 128.0.6613.186
Node.js: 20.18.1
V8: 12.8.374.38-electron.0
OS: Darwin arm64 24.1.0

yes, yes and yes

When verify:

{
“error”: {
“code”: 404,
“message”: “models/gemini-1.0-pro is not found for API version v1beta, or is not supported for generateContent. Call ListModels to see the list of available models and their supported methods.”,
“status”: “NOT_FOUND”
}
}

curl https://generativelanguage.googleapis.com/v1beta/models/gemini-1.0-pro:generateContent -H “Content-Type: application/json” --header “X-Goog-Api-Key: ” --header “anthropic-version: 2023-06-01” -d ‘{
“generationConfig”: {},
“safetySettings”: ,
“contents”: [
{
“role”: “user”,
“parts”: [
{
“text”: “Testing. Just say hi and nothing else.”
}
]
}
]
}’

When just skip verify and try to use model in ask:

When I try do the same in Agent mode:

see above, this was fixed in 0.48.6

any version earlier than that is incompatible with Gemini API keys because the verification request is hardcoded and uses a depricated request

upgrade to > 0.48.6 and you’ll be able to add it

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.