What the error looks like
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.
FAQ
Will a new key or a new project in AI Studio help?
Will a new key or a new project in AI Studio help?
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.
Is this the same error as “not available in your region” in AI Studio?
Is this the same error as “not available in your region” in AI Studio?
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.
Is this the original Gemini?
Is this the original Gemini?
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.