Turn Google Gemini into your personal API! This tool lets you chat with Google's Gemini AI through a simple web interface or programming code, without needing Google's official API keys.
- Chat with Gemini AI through a user-friendly web interface
- Get AI responses that you can use in your own projects
- No API keys needed - just use your Google account
- Download images - Save pictures that Gemini creates for you
- Free to use - no subscription required
Think of this like getting a temporary pass to use Gemini on your behalf:
- Open Google Chrome and go to gemini.google.com
- Sign in with your Google account
- Send any message to Gemini (like "Hello!")
- Right-click anywhere on the page and select "Inspect" (or press F12)
- Click the "Network" tab at the top
- Send another message to Gemini
- Look for a line that says something like "batchexecute" and click on it
- Find "Cookie:" in the details and copy everything after it
- Save this text - you'll need it in the next step
Don't worry if this seems complicated - you only need to do it once!
- Download this project to your computer
- Find the file called
.env.example
- Make a copy and rename it to
.env
- Open the
.env
file in any text editor (like Notepad) - Replace
your_cookies_here
with the cookie text you copied earlier:
GEMINI_COOKIES="paste_your_cookie_here"
HEADLESS=false
Important: Keep your cookie private! Don't share it with others or post it online - it's like your password.
On Windows:
- Install Python from python.org (choose "Add to PATH" during installation)
- Open Command Prompt and type these commands one by one:
pip install -r requirements.txt
playwright install firefox
On Mac:
- Install Python from python.org
- Open Terminal and type the same commands above
- Open your terminal/command prompt in the project folder
- Type:
python init.py
- Open your web browser and go to:
http://localhost:8080/docs
- Start chatting with Gemini through the web interface!
Once you've started the program, visit http://localhost:8080/docs
in your browser. You'll see a simple form where you can:
- Type your message to Gemini
- Click "Send"
- Get Gemini's response instantly
If you know how to code, you can send messages programmatically:
curl -X POST "http://localhost:8080/browser" \
-H "Content-Type: application/json" \
-d '{"prompt": "Hello Gemini!"}'
If you're familiar with Docker, you can run this in a container:
- Create your
.env
file (see Step 2 above) - Build:
docker build -t gemini-chat .
- Run:
docker run -p 8080:8080 gemini-chat
Note: If you get login errors with Docker, add DOCKER_CONTAINER=true
to your .env
file.
"Empty responses" or "Not signed in"
- Your cookie has expired (they last about 1-2 weeks)
- Go back to Step 1 and get a fresh cookie from your browser
"Command not found" errors
- Make sure Python is installed and added to your system PATH
- Try
python3
instead ofpython
on Mac/Linux
"Port already in use"
- Another program is using port 8080
- Close other programs or change the port in the code
Still having trouble?
- Make sure you're signed into Gemini in your browser
- Try using a fresh browser session
- Check that your internet connection is working
- Personal AI assistant for daily questions
- Content creation help (writing, ideas, etc.)
- Get images that Gemini creates (like drawings or charts)
- Learning tool (ask questions about any topic)
- Integrate AI into your own projects and websites
Need help? Open an issue on GitHub and we'll help you get started!