How to Get a Gemini API Key (Free or Paid)

On this page
You create a Gemini API key at aistudio.google.com/api-keys. Google's own API key documentation still points at the older /apikey address, which redirects to the same place. Sign in with a Google account, click Create API key, and copy what it gives you. That part takes about a minute and costs nothing, which is the appeal: Gemini's free usage tier keeps working rather than running out the way a one-off trial credit does. The decision worth your attention is whether to leave a support agent on that free tier, and the answer is usually no.
If you're doing this so a support tool runs on an account you control rather than a vendor's, running support on an account you own explains what that changes about the bill. The steps below are the Google half. We wrote getting a key from OpenAI separately, because the three consoles work differently enough to deserve their own walkthroughs.
What you need before you start
You need a Google account and about two minutes. There's no credit card step and no waiting on approval, which makes this the easiest of the three keys to get.
One thing happens quietly in the background and it matters later. Google's documentation is explicit that "every Gemini API key is associated with a Google Cloud project", where billing, collaborators and permissions are set. Create a key without thinking about it and Google makes a project for you, which is fine for a test. It's worth being deliberate when the key will answer real customers, because that project is what you later attach billing to.
How to create the key
Four steps, each leaving something you can check before moving on.
-
Open the API keys page in AI Studio. Sign in at aistudio.google.com/api-keys with the Google account you want the project to belong to, not whichever one your browser happens to be signed into. You'll know you're in the right place when the API keys page loads rather than the Gemini chat app, a different product on a different domain.

-
Create the key, name it, and pick its project. Click Create API key, give the key a name, and choose the Google Cloud project it belongs to. The same dropdown has Create project and Import project options if you'd rather not put it in an existing one. The new key appears in the list on that page, which is how you know it worked.

-
Copy the key somewhere safe straight away. Paste it into your secrets manager or your support platform's settings field before you navigate away. Confirm it saved by reading it back from wherever you put it.
-
Send one real request through it. A single call that comes back with an answer proves the key, the project and the model choice all line up. An error here is cheaper to find now than during a customer conversation.
To use the key in your own code, Google's libraries read it from an environment variable called GEMINI_API_KEY or GOOGLE_API_KEY, and the documentation notes that GOOGLE_API_KEY takes precedence when both are set. That rule catches anyone who sets one, then the other, and wonders which key is being billed.
One more thing to check if you already have a Gemini key wired into something, because Google is changing what counts as a valid key.
Is the Gemini API really free?
Yes, and for a support agent that free tier is the wrong choice, because you pay in data rather than dollars. Google's pricing page lists what the free tier includes: limited access to certain models, free input and output tokens, AI Studio access, and content "used to improve our products". The paid tier line is the same list with that last item inverted, where content is "not used to improve our products".
That ongoing free tier is what separates Gemini from the other two. Anthropic gives new users a small amount of credit to test with, and OpenAI runs on prepaid credits that return an error once the balance hits zero.
Read that in the context of what a support agent actually sends. The content isn't your test prompts. It's your customers writing in about a billing problem, an address change, or an order that never arrived, along with whatever help content and account details your agent attaches to the request. Free is a fair trade for a prototype you're poking at on a Tuesday afternoon. It's a different proposition once the text flowing through the key belongs to your customers rather than to you.
So use the free key for what it's good for. Build with it, test your prompts, and turn billing on before the first real conversation reaches it.
Which Gemini model should you pick for support?
Start at the Flash-Lite end, because support work is mostly reading your help content and writing a short reply. The published spread across the range is wide enough that this choice moves your bill more than anything else on this page.
Gemini 3.1 Flash-Lite costs an eighth of the Pro tier on input, which is why routing matters more than standardizing. Put the cheap model on "what are your opening hours" and keep the expensive one for questions that genuinely need reasoning. Optlo lets you connect your own Gemini, OpenAI or Anthropic account and mix models across a workflow, so you can see what a Gemini model costs at your ticket volume before committing to one.
What changes when you turn billing on
Two things change, and only one of them is the invoice. The data term flips, which is the reason to do it at all for support. The other change is that your project moves from the Free tier to Tier 1, and the rate limits move with it.
Google's rate limits documentation describes the ladder above. Setting up billing qualifies a project for Tier 1, and the upgrade happens automatically rather than needing a request, usually taking effect immediately. Higher tiers unlock on spending history: Tier 2 wants $100 spent plus three days since your first payment, and Tier 3 wants $1,000 plus thirty days.
The per model rate limits themselves aren't published on that page, and Google points you at AI Studio to see the ones your project actually has. That's worth checking rather than assuming, because a rate ceiling on a busy support queue doesn't show up as a bill. It shows up as customers waiting.
Before you connect it to anything
Turn billing on, then set a billing alert in the Google Cloud Console while you're still in there. Google's documentation recommends alerts specifically so you hear about a spike in usage or cost rather than discovering it on an invoice, and a support agent that retries too eagerly is exactly the kind of thing they catch.
Then work out what the traffic will actually cost. The key is free and the tokens are not, and what those tokens add up to per resolution sets them against bundled per-resolution pricing, which is the comparison most teams are really making when they go looking for a key.
Common questions
How do I get a Google Gemini API key?
Go to aistudio.google.com/api-keys, sign in with a Google account, and click Create API key. Name the key, then pick an existing Cloud project or create one from the same dropdown, and the new key appears in the list on that page. Copy it into your secrets manager or your support platform straight away, then send one real request through it to confirm the key, the project and the model all work together.
Is the Google Gemini API key free?
Creating the key is free and so is the free usage tier, which is what separates Gemini from OpenAI and Anthropic. Google's pricing page lists the free tier as limited access to certain models with free input and output tokens, and with content "used to improve our products". The paid tier inverts that last term, so content is not used that way. For customer conversations the paid tier is the one you want.
Do I need a Google Cloud account to use the Gemini API?
You need a Google Cloud project, but you don't have to set one up yourself. Google's documentation states that every Gemini API key is associated with a Google Cloud project, and AI Studio will create one for you when you make your first key. The project becomes relevant when you turn billing on, add colleagues, or set permissions, so it's worth knowing which one your key lives in.
What is the difference between Google AI Studio and Vertex AI?
They're two ways into the same family of models, aimed at different users. AI Studio is where you get a Gemini API key in a couple of clicks, and it suits a team connecting a support tool to a model. Vertex AI is the Google Cloud platform product, with its own setup, its own credentials and the enterprise controls that come with the wider Cloud console. If a tool asks for a Gemini API key, AI Studio is where it comes from.
What happens when I turn on billing for the Gemini API?
Your project moves from the Free tier to Tier 1, which lifts the rate limits, and the free tier's data term stops applying so your content is no longer used to improve Google's products. The upgrade is automatic once billing is active and usually takes effect immediately. Higher tiers follow spending history rather than a request, with Tier 2 needing $100 spent and three days, and Tier 3 needing $1,000 and thirty days.
Will my Gemini API key stop working in September 2026?
It will if it's a standard key rather than an authorization key. Google's documentation says the Gemini API "will reject requests from Standard keys" from September 2026, and that unrestricted standard keys are rejected already. Keys created in AI Studio now default to authorization keys, so a key you made recently is fine. An older one wired into a live support agent is worth checking before it starts failing mid-conversation.
Which Gemini model is best for customer support?
Start with Gemini 3.1 Flash-Lite, the cheapest tier at $0.25 per million input tokens and $1.50 per million output, since most support work is retrieving your help content and writing a short answer. Move up to 3.6 Flash or a Pro model for questions that need real reasoning. Routing the routine questions to a cheap model and saving the expensive one for hard cases costs far less than sending everything to the top of the range.


