WebAI-to-API is a browser-native AI runtime that exposes browser-based AI services through OpenAI-compatible APIs.
- OpenAI-compatible
/v1/chat/completionsAPI - Provider-based architecture with unified routing
- Streaming response support (SSE)
- Conversation continuation support
- Health, readiness, and runtime diagnostics endpoints
- Docker deployment support
- Authentication management and browser login workflows
Provides access to Google Gemini models through either the WebAPI backend or a browser-native Playwright runtime.
Provides access to cloud-hosted AI models through a native API integration powered by Atlas Cloud.
Prerequisites: Git, Python >=3.11,<3.13 and Poetry. On Windows, use Python 3.11.10+ or 3.12.4+ for secure Gemini WebAPI temporary-cookie-cache handling. See the Installation Guide for full installation and troubleshooting details.
Clone the repository, enter the project directory, then run the setup wrapper for your platform.
Linux / macOS
git clone https://github.com/Amm1rr/WebAI-to-API.git
cd WebAI-to-API
./install.shWindows PowerShell
git clone https://github.com/Amm1rr/WebAI-to-API.git
cd WebAI-to-API
.\install.ps1
The wrappers create missing configuration and runtime state, install project dependencies and Playwright Chromium, then run diagnostics. See the Installation Guide for manual setup, troubleshooting, and Make shortcuts.
Review the generated config.conf. Core Gemini settings include:
[Gemini]
backend = webapi
default_model = gemini-3-flash
extended_thinking = falseConfigure Atlas separately when needed. See the Configuration Guide for provider, proxy, logging, and authentication settings.
For browser-based Gemini authentication:
poetry run python verify_login.pyGemini WebAPI can also use configured cookies. See the Configuration Guide for authentication methods. For Docker authentication, see the Docker Deployment Guide.
poetry run python src/run.py- API:
http://localhost:6969 - Dashboard:
http://localhost:6969/ui - Swagger UI:
http://localhost:6969/docs
Linux / macOS
./update-linux-macos.shWindows
update-windows.cmdUpdates are version-driven from origin/master. See the Updater Guide for locking, preflight checks, rollback, dependency sync, and platform details.
git pull
APP_UID=$(id -u) APP_GID=$(id -g) docker compose up -d --buildSee the Docker Deployment Guide for Docker setup and deployment details.
curl -X POST http://localhost:6969/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "gemini-3-flash",
"messages": [
{
"role": "user",
"content": "Hello!"
}
]
}'Open the dashboard at http://localhost:6969/ui. It provides runtime status, authentication view, model and API discovery, a playground, and conversation management where supported. See the Dashboard Guide.
| Endpoint | Purpose |
|---|---|
/v1/chat/completions |
Main OpenAI-compatible chat endpoint |
/v1/temporary/chat/completions |
Temporary Gemini WebAPI chat without durable conversation persistence |
/v1/models |
Current runtime model catalog |
/v1/conversations |
Manage persisted Gemini WebAPI conversations |
/v1/auth/status |
Authentication status |
/v1/auth/login |
Interactive browser login trigger |
/v1/runtime/status |
Runtime diagnostics |
/health |
Liveness |
/ready |
Runtime readiness |
/translate |
Translate It! compatibility endpoint |
/ui |
Dashboard |
See API Documentation for the complete API surface, including compatibility and legacy endpoints.
Available models depend on configured providers and runtime availability. Use /v1/models as the authoritative current catalog.
gemini-3-flash
playwright/gemini-3-flash
atlas/<model-id>
Unprefixed Gemini models use the configured Gemini backend. playwright/... forces browser-native Gemini routing, while atlas/... routes to Atlas. See API Documentation for full routing behavior.
Configure Gemini backend selection (webapi or playwright), default model, provider enablement, proxy, logging, and Atlas API access in config.conf and .env. Set a default for Extended Thinking with [Gemini].extended_thinking, or override it per request with provider_options.gemini.extended_thinking. See the Configuration Guide.
OpenAI-style file content parts are supported by Gemini WebAPI. Gemini Playwright and Atlas do not currently support file parts, and Gemini WebAPI does not preserve exact text/file interleaving. See API Documentation for supported formats and limits.
WebAI-to-API does not provide caller API authentication. Keep the default localhost binding unless external authentication and access control protect the service. See the Docker Deployment Guide and Dashboard Guide.
- Installation Guide
- API Documentation
- Configuration Guide
- Architecture Guide
- Docker Deployment Guide
- Dashboard Guide
- Updater Guide
Interactive API documentation is available through Swagger UI when the server is running.
WebAI-to-API is licensed under the Apache License 2.0. See LICENSE for the full text.

