Claude Max API Proxy (Community)

Community tool that exposes your Claude Max subscription ($200/month) as an OpenAI-compatible API endpoint. Wraps the Claude Code CLI to provide unlimited Claude Opus 4 and Sonnet 4 access at a flat monthly cost instead of per-token API pricing.

Claude Max API Proxy is a community-built tool that lets you use your Claude Max subscription ($200/month) with any OpenAI-compatible client — including OpenClaw. Instead of paying per-token API pricing (which can easily exceed $200/month for heavy Opus usage), you pay a flat subscription fee for effectively unlimited access to Claude models. The proxy works by wrapping the Claude Code CLI. When it receives an OpenAI-format API request at http://localhost:3456/v1/chat/completions, it translates the request into Claude Code CLI commands, executes them using your authenticated Claude subscription, and returns the response in OpenAI format. Streaming is fully supported. Available models include Claude Opus 4, Claude Sonnet 4, and Claude Haiku 4 — mapped through model IDs like claude-opus-4, claude-sonnet-4, and claude-haiku-4. The proxy requires Node.js 20+ and a pre-authenticated Claude Code CLI (you must be logged into your Claude Max subscription). For OpenClaw users with heavy Claude usage, this proxy can represent significant savings. Claude Opus 4 API pricing is approximately $15/M input tokens and $75/M output tokens. A heavy agentic workflow might consume 100M+ tokens per month, costing $1,000+ via API. With the Max subscription proxy at $200/month, you get flat-rate access regardless of usage volume. However, there are important caveats. This is a community tool, not officially supported by Anthropic. Anthropic has blocked some subscription usage outside Claude Code in the past, and the Terms of Service may restrict this type of use. The proxy runs locally (localhost:3456) and requires the Claude Code CLI to be installed and authenticated. It's a personal-use tool, not suitable for production multi-user deployments. Auto-start via macOS LaunchAgent is supported for convenience. Several similar tools exist in the ecosystem: anthropic-max-router, opencode-claude-max-proxy, and claude-code-proxy all take slightly different approaches to exposing the Max subscription as an API. The npm package name is claude-max-api-proxy, and the original repository is maintained by atalovesyou on GitHub.

Tags: community, proxy, subscription, openai-compatible, local, claude-max, flat-rate, unlimited, cli-wrapper

Use Cases

  • Heavy Claude users who want flat-rate pricing instead of per-token API costs
  • OpenClaw agents that heavily use Claude Opus for complex reasoning and tool use
  • Personal development environments where predictable monthly costs are preferred
  • Cost optimization for agentic workflows that consume 100M+ tokens/month
  • Using Claude models with OpenAI-compatible tools that don't natively support Anthropic API
  • Developers who already have Claude Max for Claude Code and want to extend it to OpenClaw

Tips

  • Set up a macOS LaunchAgent for auto-start so the proxy runs automatically on login. See the OpenClaw docs for the plist template.
  • Use claude-opus-4 for complex reasoning and claude-sonnet-4 for faster, lighter tasks — same models, same flat cost.
  • Run a health check (curl http://localhost:3456/health) to verify the proxy is running before configuring OpenClaw.
  • If you're spending more than $200/month on Claude API tokens, the Max subscription + proxy is almost certainly cheaper.
  • Keep the Claude Code CLI updated — proxy compatibility depends on the CLI version.
  • For the simplest setup, use the apiKey 'not-needed' and baseUrl 'http://localhost:3456/v1' in your OpenClaw config.
  • Consider running the proxy in a screen/tmux session or as a systemd service on Linux for reliability.

Known Issues & Gotchas

  • This is a COMMUNITY tool, not officially supported by Anthropic. Usage may violate Anthropic's Terms of Service — verify current terms before relying on it.
  • Anthropic has blocked some subscription usage outside Claude Code in the past. The proxy may stop working if Anthropic tightens restrictions.
  • Requires a Claude Max subscription ($200/month) — this is NOT a free tool. You're paying through your subscription.
  • Runs locally at localhost:3456. Not suitable for remote access or multi-user production deployments without additional networking.
  • The Claude Code CLI must be installed and authenticated before the proxy works. If your CLI session expires, the proxy stops working.
  • Latency is higher than direct API — requests go through the CLI wrapper, adding overhead per request.
  • The original GitHub repo URL has changed over time. Install via npm (npm install -g claude-max-api-proxy) for the latest version.
  • OpenClaw config structure changes can break the proxy setup. Check docs.openclaw.ai for current configuration format.

Alternatives

  • Anthropic API (direct)
  • GitHub Copilot
  • anthropic-max-router
  • Venice AI (Anonymized Claude)

Community Feedback

I built a small workaround — a lightweight proxy that lets Claude Code talk directly to the Claude models inside your subscription. Uses your Max plan so no separate API costs.

— Reddit r/developersIndia

I've been running into various errors setting up the configuration. The latest OpenClaw update overhauled the config structure, which broke my claude-max-api-proxy setup.

— OpenClaw Discord

The npm package name is unchanged (claude-max-api-proxy), so install instructions remain the same. Historical references may point to abandoned repo URLs.

— GitHub Issues

Frequently Asked Questions

Is the Claude Max API Proxy officially supported by Anthropic?

No. This is a community-built tool that wraps the Claude Code CLI. Anthropic has not officially endorsed this usage and has blocked similar approaches in the past. Use at your own risk and verify current Terms of Service.

How much does it cost to use the proxy?

The proxy software is free. But it requires a Claude Max subscription at $200/month (or Claude Pro at $20/month with limited usage). You're paying Anthropic for the subscription; the proxy just exposes it as an API endpoint.

Is the proxy worth it vs direct API?

If you spend more than $200/month on Claude API tokens, yes. Claude Opus 4 costs ~$15/M input and $75/M output tokens on the API. Heavy agentic workflows can easily exceed $200/month in API costs, making the flat-rate subscription more economical.

Can I use the proxy remotely or is it localhost only?

By default it runs at localhost:3456, serving only local requests. For remote access, you'd need to set up port forwarding, a reverse proxy, or similar networking — but this is not recommended for security reasons.

What happens if the Claude Code CLI session expires?

The proxy will stop working until you re-authenticate the CLI. Run 'claude --version' to check status and re-login if needed. Setting up a LaunchAgent (macOS) helps with auto-restart but won't fix expired auth.

Does the proxy support thinking/extended thinking?

The proxy supports what Claude Code CLI supports, including tool use, streaming, and vision. Extended thinking support depends on the CLI version and Claude's subscription features. Check the latest proxy release notes.

Configuration Examples

Basic Claude Max Proxy setup

providers:
  claude-max-api-proxy:
    apiKey: not-needed
    baseUrl: http://localhost:3456/v1
    model: claude-max-api-proxy/claude-opus-4

Max Proxy as primary with API fallback

providers:
  claude-max-api-proxy:
    apiKey: not-needed
    baseUrl: http://localhost:3456/v1
    model: claude-max-api-proxy/claude-opus-4
  anthropic:
    apiKey: sk-ant-xxxxx
    model: anthropic/claude-sonnet-4-6
    # Fallback if proxy is down

OpenClaw env-based config

env:
  OPENAI_API_KEY: not-needed
  OPENAI_BASE_URL: http://localhost:3456/v1
agents:
  defaults:
    model:
      primary: openai/claude-opus-4