HanaokaYuzu/Gemini-API
✨ Reverse-engineered Python API for Google Gemini web app
What it solves
This project provides a reverse-engineered asynchronous Python wrapper for the Google Gemini web app, allowing developers to interact with Gemini's web-based features programmatically without using the official API.
How it works
It utilizes asyncio for efficient task handling and requires authentication via browser cookies (__Secure-1PSID and __Secure-1PSIDTS). The library automatically refreshes these cookies in the background to maintain persistent sessions for always-on services. It can also automatically import cookies from Firefox via the browser-cookie3 dependency.
Who it’s for
Python developers who want to integrate Gemini's web-app capabilities—such as Gemini Gems, extensions, and multimodal generation—into their own applications or CLI tools.
Highlights
- Multimodal Capabilities: Supports generating and editing images, as well as generating video and audio/music content.
- Deep Research: Implements a full workflow for plan creation, status polling, and result retrieval.
- Gemini Gems: Allows applying, creating, updating, and deleting custom system prompts (Gems).
- Extension Support: Integrates with Gemini extensions like YouTube and Gmail.
- Advanced Session Management: Features streaming mode for real-time responses, temporary chat modes, and the ability to retrieve a model's thought process.
- Persistent Authentication: Automatically refreshes cookies to avoid frequent re-authentication.
Related
- Project
- Project
- Project
- Project
- Project