baoyu-danger-gemini-web

Generates text and images through the reverse-engineered Gemini Web API with session support.

1|Updated May 16, 2026
One-click install
npx skills add https://github.com/ludotype/game-adventurertown --skill baoyu-danger-gemini-web-ludotype
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: baoyu-danger-gemini-web
Source: https://github.com/ludotype/game-adventurertown/tree/main/.agent/skills/baoyu-danger-gemini-web
Command: npx skills add https://github.com/ludotype/game-adventurertown --skill baoyu-danger-gemini-web-ludotype

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires baoyu-chrome-cdp, and includes scripts (resource) components.

What problem does it solve? Accessing Gemini's text and image generation without an official API key requires browser-based authentication and unofficial endpoints. This Skill provides a CLI client that authenticates via Google cookies and calls the Gemini Web API directly, enabling text generation, image generation, vision input, and multi-turn conversations from the command line. ## Core Features & Use Cases - Text and Image Generation: Run prompts against Gemini 3.0 Pro, Flash, Flash Thinking, or 3.1 Pro Preview models, and save generated images to disk. - Vision Input and Multi-Turn Chat: Attach reference images for vision tasks and persist conversation state across calls using session IDs. - Browser-Based Authentication: Automatically retrieves Google session cookies from a local Chrome/Chromium instance via CDP, with cookie caching and automatic refresh. - Use Case: An agent pipeline needs an image generation backend. It invokes the CLI with a prompt and --image flag, and the Skill returns a saved PNG path after handling authentication and cookie refresh automatically. ## Quick Start Ask the agent to generate an image of a cute cat with Gemini and save it to cat.png using this skill.

Frequently Asked Questions about baoyu-danger-gemini-web

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate an image with Gemini from the command line?▼

Run the main.ts script with bun or npx, passing a prompt and the --image flag with an output path. The skill authenticates using cached Google cookies and saves the first generated image to the specified file.

How does Gemini Web API authentication work without an API key?▼

The client extracts __Secure-1PSID and __Secure-1PSIDTS cookies from a local Chrome or Chromium session via the Chrome DevTools Protocol. Cookies are cached to a file and automatically rotated to keep the session valid.

Which Gemini models does this client support?▼

Supported models are gemini-3-pro (default), gemini-3-flash, gemini-3-flash-thinking, and gemini-3.1-pro-preview. Select one with the --model flag when invoking the script.

Can I continue a multi-turn conversation with Gemini Web?▼

Yes, pass a --sessionId flag to persist conversation state. Session metadata and message history are stored as JSON files, and subsequent calls with the same ID resume the chat context.

Why does Gemini image generation fail or return no image?▼

Failures occur when cookies expire, the usage limit for a model is exceeded, or Google temporarily blocks the IP address. Refresh cookies with the --login flag, switch models, or configure a proxy via HTTP_PROXY.

What are the risks of using a reverse-engineered Gemini API?▼

Reverse-engineered endpoints can break without notice when Google changes response formats, and usage may violate Google's terms of service. The skill requires explicit user consent stored in a consent file before first use.