Use AI Models Without API Tokens - Access DeepSeek, Doubao, Claude, ChatGPT and more for free via browser login authentication.
English | 简体中文
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 | ✅ Currently Supported | deepseek-chat, deepseek-reasoner |
| Doubao (豆包) | � Coming Soon | - |
| Claude Web | � Coming Soon | - |
| ChatGPT Web | � Coming Soon | - |
Note: Currently, only DeepSeek is fully supported. Support for Doubao, Claude, and ChatGPT is under active research and development.
┌─────────────────────────────────────────────────────────────────────────────┐
│ OpenClaw Zero Token │
├─────────────────────────────────────────────────────────────────────────────┤
│ │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
│ │ Web UI │ │ CLI/TUI │ │ Gateway │ │ Channels │ │
│ │ (Lit 3.x) │ │ │ │ (Port API) │ │ (Telegram…) │ │
│ └──────┬──────┘ └──────┬──────┘ └──────┬──────┘ └──────┬──────┘ │
│ │ │ │ │ │
│ └──────────────────┴──────────────────┴──────────────────┘ │
│ │ │
│ ┌────────▼────────┐ │
│ │ Agent Core │ │
│ │ (PI-AI Engine) │ │
│ └────────┬────────┘ │
│ │ │
│ ┌─────────────────────────────────┼─────────────────────────────────────┐ │
│ │ Provider Layer │ │
│ │ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ ┌───────────┐ │ │
│ │ │ DeepSeek API │ │ DeepSeek Web │ │ OpenAI │ │ Anthropic │ │ │
│ │ │ (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 |
- Node.js >= 22.12.0
- pnpm >= 9.0.0
- Chrome Browser
# Clone the repository
git clone https://github.com/linuxhsj/openclaw-zero-token.git
cd openclaw-zero-token
# Install dependencies
pnpm install
# Build
pnpm build# Run setup wizard
node openclaw.mjs onboard
# Select authentication method
? Auth provider: DeepSeek (Browser Login)
# Choose login mode
? DeepSeek Auth Mode:
> Automated Login (Recommended) # Auto-capture credentials
Manual Paste # Manually paste credentials# Start the service
node openclaw.mjs gateway
# Access Web UI
open http://127.0.0.1:3001Visit http://127.0.0.1:3001 and start chatting with DeepSeek models directly.
# Call via Gateway Token
curl http://127.0.0.1:3001/v1/chat/completions \
-H "Authorization: Bearer YOUR_GATEWAY_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"model": "deepseek-web/deepseek-chat",
"messages": [{"role": "user", "content": "Hello!"}]
}'# Interactive terminal
node openclaw.mjs tui{
"auth": {
"profiles": {
"deepseek-web:default": {
"provider": "deepseek-web",
"mode": "api_key"
}
}
},
"models": {
"providers": {
"deepseek-web": {
"baseUrl": "https://chat.deepseek.com",
"api": "deepseek-web",
"models": [
{
"id": "deepseek-chat",
"name": "DeepSeek Chat",
"contextWindow": 64000,
"maxTokens": 4096
},
{
"id": "deepseek-reasoner",
"name": "DeepSeek Reasoner",
"reasoning": true,
"contextWindow": 64000,
"maxTokens": 8192
}
]
}
}
},
"gateway": {
"port": 3001,
"auth": {
"mode": "token",
"token": "your-gateway-token"
}
}
}- ✅ DeepSeek Web authentication (stable)
- 🔧 Improving credential capture reliability
- 📝 Documentation improvements
- 🔜 Doubao (豆包) Web authentication support
- 🔜 Claude Web authentication support
- 🔜 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
}openclaw-zero-token/
├── src/
│ ├── providers/
│ │ ├── deepseek-web-auth.ts # DeepSeek login capture
│ │ └── deepseek-web-client.ts # DeepSeek API client
│ ├── agents/
│ │ └── deepseek-web-stream.ts # Streaming response handler
│ ├── commands/
│ │ └── auth-choice.apply.deepseek-web.ts # Authentication flow
│ └── browser/
│ └── chrome.ts # Chrome automation
├── ui/ # Web UI (Lit 3.x)
├── .openclaw-state/ # Local state (not committed)
│ ├── openclaw.json # Configuration
│ └── agents/main/agent/
│ └── auth.json # Credentials (sensitive)
└── .gitignore # Includes .openclaw-state/
- Credential Storage: Cookies and Bearer tokens are stored locally in
auth.json, never committed to Git - Session Expiry: Web sessions may expire and require periodic re-login
- Rate Limits: Web APIs may have rate limits, not suitable for high-frequency calls
- Compliance: For personal learning and research only, please comply with platform terms of service
This project is based on OpenClaw. Sync upstream updates with:
# Add upstream repository
git remote add upstream https://github.com/openclaw/openclaw.git
# Sync upstream updates
git fetch upstream
git merge upstream/mainContributions are welcome, especially:
- New platform Web authentication support (Doubao, Claude, ChatGPT, etc.)
- Bug fixes
- Documentation improvements
This project is for learning and research purposes only. When using this project to access any third-party services, please ensure compliance with that service's terms of use. The developers are not responsible for any issues arising from the use of this project.