CodewithChat LogoCodewithChat
DocsGetting StartedBring Your Own Gemini API Key
Getting Started• Account Settings

Bring Your Own Gemini API Key

Run out of daily free generation credits? Learn how to connect your own Google Gemini API key to continue building unlimited apps for free.

Why Bring Your Own Key?

CodewithChat provides a generous daily free credit allowance for generating applications. Once you run out of credits, you have the option to "Bring your own Key" (BYOK). By adding your own Google Gemini API key, you can bypass our platform limits and continue generating unlimited applications completely for free, paying only directly to Google (which offers a massive free tier).

How to Get a Gemini API Key

1. Go to Google AI Studio (aistudio.google.com).\n2. Sign in with your Google account.\n3. Click on "Get API key" in the left sidebar.\n4. Click the "Create API key" button and copy the generated key (it usually starts with AIzaSy...).

Pro Tip

Google Gemini 1.5 Flash and Pro have generous free tiers that allow for thousands of free generations per day!

Connecting Your Key to CodewithChat

When you run out of credits, you will see an "Out of Credits" dialog. Under "Option 3: Bring your own Key", simply paste your Gemini API key into the input field and click "Save & Continue". Your key will be instantly validated and you can resume building immediately.

Security & Privacy

Your API key is stored locally and securely in your browser. We DO NOT store your API key on our servers or databases. It is only sent directly to Google's API during your code generation sessions. You can revoke the key from Google AI Studio at any time.

Important Note

Never share your API key publicly or commit it to a GitHub repository.

Ready to build your first website or web app?

Start with your idea and let the AI mentor guide you step-by-step from an empty folder to a successful launch.

Start Building Now

Command Palette

Search for a command to run...