Back to Home

How to get a Google AI API Key

Getting an API key from Google AI Studio is quick and free. Follow these steps to start generating commits with your own key.

1. Navigate to Google AI Studio

Go to aistudio.google.com.

2. Sign In

Log in with your Google Account. If this is your first time, you may need to accept the terms of service.

3. Locate API Key Section

Look at the top-left corner of the interface. You should see a button labeled "Get API key" (often indicated by a key icon). Click it.

4. Create & Copy Key

Click "Create API key". You can choose to create it in a new project (easiest) or an existing one.

AIzaSyD-EXAMPLE-KEY-DO-NOT-SHARE

Important: Copy this key immediately. You won't be able to see it again after closing the dialog.

Security Best Practices

  • Never share your API key. Do not post it on public forums or commit it to GitHub.
  • Use Environment Variables. Store it in a .env file or use commitgen config securely.

Troubleshooting

  • Quota Exceeded: The free tier is generous (15 RPM), but if you hit limits, wait a moment or check your billing settings.
  • Region Lock: Ensure you are in a supported region for Google AI Studio.