# Gemini API Free Tier: Regional and API-Key Access Errors

> Gemini API key free-tier access errors: distinguish 403 Access Restricted, 400 FAILED_PRECONDITION, and 403 PERMISSION_DENIED by their messages and conditions.

Source: https://ailoot.ai/blog/en/gemini-api-access-errors/
Canonical: https://ailoot.ai/blog/en/gemini-api-access-errors/
Language: en
Publisher: Ailoot (https://ailoot.ai/)
Translation: guide-096
Revision: sha256-a666f98727a5d9cba19fddfc4c18abbac5fb1f0ea82ca701735ad3311fbcba7e


But not every Gemini error is about your region. One concerns the free tier, another the API key itself. And for coding, Gemini feels a bit dim to me, even though I have given it a second chance more than once.

I will explain how to tell what happened from the error message, and what to use instead of Gemini. Let's go.

For information on using the service, see the [Ailoot documentation](https://ailoot.ai/docs/).

<div class="aside" data-semantic="key-takeaway" role="note" aria-label="Key takeaway for this section">

Key takeaway

403 Access Restricted means the access terms have been violated. 400 FAILED_PRECONDITION means the free tier is unavailable in the country. 403 PERMISSION_DENIED with a message about key permissions means the wrong key. For coding, use Claude Code; if that does not work out, use Codex, then Qwen or DeepSeek.

</div>

## How can I check whether Gemini API is available in my region?

Google maintains a separate page listing where Gemini API and Google AI Studio work:

<figure>
<blockquote>
<p>The Gemini API and Google AI Studio are available in the following countries and territories. If you're not in one of these countries or territories, try the Gemini API in Gemini Enterprise Agent Platform</p>
</blockquote>
<figcaption>https://ai.google.dev/gemini-api/docs/available-regions</figcaption>
</figure>

Translation: “Gemini API and Google AI Studio are available in the following countries and territories. If you are not in one of them, try Gemini API in Gemini Enterprise Agent Platform.”

The list contains 230 entries, from Albania to Åland Islands. Gemini Enterprise Agent Platform is a Google Cloud platform.

If you are redirected to this page instead of AI Studio, Google gives 3 reasons: your region, being under 18, and an unverified age in your Google account.

## 403 Access Restricted: what does your region have to do with it?

Google describes it like this:

<figure>
<blockquote>
<p>If you see a 403 Access Restricted error, you are using Google AI Studio in a way that does not follow the Terms of Service. One common reason is you are not located in a supported region.</p>
</blockquote>
<figcaption>https://ai.google.dev/gemini-api/docs/troubleshoot-ai-studio</figcaption>
</figure>

Translation: “If you see a 403 Access Restricted error, you are using Google AI Studio in a way that violates the Terms of Service. One common reason is that you are not in a supported region.”

Your region is one of 4 checks. The other 3 are:

- the request must pass automated safety checks;
- you must accept Google's Terms of Service and the additional terms for generative AI;
- the Google Cloud project must not be flagged for violations.

## 400 FAILED_PRECONDITION and the free tier

This error is about money. Here is its message in the Gemini API error table:

<figure>
<blockquote>
<p>Gemini API free tier is not available in your country. Please enable billing on your project in Google AI Studio.</p>
</blockquote>
<figcaption>https://ai.google.dev/gemini-api/docs/generate-content/api-errors</figcaption>
</figure>

Translation: “The Gemini API free tier is not available in your country. Enable billing for your project in Google AI Studio.”

Google recommends enabling a paid plan in AI Studio. But this only works for countries on the list.

## Gemini API key permissions: what does 403 PERMISSION_DENIED mean? {#403-permission_denied-read-the-message}

The number is the same, but the message in the error table is different:

<figure>
<blockquote>
<p>Your API key doesn't have the required permissions.</p>
</blockquote>
<figcaption>https://ai.google.dev/gemini-api/docs/generate-content/api-errors</figcaption>
</figure>

Translation: “Your API key does not have the required permissions.”

According to Google, the reasons are that you picked the wrong key or are accessing a fine-tuned model without the required authorisation. Check that the key is correct and has access.

But in AI Studio, the same PERMISSION_DENIED also occurs during the region check: Google describes this on the page about the 4 checks. So read the message. If it mentions key permissions, check the key. If it mentions your region, the key has nothing to do with it.

## Is Gemini worth sticking with?

For coding, I do not think so. I have Gemini on the highest-tier plan, but I do not build programs with it. I use it for videos and photos. I spent a month working in Google Antigravity, Google's program for working with code, and still went back to VS Code.

It does not matter that Gemini can keep 1 million tokens in its head: it is a bit less smart than ChatGPT. Antigravity is not dumb, and I like it, but the quality is still much worse, unfortunately. If nothing else is available, it will do: having something is better than nothing.

Where Gemini is good is deep research on a topic online. It is Google, after all: it gobbles up every website, and every website lets it in. That is why I run this kind of research in Gemini rather than Claude: Claude is expensive and will chew through a lot of tokens. But bear in mind that Gemini writes a lot, at length, and cannot pull out the key point.

## What to use instead of Gemini

My order is as follows. Claude Code—because it is simply smarter. Why choose a less intelligent model when the smartest one is available? If there is no way to make it work, use ChatGPT Codex: it is easier to get access and there are fewer blocks. If that does not work either, there are Chinese models.



**Qwen.** Qwen is a Chinese model. It trails Opus, Claude's strongest model, by around 10%; it is fairly good, but slow. I use it too, mainly to check code for bugs. I explained how to set it up [in a separate article](https://ailoot.ai/blog/en/qwen-code-token-plan-setup/).

**DeepSeek.** This is a Chinese platform. But it cannot handle a task lasting several hours: I tried it, and it breaks along the way. I explained how it differs from ChatGPT [in a separate article](https://ailoot.ai/blog/en/chatgpt-vs-deepseek/).

I explained which model to choose for which task to avoid overpaying [in a separate article](https://ailoot.ai/blog/en/ai-model-for-each-task/).

## If Gemini is part of your product

Build in a fallback model from the start. In the case described, the official ChatGPT API was used, and the account was blocked: the service had processed a user's text containing offensive remarks. The user never even saw the block, because the service switched to a Chinese model when it received a refusal.

A similar breakdown of Claude Code's region error is [in a separate article](https://ailoot.ai/blog/en/claude-code-region-unavailable/).

If Gemini and Claude are unavailable in your region, compare the available alternatives for your task.

<div class="section" role="doc-bibliography" aria-label="Sources">

### Sources

- [Google: Available regions for Gemini API and Google AI Studio](https://ai.google.dev/gemini-api/docs/available-regions) - a list of 230 countries and territories, 3 reasons for being sent to the page, and Gemini Enterprise Agent Platform for countries outside the list.
- [Google: Troubleshoot Google AI Studio](https://ai.google.dev/gemini-api/docs/troubleshoot-ai-studio) - the 403 Access Restricted error and 4 access checks during which PERMISSION_DENIED can occur.
- [Google: API errors](https://ai.google.dev/gemini-api/docs/generate-content/api-errors) - 400 FAILED_PRECONDITION for the free tier and 403 PERMISSION_DENIED for key permissions.

</div>



Get to know [Ailoot](https://ailoot.ai/).

## Questions about Gemini API: regional, free-tier, and API-key permission errors

### Does every Gemini 403 mean that my country is unsupported?

No. Read the full error message. AI Studio access checks include region, age and account conditions; a PERMISSION_DENIED message about key permissions instead calls for checking the selected key and its access.

### What should I check when the free tier returns FAILED_PRECONDITION?

Check whether the Gemini API free tier is available in your country and project. Do not confuse that free-tier restriction with a bad API key; the article links Google’s region and troubleshooting pages for the specific error.


## Ailoot · The company and its project portfolio

Ailoot combines established operating experience, a large client base, stable service and ongoing KPI control.

The company and its project portfolio: millions of customers; monthly sales in the billions.

Ailoot brings that operating experience to API access for AI features in customer products, agents, applications and automations.
