WebAI To API banner
leolionart leolionart

WebAI To API

AI community

Description

Gemini to API (Don't need API KEY) to use Gemini Model Free

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

**This project is intended for research and educational purposes only.** Please use it responsibly and refrain from any commercial use.

WebAI-to-API

A FastAPI server that exposes Google Gemini (via browser cookies) as a local OpenAI-compatible API endpoint. No API key required — it reuses your existing browser session.

Compatible with any tool that supports the OpenAI API format: [Open WebUI](https://github.com/open-webui/open-webui), [Cursor](https://cursor.sh), [Continue](https://continue.dev), custom scripts, etc.

![1771806187019](assets/1771806187019.png)


Deploy with Docker Compose

1. Create a folder and add two files

**`docker-compose.yml`**

services:
  web_ai:
    image: ghcr.io/leolionart/webai-to-api:latest
    container_name: web_ai_server
    restart: always
    ports:
      - "6969:6969"
    environment:
      - PYTHONPATH=/app/src
      - CONFIG_PATH=/app/data/config.conf
    volumes:
      - ./config.conf:/app/data/config.conf
    command: uvicorn app.main:app --host 0.0.0.0 --port 6969 --workers 1 --log-level info

**`config.conf`** (leave cookies empty for now)

[Browser]
name = chrome

[AI]
default_ai = gemini
default_model_gemini = gemini-3.0-flash

[Cookies]
gemini_cookie_1psid   =
gemini_cookie_1psidts =

[EnabledAI]
gemini = true

[Proxy]
http_proxy =

2. Start the server

docker compose up -d

3. Open the admin dashboard

Go to **`http://localhost:6969/admin`**

From there, paste your Gemini cookies and click **Connect** — no file editing needed.


Getting Gemini cookies

  1. Open gemini.google.com and log in
  2. Open DevTools (F12) → Network tab → refresh the page → click any request to gemini.google.com
  3. Right-click the request → Copy → Copy as cURL
  4. Paste the cURL command into the admin dashboard — it extracts the cookies automatically

Or manually: DevTools → **Application** → **Cookies** → copy `__Secure-1PSID` and `__Secur