Skip to main content
Short answer: this error is returned by Google itself when a request to the Gemini API comes from a place that isn’t on its list of regions. What gets checked is the address the request came from, not the key: a new key or a new project won’t help. For the error to go away, the request has to reach Google from an address other than yours. That’s exactly how it works with a RuAPI key: you change the key and the address in your code, and the Gemini models stay the same — no VPN needed.

What the error looks like

In the SDK it comes as an exception with code 400 and the same text: User location is not supported for the API use.

Why it happens

  • Google checks where the request came from. If the address belongs to a region that isn’t on the Available regions for Google AI Studio and Gemini API list, the request is rejected before it reaches the model.
  • The error also happens on servers in supported countries. This is reported on Google’s developer forum (example).
  • A VPN is an unreliable workaround. Google blocks many VPN addresses too, and keeping a server running a program that needs Gemini behind a VPN is inconvenient.

What you can do

How to connect Gemini via RuAPI

1

Sign up

Sign up at www.ruapi.ai — with email, Google or Yandex.
2

Top up

Console → Wallet: USDT or USDC (TRC20 / BEP20 / Polygon; USDT also on TON), from 5 USDT. No USDT yet? Buy it with rubles via SBP (Faster Payments System). Cards from foreign banks (Visa / Mastercard) are accepted too.
3

Key

Console → API Keys → Create API key — you’ll get an sk-... string.
4

Update your code

Change the key and the address — the rest of the code stays as it was.
Which Gemini model to choose (Argon, Flash, Flash-Lite, Pro) is covered in the Gemini API guide.

FAQ

No. Google checks not the key but the address the request came from. From the same address, a new key will get the same error.
The cause is the same; only the place differs: in AI Studio it’s a message on the page, in the API it’s a 400 response. There’s a separate article about AI Studio: Google AI Studio: not available in your region.
Yes. These are Google’s original models — gemini-4-argon, gemini-3.8-flash and others — with no substitution and no quality cuts.

Next steps

Gemini API without a VPN

Connect in three steps, with Python and curl examples.

RuAPI error codes

400, 401, 403, 429 — what they mean and how to fix them.