This document describes the available configuration and authentication methods supported by WebAI-to-API.
When initializing the Gemini backend, WebAI-to-API searches for authentication material in the following priority order:
config.conf([Gemini] section): Explicitly configured cookies.config.conf([Cookies] section): Legacy/deprecated cookie configuration.runtime/auth/gemini.json: Persistence state generated byverify_login.py.- Browser Discovery: Automatic cookie retrieval from local browser profiles (host-only).
WebAI-to-API supports multiple authentication approaches depending on the selected backend and deployment environment.
Configure Gemini authentication directly in config.conf:
[Gemini]
secure_1psid =
secure_1psidts =- Works in Docker and host environments
- No browser automation required
- Quick setup
- Gemini WebAPI deployments
- Headless environments
- Simple installations
Generate browser authentication state:
poetry run python verify_login.pyThis creates:
runtime/auth/gemini.json
- Native browser authentication
- Persistent login state
- Recommended Playwright workflow
- Playwright backend
- Docker + Playwright deployments
- Long-lived authenticated sessions
WebAI-to-API can automatically retrieve cookies from supported browsers when explicit credentials are not provided.
Supported browsers depend on the local environment and available browser profiles.
| Method | Backend | Docker | Persistence |
|---|---|---|---|
| Manual Cookies | WebAPI | Yes | Cookie lifetime |
| verify_login.py | Playwright | Yes | Persistent |
| Browser Discovery | WebAPI | Host Only | Cookie lifetime |
| /v1/auth/login | Playwright | Host Only | Persistent |
Install Playwright browser binaries:
poetry run playwright install chromiumGenerate authentication:
poetry run python verify_login.pyVerify status:
curl http://localhost:6969/v1/auth/statusExample:
[Gemini]
backend = webapi
default_model = gemini-3-flash
[EnabledAI]
gemini = true
[Browser]
name = firefox
[Proxy]
http_proxy =| Option | Description |
|---|---|
backend |
Execution backend (webapi or playwright) |
default_model |
Default Gemini model |
The following keys are accepted for manual cookie configuration:
__Secure-1PSID/__Secure-1PSIDTS(Canonical)gemini_cookie_1psid/gemini_cookie_1psidts(Supported)
Warning
The [Cookies] configuration section is legacy and deprecated. Please move your cookies to the [Gemini] section.
| Option | Description |
|---|---|
api_key |
Atlas Cloud API key |
base_url |
Atlas Cloud API base address |
Note
Atlas models are only advertised when Atlas is configured with a valid API key. If Atlas is not configured, Atlas models will not appear in the model catalog or dashboard UI.
| Option | Description |
|---|---|
name |
Browser used for cookie discovery |
| Option | Description |
|---|---|
http_proxy |
Optional outbound proxy |
| Option | Description |
|---|---|
gemini |
Enable or disable Gemini |
For Playwright deployments:
- Run authentication on the host machine.
- Generate
runtime/auth/gemini.json. - Start the Docker container.
- Restart the container whenever authentication is refreshed.
See Docker.md for complete deployment instructions.
WebAI-to-API logging behavior can be configured centrally to manage console output verbosity and HTTP access logging.
Logging settings are resolved in the following priority order:
- CLI Arguments (highest priority)
- OS Environment Variables
- Configuration File (
[Logging]section inconfig.conf, if present) - System Defaults (
INFOlevel, access logs enabled)
You can manage logging in config.conf using the [Logging] section:
[Logging]
# Log level: DEBUG, INFO, WARNING, ERROR, CRITICAL
level = INFO
# Disable Uvicorn request logs (default: false)
disable_access_logs = false- Default Run (runs at
INFOlevel, access logs enabled):poetry run python src/run.py
- Enable DEBUG via CLI:
poetry run python src/run.py --log-level debug
- Enable DEBUG via Environment Variable:
LOG_LEVEL=DEBUG poetry run python src/run.py
- Disable HTTP Access Logs:
poetry run python src/run.py --disable-access-logs
The full configuration template is available in:
config.conf.example