← all repositories
foxhui/WebAI2API

When the AI has no API, send a browser in a trenchcoat instead

It automates web-only AI services through a stealth browser to expose them as OpenAI-compatible endpoints with multi-account isolation.

1.2k stars JavaScript Inference · Serving
WebAI2API
Not currently ranked — collecting fresh signals.
star history

What it does

WebAI2API is middleware that drives real browser instances via Camoufox—an anti-detection fork of Playwright—to interact with web-based AI platforms like LMArena, Gemini, ChatGPT, and DeepSeek. It translates those manual web sessions into a standard OpenAI-format API, complete with streaming responses and model enumeration. The project is essentially sophisticated glue code between a headful browser and an HTTP server.

The interesting bit

Rather than scraping raw HTML, the project leans into evasion: it deliberately runs in headed mode with simulated human typing and mouse trails to avoid anti-bot measures, and bundles VNC access so you can babysit the browser when a site demands a manual CAPTCHA or Terms-of-Service click-through. That makes it less a traditional scraper and more a remote puppeteer for finicky web UIs.

Key highlights

  • Supports a wide roster of web AI services—LMArena, Gemini (consumer and enterprise), ChatGPT, DeepSeek, Sora, and others—with varying capabilities for text, image, and video generation.
  • Exposes an OpenAI-compatible /v1/chat/completions endpoint, including SSE streaming with configurable heartbeat keepalive to prevent timeouts during long browser-driven tasks.
  • Isolates accounts at the browser-instance level, allowing multi-window concurrency with independent proxies and persistent cookie jars.
  • Ships with a web dashboard for real-time logs, adapter management, and VNC-based virtual display access.
  • Requires genuine browser profiles and manual login initialization; it will not bypass authentication, only automation detection.

Caveats

  • The README warns that the WebUI traffic is unencrypted, making the built-in VNC and dashboard unsafe for direct public exposure without an SSH tunnel or HTTPS reverse proxy.
  • Resource overhead is non-trivial: even a single instance is recommended to run on 2 CPU cores and 2 GB of RAM, and the authors note that a 1C1G Oracle free tier is “tight and laggy.”
  • Several supported services mark image or video results with watermarks (noted with a 💧 in the README), and some capabilities are explicitly unsupported where the underlying site lacks them.

Verdict

This is for developers who need API access to web-only AI tiers—free accounts, promotional credits, or region-locked interfaces—and are willing to trade infrastructure overhead for that access. If you already have official API keys and a clean legal path, running a fleet of stealth browsers is probably more trouble than it is worth.

Frequently asked

What is foxhui/WebAI2API?
It automates web-only AI services through a stealth browser to expose them as OpenAI-compatible endpoints with multi-account isolation.
Is WebAI2API open source?
Yes — foxhui/WebAI2API is open source, released under the MIT license.
What language is WebAI2API written in?
foxhui/WebAI2API is primarily written in JavaScript.
How popular is WebAI2API?
foxhui/WebAI2API has 1.2k stars on GitHub.
Where can I find WebAI2API?
foxhui/WebAI2API is on GitHub at https://github.com/foxhui/WebAI2API.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.