Setup
Everything you need to follow along.
You do not need a powerful laptop, a GPU, or a pile of tools to start this course. You need a browser, a Google account, and one free Gemini API key from Google AI Studio. That is enough to follow the lessons and run the first real AI examples later.
Why does this exist?
Setup should make you feel ready, not lost. Many AI tutorials start by asking you to install five tools before explaining what any of them are for. This course keeps the first step simple: get access to a real model, learn what an API key is, and keep that key safe.
The goal
By the end of this lesson, you should have:
- A Google AI Studio account.
- A free Gemini API key.
- A basic understanding of what the key is for.
- A safe place to keep the key.
- Optional: Python installed for later coding exercises.
You will not call the API yet. We will do that together in the Playground module. Today is just setup.
What is Google AI Studio?
Google AI Studio is a website where you can try Gemini models in the browser and create an API key for your own code.
Think of it like this:
- Gemini is the AI model.
- Google AI Studio is the place where you test prompts and manage keys.
- An API key is a secret password that lets your code call Gemini.
Free tier, with limits
Google offers a free Gemini API tier for developers and small projects. Free does not mean unlimited. You get limited access and rate limits, which is fine for learning. Do not add billing unless you intentionally want higher limits.
Step 1: open AI Studio
Go to aistudio.google.com.
Sign in with a Google account. If Google asks you to accept terms, read them and accept them if you are comfortable continuing.
After sign-in, you should land in the AI Studio interface. You may see a chat playground where you can type a message and run it against a Gemini model.
If you can see the playground, your account is ready.
Use a personal account if work blocks you
Some company or school Google accounts restrict AI Studio access. If buttons are missing, or you cannot create a key, try a personal Google account. If you must use a managed work account, you may need an admin to allow access.
Step 2: create your Gemini API key
Open the API key page directly:
Then follow these steps:
- Click Create API key if you do not already see a key.
- Choose the default project if AI Studio offers one.
- Click Create API key again in the dialog.
- Copy the key.
- Save it somewhere private, like a password manager or a local notes file you will not share.
The key will look like a long random string. That is normal.
Do not overthink projects yet
Google may mention a "project." For now, treat it like a folder that owns your API key. The default project is fine for this course.
Step 3: understand what the key does
When your code calls Gemini, Google needs to know who is making the request. Your API key answers that question.
It is not a username. It is not something to paste into a public website. It is a secret.
If someone else gets your key, they may be able to use your quota or create charges if billing is enabled. So the rule is simple:
- Do not commit it to GitHub.
- Do not paste it into screenshots.
- Do not put it in frontend JavaScript.
- Do not send it in chat.
- Do keep it in an environment variable when writing code.
Step 4: save it as an environment variable
You can skip this until the Playground module, but it is useful to see the pattern now.
An environment variable is a private value your code can read without hardcoding the secret into the file.
On macOS or Linux:
export GEMINI_API_KEY="paste-your-key-here"
On Windows PowerShell:
setx GEMINI_API_KEY "paste-your-key-here"
After using setx, open a new terminal before running code. Windows only loads the new value in new terminal sessions.
Never paste the real key into course notes
In examples, we will write GEMINI_API_KEY or YOUR_API_KEY. Replace those locally when you run code, but never publish the real value.
Step 5: optional local tools
Most early lessons run directly in your browser. You can learn binary, text encoding, tokens, embeddings, and attention without installing anything.
Later, when we write real scripts, Python will be helpful. If you want to prepare now, install Python 3.10 or newer and check it with:
python3 --version
Then run:
python3 -c "print('AI setup works')"
If that prints AI setup works, Python is ready.
No GPU needed
You are not training models from scratch in this course. Your laptop sends text to Gemini, Gemini runs on Google's servers, and your laptop receives the response. A normal laptop is enough.
Common problems
I do not see the Create API key button.
Try opening aistudio.google.com/apikey directly. If you are using a work or school account, your organization may block key creation.
Google asks me about billing.
You do not need paid billing to start. Stay on the free tier for this course unless a later exercise explicitly says otherwise.
I created a key but lost it.
Create a new key. Then delete or disable the old one if you are not using it.
Can I paste private company data into AI Studio?
No. For learning, use fake examples. On the free tier, treat anything you type as non-private.
Build it yourself
Do this quick checklist before moving on:
- Open aistudio.google.com and sign in.
- Open aistudio.google.com/apikey.
- Create or view your Gemini API key.
- Save the key somewhere private.
- Tell yourself what the key means in one sentence: "This key lets my code call Gemini."
If you can do those five things, you are ready for the course.
Summary
- Start at aistudio.google.com and sign in with Google.
- Create a free Gemini key at aistudio.google.com/apikey.
- Save the key privately.
- Use
GEMINI_API_KEYas the environment variable name when coding. - Do not add billing, expose the key, or use private data unless you understand the risks.
- Python is optional for now; the browser is enough for the first lessons.