VanoirbeekConsulting

How to create a Gemini API key in Google AI Studio

You create a Gemini API key for free in Google AI Studio. Here is how, step by step, including the free tier, prices, your data and security.

Lees in het Nederlands →
Two glowing neon keys, one cyan and one violet, hanging like twins from a single ring against a dark blue background

You create a Gemini API key for free in Google AI Studio, at aistudio.google.com/api-keys. All you need is a Google account, and you must be 18 or older. New users even get a first key automatically after accepting the terms.

You want a tool, an n8n automation or your own application to work with Google's models. Sooner or later that tool asks for an API key. In this article I show you step by step how to create one, what the free tier covers, what happens to your data and how to keep the key out of the wrong hands.

Not sure yet what such a key is? Read What is an API key? first. Everything below was checked against Google's documentation, as things stand on 24 November 2026.

What do you need for a Gemini API key?

Less than you think. Here is the list:

  • A Google account. A regular Gmail account is enough. A Google Workspace account works too, but then your administrator has a say in what you can do.
  • You are 18 or older. That is what the Gemini API terms say.
  • You use it for work. Google intends the API for professional use, not for consumers.
  • You live in a supported country. Belgium and the Netherlands are both on Google's list.

You do not need a credit card for the free tier.

Create a Gemini API key in Google AI Studio: the steps

Right, let's get to work.

  1. Go to aistudio.google.com/api-keys and sign in with your Google account.
  2. Accept the terms. If you are a new user, Google AI Studio now automatically creates a default project and a first API key for you. At that point you are basically done.
  3. If you want an extra key, click Create API key and follow the dialog. Every key belongs to a project. That is the folder in which Google tracks your usage and billing.
  4. Copy the key and store it in a password manager. Then paste it into the tool that asks for it.
  5. Next to the key, click Add restrictions, choose Restrict to Gemini API only and confirm with Restrict key. That way the key cannot be used for anything else.

A tip: create a separate key per application. If something goes wrong, you replace one key and the rest keeps working.

Was your company already using Google Cloud?

Then AI Studio does not create a default project. You first have to bring in your existing projects: open the Dashboard on the left, choose Projects and then Import projects. Search for your project, select it and click Import. After that you create the key on the API Keys page.

Do you see the message "You do not have permission to create a key in this project"? Then you lack permissions in that project. Ask your administrator for a role such as Project Editor.

Is the Gemini API free?

Partly. There is a free tier with a limited set of models and with limits on the number of requests. Prices in dollars per million tokens, according to Google's pricing page on 24 November 2026:

  • Gemini 4 Hydrogen: free in the free tier. Paid: $1.50 for input and $7.50 for output.
  • Gemini 3.5 Flash-Lite: free in the free tier. Paid: $0.30 for input and $2.50 for output.
  • Gemini 3.8 Flash and 3.6 Flash: free in the free tier. Paid: $0.75 and $3.75 until 31 December 2026, double that from 1 January 2027.
  • Gemini 4 Carbon (Google's most capable reasoning model, in its own words): not in the free tier. $2 and $10 until 30 November 2026, $4 and $20 from 1 December 2026.

Google no longer lists the free requests per minute and per day in one fixed table. You see your own limits inside AI Studio. I wrote about the 1 December price increase earlier: Gemini 4 doubles in price on 1 December.

How do you switch to paid?

In AI Studio, click Set up billing next to your project, in the Billing Tier column. You choose your country, enter your details and a payment method, and buy credit. What you should know:

  • Prepay is the default for new users. You buy at least $5 and at most $5,000 of credit.
  • Credit expires after 12 months and is not refunded. So do not buy too much at once.
  • When your balance hits zero, all keys stop in every project linked to that billing account, at the same time. You can turn on auto-reload, with a monthly ceiling.
  • There is a spend cap per project (Monthly spend cap on the Spend page). Google still calls that feature experimental.

What does Google do with your data?

There is a difference here that many people do not know about. Outside Europe, Google may use what you send through the free tier to improve its products, and human reviewers may read it. In the paid tier that does not happen.

For anyone in the European Economic Area, Switzerland or the United Kingdom, the paid-tier rules apply to everything, including the free tier and AI Studio itself. Your input is then not used to improve Google's products. Google does keep it for a while to detect abuse.

One more rule from the terms: if you build an application for users in Europe, it has to run on the paid tier. The free tier is for testing.

How do you keep your Gemini API key safe?

Google says it itself: treat the key like a password.

  • Never put it in code you share, for example on GitHub.
  • Never put it directly in a website or a mobile app. Anyone can read it there.
  • Have your developer store it as an environment variable named GEMINI_API_KEY.
  • Do not share it by email or chat.

Since 28 May 2026, all new keys from AI Studio are so-called auth keys. Google actively detects leaked keys of that type and blocks them quickly. Do not count on that. If your key has leaked anyway, create a new one right away, put it in your application and disable or delete the old one.

My opinion?

Google deliberately keeps the threshold low here: you sign in and the key is waiting for you, no card needed. For testing that is ideal, and I find it a real plus that European users get the stricter data rules in the free tier too.

I would keep an eye on two things. Prices move fast: two increases in two months. And prepaid credit that expires, combined with keys that all stop together at a zero balance, needs some follow-up. Turn on auto-reload as soon as anything in your business runs on it, with a ceiling you can live with.

Do you work with other models as well? I have the same guide for Claude by Anthropic and for OpenAI.

Frequently asked questions

Is a Gemini API key the same as a Gemini subscription?

No. The subscription is for the Gemini app you type in yourself. The API key is for software that talks to the models, and you pay per use. One does not give you credit for the other.

Can I create a Google API key without a credit card?

Yes. You do not need a payment method for the free tier of the Gemini API. Only when you move to the paid tier do you buy credit, from $5.

Does the Gemini API work in Belgium and the Netherlands?

Yes. Both countries are on the list of available regions for the Gemini API and Google AI Studio (as of 24 November 2026).

Sources

LinkedIn

More from this zone