Skip to content

About

Anthropic-compatible proxy over OpenAI-compatible backends

Resources

Stars

1 star

Watchers

1 watching

Forks

Repository files navigation

Padwan Proxy

Padwan Proxy

CI Docker Release Docs

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.

Claude Code running GLM 5.2 on Scaleway through padwan-proxy

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 claude

Or 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 claude

A 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.

Development

uv sync --group dev
just ci    # lint + type check + tests
just docs  # serve the docs locally

About

Anthropic-compatible proxy over OpenAI-compatible backends

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages