Aller au contenu principal

Google Gemini API key: how to create it in 3 minutes

Par AIFORYA — 26 July 2026 — 7 min de lecture

On this page (11)

Of all the AI providers, Google is the one whose key is obtained fastest — often in under a minute, and without getting your card out to begin with. That makes it an excellent way in when you want to try AI on your site before committing to a budget.

This guide shows you where to click, what the free tier actually allows, and how to connect the key to an AIFORYA extension. The principle is the same as everywhere else with us: your AI, your key, your data stays with you. You open the account, you keep control of consumption, and nothing goes through a middleman.

By following this guide, you will:

  • Get your key from Google AI Studio in a few clicks.
  • Understand what the free tier covers — and where it stops.
  • Secure the key and set guardrails before the first call.
  • Paste it into an AIFORYA extension and confirm it runs.

Contents

What you need before you start

  • A Google account. That is all, to get going. If you already use Gmail, you have one.
  • Nothing else, as long as you stay within the free tier. A payment method only becomes necessary if you enable billing to lift the limits.

One useful piece of vocabulary: the key is attached to a Google Cloud project. Google creates one automatically if you do not have one, and you do not need to understand the Cloud ecosystem to continue. Just remember that the project is the drawer your key sits in: it is where consumption — and later, billing — is read.

Step 1: open Google AI Studio

Estimated time: 30 seconds

  1. Go to aistudio.google.com.
  2. Sign in with your Google account.
  3. Accept the terms presented on first visit.

Google AI Studio is the workshop for developers and for people integrating AI into their tools. It is not the same thing as the consumer assistant: this is where — and only where — keys are created.

Step 2: create the API key

Estimated time: 30 seconds

  1. In AI Studio, open Get API key (page aistudio.google.com/apikey).
  2. Click Create API key.
  3. Choose an existing project, or let Google create one. If you manage several client sites, create one project per client: consumption stays readable.
  4. The key appears. Copy it immediately into your password manager.

A quirk that makes Google more comfortable than most: the console generally lets you display the key value again later from that same page. Convenient — but it does not excuse careless storage. Quite the opposite: a viewable key is one that must sit behind a well-secured account. Turn on two-factor authentication on your Google account if you have not already.

Step 3: the free tier, without misunderstandings

This is the question that always comes up, so let us be precise about the mechanism rather than about figures that move:

  • A free tier exists, with rate limits (requests per minute and per day) and volume quotas. It is more than enough to experiment, prototype, and run a low-traffic site.
  • Beyond that, you enable billing and pay per use, like with any other provider.
  • The free tier's terms differ from the paid tier's, particularly on how submitted data may be used. If you handle client data, read that point before starting: it is the only place in this guide where a wrong choice costs something other than money.

Exact thresholds change several times a year. The official pricing page is the reference; no blog post, including this one, should serve as your source for numbers.

Step 4: secure the key

Estimated time: 1 minute

  • Password manager, never an email or a shared document.
  • Never in browser-visible code or a public repository. The key stays server-side — exactly what the settings fields in AIFORYA extensions do.
  • Restrict the key where you can. The console lets you limit a key to certain APIs: a key that can only do one thing cannot do much in the wrong hands.
  • Watch consumption in your project, and set a budget alert as soon as you move to the paid tier.
  • One key per site. You will be able to cut one off without disturbing the others.

Step 5: add the key to an AIFORYA extension

  1. In WordPress, open the settings of the AIFORYA extension concerned.
  2. Find the field carrying the provider's name.
  3. Paste the key, with no space before or after.
  4. Save.

That is it. Work is now billed to your account, at the provider's rate, with no middleman.

Troubleshooting: the most common errors

  • Invalid key. Check that no space slipped in while copying, and that you are using a key created in AI Studio rather than another Google credential.
  • Quota exceeded. You have hit the free tier's request limit. Wait for the next window, space out the work, or enable billing.
  • API not enabled on the project. This happens when the key was created inside a pre-existing Cloud project. Create the key from AI Studio instead, which handles enabling it.
  • Empty or truncated response on images. Check the size and format of the files you send: size limits are reached faster than expected on uncompressed photos.

Putting the key to work: alternative text for your images

Google's models are notably comfortable with images — which is where they deliver the most visible service on a WordPress site. Concrete case: AIFORYA Alt Text Generator looks at your images and writes their alternative text.

The benefit is twofold, and rarely well understood. Alternative text is first of all what screen readers read: without it, some of your visitors see nothing at all. It is then what search engines read. A media library of several hundred images with no alt text is a job nobody ever does by hand — and it is exactly the kind of task an AI clears in one pass while you do something else.

Discover AIFORYA Alt Text Generator

Working with your own key is an architectural choice at AIFORYA, not an option. Your AI costs are billed by the provider, directly, with no margin and no hidden fees from us. Your content does not pass through our servers to be generated. You can cap, revoke, switch provider or leave: nothing holds you, and that is deliberate.

Conclusion

You have a working Google key, obtained without a credit card, ready to connect. Three things to remember:

  1. It is the fastest way in to AI on WordPress: a Google account is enough to start.
  2. The free tier limits rate, not just volume. That is what surprises people first during a batch run.
  3. Read the free tier's terms before pushing client data through it. It is the one decision in this guide that cannot be undone.

Want to compare before choosing? The same steps apply with other providers: see the Anthropic key guide, the OpenAI key guide or the Mistral AI key guide. To understand our architectural choice, our dedicated page explains it plainly.

If images are your real workload, our comparison of Smush alternatives for image SEO extends this guide on compression and ranking.

FAQ

1. Is the Gemini API really free? There is a free tier, bounded by request and volume limits, sufficient for experimenting and for a low-traffic site. Beyond that you enable billing and pay per use. Thresholds change: the official page is the reference.

2. Where do I find a key I already created? In Google AI Studio, on the Get API key page. Unlike other providers, the value generally remains viewable. All the more reason to protect the Google account with two-factor authentication.

3. Do I need a Google Cloud account? Not in the sense of configuring one yourself. The key is attached to a project, which Google creates for you if needed. You only go back to it to track consumption or enable billing.

4. Can I use the same key on several sites? Yes, but avoid it: one key per site keeps consumption readable and lets you cut off one site without touching the others.

5. Is my content used to train the models? It depends on the tier, and the terms differ between free and paid. Check the provider's terms before pushing client data through it — and it is precisely so that this choice stays yours that our extensions run on your own key.

Google Gemini API key: how to create it in 3 minutes | AIFORYA