Skip to main content
AdOpenFree logoPromote your productReach more potential users and drive product growth and revenue.Advertise
Favicon of Gemini-API

Gemini-API

Free Listing

An asynchronous Python wrapper for the Google Gemini web app (formerly Bard), offering text, image, video, audio, chat, streaming, and deep research capabilities through a reverse-engineered client.

Visit HanaokaYuzu/Gemini-API

Overview

Gemini-API is a reverse-engineered asynchronous Python wrapper for the Google Gemini web app (formerly Bard). It provides a simple, elegant interface inspired by Google Generative AI's official API and supports asynchronous generation, streaming, multi-turn conversations, media outputs, Gemini Gems, extensions, and deep research.

Key Features

  • Persistent cookies with automatic background refresh for always-on services.
  • Native image generation and editing, plus video and audio/music generation.
  • Deep research workflow with plan creation, status polling, and result retrieval.
  • System prompts through Gemini Gems and support for Gemini extensions such as YouTube and Gmail.
  • Classified outputs for text, thoughts, images, videos, and audio, with streaming mode for partial results.
  • Asynchronous client and standalone CLI for quick interactions.

Use Cases

  • Building always-on services and chatbots that need automatic cookie refresh.
  • Creating multi-turn conversational applications with history handling and streaming responses.
  • Generating and saving images, videos, and audio through natural-language prompts.
  • Running deep research workflows and retrieving structured results.

Getting Started

  • Install or update the package with pip: pip install -U gemini_webapi.
  • Optionally install with browser support using pip install -U gemini_webapi[browser] to import cookies from a local Firefox browser.
  • Log in to Gemini, copy the __Secure-1PSID and __Secure-1PSIDTS cookie values, initialize GeminiClient, and call init with desired timeout and refresh settings.

Deployment & Requirements

  • Python 3.11 or higher.
  • Valid Gemini web cookies (__Secure-1PSID and __Secure-1PSIDTS) unless browser-cookie3 cookie import is used.
  • Optional browser-cookie3 dependency for automatic cookie import; currently only Firefox is supported.
  • In containerized deployments, set GEMINI_COOKIE_PATH to a writable path to persist auto-refreshed cookies.

Before You Adopt

  • License: AGPL-3.0. Review its terms before using, modifying, or distributing the project.
  • The project is a reverse-engineered wrapper rather than an officially documented Gemini web API client.
  • Image generation availability can vary by region and account.
  • Video and audio generation may require an active subscription.
  • Cookie extraction may be more reliable with Firefox because recent Chromium-based browsers can limit cookie renewal.

Comments

Sign in to leave a comment.

More like Gemini-API

Favicon of kimi-k3-in-c

kimi-k3-in-c

Free ListingStars: 10K

2.78T-parameter Kimi K3 inference in portable C99

Language Models

Runs Kimi K3, a 2.78-trillion-parameter model, on a single CPU in 8.24 GB of RAM by streaming the model from disk instead of holding it in memory. Portable C99 with no BLAS, framework, or GPU.

Favicon of nanochat

nanochat

Free ListingStars: 60.1K

Minimal experimental harness for training LLMs

Language Models

nanochat is a minimal, hackable harness for training LLMs end to end on a single GPU node, covering tokenization, pretraining, finetuning, evaluation, and inference. It is pitched as the best ChatGPT that $100 can buy.

Favicon of Heretic

Heretic

Free ListingStars: 38.2K

Training-free language model modification

Language Models

Heretic is a training-free language model modification tool. It uses mathematical techniques and configurable scorers to steer model behavior, including removing censorship, suppressing refusals, reducing slop or sycophancy, and more.