Gemini API suddenly returns "User location is not supported" after enabling Billing, and AI Studio cannot list projects

Hello,

I encountered an issue with the Gemini API today.

Timeline:

  1. I created a new Google Cloud Project.
  2. Enabled Billing successfully.
  3. Created Gemini API keys.
  4. Initially, everything worked correctly:
    • Google AI Studio could access my project.
    • API keys were created successfully.
    • Gemini API requests worked.

About one hour later, the following issues suddenly appeared:

  1. Google AI Studio now shows:

Failed to list imported projects: permission denied.
Please try again.

  1. Both Gemini models return the following error:

Error 400
User location is not supported for the API use.
FAILED_PRECONDITION

Environment:

Could you please help determine whether this is a temporary backend issue, an account region restriction, or a project permission problem?

Thank you.

Are you using a VPN or a VPS? Some VPSs and VPNs are banned by Google Cloud services.

Hi, thanks for your reply.

Yes, I am using a VPN with a US IP address (Los Angeles).

I checked my IP using ipinfo .io, and it shows:

  • Country: United States
  • City: Los Angeles
  • ISP: HostPapa

The strange part is that everything worked normally for about one hour after I enabled billing and created the API key. Then suddenly:

  • Google AI Studio started showing “Failed to list imported projects: permission denied.”
  • Both Gemini 2.5 Flash and Pro APIs began returning:
    User location is not supported for the API use.

I haven’t changed the VPN or my IP during this time.

Do you think this IP might have been blocked, or could this be an issue with my Google account or project?

Since it worked initially and then stopped without any configuration changes, I’m wondering if this could be a temporary backend issue or a false regional detection.

I can’t comment much on the VPN usage, but it is possible that your connection leaked your source IP, which is not supported by Gemini during the authentication. My advice is to tunnel all your connections to the VPN or try changing the VPN server. “Technically,” users are not allowed to access Gemini via a VPN.

Thank you for your reply.

I am using a US VPN and my public IP is located in Los Angeles (verified via ipinfo..io).

Everything worked correctly for about one hour after enabling billing and creating the API key, then it suddenly started returning “User location is not supported” and AI Studio could no longer list my projects.

I will test another VPN server and also check for possible DNS/IP leaks. Thank you for the suggestion.

Hello @yixin ,
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.