Serve the Anthropic Messages API (/v1/messages + count_tokens) on top of any OpenAI-compatible backend, so Anthropic clients such as Claude Code can use it. Built on padwan-ai's Anthropic↔OpenAI translation layer, served by granian via gravier.
export PADWAN_API_KEY=<YOUR_BACKEND_KEY>
uvx padwan-proxy --backend-url https://api.example.com/v1/ \
-m my-model --small-model my-small-model \
--claude-config ~/.claude-mybackend
CLAUDE_CONFIG_DIR=~/.claude-mybackend claudeOr without writing a config: ANTHROPIC_BASE_URL=http://127.0.0.1:4000 ANTHROPIC_AUTH_TOKEN=dummy claude.
Save the flags as a [mybackend] table in ~/.config/padwan-proxy/profiles.toml and run
padwan-proxy --profile mybackend instead; see Profiles.
Or with Docker, mounting the config dir at the same path so --claude-config writes it on the host:
mkdir -p ~/.claude-mybackend
docker run -d --rm --name padwan-proxy -p 127.0.0.1:4000:4000 \
--user "$(id -u):$(id -g)" -e PADWAN_API_KEY \
-v ~/.claude-mybackend:$HOME/.claude-mybackend \
ghcr.io/polarsen-io/padwan-proxy:latest \
--backend-url https://api.example.com/v1/ -m my-model --small-model my-small-model \
--claude-config $HOME/.claude-mybackend
CLAUDE_CONFIG_DIR=~/.claude-mybackend claudeA compose.yaml does the same from a .env; see the Docker docs.
Documentation: https://polarsen-io.github.io/padwan-proxy — routing, Docker
(ghcr.io/polarsen-io/padwan-proxy), tracing, tool approvals, and the full option reference.
uv sync --group dev
just ci # lint + type check + tests
just docs # serve the docs locally
