Gemini API: unsupported location error from Moldova server

Hello Gemini API team,

My server in Moldova receives HTTP 400 FAILED_PRECONDITION: User location is not supported for the API use.

Project ID: gen-lang-client-07306374..

Verified outbound IP: 91.229.239.25

Request: GET https://generativelanguage.googleapis.com/v1beta/models?pageSize=1000

Gemini API is enabled, the key is restricted to this API, and Cloud Billing is linked. Authentication uses x-goog-api-key. No key is included here.

Moldova is listed in your supported regions:

Please check IP geolocation for 91.229.239.25 and advise what causes this rejection. Thank you.

Hello @ShurrScenic ,

This could be specific to your IP address. Please report it on our Report IP problems page. Suggested workarounds which may help for now:

  • Try temporarily switching to a different network (e.g. try with the hotspot from your phone if available).

  • Try asking your host for a new IP.

  • Trying switching between IPv6 / IPv4.

Thank you for your guidance.

The requests originate from a VPS hosted in Moldova, with public IPv4 address 91.229.239.25. The Gemini API returns “User location is not supported for the API use.”

Since the application runs on the VPS, switching my personal device to a mobile hotspot would not change the server’s outbound IP. We will check IPv6 connectivity and contact our hosting provider about an alternative IP.

Could you confirm whether the “Report IP problems” form can help correct IP geolocation used by the Gemini API, or whether there is a separate support channel for this?

Thank you for your help.

Sorry for the very late response, we’ve been checking into multiple related issues. From the sound of it, your VPS is being misidentified as being from an unsupported country. The fastest solution may be to try a different VPS. Otherwise you can try the approaches below (although we can’t guarantee how long they will take or that they’ll be successful):