Skip to main content
claude-max-api-proxy is a community npm package (not an OpenClaw plugin) that exposes a Claude Max/Pro subscription as an OpenAI-compatible API endpoint, so you can point any OpenAI-compatible tool at your subscription instead of an Anthropic API key.
Technical compatibility only, not an officially sanctioned path. Anthropic has blocked some subscription usage outside Claude Code in the past; verify Anthropic’s current billing rules before relying on this.Anthropic’s Claude Code docs describe claude -p as Agent SDK/programmatic usage. As of Anthropic’s June 15, 2026 support update, Claude Agent SDK, claude -p, and third-party app usage draw from the signed-in subscription’s usage limits (the previously announced separate Agent SDK credit plan is paused). See Anthropic’s Agent SDK plan article, the Pro/Max and Team/Enterprise plan articles, and Anthropic provider for OpenClaw’s own Claude CLI billing notes.

Why use this

This proxy lets a Claude Max or Pro subscription work with OpenAI-compatible tools. It is not an unlimited flat-rate path — it inherits Claude Code’s usage limits. API keys remain the clearer billing path for production use.

How it works

The proxy spawns the Claude Code CLI as a subprocess per request, converts OpenAI-format chat requests to CLI prompts, and streams (or returns) the response back in OpenAI format.

Getting started

1

Install the proxy

Requires Node.js 20+ and an authenticated Claude Code CLI.
2

Start the server

3

Test the proxy

4

Configure OpenClaw

Point OpenClaw at the proxy as a custom OpenAI-compatible endpoint:
The model ids below are the proxy’s own catalog, not OpenClaw’s Anthropic model refs. Each id maps to a Claude Code CLI model alias (opus, sonnet, haiku), so the underlying model shifts whenever Anthropic updates that alias in the CLI. Check the proxy’s current README before relying on a specific mapping.

Advanced configuration

This uses OpenClaw’s generic custom /v1 OpenAI-compatible route, the same path as any other self-hosted OpenAI-compatible backend:
  • Native OpenAI-only request shaping does not apply.
  • /fast and service_tier only apply to direct api.anthropic.com traffic; proxy routes leave service_tier untouched (see Anthropic provider fast mode).
  • No Responses store, prompt-cache hints, or OpenAI reasoning-compat payload shaping.
  • OpenClaw’s OpenAI/Codex attribution headers (originator, version, User-Agent) are only sent on native api.openai.com OAuth traffic, not on custom OPENAI_BASE_URL targets like this proxy.

Notes

  • Inherits Claude Code’s claude -p billing, usage-credit, and rate-limit behavior.
  • Binds to 127.0.0.1 only; does not send data to any third-party server beyond the CLI’s own call to Anthropic.
  • Streaming responses are supported.
  • Auth failures are not checked at startup and only surface once a chat request actually runs; if the CLI is unauthenticated, expect the first request to fail rather than the server to refuse to start.
For native Anthropic integration with Claude CLI or API keys, see Anthropic provider. For OpenAI/Codex subscriptions, see OpenAI provider.

Anthropic provider

Native OpenClaw integration with Claude CLI or API keys.

OpenAI provider

For OpenAI/Codex subscriptions.

Model selection

Overview of all providers, model refs, and failover behavior.

Configuration

Full config reference.