WebAI2API  by foxhui

Web AI services to OpenAI API gateway

Created 4 months ago
418 stars

Top 70.2% on SourcePulse

GitHubView on GitHub
Project Summary

Summary

WebAI2API transforms web-based AI services like LMArena and Gemini into an OpenAI-compatible API. It targets developers needing to integrate diverse AI models into applications, offering multi-window concurrency and account isolation for managing multiple AI service accounts simultaneously.

How It Works

This project utilizes Camoufox, built on Playwright, to simulate human-like browser interactions, effectively bypassing anti-automation detection on AI websites. It exposes these web services via a standardized OpenAI-formatted API, supporting streaming responses and enabling concurrent, isolated browser instances for managing different accounts or services.

Quick Start & Requirements

  • Installation: Source installation requires Node.js v20.0.0+ and dependencies installed via pnpm install and npm run init (network proxy recommended). Docker deployment is available via docker run or docker-compose up -d.
  • Prerequisites: Node.js v20.0.0+, OS (Windows/Linux/macOS). Linux requires xvfb, x11vnc, libgtk-3-0, libx11-xcb1, libasound2.
  • Running: Use npm start or npm start -- -xvfb -vnc on Linux. Docker images include Xvfb and VNC.
  • Configuration: Edit data/config.yaml. Access Web UI at http://localhost:3000.
  • Initial Setup: Requires connecting to a virtual display (if applicable) and manually logging into AI service accounts within the Web UI.
  • Docs: Full configuration and API details are available via the Web UI or linked documentation.

Highlighted Details

  • Supports numerous AI services (LMArena, Gemini, ChatGPT, Sora, etc.) for text, image, and video generation.
  • Features multi-window concurrency and browser instance-level data isolation for managing multiple accounts or services simultaneously.
  • Provides an OpenAI-compatible API (/v1/chat/completions, /v1/models) with streaming support.
  • Includes a visual management interface for logs, VNC connections, and adapter management.

Maintenance & Community

The README does not explicitly detail contributors, community channels, or sponsorships. The project has migrated from Puppeteer to Camoufox to enhance evasion of anti-bot detection mechanisms.

Licensing & Compatibility

Released under the MIT License, permitting commercial use and integration into closed-source projects, provided users comply with underlying AI website terms of service.

Limitations & Caveats

Intended for learning and exchange; users bear responsibility for consequences like account bans and must adhere to website ToS. Non-headless mode (or Xvfb) is recommended for long-term operation to mitigate detection risks. Some AI services may yield watermarked results or have specific limitations.

Health Check
Last Commit

3 days ago

Responsiveness

Inactive

Pull Requests (30d)
9
Issues (30d)
25
Star History
258 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.