Guides
How to Get a Gemini API Key in Minutes
If you want to use a tool that asks for your own key, learning how to get a Gemini API key takes about five minutes. You sign in to Google AI Studio, create a key, and paste it into the app. The rest is keeping that key safe and watching your use.
This guide walks you through each step, explains billing in plain terms, and shows you how to store the key safely on your Mac.
Before you start
You need three things:
- A Google account you control. Use a work account if the key is for client work, so billing and access stay with the right owner.
- A modern browser with JavaScript enabled.
- A place to store the key, such as Apple Keychain or another password manager.
You do not need to write code to create the key. You only need the key itself, which you paste into the app that asked for it. If you are still deciding whether this model suits you, read bring your own API key explained first.
Google changes its console and plan names often, at the time of writing — check their site for current pricing/features if a screen looks different from the steps below.
How to get a Gemini API key step by step
These steps use Google AI Studio, which is Google's web console for Gemini API keys and basic use tracking.
- Sign in to Google AI Studio. Open Google AI Studio and sign in with the Google account you want billed for use.
- Open the API key section. Look for a "Get API key" button or an API keys page in the left menu. The exact label changes from time to time, but it is always near the top level of AI Studio.
- Create a new key. Choose the option to create a key in a new or existing Google Cloud project when asked. Give the project a clear name, such as "consulting-meeting-tools", so you can find it later.
- Copy the key once. Google shows the full key only at creation. Select it, copy it, and paste it straight into your password manager before you do anything else.
- Paste it into your app. Open the app's settings, find the field for a Gemini or Google API key, and paste the value. Save, then run one small test, such as asking a single question.
- Check that use appears. Return to AI Studio after a minute and confirm you see the request in your history or dashboard. If you see nothing, you may have pasted the key into the wrong field or used a different account.
If you need keys for two purposes, create two keys with clear names. Say a client asks you to test a new workflow on a trial account while your main work runs on your paid account. Two keys let you track each stream separately and revoke one without breaking the other.
For the other major option, see how to get an Anthropic API key.
Billing basics
API billing confuses many first-time users because it is metered. You pay for what you send and receive, rather than a flat monthly fee for the API itself. A short question costs less than a long document you ask the model to read.
Keep these points in mind:
- Find the pricing page first. Check Google's current pricing page before you connect a key to daily work. Rates, free limits, and quotas change, and only the official page is current.
- Expect two bills. The app you use may charge its own fee, and Google bills you separately for API use. Both are normal with the bring-your-own-key model.
- Set a budget early. In your Google Cloud project, look for billing budgets and alerts. Set an alert at a low amount, such as the cost of one week of normal use, so a mistake or leak shows up fast.
- Start small. Run one meeting or one test document first, wait for use to appear, then scale up. That first report tells you what a normal week looks like.
- Review monthly. Put a 10-minute billing check on your calendar. Compare last month's API total with the value you got from it, such as calls handled or briefs prepared.
Google's API terms, quotas, and billing options change often, at the time of writing — check their site for current pricing/features and the Gemini API docs for the latest setup details.
Keeping your key safe on a Mac
Treat your Gemini key like a password that can spend money. Anyone with the key can make requests billed to you until you revoke it. Use this checklist on the day you create the key. You can copy it into your own runbook.
- Save the key in Apple Keychain or your password manager with a clear name and date
- Turn on your Mac's FileVault and screen lock if they are off
- Paste the key only into the app that needs it, using the password manager's copy button
- Delete screenshots, downloads, or drafts that contain the full key
- Never send the key by email, ticket, or shared doc
- Create one key per app instead of reusing a single key
- Set a reminder to rotate the key every 6–12 months
To rotate a key, create a new key in AI Studio, paste it into the app, confirm the app works, then delete the old key. That order avoids downtime. If a contractor or teammate had access to the key and leaves the project, rotate it the same day.
Also check how the app stores your key. Prefer apps that keep it in Keychain on your device and explain what they send to the provider. HintGoblin, for example, keeps transcription on-device and sends only redacted question text and matching snippets to the AI provider. You can read more in our guide to local-first AI privacy.
Troubleshooting common setup errors
Most setup failures come from pasting, billing, or project settings. Work through this table in order.
| Symptom | Likely cause | What to do |
|---|---|---|
| "Invalid API key" right after pasting | Extra space or line break, or wrong key | Copy again from your password manager, trim spaces, paste once, save, retry |
| Key worked, then stopped | Key revoked or project changed | Check AI Studio to see if the key still exists; create a new key if needed |
| "Permission denied" or "project not found" | Wrong project or API not enabled | Confirm you picked the right Cloud project and that the Gemini API is enabled for it |
| "Quota exceeded" or "limit reached" | Free quota used or rate limit hit | Wait a few minutes, reduce test size, and check quotas in the Cloud console |
| "Billing not enabled" | Project needs billing for this use | Enable billing on that project, or move the key to a project with billing |
| No use shows in the dashboard | Key from a different account | Confirm the signed-in account matches the account that owns the key |
If none of these fix it, create a fresh key in a clean project and test it with a single short request. That tells you whether the problem is the key or the app's settings. Keep the old key until the new one works, then delete the old one.
One more tip: if you paste keys often, clear your clipboard after each paste. On a Mac you can copy a short random word right after pasting, so the key does not sit in your clipboard history.
Where HintGoblin fits
HintGoblin can run with your own Gemini key under its bring-your-own-key plan, which suits light or uneven use. It listens on your Mac, shows cited answers during the call, and writes minutes after. See pricing to compare plans.
Frequently asked questions
How do I get a Gemini API key?
Sign in to Google AI Studio with your Google account, open the API key section, and create a new key. Copy it once and store it in a password manager.
Where do I find my Gemini API key in Google AI Studio?
Open Google AI Studio, sign in, and look for the Get API key or API keys section. From there you can view your existing keys or create a new one.
How much does the Gemini API cost?
Costs depend on your use and plan, and Google updates them often. Check Google's current pricing page for the latest rates and free limits before you build.
How do I keep my Gemini API key safe?
Save it in Apple Keychain or a password manager, use one key per app, and set spending limits if available. Revoke and replace the key at once if it leaks.
Why is my Gemini API key not working?
Common causes are extra spaces when pasting, billing not enabled, or the key being revoked. Check the troubleshooting table in this guide and the official docs.
HintGoblin
Never say “let me get back to you” again.
Knowledge graphs for every meeting, cited answers during the call, minutes and action points after. Mac app + web dashboard.
See plans →