A Desa
A Desa6mo ago

Gemini API location error

When I try to use the Gemini Text Editor node I get the following error { "error": { "code": 400, "message": "User location is not supported for the API use.", "status": "FAILED_PRECONDITION" } } If I run the code to connect to Gemini API from the command line using curl and the same API key, it is a success. The user location is also supported for API use as per the Google documentation.
9 Replies
Gaurav Chadha
Gaurav Chadha6mo ago
@A Desa Could you please share which location is your project created on?
A Desa
A Desa6mo ago
Thanks Gaurav. It's located at Europe West 4, if I understood it correctly. Does that help or do I need to share some additional details?
Gaurav Chadha
Gaurav Chadha6mo ago
If you try on Postman or any other api testing tool does it works? Checked on Europe West 4 and it worked, seems an issue with Gemini API service?
andy.d
andy.d6mo ago
Tested it with a direct API call using FlutterFlow and the Gemini API service worked.
A Desa
A Desa6mo ago
Doesn't feel like it's an issue with the API as it works directly and via FlutterFlow too.
Gaurav Chadha
Gaurav Chadha6mo ago
Can you try generating a new API key? We tested with different location project, it is working with all.
Tim Stewart
Tim Stewart6mo ago
I think gemini is sensitive to where the request to it's service is originating as they don't support all countries yet.
A Desa
A Desa6mo ago
OK, thanks.
Hamilton T da Silva
I have had a project with BuildShip since March/24. The Gemini API Call was working normally until 08/26/24. From 08/27/24 I am receiving this message from Gemini: "User location is not supported for the API use.".
I couldn´t find any issue with the API Call. If I remove the URL restriction on GCP, the same call from Insominia it works normally using the same ApiKey. UPDATE: Google solved.