Skip to content

Repository files navigation

🌉 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: MITNode.jsTypeScriptTests

Quick Start · Supported Models · Configuration · API Reference · 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-bridgegpt4freeCLIProxyAPIchat2api
ApproachReal browser automationReverse-engineered APIsCLI OAuth proxyToken simulation
Anti-blockingStrongest — real browser fingerprintWeak — APIs break oftenMediumWeak — Cloudflare blocks
CostFree — web free tier onlyFreeNeeds $20-100/mo subscriptionFree
Platforms11 platforms, 16 modelsVaries (unstable)4-5 platformsChatGPT only
API formatsOpenAI + AnthropicOpenAI onlyOpenAI + AnthropicOpenAI only
LanguageTypeScript (Node.js native)PythonGoPython

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

FeatureDescription
🔌 11 ProvidersClaude, ChatGPT, DeepSeek, Kimi, Qwen, GLM, Grok, Gemini, Perplexity, Doubao, Xiaomimo
🔄 Dual API FormatOpenAI (/v1/chat/completions) + Anthropic (/v1/messages)
🖥️ Web DashboardVisual management — login, status, one-click API URL copy
🚀 One Commandnpx web-model-bridge — auto environment check, auto open Dashboard
🔒 SecureLocalhost-only by default, optional Bearer token, browser-isolated cookies
💻 Cross-PlatformmacOS, Linux, Windows
🎯 Zero ConfigWorks out of the box, optional YAML config for customization

Quick Start

1. Start the bridge

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), 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:

{
"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:

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 IDNameContextPlatform
claude-web/claude-sonnet-4-6Claude Sonnet 4.61Mclaude.ai
claude-web/claude-haiku-4-5Claude Haiku 4.5200Kclaude.ai
chatgpt-web/gpt-5.3GPT-5.3128Kchatgpt.com
chatgpt-web/gpt-5.4-miniGPT-5.4 Mini128Kchatgpt.com
deepseek-web/deepseek-v4DeepSeek V4128Kchat.deepseek.com
deepseek-web/deepseek-v4-reasonerDeepSeek V4 Reasoner128Kchat.deepseek.com
kimi-web/kimi-k2.5Kimi K2.5256Kkimi.moonshot.cn
qwen-web/qwen-3.5-plusQwen 3.5 Plus262Kchat.qwen.ai
qwen-web/qwqQwQ32Kchat.qwen.ai
glm-web/glm-5GLM-5128Kchatglm.cn
grok-web/grok-3Grok 3128Kgrok.com
gemini-web/gemini-3-flashGemini 3 Flash1Mgemini.google.com
gemini-web/gemini-2.5-proGemini 2.5 Pro1Mgemini.google.com
perplexity-web/perplexity-defaultPerplexity128Kperplexity.ai
doubao-web/doubao-seed-2.0-proDoubao Seed 2.0 Pro256Kdoubao.com
xiaomimo-web/mimo-v2-proMiMo V2 Pro1Mxiaomimimo.com

Configuration

Command Line Options

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:

server:
port: 3456host: 127.0.0.1authToken: nullbrowser:
idleShutdown: 300# Close Chrome after 5 min idleproviders:
enabled: # Enable only what you need
- claude-web
- deepseek-web
- qwen-weblogging:
level: info

API Reference

OpenAI Format

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

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

EndpointMethodDescription
/GETWeb Dashboard
/v1/chat/completionsPOSTOpenAI-compatible chat
/v1/messagesPOSTAnthropic-compatible chat
/v1/modelsGETList available models
/webmodel/providersGETProvider auth status
/webmodel/healthGETServer health check
/webmodel/auth/loginPOSTTrigger provider login
/webmodel/auth/logoutPOSTClear 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

ProblemSolution
"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 expiredClick Re-login in Dashboard — no restart needed
Port 3456 in useUse -p 8080 or any free port
Claude Code 404ANTHROPIC_BASE_URL must NOT end with /v1
Cursor connection failsSome Cursor versions require ngrok for localhost
Windows: Chrome not detectedEnsure Chrome is in default install path (Program Files)

Testing

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

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

About

Use All Major AI Models NO API Token! Claude/ChatGPT/Gemini/DeepSeek/Doubao/Grok/Qwen/Manus/Kimi

Resources

Stars

74 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages