Why use this
| Approach | Cost route | Best for |
|---|---|---|
| Anthropic API key | Pay per token through Claude Console | Production apps, shared automation, volume |
| Claude subscription proxy | Claude Code / claude -p plan and credit rules | Personal experiments with compatible tools |
How it works
Getting started
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.| Model ID | CLI alias | Current mapping |
|---|---|---|
claude-opus-4 | opus | Claude Opus 4.5 |
claude-sonnet-4 | sonnet | Claude Sonnet 4 |
claude-haiku-4 | haiku | Claude Haiku 4 |
Advanced configuration
Proxy-style OpenAI-compatible notes
Proxy-style OpenAI-compatible notes
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.
/fastandservice_tieronly apply to directapi.anthropic.comtraffic; proxy routes leaveservice_tieruntouched (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 nativeapi.openai.comOAuth traffic, not on customOPENAI_BASE_URLtargets like this proxy.
Auto-start on macOS with LaunchAgent
Auto-start on macOS with LaunchAgent
Notes
- Inherits Claude Code’s
claude -pbilling, usage-credit, and rate-limit behavior. - Binds to
127.0.0.1only; 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.
Related
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.