Gemini API location error from Seoul server, same key works locally

Hello,

I’m receiving this error when calling the Gemini API directly from my Tencent Cloud server:

HTTP 400
FAILED_PRECONDITION
“User location is not supported for the API use.”

Environment:

  • Tencent Cloud Lighthouse
  • Server region: Seoul, South Korea
  • Public IPv4: 43.155.220.89
  • Ubuntu 24.04, Python 3.12.3
  • Model tested: gemini-3-pro-image
  • Python urllib.request.getproxies() reports no proxy configuration.
  • IPinfo identifies the public IPv4 as Seoul, South Korea.

The same API key and model work on my Mac through a VPN connection. Both the deployed application and a standalone Python urllib request fail on the server with the location error above.

I believe the billing profile associated with my API credit purchases is registered in Hong Kong, but I have not verified the exact billing configuration.

Could you help clarify:

  1. Could the billing profile region cause this difference between local and server requests?
  2. Could Google be classifying the server’s IP as an unsupported location?
  3. What diagnostic information should I provide to investigate this?

I have attached a screenshot of the error. No API key is included.

Thank you.

Hello @gaze_lee ,

Please try the below steps:

  • Make sure you’re in one of the supported regions.

  • Turn off any VPN, proxy or iCloud Private Relay, and connect directly.

  • Make sure you’re 18 or older and have verified your age.

  • Try a different network, for example your phone’s hotspot.

If none of these help, please share the details using this form so we can investigate further: Gemini API & Google AI Studio Location Issue Report

Thank you. I have already submitted the Location Issue Report form.

The failed requests were sent directly from my Tencent Cloud server in Seoul, South Korea. Python detected no proxy configuration on that server. The VPN mentioned in my original post was used only on my Mac, where the same API key and model worked successfully.

I have since refunded the server, so I can no longer run additional tests from its original IP, 43.155.220.89.

Could you please review the submitted report and clarify whether the rejection relates to the server IP classification or account/billing eligibility? My billing profile is believed to be registered in Hong Kong.