WebAI-to-API is a browser-native AI runtime that exposes browser-based AI services through OpenAI-compatible APIs.
WebAI-to-API combines browser-native automation with WebAPI-based provider integrations to expose AI services through a flexible OpenAI-compatible API layer.
- 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.
poetry install
poetry run playwright install chromiumcp config.conf.example config.confpython verify_login.pypoetry run python src/run.pyTip
New users can run make setup and make doctor for automated setup and diagnostics. See Convenience Shortcuts below.
WebAI-to-API includes a bootstrap utility and a Makefile for common setup tasks.
| Command | Description |
|---|---|
make setup |
One-step install, directory creation, and config setup. |
make doctor |
Run environment and dependency diagnostics. |
Alternative (no Make): python scripts/bootstrap.py and python scripts/doctor.py
Gemini requires an authenticated Google session.
| Method | Recommended For |
|---|---|
Browser Login (verify_login.py) |
Recommended. Playwright backend, Docker, and long-term usage. |
| Manual Cookies | Quick testing and WebAPI-only usage. |
- Run the interactive login helper:
python verify_login.py
- Complete the sign-in process in the browser window.
- This creates
runtime/auth/gemini.json, used by both backends.
- Sign in to Gemini.
- Copy
__Secure-1PSIDand__Secure-1PSIDTSfrom your browser cookies. - Paste them into the
[Gemini]section ofconfig.conf.
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.
The dashboard provides a visual interface for runtime status, authentication management, API discovery, and interactive testing.
| Endpoint | Purpose |
|---|---|
/v1/chat/completions |
OpenAI-compatible chat completions |
/v1/temporary/chat/completions |
Gemini WebAPI temporary chat |
/v1/models |
List supported models |
/v1/auth/status |
Check authentication status |
/v1/auth/login |
Start authentication flow |
/v1/conversations |
Manage Gemini WebAPI conversation snapshots |
/translate |
Legacy translation compatibility |
/ui/* |
Dashboard and playground |
/v1/temporary/chat/completions is Gemini WebAPI-only and uses Gemini temporary requests (temporary=True).
Requests are not stored in Gemini history and do not create SQLite conversation snapshots.
It supports streaming, non-streaming, multimodal file inputs, and artifact outputs. See docs/api.md for details.
The /translate endpoint is maintained for compatibility with the Translate It! browser extension.
It uses Gemini temporary requests and a shared in-memory session. See docs/api.md for additional details.
File input is supported through OpenAI-style content parts on /v1/chat/completions when routed to the Gemini WebAPI backend.
The currently verified file formats are documented in docs/api.md.
Note
File parts are supported only by the Gemini WebAPI backend in the MVP. Gemini Playwright and Atlas reject file parts with a clear capability error.
For Gemini WebAPI, text content parts are concatenated into one prompt and file parts are passed as attachments. Exact text/file interleaving order is not preserved.
The built-in /ui/playground page uses the same contract for file attachments.
Available models may vary depending on the configured provider and backend.
Use the /v1/models endpoint to retrieve the current list of supported models.
WebAI-to-API uses model prefixes to route requests to specific backends.
| Model | Backend |
|---|---|
gemini-3-flash |
Gemini (default configured backend) |
playwright/gemini-3-flash |
Gemini Playwright |
atlas/<model-id> |
Atlas Cloud via OpenAI-compatible API, with 50 validated chat models exposed in /v1/models |
Tip
Model prefixes force backend selection and override the default Gemini backend configured in config.conf. Use playwright/... model prefixes to force the Playwright backend explicitly.
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.

