Skip to main content
Termerly logo

Tutorials·8 min read

How to create a Google Gemini API Key for Termerly

A simple guide to connect your Termerly account to Google Gemini and generate policy drafts using Google's models

Why does Termerly need your Google Gemini API Key?

Termerly generates policy drafts (privacy, terms, cookies, etc.) using artificial intelligence models. For those drafts to be written with Gemini (Google's models), Termerly needs to connect to your Google account through an API Key.

An API Key is like a personal key that lets Termerly talk to Gemini on your behalf. You generate it once on Google AI Studio, paste it into Termerly's settings, and from that moment on you can generate your drafts with Gemini.

Good news: unlike OpenAI or Anthropic, Google lets you start using Gemini without a credit card. There's a free tier for the Flash and Flash-Lite models that will probably cover your initial Termerly usage. You'll only need to add a card when you want to use the Pro models or when you exceed the free quota.

A small clarification: AI Studio vs Vertex AI

Google offers two ways to use Gemini:

  • Google AI Studio (aistudio.google.com): the quick, simple option with a free tier. This is what you'll use for Termerly.
  • Vertex AI (inside Google Cloud): the enterprise-grade option, with SLAs and per-region data residency. You don't need it to get started.

This guide focuses on Google AI Studio because it's the simplest path. If your business grows and you need enterprise guarantees later, you can migrate to Vertex AI without rewriting anything significant.

What you'll need on hand

  • A Google account (the same one you use for Gmail or Drive).
  • A modern browser (Chrome, Firefox, Edge, or Safari).
  • Access from a supported region (most of Europe, including Spain, is supported).

Estimated time: 3 to 5 minutes. This is probably the fastest API Key to get of the three major ones.

Step 1: Sign in to Google AI Studio

Open your browser and go to https://aistudio.google.com.

Sign in with your Google account. If it's your first visit, Google will ask you to accept the Generative AI Additional Terms of Service and confirm your region. Accept them to continue.

Suggested image: the Google AI Studio welcome screen with the "Get started" button.

Once inside, you'll land on the AI Studio dashboard. You don't need to touch anything here — we're going straight to the key.

Nice detail: Google AI Studio automatically creates a Google Cloud project in the background for you. You don't have to configure anything manually — everything is set up for you.

Step 2: Generate your API Key

In the left side menu, click "Get API key" (or go directly to https://aistudio.google.com/apikey).

Click the "Create API key" button. A small window will pop up where you can choose:

  • Create the key in a new project (recommended if you're getting started): Google will generate a project automatically. This is the option you should pick.
  • Create the key in an existing Google Cloud project (only if you already have one).

Suggested image: the "Create API key" dialog with the "create new project" option selected.

Click "Create API key in new project". Within seconds, you'll see the generated key. It will look like this: AIzaSyXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.

Useful detail: unlike OpenAI or Anthropic, Google AI Studio lets you see your key again later from the same API Keys page. Even so, treat it like a password and store it carefully from the start: the easiest is to copy it now into a password manager (Bitwarden, 1Password, iPhone Keychain, etc.).

Step 3: Paste it into Termerly

Go back to Termerly and into your dashboard:

  1. Sign in to your Termerly account.
  2. In the side menu, go to Settings → Account.
  3. Scroll down to the Google Gemini section.
  4. Paste the key you just copied into the "Paste your API key" field.
  5. Click the "Save" button.

Suggested image: the Google Gemini section in Termerly, inside Settings → Account, with the "Paste your API key" field filled in.

If the key is valid, you'll see the field's status change from "Not connected" (red) to "Connected" (blue). From that moment on, Termerly can generate drafts with Gemini models on your behalf.

Your key is safe. Termerly stores it encrypted with AES-256-GCM and never shows it back to you in plain text.

Step 4: Verify the connection works

Termerly has a button labeled "Test connection" right below the API Key field. Clicking it is the fastest way to know if everything is right:

  • If the connection works, you'll see a green check and a "Last used" date will appear under the field.
  • If the connection fails, Termerly will tell you what happened (invalid key, region not supported, etc.).

Suggested image: the "Test connection" button in Termerly with a successful result and the "Last used" timestamp visible.

From here you can start generating policy drafts in Termerly with Gemini models.

Step 5 (important): Restrict the key so it can only be used by Termerly

This is very important and your best insurance against bill shock. Google lets you add restrictions to the key so that, even if someone steals it, they can't use it with other services. Although it's technically optional, we strongly recommend it.

To add restrictions:

  1. Go to console.cloud.google.com/apis/credentials.
  2. Select the project AI Studio created automatically (if you only have one, it'll already be selected).
  3. Find your key in the list and click the pencil icon to edit it.
  4. Under "API restrictions", check "Restrict key" and leave only the "Generative Language API" selected.
  5. Save the changes.

This isn't theory. In February 2026 there was a documented case of a developer whose unrestricted Gemini key was stolen and racked up more than 80,000 USD in two days. Google did not waive the charges. If you turn on billing, always apply the restrictions in this step.

Step 6: Take care of your API Key

Your API Key is exactly like a digital credit card: if you turn on billing, anyone who has it can spend your Google Cloud balance on your behalf. So:

  • Don't paste it in public chats or share it via email, social media, forums, or videos.
  • Don't post it where others can see it (screenshots on social media, for example).
  • Apply the restrictions from Step 5, especially if you have billing turned on.
  • Create a different key for each tool. The one you generated for Termerly should only be used in Termerly.
  • Set up budget alerts on Google Cloud if you turn on billing, so you get warned before any surprise.
  • If you suspect it has leaked, run to aistudio.google.com/apikey and delete it. Then generate a new one and paste it back in Termerly using the "Update" button.
  • Check the "Usage" section in AI Studio every now and then to spot unusual consumption.

If you think of your API Key as your bank card PIN, you'll be on the right track. Same care, same discretion.

What if I want to use the Pro models?

The free tier gives you access to the Flash and Flash-Lite models, which are more than enough for Termerly in the vast majority of cases. If at some point you want to switch to the Pro models (more powerful, with a larger context window), you'll need to turn on billing:

  1. Go to console.cloud.google.com.
  2. Select the project AI Studio created.
  3. In the side menu, go to Billing and link a billing account with a card.
  4. While you're there, set up budget alerts (Budgets & alerts) so you don't get surprises.

Budget tip: start with a low cap (10 or 20 USD) and raise it once you see your real consumption. Alerts notify you by email when spending approaches the cap, so there are no surprises.

Things that can go wrong and how to fix them

What you see in TermerlyWhat it meansHow to fix it
"Not connected" after clicking SaveThe key is wrongly pasted or invalidCopy the key again from aistudio.google.com/apikey and paste it back, no leading or trailing spaces.
"403 Forbidden" when testing the connectionThe key has restrictions blocking Termerly, or your region is not enabledGo to the Google Cloud console and review the key restrictions.
"API not enabled" when generating a draftThe "Generative Language API" is not active on the projectEnable it from the Google Cloud Console of the associated project.
"Quota exceeded" on the free tierYou exceeded the daily free quotaWait until the next day or turn on billing to move to a higher tier.
"Region not supported"You're calling from a region not enabledCheck the list of supported regions. Some multimodal features have extra restrictions in the EU.

Wrapping up

Connecting Termerly to Google Gemini is probably the fastest and cheapest path to get started: in less than five minutes you have a working key, no card required, and a decent free tier for the Flash models. What does deserve attention, a lot of it, are two things: apply the restrictions to the key (Step 5) and set up budget alerts if you turn on billing. The 80,000 USD episode is a reminder that security is not optional.

Once you have the key configured and tested, you can ask Termerly to generate policy drafts with Gemini models. If you ever get lost, come back to this guide and re-read the relevant step.

Stay up to date

Subscribe to get notified when new articles are published.