# WebModel **Repository Path**: xgcl_wcl/WebModel-ZeroToken ## Basic Information - **Project Name**: WebModel - **Description**: No description available - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-09-06 - **Last Updated**: 2026-09-06 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # ๐ŸŒ‰ web-model-bridge **Bridge web AI models through OpenAI-compatible API** Use Claude, ChatGPT, DeepSeek, and 8 more AI models โ€” completely free, zero API tokens. [License: MIT](LICENSE) [Node.js](https://nodejs.org/) [TypeScript](https://www.typescriptlang.org/) [Tests](#testing) [Quick Start](#quick-start) ยท [Supported Models](#supported-models) ยท [Configuration](#configuration) ยท [API Reference](#api-reference) ยท [Contributing](#contributing) --- ## What is this? **web-model-bridge** is a standalone HTTP service that lets any AI tool use web-based AI models through their free browser interfaces. It acts as a bridge between AI tools (OpenClaw, Claude Code, Cursor, etc.) and web AI platforms (Claude, ChatGPT, DeepSeek, etc.). ``` Your AI Tool โ†’ web-model-bridge โ†’ Browser โ†’ Web AI Model (OpenClaw) (localhost:3456) (Chrome) (claude.ai) ``` **How it works:** You log into AI websites once through a Dashboard. The bridge then uses your browser session to forward API requests โ€” no API keys, no tokens, no cost. ## Why web-model-bridge? Compared to alternatives like gpt4free (66K stars), CLIProxyAPI (23K stars), and chat2api (3.4K stars): | | web-model-bridge | gpt4free | CLIProxyAPI | chat2api | |---|---|---|---|---| | **Approach** | Real browser automation | Reverse-engineered APIs | CLI OAuth proxy | Token simulation | | **Anti-blocking** | **Strongest** โ€” real browser fingerprint | Weak โ€” APIs break often | Medium | Weak โ€” Cloudflare blocks | | **Cost** | **Free** โ€” web free tier only | Free | **Needs $20-100/mo subscription** | Free | | **Platforms** | **11 platforms, 16 models** | Varies (unstable) | 4-5 platforms | ChatGPT only | | **API formats** | **OpenAI + Anthropic** | OpenAI only | OpenAI + Anthropic | OpenAI only | | **Language** | TypeScript (Node.js native) | Python | Go | Python | **Core advantages:** 1. **Strongest anti-blocking** โ€” Uses Playwright real browser, websites can't distinguish from normal browsing 2. **Truly free** โ€” Only needs free web accounts, no paid subscriptions required 3. **Widest coverage** โ€” 11 platforms (international + Chinese), 16 models in one bridge 4. **Dual API format** โ€” Both `/v1/chat/completions` (OpenAI) and `/v1/messages` (Anthropic), works with every AI tool 5. **Node.js ecosystem** โ€” TypeScript native, `npx web-model-bridge` zero-install startup ## Features | Feature | Description | | ---------------------- | -------------------------------------------------------------------------------------- | | ๐Ÿ”Œ **11 Providers** | Claude, ChatGPT, DeepSeek, Kimi, Qwen, GLM, Grok, Gemini, Perplexity, Doubao, Xiaomimo | | ๐Ÿ”„ **Dual API Format** | OpenAI (`/v1/chat/completions`) + Anthropic (`/v1/messages`) | | ๐Ÿ–ฅ๏ธ **Web Dashboard** | Visual management โ€” login, status, one-click API URL copy | | ๐Ÿš€ **One Command** | `npx web-model-bridge` โ€” auto environment check, auto open Dashboard | | ๐Ÿ”’ **Secure** | Localhost-only by default, optional Bearer token, browser-isolated cookies | | ๐Ÿ’ป **Cross-Platform** | macOS, Linux, Windows | | ๐ŸŽฏ **Zero Config** | Works out of the box, optional YAML config for customization | ## Quick Start ### 1. Start the bridge ```bash npx web-model-bridge ``` This will: - โœ“ Check your environment (Node.js, Chrome) - โœ“ Start HTTP server on port 3456 - โœ“ Open Dashboard in your browser ### 2. Login to AI providers In the Dashboard ([http://localhost:3456](http://localhost:3456)), click **Login** next to any provider. A browser window opens โ€” log in as you normally would. Done. ### 3. Connect your AI tool **OpenClaw** โ€” Add to `~/.openclaw/openclaw.json`: ```json { "models": { "mode": "merge", "providers": { "webmodel": { "baseUrl": "http://127.0.0.1:3456/v1", "apiKey": "not-needed", "api": "openai-completions", "models": [ { "id": "deepseek-web/deepseek-v4", "name": "DeepSeek V4 (Free)", "contextWindow": 128000, "maxTokens": 8192 } ] } } } } ``` **Claude Code:** ```bash export ANTHROPIC_BASE_URL="http://localhost:3456" export ANTHROPIC_API_KEY="not-needed" claude ``` **Cursor:** Settings โ†’ Models โ†’ Override OpenAI Base URL โ†’ `http://localhost:3456/v1` **Any OpenAI-compatible tool:** Set base URL to `http://localhost:3456/v1` ## Supported Models | Model ID | Name | Context | Platform | | ----------------------------------- | -------------------- | ------- | ----------------- | | `claude-web/claude-sonnet-4-6` | Claude Sonnet 4.6 | 1M | claude.ai | | `claude-web/claude-haiku-4-5` | Claude Haiku 4.5 | 200K | claude.ai | | `chatgpt-web/gpt-5.3` | GPT-5.3 | 128K | chatgpt.com | | `chatgpt-web/gpt-5.4-mini` | GPT-5.4 Mini | 128K | chatgpt.com | | `deepseek-web/deepseek-v4` | DeepSeek V4 | 128K | chat.deepseek.com | | `deepseek-web/deepseek-v4-reasoner` | DeepSeek V4 Reasoner | 128K | chat.deepseek.com | | `kimi-web/kimi-k2.5` | Kimi K2.5 | 256K | kimi.moonshot.cn | | `qwen-web/qwen-3.5-plus` | Qwen 3.5 Plus | 262K | chat.qwen.ai | | `qwen-web/qwq` | QwQ | 32K | chat.qwen.ai | | `glm-web/glm-5` | GLM-5 | 128K | chatglm.cn | | `grok-web/grok-3` | Grok 3 | 128K | grok.com | | `gemini-web/gemini-3-flash` | Gemini 3 Flash | 1M | gemini.google.com | | `gemini-web/gemini-2.5-pro` | Gemini 2.5 Pro | 1M | gemini.google.com | | `perplexity-web/perplexity-default` | Perplexity | 128K | perplexity.ai | | `doubao-web/doubao-seed-2.0-pro` | Doubao Seed 2.0 Pro | 256K | doubao.com | | `xiaomimo-web/mimo-v2-pro` | MiMo V2 Pro | 1M | xiaomimimo.com | ## Configuration ### Command Line Options ```bash web-model-bridge # Start with defaults web-model-bridge -p 8080 # Custom port web-model-bridge --host 0.0.0.0 # Allow remote access (use with --auth-token) web-model-bridge --auth-token mysecret # Require Bearer token web-model-bridge --no-open # Don't auto-open browser web-model-bridge -v # Verbose logging (shows environment check) ``` ### Config File `~/.webmodel/config.yml`: ```yaml server: port: 3456 host: 127.0.0.1 authToken: null browser: idleShutdown: 300 # Close Chrome after 5 min idle providers: enabled: # Enable only what you need - claude-web - deepseek-web - qwen-web logging: level: info ``` ## API Reference ### OpenAI Format ```bash curl http://localhost:3456/v1/chat/completions \ -H "Content-Type: application/json" \ -d '{ "model": "deepseek-web/deepseek-v4", "messages": [{"role": "user", "content": "Hello"}], "stream": true }' ``` ### Anthropic Format ```bash curl http://localhost:3456/v1/messages \ -H "Content-Type: application/json" \ -H "x-api-key: not-needed" \ -H "anthropic-version: 2023-06-01" \ -d '{ "model": "claude-web/claude-sonnet-4-6", "max_tokens": 1024, "messages": [{"role": "user", "content": "Hello"}] }' ``` ### Management Endpoints | Endpoint | Method | Description | | ----------------------- | ------ | ------------------------- | | `/` | GET | Web Dashboard | | `/v1/chat/completions` | POST | OpenAI-compatible chat | | `/v1/messages` | POST | Anthropic-compatible chat | | `/v1/models` | GET | List available models | | `/webmodel/providers` | GET | Provider auth status | | `/webmodel/health` | GET | Server health check | | `/webmodel/auth/login` | POST | Trigger provider login | | `/webmodel/auth/logout` | POST | Clear provider auth | ## Architecture ``` โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ AI Tools (OpenClaw, Claude โ”‚ โ”‚ Code, Cursor, Open WebUI) โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ HTTP โ–ผ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ web-model-bridge โ”‚ โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ โ”‚ โ”‚ HTTP Layer โ”‚ โ”‚ โ”‚ โ”‚ OpenAI + Anthropic API โ”‚ โ”‚ โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ โ”‚ โ”‚ Core Layer โ”‚ โ”‚ โ”‚ โ”‚ Registry + SSE Stream โ”‚ โ”‚ โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ โ”‚ โ”‚ Infra Layer โ”‚ โ”‚ โ”‚ โ”‚ Chrome + Auth + Config โ”‚ โ”‚ โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ CDP โ–ผ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ Chrome (silent, background) โ”‚ โ”‚ Logged into AI websites โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ ``` ## Troubleshooting | Problem | Solution | | ---------------------------- | ---------------------------------------------------------- | | "Chrome not found" | Install Google Chrome. Run with `-v` to see detected paths | | "Browser not connected" | Chrome may have crashed. Restart web-model-bridge | | Cookie expired | Click **Re-login** in Dashboard โ€” no restart needed | | Port 3456 in use | Use `-p 8080` or any free port | | Claude Code 404 | `ANTHROPIC_BASE_URL` must NOT end with `/v1` | | Cursor connection fails | Some Cursor versions require ngrok for localhost | | Windows: Chrome not detected | Ensure Chrome is in default install path (Program Files) | ## Testing ```bash npm test # All tests (132 passing) npm run test:unit # Unit tests only npm run test:integration # Integration tests npm run test:coverage # Coverage report npm run typecheck # TypeScript strict check ``` ## Development ```bash git clone https://github.com/linuxhsj/WebModel.git cd WebModel npm install npm run dev # Start in dev mode npm test # Run tests npm run build # Build for distribution ``` ## Contributing Contributions welcome! Areas where help is needed: - ๐ŸŒ New provider adapters - ๐Ÿงช E2E test coverage - ๐Ÿ“ฑ Mobile-friendly Dashboard - ๐Ÿณ Docker image - ๐Ÿ”ง Real upstream API endpoint discovery ## License [MIT](LICENSE)