claude-max-proxy-setupUse when an agent or developer wants to reduce Claude API costs, route requests through a Claude Max or Pro subscription instead of per-token billing, or set...
Install via ClawdBot CLI:
clawdbot install ERROR403agent/claude-max-proxy-setupReplace per-token Claude API billing ($15-75/M tokens) with a flat-rate proxy through your Claude Max ($200/mo) or Pro ($20/mo) subscription. The claude-max-api-proxy package exposes your authenticated Claude Code CLI session as an OpenAI-compatible HTTP endpoint on localhost:3456.
How it works: The proxy uses your already-authenticated claude CLI session to forward requests. No API keys are stored or transmitted by the proxy โ it relies on your local CLI login. Any OpenAI-compatible client (OpenClaw, LangChain, custom scripts) connects to localhost:3456.
Source code: github.com/atalovesyou/claude-max-api-proxy โ review the source before installing.
Do not use when:
claude CLI session, meaning anyone with access to port 3456 on your machine can make requests against your subscription# Verify Node.js 20+
node --version
# Verify Claude Code CLI is installed and authenticated
claude --version
claude --print "test" # Should return a response without errors
If claude is not authenticated, run claude login and complete the browser flow.
# Review the package source first: https://github.com/atalovesyou/claude-max-api-proxy
npm install -g claude-max-api-proxy
claude-max-api # Starts on localhost:3456 by default
# Verify:
curl http://localhost:3456/health
# => {"status":"ok","provider":"claude-code-cli",...}
For OpenClaw (~/.openclaw/openclaw.json):
{
"env": {
"OPENAI_API_KEY": "not-needed",
"OPENAI_BASE_URL": "http://localhost:3456/v1"
},
"models": {
"providers": {
"openai": {
"baseUrl": "http://localhost:3456/v1",
"apiKey": "not-needed",
"models": [
{ "id": "claude-opus-4", "name": "Claude Opus 4.6 (Max)", "contextWindow": 200000, "maxTokens": 16384 },
{ "id": "claude-sonnet-4", "name": "Claude Sonnet 4.6 (Max)", "contextWindow": 200000, "maxTokens": 16384 },
{ "id": "claude-haiku-4", "name": "Claude Haiku 4.5 (Max)", "contextWindow": 200000, "maxTokens": 8192 }
]
}
}
}
}
For any OpenAI-compatible client:
http://localhost:3456/v1claude-opus-4, claude-sonnet-4, claude-haiku-4# Create systemd user service
# Adjust paths below to match your system โ find yours with:
# which claude-max-api
# echo $HOME
mkdir -p ~/.config/systemd/user
cat > ~/.config/systemd/user/claude-max-api-proxy.service << EOF
[Unit]
Description=Claude Max API Proxy
After=network.target
[Service]
Type=simple
ExecStart=$(which claude-max-api)
Environment=HOME=$HOME
Environment=PATH=$HOME/.npm-global/bin:/usr/local/bin:/usr/bin:/bin
Restart=on-failure
RestartSec=5
[Install]
WantedBy=default.target
EOF
systemctl --user daemon-reload
systemctl --user enable claude-max-api-proxy
systemctl --user start claude-max-api-proxy
curl http://localhost:3456/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{"model":"claude-opus-4","messages":[{"role":"user","content":"Say: proxy working"}]}'
| Proxy Model ID | CLI Alias | Best For |
|---------------|-----------|----------|
| claude-opus-4 | opus | Complex reasoning, research, long-form |
| claude-sonnet-4 | sonnet | Fast + capable, most tasks |
| claude-haiku-4 | haiku | Simple tasks, high speed |
| Mistake | Fix |
|---------|-----|
| claude: command not found | npm install -g @anthropic-ai/claude-code |
| Proxy returns auth errors | Run claude login and complete browser auth |
| Rate limit errors with Max plan | Add "maxConcurrency": 1 to agent config; Max has limits |
| Config not taking effect | Restart your agent/client after changing config |
| Proxy dies on reboot | Set up systemd service (Step 4 above) |
| Setup | Monthly Cost |
|-------|-------------|
| Claude Opus 4.6 API (active agent) | $200-500+ |
| Claude Max + this proxy | $200 flat |
| Claude Pro + this proxy | $20 flat (lower rate limits) |
mltl hire --agent 18890)Generated Mar 1, 2026
A research lab uses Claude Opus for complex reasoning tasks, generating high API costs. By implementing this proxy with a Claude Max subscription, they replace per-token billing with a flat $200/month, saving hundreds while maintaining access to the latest models for experiments and paper drafting.
A tech startup building an AI-powered app prototype uses Claude Sonnet via LangChain for rapid iteration. With limited budget, they use this proxy through a Claude Pro subscription ($20/month) to avoid unpredictable API costs during development, enabling cost-effective testing before scaling.
A freelance writer uses Claude Haiku for generating and editing content drafts. By routing requests through this proxy with a Claude Pro plan, they eliminate per-token fees, making it affordable for high-volume writing tasks like blog posts and marketing copy without sacrificing speed.
An online learning platform integrates Claude Opus into its tutoring assistant via OpenClaw. Using this proxy with a Claude Max subscription, they provide advanced AI help to students at a fixed cost, avoiding variable billing that could disrupt budget planning for educational services.
A company automates internal reports and data analysis using Claude Sonnet through custom scripts. By deploying this proxy locally with a Claude Max plan, they centralize AI usage under a flat rate, reducing operational expenses compared to per-token API calls across departments.
Offer a managed service where clients pay a monthly fee to access the proxy setup, including maintenance and support. Revenue comes from subscription tiers, helping businesses reduce Claude API costs by leveraging flat-rate plans, with potential upsells for customization.
Provide consulting services to help organizations integrate the proxy into their existing AI workflows, such as configuring OpenClaw or LangChain. Revenue is generated through project-based fees or hourly rates, targeting clients who lack technical expertise but want cost savings.
Run an agency that deploys and manages AI agents using this proxy for clients, optimizing their Claude usage under flat subscriptions. Revenue streams include setup fees, ongoing management retainers, and performance-based pricing for cost reduction achieved.
๐ฌ Integration Tip
Ensure the Claude CLI is authenticated before starting the proxy, and always restrict port 3456 to localhost to prevent unauthorized access from external networks.
Extract text from PDFs with OCR support. Perfect for digitizing documents, processing invoices, or analyzing content. Zero dependencies required.
Fast local PDF parsing with PyMuPDF (fitz) for Markdown/JSON outputs and optional images/tables. Use when speed matters more than robustness, or as a fallback while heavier parsers are unavailable. Default to single-PDF parsing with per-document output folders.
Find, evaluate, and recommend ClawHub skills by need with quality filtering and preference learning.
Fetch full tweets, long tweets, quoted tweets, and X Articles from X/Twitter without login or API keys, using no dependencies and zero configuration.
Skill ๆฅๆพๅจ | Skill Finder. ๅธฎๅฉๅ็ฐๅๅฎ่ฃ ClawHub Skills | Discover and install ClawHub Skills. ๅ็ญ'ๆไปไนๆ่ฝๅฏไปฅX'ใ'ๆพไธไธชๆ่ฝ' | Answers 'what skill can X', 'find a skill'. ่งฆๅ...
Generate QR codes from text or URL for mobile scanning.