Skip to content

joaompfp/claude-max-proxy

Repository files navigation

claude-max-proxy

OpenAI-compatible + native Anthropic API proxy backed by a Claude Max subscription (OAuth).

Endpoints

Method Path Description
GET /health Liveness
GET /v1/models Model list
POST /v1/chat/completions OpenAI-compat (Claude CLI subprocess)
POST /v1/messages Anthropic Messages API (OAuth passthrough)
GET /auth/login Auth UI — browser login page
GET /auth/status JSON auth status
POST /auth/start Begin PKCE login → returns {url, state}
POST /auth/callback Complete login with {code, state}

Auth flow

When the token expires, browse to /auth/login:

  1. Click Generate Login URL — opens claude.com OAuth
  2. Log in and authorise Claude Code
  3. Anthropic redirects to platform.claude.com/oauth/code/callback which shows a one-time code
  4. Paste that code into the proxy UI → tokens written, cache busted, ready immediately

Docker

services:
  claude-max-proxy:
    build: .
    volumes:
      - /home/joao/.claude:/root/.claude   # OAuth credentials
    ports:
      - "8318:8318"

About

Claude Max subscription OAuth proxy — OpenAI + Anthropic API compatible

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors