Top AI Repos — open-source AI, indexed and scored
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Route OpenClaw API requests through Claude Code subscription billing instead of Extra Usage
| Date | Stars |
|---|---|
| 2026-07-31 | 512 |
| 2026-08-06 | 513 |
Today
+1 stars today
This week
— stars this week
This month
— stars this month
Momentum
0.0
growth rate 0.00%/day
# OpenClaw Subscription Billing Proxy
Route your OpenClaw API requests through your Claude Max/Pro subscription instead of Extra Usage billing.
## What This Does
After Anthropic revoked subscription billing for third-party tools (April 4, 2026), OpenClaw requests are billed to Extra Usage. This proxy sits between OpenClaw and the Anthropic API, injecting Claude Code's billing identifier so requests use your existing subscription.
**Zero cost increase. Full OpenClaw functionality. No code changes to OpenClaw.**
## How It Works
The proxy performs 7-layer bidirectional request/response processing to defeat Anthropic's multi-layer detection:
**Outbound (request to API):**
1. **Billing Header** -- Injects an 84-character Claude Code billing identifier into the system prompt
2. **Token Swap** -- Replaces OpenClaw's auth token with your Claude Code OAuth token
3. **String Sanitization** -- Replaces 30 trigger phrases (OpenClaw, sessions_*, HEARTBEAT, etc.)
4. **Tool Name Bypass** -- Renames all 29 OpenClaw tool names to PascalCase Claude Code convention (e.g., `exec` -> `Bash`, `lcm_grep` -> `ContextGrep`) throughout the entire body
5. **System Template Bypass** -- Strips ~28K of structured config sections and replaces with a ~0.5K natural prose paraphrase
6. **Tool Description Stripping** -- Removes tool descriptions to reduce fingerprint signal
7. **Property Renaming** -- Renames OC-specific schema properties (e.g., `session_id` -> `thread_id`)
**Inbound (response to OpenClaw):**
8. **Full Reverse Mapping** -- Restores ALL original tool names, property names, file paths, and identifiers in both SSE streaming chunks and JSON responses
This ensures Anthropic sees what looks like a Claude Code session while OpenClaw sees its original tool names, paths, and identifiers.
## Requirements
- **Node.js** 18+
- **Claude Max or Pro subscription**
- **Claude Code CLI** installed and authenticated
- **OpenClaw** installed and running
### Installing Claude Code CLI (if not already installed)
```bash
npm install -g @anthropic-ai/claude-code
```
Then authenticate with your Claude account:
```bash
claude auth login
```
This opens a browser window to sign in with your Claude Max/Pro account. Once authenticated, credentials are stored at `~/.claude/.credentials.json`. The proxy reads from this file.
Verify it worked:
```bash
claude auth status
# Should show: loggedIn: true, subscriptionType: max (or pro)
```
## Quick Start
```bash
# 1. Clone
git clone https://github.com/zacdcook/openclaw-billing-proxy
cd openclaw-billing-proxy
# 2. Run setup (auto-detects your config)
node setup.js
# 3. Start the proxy
node proxy.js
# 4. Update OpenClaw config (see "OpenClaw Configuration" below)
# 5. Restart your OpenClaw gateway
```
## OpenClaw Configuration
Add or update the `models.providers.anthropic` section in `~/.openclaw/openclaw.json` to point at the proxy:
```json
{
"models": {
"providers": {
"anthropic": {
"baseUrl": "http://127.0.0.1:18801"
}
}
}
}
```
**Important notes:**
- The `baseUrl` field is the ONLY mechanism that routes OpenClaw traffic through the proxy. Environment variables like `ANTHROPIC_BASE_URL` do NOT control OpenClaw's routing.
- If you have a direct Anthropic API key in your auth profiles (`~/.openclaw/agents/*/agent/auth-profiles.json`), OpenClaw may prefer that over OAuth and bypass the proxy entirely. Remove or disable the API key auth profile to ensure all traffic goes through the proxy.
- After updating, restart your OpenClaw gateway for the changes to take effect.
- Run `node troubleshoot.js` to verify the proxy is working AND that OpenClaw is pointed at it.
### Rollback
To stop using the proxy, change `baseUrl` back to `https://api.anthropic.com` (or remove the `models.providers` section entirely) and restart the gateway.
## Proxy Configuration
The `config.json` file (generated by setup or created manually):
```json
{
"port": 18801,
"credentialsPath": "~/.claudeExcerpt of 14,048 characters
Read on GitHub33
1
1
1
1
Would you bet a product on this? Bounded 0–100 and slow moving.
matched fp:ab5958605f3a4410, llm:description: 'Route OpenClaw API requests through Claude Code subscription billing instead of Extra Usage' (JavaScript)