Setup Google Gemini API Key (2025)

1. Create a Google Cloud Project

Go to Google Cloud Console and create a new project. Enter your project name, select location, and click Create.

Google Cloud Project Creation

2. Go to Google AI Studio

Navigate to Google AI Studio and accept the Terms of Service if prompted.

Google AI Studio Page

3. Select Project & Create API Key

Click Create API key. You will be asked to choose a Google Cloud project. Select your newly created project (or an existing one) and confirm to generate the key.

⬇️
Select Google Cloud Project

4. Copy Your API Key

Once generated, your API key will appear in a box. Click the copy button to save it to your clipboard.

⬇️
Generated API Key Box

5. Use in Your Project

Copy paste the Api Key.

Note: Keep your API keys private. Never commit them to GitHub or share them publicly.