Gemini API location support

{ “error”: { “code”: 400, “message”: “User location is not supported for the API use.”, “status”: “FAILED_PRECONDITION” } }, from the docs Ghana is a supported country so why am getting this error? it works well on localhost though, but i get this error after hosting it

Odd, it does say that Ghana is a supported country. Are you using a VPN or a tunnel network?

Thank you for your response. I recently hosted my application and I’m not familiar with the specific configurations or setups being used by my hosting provider. Could you please provide more information or guidance on how to determine if a VPN or tunnel network is being used? I appreciate any insights you can offer to help troubleshoot the issue.

I understand that you can run API requests manually but encounter issues when you run them on a Cloud server. This could be due to the location of your servers. May I know the cloud provider you are using? You can try changing the location of your server and check where it is being hosted. Please note that currently, hosting in the EU is not allowed.

1 Like

To use Gemini in the EU, you can use Google Cloud Belgium (europe-west1).

Thank you for the clarification, I will take actions on your suggestions. Please I’m using ovationhall.com

Thank you very much for the support.

1 Like