Skip to main content

Claude OpenAI Proxy

A thin Python proxy that wraps the Anthropic Vertex AI SDK and exposes an OpenAI-compatible /v1/chat/completions API.

Requests are translated from the OpenAI message format to the Anthropic format, sent to Claude via the Vertex AI API, and the responses are converted back to OpenAI-compatible JSON (or SSE for streaming).

Prerequisites

  • Python 3.11+
  • A Google Cloud project with the Anthropic Vertex AI API enabled
  • Google Cloud credentials configured (e.g. gcloud auth application-default login)

Install

pip install --user claude-openai-proxy

Make sure ~/.local/bin is in your PATH.

More options (uv tool, pipx, from source) are covered in the installation guide.

Run

claude-openai-proxy                          # localhost:1234
HOST=0.0.0.0 PORT=5000 claude-openai-proxy   # all interfaces, custom port

Endpoints

Method Path Description
GET /health Health check
GET /v1/models List available Claude models
POST /v1/chat/completions Chat completions (streaming + sync)

Development

uv sync --group dev

Lint

uv run ruff check .          # check for issues
uv run ruff check --fix .    # auto-fix issues

Format

uv run ruff format .         # format all files
uv run ruff format --check . # check without writing

Test

uv run pytest               # run all tests
uv run pytest -v            # verbose output

Environment Variables

Variable Default Description
HOST 127.0.0.1 Server listen address
PORT 1234 Server listen port
LOG_LEVEL INFO Python logging level
MAX_TOKENS 8192 Default max tokens per response
ANTHROPIC_TIMEOUT 600 Request timeout in seconds for the Anthropic SDK
CLOUD_ML_REGION — Google Cloud region (e.g. us-east5)
ANTHROPIC_VERTEX_PROJECT_ID — Google Cloud project ID

Metadata

Release files for claude-openai-proxy 0.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for claude-openai-proxy 0.1.5
File Size Uploaded Provenance
claude_openai_proxy-0.1.5.tar.gz 88.8 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for claude-openai-proxy 0.1.5
File Interpreter ABI Platform
claude_openai_proxy-0.1.5-py3-none-any.whl Python 3 none any Details

Total release size: 105.8 kB

Release files / claude_openai_proxy-0.1.5.tar.gz

Download URL claude_openai_proxy-0.1.5.tar.gz
Size 88.8 kB
Tags Source
SHA-256 checksum
How to use checksums
6c2d99d9d47a4fc35c27ab2487a70635339a9152eb506a1e1980ecce19585929
BLAKE2b-256 checksum
How to use checksums
b2d004e71c21fef4497601b6d3309ab58ec6da6a53d85ade28fa7c73e81a5d6a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.10.10 {"installer":{"name":"uv","version":"0.10.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / claude_openai_proxy-0.1.5-py3-none-any.whl

Download URL claude_openai_proxy-0.1.5-py3-none-any.whl
Size 16.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1af06650f4cbaf69e81160d6eb1058f24573929599121f926220d0b88522573c
BLAKE2b-256 checksum
How to use checksums
aaddd6e129402440fb9c26bcd2ed485995e331dffdc2cc69431bbe0d4b502619
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.10.10 {"installer":{"name":"uv","version":"0.10.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for claude-openai-proxy 0.1.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page