Zero API Token Cost — Free access to AI models via browser-based authentication (ChatGPT, Claude, Gemini, DeepSeek, Qwen, Doubao, Kimi, GLM, Grok, Manus, and more).
OpenClaw Zero Token is a fork of OpenClaw with a core mission: eliminate API token costs by capturing session credentials through browser automation, enabling free access to major AI platforms.
| Traditional Approach | Zero Token Approach |
|---|---|
| Requires purchasing API tokens | Completely free |
| Pay per API call | No usage limits |
| Credit card binding required | Only web login needed |
| Potential token leakage | Credentials stored locally |
| Platform | Status | Models |
|---|---|---|
| DeepSeek | ✅ Tested | deepseek-chat, deepseek-reasoner |
| Qwen (千问) | ✅ Tested | Qwen 3.5 Plus, Qwen 3.5 Turbo |
| Kimi | ✅ Tested | Moonshot v1 8K, 32K, 128K |
| Claude Web | ✅ Tested | claude-3-5-sonnet-20241022, claude-3-opus-20240229, claude-3-haiku-20240307 |
| Doubao (豆包) | ✅ Tested | doubao-seed-2.0, doubao-pro |
| ChatGPT Web | ✅ Tested | GPT-4, GPT-4 Turbo |
| Gemini Web | ✅ Tested | Gemini Pro, Gemini Ultra |
| Grok Web | ✅ Tested | Grok 1, Grok 2 |
| GLM Web (智谱清言) | ✅ Tested | glm-4-Plus, glm-4-Think |
| Manus API | ✅ Tested | Manus 1.6, Manus 1.6 Lite (API key, free tier) |
Note: All web-based providers use browser automation (Playwright) for authentication and API access. Platforms marked Tested have been verified to work.
# 1. Build
npm install && npm run build && pnpm ui:build
# 2. Open browser debug
./start-chrome-debug.sh
# 3. Login to platforms (Qwen, Kimi, Claude, etc. — exclude DeepSeek)
# 4. Configure onboard
./onboard.sh
# 5. Login DeepSeek (Chrome + onboard select deepseek-web)
# 6. Start server
./server.sh startSee START_HERE.md and TEST_STEPS.md for details.
┌─────────────────────────────────────────────────────────────────────────────┐
│ OpenClaw Zero Token │
├─────────────────────────────────────────────────────────────────────────────┤
│ │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
│ │ Web UI │ │ CLI/TUI │ │ Gateway │ │ Channels │ │
│ │ (Lit 3.x) │ │ │ │ (Port API) │ │ (Telegram…) │ │
│ └──────┬──────┘ └──────┬──────┘ └──────┬──────┘ └──────┬──────┘ │
│ │ │ │ │ │
│ └──────────────────┴──────────────────┴──────────────────┘ │
│ │ │
│ ┌────────▼────────┐ │
│ │ Agent Core │ │
│ │ (PI-AI Engine) │ │
│ └────────┬────────┘ │
│ │ │
│ ┌─────────────────────────────────┼─────────────────────────────────────┐ │
│ │ Provider Layer │ │
│ │ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │ │
│ │ │ DeepSeek Web │ │ Doubao Web │ │ OpenAI │ │ Anthropic │ │ │
│ │ │ (Zero Token) │ │ (Zero Token) │ │ (Token) │ │ (Token) │ │ │
│ │ └──────────────┘ └──────────────┘ └──────────────┘ └──────────────┘ │ │
│ └───────────────────────────────────────────────────────────────────────┘ │
│ │
└─────────────────────────────────────────────────────────────────────────────┘
┌────────────────────────────────────────────────────────────────────────────┐
│ DeepSeek Web Authentication Flow │
├────────────────────────────────────────────────────────────────────────────┤
│ │
│ 1. Launch Browser │
│ ┌─────────────┐ │
│ │ openclaw │ ──start──▶ Chrome (CDP Port: 18892) │
│ │ gateway │ with user data directory │
│ └─────────────┘ │
│ │
│ 2. User Login │
│ ┌─────────────┐ │
│ │ User logs in│ ──visit──▶ https://chat.deepseek.com │
│ │ browser │ scan QR / password login │
│ └─────────────┘ │
│ │
│ 3. Capture Credentials │
│ ┌─────────────┐ │
│ │ Playwright │ ──listen──▶ Network requests │
│ │ CDP Connect │ Intercept Authorization Header │
│ └─────────────┘ Extract Cookies │
│ │
│ 4. Store Credentials │
│ ┌─────────────┐ │
│ │ auth.json │ ◀──save── { cookie, bearer, userAgent } │
│ └─────────────┘ │
│ │
│ 5. API Calls │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
│ │ DeepSeek │ ──▶ │ DeepSeek │ ──▶ │ chat.deep- │ │
│ │ WebClient │ │ Web API │ │ seek.com │ │
│ └─────────────┘ └─────────────┘ └─────────────┘ │
│ Using stored Cookie + Bearer Token │
│ │
└────────────────────────────────────────────────────────────────────────────┘
| Component | Implementation |
|---|---|
| Browser Automation | Playwright CDP connection to Chrome |
| Credential Capture | Network request interception, Authorization Header extraction |
| PoW Challenge | WASM SHA3 computation for anti-bot bypass |
| Streaming Response | SSE parsing + custom tag parser |
Doubao integration uses browser automation (Playwright) for authentication and API access, similar to Claude Web.
Browser Login (Playwright)
↓
Capture sessionid & ttwid (Cookies)
↓
Keep Browser Connection Open
↓
Execute Requests in Browser Context (page.evaluate)
↓
Doubao API Response (SSE Stream)
Key Features:
- ✅ No Proxy Required: Direct browser-based access
- ✅ Automatic Parameter Handling: Browser generates dynamic parameters (msToken, a_bogus, fp, etc.)
- ✅ Cloudflare Bypass: Requests sent in real browser context
- ✅ Simple Authentication: Only needs sessionid and ttwid
- ✅ Streaming Support: Real-time response streaming
Same 6-step flow: build → Chrome debug → login platforms → onboard → DeepSeek auth → server. For Doubao, select doubao-web in ./onboard.sh.
| Model ID | Name | Features |
|---|---|---|
doubao-seed-2.0 |
Doubao-Seed 2.0 | Supports reasoning |
doubao-pro |
Doubao Pro | Standard model |
The configuration is stored in .openclaw-state/openclaw.json:
{
"browser": {
"attachOnly": true,
"defaultProfile": "my-chrome",
"profiles": {
"my-chrome": {
"cdpUrl": "http://127.0.0.1:9222"
}
}
},
"models": {
"providers": {
"doubao-web": {
"baseUrl": "https://www.doubao.com",
"api": "doubao-web",
"models": [
{
"id": "doubao-seed-2.0",
"name": "Doubao-Seed 2.0 (Web)"
}
]
}
}
}
}Chrome connection failed:
# Check if Chrome is running
ps aux | grep "chrome.*9222"See INSTALLATION.md and START_HERE.md for full setup and troubleshooting.
- ✅ DeepSeek Web, Qwen, Kimi, Claude Web, Doubao, Manus API — all tested and working
- 🔧 Improving credential capture reliability
- 📝 Documentation improvements
- 🔜 ChatGPT Web authentication support
- 🔜 Auto-refresh for expired sessions
To add support for a new platform, create the following files:
export async function loginPlatformWeb(params: {
onProgress: (msg: string) => void;
openUrl: (url: string) => Promise<boolean>;
}): Promise<{ cookie: string; bearer: string; userAgent: string }> {
// Browser automation login, capture credentials
}export class PlatformWebClient {
constructor(options: { cookie: string; bearer?: string }) {}
async chatCompletions(params: ChatParams): Promise<ReadableStream> {
// Call platform Web API
}
}export function createPlatformWebStreamFn(credentials: string): StreamFn {
// Handle platform-specific response format
}