How to get a Google AI Studio API key
Checked by hand 2026-10-30
- Open API Keys in Google AI Studio. On your first visit, accept the terms and click Continue. Studio may already list a Default Gemini API Key; you can use it, but a named key is easier to track. Click Create API key.
- Type a name for the key and leave the project on Default Gemini Project unless you made your own.
- Click Create key. The key appears in the API key details box that opens next.
What you end up with
- GEMINI_API_KEY