← Back to setup guide

Get a Gemini API Key

Create a Google AI Studio account and get your API key in under 2 minutes.

Prerequisites

  • A Google account (any Gmail or Google Workspace account)
  • A billing account may be required depending on your region
1

Go to Google AI Studio

Open aistudio.google.com and sign in with your Google account.

If it's your first visit, accept the Terms of Service. Google will automatically create a Cloud project for you.

2

Create an API key

In the left sidebar, click "Get API key" (key icon).

Click "Create API key", then choose "Create a key in a new project".

Your API key will be displayed. Copy it immediately — you won't be able to see the full key again.

3

Add it to your GitHub Secrets

In your newsletter repository, go to Settings → Secrets and variables → Actions.

Create a new secret named GEMINI_API_KEY and paste your key.

Rate limits

Rate limits depend on your account, region, and quota tier. Check the official documentation for current limits.

View rate limits documentation

Pricing

Gemini API is pay-as-you-go. Check the pricing page for current rates. Flash models are very affordable for newsletter generation.

Tip: DayBrief's default model is gemini-3-flash-preview. A typical newsletter run uses 15-30 API requests (one per source + one for synthesis). Flash models keep costs minimal.