Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Gemini API suddenly reporting user location is not supported for the API use

After using Gemini API fine through a Google Cloud Node JS function, I'm suddenly getting "User location is not supported for the API use." I am using a US-based (us-central1) Google Cloud function to call the code, and currently based in the UK. This has all worked fine until the last day. I now get:

[GoogleGenerativeAI Error]: Error fetching from https://generativelanguage.googleapis.com/v1beta/models/gemini-1.5-flash:generateContent: [400 Bad Request] User location is not supported for the API use.

Has anyone else had this when both the US and UK are listed as supported  / any ideas why this might be happening please?

 

Very many thanks

Solved Solved
2 5 9,326
1 ACCEPTED SOLUTION

5 REPLIES 5