Use this when you need an AI model in a pipeline for text parsing or basic image understanding, without paying, and without going through Google Cloud Console's billing wall.
Steps
- Go to Google AI Studio (aistudio.google.com), sign in with any Google account.
- Click Get API key → Create API key. No card required.
- Copy the key, it's a long string starting with
AIzaSy.... - Use it directly as a query parameter or header depending on how you're calling the API, no separate OAuth flow needed for basic API key auth.
Gotcha
Google AI Studio is a completely different product from Google Cloud Console. AI Studio only handles the API key itself and doesn't require a billing-verified Cloud project, which is what makes it card-free. Don't confuse the two when looking for where to manage the key, Cloud Console's OAuth/billing setup is a separate, heavier process only needed for things like Google Sheets API access, not for the Gemini key itself.
Also worth checking before committing to a specific model name in a prompt or API call: model availability and free-tier quotas change. A model that works today can have its free quota cut to zero with little warning, so treat the model name as something to verify occasionally, not permanent infrastructure.
Quick reference
https://generativelanguage.googleapis.com/v1beta/models/MODEL_NAME:generateContent?key=YOUR_KEY