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
@A Desa Could you please share which location is your project created on?
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?
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?
Tested it with a direct API call using FlutterFlow and the Gemini API service worked.
Doesn't feel like it's an issue with the API as it works directly and via FlutterFlow too.
Can you try generating a new API key? We tested with different location project, it is working with all.
I think gemini is sensitive to where the request to it's service is originating as they don't support all countries yet.
OK, thanks.
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.
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.